diff options
| author | wolfgang.thaller@gmx.net <unknown> | 2006-02-05 16:24:53 +0000 |
|---|---|---|
| committer | wolfgang.thaller@gmx.net <unknown> | 2006-02-05 16:24:53 +0000 |
| commit | cebb894ad0c952c78de4774ddd3b71477d0f2327 (patch) | |
| tree | 4791353d029a20e1c1a67dbadc360ac94bc9e2aa | |
| parent | e43eaee702b32ea8a89911484d2abe45d4f3f98e (diff) | |
| download | haskell-cebb894ad0c952c78de4774ddd3b71477d0f2327.tar.gz | |
Darwin/x86: Print 64-bit literals in a way Apple understands.
| -rw-r--r-- | ghc/compiler/nativeGen/PprMach.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ghc/compiler/nativeGen/PprMach.hs b/ghc/compiler/nativeGen/PprMach.hs index 4392ae737b..afa5bcd872 100644 --- a/ghc/compiler/nativeGen/PprMach.hs +++ b/ghc/compiler/nativeGen/PprMach.hs @@ -50,7 +50,7 @@ import MONAD_ST import Char ( chr, ord ) import Maybe ( isJust ) -#if powerpc_TARGET_ARCH +#if powerpc_TARGET_ARCH || darwin_TARGET_OS import DATA_WORD(Word32) import DATA_BITS #endif @@ -744,6 +744,14 @@ pprDataItem lit #if i386_TARGET_ARCH || x86_64_TARGET_ARCH ppr_item I16 x = [ptext SLIT("\t.word\t") <> pprImm imm] #endif +#if i386_TARGET_ARCH && darwin_TARGET_OS + ppr_item I64 (CmmInt x _) = + [ptext SLIT("\t.long\t") + <> int (fromIntegral (fromIntegral x :: Word32)), + ptext SLIT("\t.long\t") + <> int (fromIntegral + (fromIntegral (x `shiftR` 32) :: Word32))] +#endif #if i386_TARGET_ARCH ppr_item I64 x = [ptext SLIT("\t.quad\t") <> pprImm imm] #endif |
