Commit dcab96f9 authored by Simon Marlow's avatar Simon Marlow
Browse files

callerSaveVolatileRegs: fix the Nothing case

When the volatile regs attached to a CmmCall is Nothing, it means
"save everything", not "save nothing".
parent 0fcf892d
......@@ -359,7 +359,12 @@ callerSaveVolatileRegs vols = (caller_save, caller_load)
regs_to_save = system_regs ++ vol_list
vol_list = case vols of Nothing -> []; Just regs -> regs
vol_list = case vols of Nothing -> all_of_em; Just regs -> regs
all_of_em = [ VanillaReg n | n <- [0..mAX_Vanilla_REG] ]
++ [ FloatReg n | n <- [0..mAX_Float_REG] ]
++ [ DoubleReg n | n <- [0..mAX_Double_REG] ]
++ [ LongReg n | n <- [0..mAX_Long_REG] ]
callerSaveGlobalReg reg next
| callerSaves reg =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment