summaryrefslogtreecommitdiff
path: root/compiler/ghci
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-11-24 09:01:05 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-11-24 10:37:56 +0000
commit6d9c9afa865ae7e2edbd831fd150a0dfb1a4b5b2 (patch)
tree24c28e4fbabe642f1f90f294b9b9dc26c4843d4d /compiler/ghci
parent0e275ec93a15726bacfceff3aa04ab242cd56eab (diff)
downloadhaskell-6d9c9afa865ae7e2edbd831fd150a0dfb1a4b5b2.tar.gz
fix warnings (validate was failing on i386)
Diffstat (limited to 'compiler/ghci')
-rw-r--r--compiler/ghci/ByteCodeItbls.lhs10
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/ghci/ByteCodeItbls.lhs b/compiler/ghci/ByteCodeItbls.lhs
index 13c7576b2f..1af42317a6 100644
--- a/compiler/ghci/ByteCodeItbls.lhs
+++ b/compiler/ghci/ByteCodeItbls.lhs
@@ -238,17 +238,21 @@ mkJumpToAddr a
#endif
-byte0, byte1, byte2, byte3, byte4, byte5, byte6, byte7
- :: (Integral w, Bits w) => w -> Word8
+#if defined(i386_TARGET_ARCH) || defined(x86_64_TARGET_ARCH)
+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)
+#endif
+
+#if defined(x86_64_TARGET_ARCH)
+byte4, byte5, byte6, byte7 :: (Integral w, Bits w) => w -> Word8
byte4 w = fromIntegral (w `shiftR` 32)
byte5 w = fromIntegral (w `shiftR` 40)
byte6 w = fromIntegral (w `shiftR` 48)
byte7 w = fromIntegral (w `shiftR` 56)
-
+#endif
#ifndef __HADDOCK__
-- entry point for direct returns for created constr itbls