From cab13f0f059efd6ad8e70f6a55982e9137513baf Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 11 Jul 2005 14:21:54 +0000 Subject: [PATCH] [project @ 2005-07-11 14:21:54 by simonmar] byte code info tables for x86_64 (same as i386) --- ghc/compiler/ghci/ByteCodeItbls.lhs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 1.7.10.4