Commit 341aa591 authored by Peter Trommler's avatar Peter Trommler 🥁 Committed by Ben Gamari

PPC NCG: Register definitions for all 64-bit systems

parent 9477bf59
...@@ -229,11 +229,8 @@ allArgRegs = map regSingle [3..10] ...@@ -229,11 +229,8 @@ allArgRegs = map regSingle [3..10]
-- these are the regs which we cannot assume stay alive over a C call. -- these are the regs which we cannot assume stay alive over a C call.
callClobberedRegs :: Platform -> [Reg] callClobberedRegs :: Platform -> [Reg]
callClobberedRegs platform callClobberedRegs _platform
= case platformOS platform of = map regSingle (0:[2..12] ++ map fReg [0..13])
OSAIX -> map regSingle (0:[2..12] ++ map fReg [0..13])
OSLinux -> map regSingle (0:[2..13] ++ map fReg [0..13])
_ -> panic "PPC.Regs.callClobberedRegs: not defined for this architecture"
allMachRegNos :: [RegNo] allMachRegNos :: [RegNo]
...@@ -263,11 +260,10 @@ allFPArgRegs :: Platform -> [Reg] ...@@ -263,11 +260,10 @@ allFPArgRegs :: Platform -> [Reg]
allFPArgRegs platform allFPArgRegs platform
= case platformOS platform of = case platformOS platform of
OSAIX -> map (regSingle . fReg) [1..13] OSAIX -> map (regSingle . fReg) [1..13]
OSLinux -> case platformArch platform of _ -> case platformArch platform of
ArchPPC -> map (regSingle . fReg) [1..8] ArchPPC -> map (regSingle . fReg) [1..8]
ArchPPC_64 _ -> map (regSingle . fReg) [1..13] ArchPPC_64 _ -> map (regSingle . fReg) [1..13]
_ -> panic "PPC.Regs.allFPArgRegs: unknown PPC Linux" _ -> panic "PPC.Regs.allFPArgRegs: unknown PPC Linux"
_ -> panic "PPC.Regs.allFPArgRegs: not defined for this architecture"
fits16Bits :: Integral a => a -> Bool fits16Bits :: Integral a => a -> Bool
fits16Bits x = x >= -32768 && x < 32768 fits16Bits x = x >= -32768 && x < 32768
......
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