diff options
| author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-11-24 12:32:03 +0000 |
|---|---|---|
| committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-11-24 12:32:03 +0000 |
| commit | cfcf0a549da1f3d7d74fe4695c56e3763bf44599 (patch) | |
| tree | 3bbcdf1c1ed9bc62453ce939f9024051d7375eeb /compiler/ghci | |
| parent | 70bccc12ea81f218984eec5077e7e6f18584d737 (diff) | |
| parent | 9f24caabdab0cdf8aa211abdccfd850cce616c37 (diff) | |
| download | haskell-cfcf0a549da1f3d7d74fe4695c56e3763bf44599.tar.gz | |
Merge branch 'master' of http://darcs.haskell.org/ghc
Conflicts:
compiler/ghci/ByteCodeItbls.lhs
Diffstat (limited to 'compiler/ghci')
| -rw-r--r-- | compiler/ghci/ByteCodeItbls.lhs | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/compiler/ghci/ByteCodeItbls.lhs b/compiler/ghci/ByteCodeItbls.lhs index 1783125b0e..2dd1d11ea6 100644 --- a/compiler/ghci/ByteCodeItbls.lhs +++ b/compiler/ghci/ByteCodeItbls.lhs @@ -198,13 +198,6 @@ 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) @@ -227,17 +220,6 @@ 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 @@ -255,6 +237,22 @@ mkJumpToAddr a = undefined #endif +#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 foreign import ccall "&stg_interp_constr_entry" stg_interp_constr_entry :: Ptr () |
