Commit 276ff6e8 authored by sewardj's avatar sewardj
Browse files

[project @ 2001-04-27 15:39:18 by sewardj]

merge rev 1.69.2.1, which was:
Remove x86-specific implementation of {intToInt,wordToWord}{8,16,32}#
primops, and replace them with platform-independent versions expressed
purely in Stix terms.
parent b9f1b9ef
......@@ -671,13 +671,6 @@ getRegister (StPrim primop [x]) -- unary PrimOps
Double2IntOp -> coerceFP2Int x
Int2DoubleOp -> coerceInt2FP DoubleRep x
IntToInt8Op -> extendIntCode Int8Rep IntRep x
IntToInt16Op -> extendIntCode Int16Rep IntRep x
IntToInt32Op -> getRegister x
WordToWord8Op -> extendIntCode Word8Rep WordRep x
WordToWord16Op -> extendIntCode Word16Rep WordRep x
WordToWord32Op -> getRegister x
other_op ->
getRegister (StCall fn cCallConv DoubleRep [x])
where
......@@ -3264,20 +3257,6 @@ coerceFP2Int x
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#if i386_TARGET_ARCH
extendIntCode :: PrimRep -> PrimRep -> StixTree -> NatM Register
extendIntCode pks pkd x
= coerceIntCode pks x `thenNat` \ register ->
getNewRegNCG pks `thenNat` \ reg ->
let
code = registerCode register reg
src = registerName register reg
opc = case pkd of IntRep -> MOVSxL ; WordRep -> MOVZxL
sz = primRepToSize pks
code__2 dst = code `snocOL` opc sz (OpReg src) (OpReg dst)
in
returnNat (Any pkd code__2)
------------
coerceInt2FP pk x
= getRegister x `thenNat` \ register ->
getNewRegNCG IntRep `thenNat` \ reg ->
......
Supports Markdown
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