From dcab96f951d193fd577e25c10358501810db8a93 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 3 Mar 2006 13:31:35 +0000 Subject: [PATCH] callerSaveVolatileRegs: fix the Nothing case When the volatile regs attached to a CmmCall is Nothing, it means "save everything", not "save nothing". --- ghc/compiler/nativeGen/MachRegs.lhs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/nativeGen/MachRegs.lhs b/ghc/compiler/nativeGen/MachRegs.lhs index ef3086b..bffb723 100644 --- a/ghc/compiler/nativeGen/MachRegs.lhs +++ b/ghc/compiler/nativeGen/MachRegs.lhs @@ -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 = -- 1.7.10.4