diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-09-07 09:01:48 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-09-07 09:29:58 -0400 |
commit | 2d3983e0f6c8a882224020eb18cd30333353e648 (patch) | |
tree | 7cbb3b9180d8d2b9d5772f22ea81bfc0790af070 | |
parent | c3f50dc24361d08e10071cb26f55e413ef723351 (diff) | |
download | haskell-wip/test-no-32bit.tar.gz |
Instr: Eliminate 32-bitwip/test-no-32bit
-rw-r--r-- | compiler/nativeGen/X86/CodeGen.hs | 2 | ||||
-rw-r--r-- | compiler/nativeGen/X86/Instr.hs | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs index ad2727df5d..6954ed2425 100644 --- a/compiler/nativeGen/X86/CodeGen.hs +++ b/compiler/nativeGen/X86/CodeGen.hs @@ -527,7 +527,7 @@ getRegister' dflags _is32Bit (CmmReg reg) nilOL) getRegister' dflags _is32Bit (CmmRegOff r n) - = getRegister' dflags $ mangleIndexTree dflags r n + = getRegister' dflags is32Bit $ mangleIndexTree dflags r n getRegister' dflags _is32Bit (CmmMachOp (MO_AlignmentCheck align _) [e]) = addAlignmentCheck align <$> getRegister' dflags is32Bit e diff --git a/compiler/nativeGen/X86/Instr.hs b/compiler/nativeGen/X86/Instr.hs index 6e5d656beb..e4f094e8b8 100644 --- a/compiler/nativeGen/X86/Instr.hs +++ b/compiler/nativeGen/X86/Instr.hs @@ -47,10 +47,12 @@ import Debug (UnwindTable) import Control.Monad import Data.Maybe (fromMaybe) +is32Bit = False + -- Format of an x86/x86_64 memory address, in bytes. -- archWordFormat :: Bool -> Format -archWordFormat is32Bit +archWordFormat _is32Bit | is32Bit = II32 | otherwise = II64 @@ -672,7 +674,6 @@ x86_mkSpillInstr dflags reg delta slot RcDouble -> MOV FF64 (OpReg reg) (OpAddr (spRel dflags off)) _ -> panic "X86.mkSpillInstr: no match" where platform = targetPlatform dflags - is32Bit = target32Bit platform -- | Make a spill reload instruction. x86_mkLoadInstr @@ -691,11 +692,9 @@ x86_mkLoadInstr dflags reg delta slot RcDouble -> MOV FF64 (OpAddr (spRel dflags off)) (OpReg reg) _ -> panic "X86.x86_mkLoadInstr" where platform = targetPlatform dflags - is32Bit = target32Bit platform spillSlotSize :: Platform -> Int spillSlotSize dflags = if is32Bit then 12 else 8 - where is32Bit = target32Bit dflags maxSpillSlots :: DynFlags -> Int maxSpillSlots dflags |