X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FnativeGen%2FStixPrim.lhs;fp=ghc%2Fcompiler%2FnativeGen%2FStixPrim.lhs;h=d1edcc022c1c7d74a258aa4af90b0bbadae6e545;hb=2129fa6fc4afd7f7b0c767f8c0c14b9ab5508ec2;hp=1e9f0292b73d1645b57afdbb94244689e9b42d4c;hpb=ce42f19f8c840fbe89844471a0d850d310a94556;p=ghc-hetmet.git diff --git a/ghc/compiler/nativeGen/StixPrim.lhs b/ghc/compiler/nativeGen/StixPrim.lhs index 1e9f029..d1edcc0 100644 --- a/ghc/compiler/nativeGen/StixPrim.lhs +++ b/ghc/compiler/nativeGen/StixPrim.lhs @@ -50,14 +50,11 @@ foreignCallCode %* * %************************************************************************ -First, the dreaded @ccall@. We can't handle @casm@s. +First, the dreaded @ccall@. Usually, this compiles to an assignment, but when the left-hand side is empty, we just perform the call and ignore the result. -btw Why not let programmer use casm to provide assembly code instead -of C code? ADR - ToDo: saving/restoring of volatile regs around ccalls. JRS, 001113: always do the call of suspendThread and resumeThread as a ccall @@ -96,9 +93,6 @@ foreignCallCode lhs call@(CCall (CCallSpec ctarget cconv safety)) rhs StaticTarget nm -> (rhs, Left nm) DynamicTarget | notNull rhs -- an assertion -> (tail rhs, Right (amodeToStix (head rhs))) - CasmTarget _ - -> ncgPrimopMoan "Native code generator can't handle foreign call" - (ppr call) stix_args = map amodeToStix' cargs @@ -187,7 +181,6 @@ amodeToStix (CLit core) MachNullAddr -> StInt 0 MachInt i -> StInt i MachWord w -> case word2IntLit core of MachInt iw -> StInt iw - MachLitLit s _ -> litLitErr -- dreadful, but rare. MachLabel l (Just x) -> StCLbl (mkForeignLabel (mkFastString (unpackFS l ++ '@':show x)) False) MachLabel l _ -> StCLbl (mkForeignLabel l False{-ToDo: dynamic-}) @@ -221,9 +214,6 @@ amodeToStix (CMacroExpr _ macro [arg]) amodeToStix other = pprPanic "StixPrim.amodeToStix" (pprAmode other) - -litLitErr - = ncgPrimopMoan "native code generator can't handle lit-lits" empty \end{code} Sizes of the CharLike and IntLike closures that are arranged as arrays