From a6f9b43aa7e032e97725b09efff2241181ebbc94 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 11 Apr 2005 09:50:18 +0000 Subject: [PATCH] [project @ 2005-04-11 09:50:18 by simonmar] Fix i386 breakage --- ghc/compiler/nativeGen/MachCodeGen.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ghc/compiler/nativeGen/MachCodeGen.hs b/ghc/compiler/nativeGen/MachCodeGen.hs index d911c24..4fda4ee 100644 --- a/ghc/compiler/nativeGen/MachCodeGen.hs +++ b/ghc/compiler/nativeGen/MachCodeGen.hs @@ -1996,12 +1996,14 @@ getAmode other #if i386_TARGET_ARCH || x86_64_TARGET_ARCH getNonClobberedOperand :: CmmExpr -> NatM (Operand, InstrBlock) +#if x86_64_TARGET_ARCH getNonClobberedOperand (CmmLit lit) | isSuitableFloatingPointLit lit = do lbl <- getNewLabelNat let code = unitOL (LDATA ReadOnlyData [CmmDataLabel lbl, CmmStaticLit lit]) return (OpAddr (ripRel (ImmCLbl lbl)), code) +#endif getNonClobberedOperand (CmmLit lit) | not (is64BitLit lit) && not (isFloatingRep (cmmLitRep lit)) = return (OpImm (litToImm lit), nilOL) @@ -2030,12 +2032,14 @@ regClobbered _ = False -- getOperand: the operand is not required to remain valid across the -- computation of an arbitrary expression. getOperand :: CmmExpr -> NatM (Operand, InstrBlock) +#if x86_64_TARGET_ARCH getOperand (CmmLit lit) | isSuitableFloatingPointLit lit = do lbl <- getNewLabelNat let code = unitOL (LDATA ReadOnlyData [CmmDataLabel lbl, CmmStaticLit lit]) return (OpAddr (ripRel (ImmCLbl lbl)), code) +#endif getOperand (CmmLit lit) | not (is64BitLit lit) && not (isFloatingRep (cmmLitRep lit)) = do return (OpImm (litToImm lit), nilOL) -- 1.7.10.4