import OrdList ( OrdList, nilOL, isNilOL, unitOL, appOL, toOL,
snocOL, consOL, concatOL )
import AbsCUtils ( magicIdPrimRep )
-import CallConv ( CallConv )
+import ForeignCall ( CCallConv(..) )
import CLabel ( isAsmTemp, CLabel, labelDynamic )
import Maybes ( maybeToBool, expectJust )
import PrimRep ( isFloatingRep, PrimRep(..) )
import PrimOp ( PrimOp(..) )
-import CallConv ( cCallConv, stdCallConv )
import Stix ( getNatLabelNCG, StixTree(..),
StixReg(..), CodeSegment(..),
DestInfo, hasDestInfo,
Double2FloatOp -> coerceFltCode x
Float2DoubleOp -> coerceFltCode x
- other_op -> getRegister (StCall fn cCallConv DoubleRep [x])
+ other_op -> getRegister (StCall fn CCallConv DoubleRep [x])
where
fn = case other_op of
FloatExpOp -> SLIT("exp")
ISraOp -> trivialCode SRA x y -- was: panic "AlphaGen:isra"
ISrlOp -> trivialCode SRL x y -- was: panic "AlphaGen:isrl"
- FloatPowerOp -> getRegister (StCall SLIT("pow") cCallConv DoubleRep [x,y])
- DoublePowerOp -> getRegister (StCall SLIT("pow") cCallConv DoubleRep [x,y])
+ FloatPowerOp -> getRegister (StCall SLIT("pow") CCallConv DoubleRep [x,y])
+ DoublePowerOp -> getRegister (StCall SLIT("pow") CCallConv DoubleRep [x,y])
where
{- ------------------------------------------------------------
Some bizarre special code for getting condition codes into
Int2DoubleOp -> coerceInt2FP DoubleRep x
other_op ->
- getRegister (StCall fn cCallConv DoubleRep [x])
+ getRegister (StCall fn CCallConv DoubleRep [x])
where
(is_float_op, fn)
= case primop of
ISraOp -> shift_code (SAR L) x y {-False-}
ISrlOp -> shift_code (SHR L) x y {-False-}
- FloatPowerOp -> getRegister (StCall SLIT("pow") cCallConv DoubleRep
+ FloatPowerOp -> getRegister (StCall SLIT("pow") CCallConv DoubleRep
[promote x, promote y])
where promote x = StPrim Float2DoubleOp [x]
- DoublePowerOp -> getRegister (StCall SLIT("pow") cCallConv DoubleRep
+ DoublePowerOp -> getRegister (StCall SLIT("pow") CCallConv DoubleRep
[x, y])
other
-> pprPanic "getRegister(x86,dyadic primop)"
then StPrim Float2DoubleOp [x]
else x
in
- getRegister (StCall fn cCallConv DoubleRep [fixed_x])
+ getRegister (StCall fn CCallConv DoubleRep [fixed_x])
where
(is_float_op, fn)
= case primop of
ISraOp -> trivialCode SRA x y
ISrlOp -> trivialCode SRL x y
- FloatPowerOp -> getRegister (StCall SLIT("pow") cCallConv DoubleRep
+ FloatPowerOp -> getRegister (StCall SLIT("pow") CCallConv DoubleRep
[promote x, promote y])
where promote x = StPrim Float2DoubleOp [x]
- DoublePowerOp -> getRegister (StCall SLIT("pow") cCallConv DoubleRep
+ DoublePowerOp -> getRegister (StCall SLIT("pow") CCallConv DoubleRep
[x, y])
other
(pprStixTree (StPrim primop [x, y]))
where
- imul_div fn x y = getRegister (StCall fn cCallConv IntRep [x, y])
+ imul_div fn x y = getRegister (StCall fn CCallConv IntRep [x, y])
getRegister (StInd pk mem)
= getAmode mem `thenNat` \ amode ->
call = toOL (
[CALL (fn__2 tot_arg_size)]
++
- (if cconv == stdCallConv then [] else
+ (if cconv == StdCallConv then [] else
[ADD L (OpImm (ImmInt tot_arg_size)) (OpReg esp)])
++
[DELTA (delta + tot_arg_size)]
= ImmLab False (text (fn_u ++ stdcallsize tot_arg_size))
stdcallsize tot_arg_size
- | cconv == stdCallConv = '@':show tot_arg_size
+ | cconv == StdCallConv = '@':show tot_arg_size
| otherwise = ""
arg_size DF = 8