Skip to content
Snippets Groups Projects
Commit bab58579 authored by amesgen's avatar amesgen Committed by Cheng Shao
Browse files

compiler: handle CmmRegOff in lower_CmmExpr_Ptr

(cherry picked from commit def46c8c)
parent 0c5b3314
No related branches found
No related tags found
No related merge requests found
...@@ -1003,6 +1003,8 @@ lower_CmmExpr_Ptr lbl ptr = do ...@@ -1003,6 +1003,8 @@ lower_CmmExpr_Ptr lbl ptr = do
let (ptr', o) = case ptr of let (ptr', o) = case ptr of
CmmLit (CmmLabelOff lbl o) CmmLit (CmmLabelOff lbl o)
| o >= 0 -> (CmmLit $ CmmLabel lbl, o) | o >= 0 -> (CmmLit $ CmmLabel lbl, o)
CmmRegOff reg o
| o >= 0 -> (CmmReg reg, o)
CmmMachOp (MO_Add _) [base, CmmLit (CmmInt o _)] CmmMachOp (MO_Add _) [base, CmmLit (CmmInt o _)]
| o >= 0 -> (base, fromInteger o) | o >= 0 -> (base, fromInteger o)
_ -> (ptr, 0) _ -> (ptr, 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment