summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-09-07 09:01:48 -0400
committerBen Gamari <ben@smart-cactus.org>2019-09-07 09:29:58 -0400
commit2d3983e0f6c8a882224020eb18cd30333353e648 (patch)
tree7cbb3b9180d8d2b9d5772f22ea81bfc0790af070
parentc3f50dc24361d08e10071cb26f55e413ef723351 (diff)
downloadhaskell-wip/test-no-32bit.tar.gz
Instr: Eliminate 32-bitwip/test-no-32bit
-rw-r--r--compiler/nativeGen/X86/CodeGen.hs2
-rw-r--r--compiler/nativeGen/X86/Instr.hs7
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