diff options
| author | Simon Marlow <simonmar@microsoft.com> | 2006-03-03 13:31:35 +0000 |
|---|---|---|
| committer | Simon Marlow <simonmar@microsoft.com> | 2006-03-03 13:31:35 +0000 |
| commit | dcab96f951d193fd577e25c10358501810db8a93 (patch) | |
| tree | 105d3369cf679a2ccfcaf9205f27b2f9635408a8 | |
| parent | 0fcf892d28f9d70770717352019bd6a98b3b4651 (diff) | |
| download | haskell-dcab96f951d193fd577e25c10358501810db8a93.tar.gz | |
callerSaveVolatileRegs: fix the Nothing case
When the volatile regs attached to a CmmCall is Nothing, it means
"save everything", not "save nothing".
| -rw-r--r-- | ghc/compiler/nativeGen/MachRegs.lhs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ghc/compiler/nativeGen/MachRegs.lhs b/ghc/compiler/nativeGen/MachRegs.lhs index ef3086bbc3..bffb723d1b 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 = |
