From: simonmar Date: Mon, 11 Jul 2005 14:21:54 +0000 (+0000) Subject: [project @ 2005-07-11 14:21:54 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~377 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=cab13f0f059efd6ad8e70f6a55982e9137513baf;p=ghc-hetmet.git [project @ 2005-07-11 14:21:54 by simonmar] byte code info tables for x86_64 (same as i386) --- diff --git a/ghc/compiler/ghci/ByteCodeItbls.lhs b/ghc/compiler/ghci/ByteCodeItbls.lhs index 681a462..5cc07d6 100644 --- a/ghc/compiler/ghci/ByteCodeItbls.lhs +++ b/ghc/compiler/ghci/ByteCodeItbls.lhs @@ -172,12 +172,15 @@ mkJumpToAddr a = 0x7D8903A6, 0x4E800420 ] -#elif i386_TARGET_ARCH +#elif i386_TARGET_ARCH || x86_64_TARGET_ARCH -- Let the address to jump to be 0xWWXXYYZZ. -- Generate movl $0xWWXXYYZZ,%eax ; jmp *%eax -- which is -- B8 ZZ YY XX WW FF E0 +-- This works on x86_64 too, because we're assuming the small memory +-- model, where all symbols fit into the lower 2Gb. + type ItblCode = Word8 mkJumpToAddr a = let w32 = fromIntegral (ptrToInt a)