[project @ 2004-09-07 10:10:07 by simonmar]
[ghc-hetmet.git] / ghc / compiler / ghci / ByteCodeAsm.lhs
index 53340e7..5067aea 100644 (file)
@@ -26,10 +26,9 @@ import FiniteMap     ( addToFM, lookupFM, emptyFM )
 import Literal         ( Literal(..) )
 import TyCon           ( TyCon )
 import PrimOp          ( PrimOp )
-import PrimRep         ( PrimRep(..), isFollowableRep, is64BitRep )
 import Constants       ( wORD_SIZE )
 import FastString      ( FastString(..) )
-import SMRep           ( StgWord )
+import SMRep           ( CgRep(..), StgWord )
 import FiniteMap
 import Outputable
 
@@ -250,7 +249,6 @@ mkBits findLabel st proto_insns
               PUSH_APPLY_PPPP      -> do instr1 st bci_PUSH_APPLY_PPPP
               PUSH_APPLY_PPPPP     -> do instr1 st bci_PUSH_APPLY_PPPPP
               PUSH_APPLY_PPPPPP    -> do instr1 st bci_PUSH_APPLY_PPPPPP
-              PUSH_APPLY_PPPPPPP   -> do instr1 st bci_PUSH_APPLY_PPPPPPP
 
                SLIDE     n by     -> instr3 st bci_SLIDE n by
                ALLOC_AP  n        -> instr2 st bci_ALLOC_AP n
@@ -356,27 +354,19 @@ mkBits findLabel st proto_insns
        literal st other            = pprPanic "ByteCodeLink.literal" (ppr other)
 
 
-push_alts WordRep   = bci_PUSH_ALTS_N
-push_alts IntRep    = bci_PUSH_ALTS_N
-push_alts AddrRep   = bci_PUSH_ALTS_N
-push_alts CharRep   = bci_PUSH_ALTS_N
-push_alts FloatRep  = bci_PUSH_ALTS_F
-push_alts DoubleRep = bci_PUSH_ALTS_D
-push_alts VoidRep   = bci_PUSH_ALTS_V
-push_alts pk
- | is64BitRep pk      = bci_PUSH_ALTS_L
- | isFollowableRep pk = bci_PUSH_ALTS_P
-
-return_ubx WordRep   = bci_RETURN_N
-return_ubx IntRep    = bci_RETURN_N
-return_ubx AddrRep   = bci_RETURN_N
-return_ubx CharRep   = bci_RETURN_N
-return_ubx FloatRep  = bci_RETURN_F
-return_ubx DoubleRep = bci_RETURN_D
-return_ubx VoidRep   = bci_RETURN_V
-return_ubx pk
- | is64BitRep pk      = bci_RETURN_L
- | isFollowableRep pk = bci_RETURN_P
+push_alts NonPtrArg = bci_PUSH_ALTS_N
+push_alts FloatArg  = bci_PUSH_ALTS_F
+push_alts DoubleArg = bci_PUSH_ALTS_D
+push_alts VoidArg   = bci_PUSH_ALTS_V
+push_alts LongArg   = bci_PUSH_ALTS_L
+push_alts PtrArg    = bci_PUSH_ALTS_P
+
+return_ubx NonPtrArg = bci_RETURN_N
+return_ubx FloatArg  = bci_RETURN_F
+return_ubx DoubleArg = bci_RETURN_D
+return_ubx VoidArg   = bci_RETURN_V
+return_ubx LongArg   = bci_RETURN_L
+return_ubx PtrArg    = bci_RETURN_P
 
 
 -- The size in 16-bit entities of an instruction.
@@ -404,7 +394,6 @@ instrSize16s instr
        PUSH_APPLY_PPPP{}       -> 1
        PUSH_APPLY_PPPPP{}      -> 1
        PUSH_APPLY_PPPPPP{}     -> 1
-       PUSH_APPLY_PPPPPPP{}    -> 1
         SLIDE{}                        -> 3
         ALLOC_AP{}             -> 2
         ALLOC_PAP{}            -> 3