From: Simon Marlow Date: Tue, 27 Feb 2007 13:43:58 +0000 (+0000) Subject: fix data con patch for 64-bit architectures X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=f38310c9d33a263a610005996f32f3d7d2e25c44 fix data con patch for 64-bit architectures --- diff --git a/compiler/ghci/ByteCodeItbls.lhs b/compiler/ghci/ByteCodeItbls.lhs index 12cd47f..78d18c7 100644 --- a/compiler/ghci/ByteCodeItbls.lhs +++ b/compiler/ghci/ByteCodeItbls.lhs @@ -48,7 +48,7 @@ itblCode :: ItblPtr -> Ptr () itblCode (ItblPtr ptr) = (castPtr ptr) #ifdef GHCI_TABLES_NEXT_TO_CODE - `plusPtr` (wORD_SIZE * 2) + `plusPtr` (3 * wORD_SIZE) #endif type ItblEnv = NameEnv (Name, ItblPtr) @@ -125,14 +125,11 @@ make_constr_itbls cons } -- Make a piece of code to jump to "entry_label". -- This is the only arch-dependent bit. - -- addr <- newExec [itbl] addrCon <- newExec [conInfoTbl] - let addr = (castFunPtrToPtr addrCon) `plusPtr` 4 -- ToDo: remove magic number --putStrLn ("SIZE of itbl is " ++ show (sizeOf itbl)) --putStrLn ("# ptrs of itbl is " ++ show ptrs) --putStrLn ("# nptrs of itbl is " ++ show nptrs_really) - -- return (getName dcon, ItblPtr (castFunPtrToPtr addr)) - return (getName dcon, ItblPtr addr) + return (getName dcon, ItblPtr (castFunPtrToPtr addrCon)) -- Make code which causes a jump to the given address. This is the