summaryrefslogtreecommitdiff
path: root/compiler/ghci/ByteCodeItbls.lhs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-11-23 15:15:27 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2011-11-23 15:15:27 +0000
commit8ff44877c0ccb3af846775474b548076986bbbed (patch)
tree9d03d4a8a17f7c4988be4299cd410dce167f1a03 /compiler/ghci/ByteCodeItbls.lhs
parent922176f6c99dceb910b6d1a2c98ec0edbe4a39e6 (diff)
downloadhaskell-8ff44877c0ccb3af846775474b548076986bbbed.tar.gz
Fix build on Windows
Diffstat (limited to 'compiler/ghci/ByteCodeItbls.lhs')
-rw-r--r--compiler/ghci/ByteCodeItbls.lhs31
1 files changed, 18 insertions, 13 deletions
diff --git a/compiler/ghci/ByteCodeItbls.lhs b/compiler/ghci/ByteCodeItbls.lhs
index 13c7576b2f..1783125b0e 100644
--- a/compiler/ghci/ByteCodeItbls.lhs
+++ b/compiler/ghci/ByteCodeItbls.lhs
@@ -198,6 +198,13 @@ mkJumpToAddr a
in
insnBytes
+byte0, byte1, byte2, byte3
+ :: (Integral w, Bits w) => w -> Word8
+byte0 w = fromIntegral w
+byte1 w = fromIntegral (w `shiftR` 8)
+byte2 w = fromIntegral (w `shiftR` 16)
+byte3 w = fromIntegral (w `shiftR` 24)
+
#elif x86_64_TARGET_ARCH
-- Generates:
-- jmpq *.L1(%rip)
@@ -220,6 +227,17 @@ mkJumpToAddr a
in
insnBytes
+byte0, byte1, byte2, byte3, byte4, byte5, byte6, byte7
+ :: (Integral w, Bits w) => w -> Word8
+byte0 w = fromIntegral w
+byte1 w = fromIntegral (w `shiftR` 8)
+byte2 w = fromIntegral (w `shiftR` 16)
+byte3 w = fromIntegral (w `shiftR` 24)
+byte4 w = fromIntegral (w `shiftR` 32)
+byte5 w = fromIntegral (w `shiftR` 40)
+byte6 w = fromIntegral (w `shiftR` 48)
+byte7 w = fromIntegral (w `shiftR` 56)
+
#elif alpha_TARGET_ARCH
type ItblCode = Word32
mkJumpToAddr a
@@ -237,19 +255,6 @@ mkJumpToAddr a
= undefined
#endif
-
-byte0, byte1, byte2, byte3, byte4, byte5, byte6, byte7
- :: (Integral w, Bits w) => w -> Word8
-byte0 w = fromIntegral w
-byte1 w = fromIntegral (w `shiftR` 8)
-byte2 w = fromIntegral (w `shiftR` 16)
-byte3 w = fromIntegral (w `shiftR` 24)
-byte4 w = fromIntegral (w `shiftR` 32)
-byte5 w = fromIntegral (w `shiftR` 40)
-byte6 w = fromIntegral (w `shiftR` 48)
-byte7 w = fromIntegral (w `shiftR` 56)
-
-
#ifndef __HADDOCK__
-- entry point for direct returns for created constr itbls
foreign import ccall "&stg_interp_constr_entry" stg_interp_constr_entry :: Ptr ()