Commit a6f9b43a authored by simonmar's avatar simonmar
Browse files

[project @ 2005-04-11 09:50:18 by simonmar]

Fix i386 breakage
parent 29c47f24
...@@ -1996,12 +1996,14 @@ getAmode other ...@@ -1996,12 +1996,14 @@ getAmode other
#if i386_TARGET_ARCH || x86_64_TARGET_ARCH #if i386_TARGET_ARCH || x86_64_TARGET_ARCH
getNonClobberedOperand :: CmmExpr -> NatM (Operand, InstrBlock) getNonClobberedOperand :: CmmExpr -> NatM (Operand, InstrBlock)
#if x86_64_TARGET_ARCH
getNonClobberedOperand (CmmLit lit) getNonClobberedOperand (CmmLit lit)
| isSuitableFloatingPointLit lit = do | isSuitableFloatingPointLit lit = do
lbl <- getNewLabelNat lbl <- getNewLabelNat
let code = unitOL (LDATA ReadOnlyData [CmmDataLabel lbl, let code = unitOL (LDATA ReadOnlyData [CmmDataLabel lbl,
CmmStaticLit lit]) CmmStaticLit lit])
return (OpAddr (ripRel (ImmCLbl lbl)), code) return (OpAddr (ripRel (ImmCLbl lbl)), code)
#endif
getNonClobberedOperand (CmmLit lit) getNonClobberedOperand (CmmLit lit)
| not (is64BitLit lit) && not (isFloatingRep (cmmLitRep lit)) = | not (is64BitLit lit) && not (isFloatingRep (cmmLitRep lit)) =
return (OpImm (litToImm lit), nilOL) return (OpImm (litToImm lit), nilOL)
...@@ -2030,12 +2032,14 @@ regClobbered _ = False ...@@ -2030,12 +2032,14 @@ regClobbered _ = False
-- getOperand: the operand is not required to remain valid across the -- getOperand: the operand is not required to remain valid across the
-- computation of an arbitrary expression. -- computation of an arbitrary expression.
getOperand :: CmmExpr -> NatM (Operand, InstrBlock) getOperand :: CmmExpr -> NatM (Operand, InstrBlock)
#if x86_64_TARGET_ARCH
getOperand (CmmLit lit) getOperand (CmmLit lit)
| isSuitableFloatingPointLit lit = do | isSuitableFloatingPointLit lit = do
lbl <- getNewLabelNat lbl <- getNewLabelNat
let code = unitOL (LDATA ReadOnlyData [CmmDataLabel lbl, let code = unitOL (LDATA ReadOnlyData [CmmDataLabel lbl,
CmmStaticLit lit]) CmmStaticLit lit])
return (OpAddr (ripRel (ImmCLbl lbl)), code) return (OpAddr (ripRel (ImmCLbl lbl)), code)
#endif
getOperand (CmmLit lit) getOperand (CmmLit lit)
| not (is64BitLit lit) && not (isFloatingRep (cmmLitRep lit)) = do | not (is64BitLit lit) && not (isFloatingRep (cmmLitRep lit)) = do
return (OpImm (litToImm lit), nilOL) return (OpImm (litToImm lit), nilOL)
......
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