X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FCgInfoTbls.hs;h=3751824f41384af857c62b772f6258e505f28694;hb=7f1bc015a4094a8282ad4090768d780fd4d6122d;hp=f233cbb1c0b5f15c9febb2b1ef2239715962c435;hpb=49c98d143c382a1341e1046f5ca00819a25691ba;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgInfoTbls.hs b/compiler/codeGen/CgInfoTbls.hs index f233cbb..3751824 100644 --- a/compiler/codeGen/CgInfoTbls.hs +++ b/compiler/codeGen/CgInfoTbls.hs @@ -19,7 +19,7 @@ module CgInfoTbls ( mkFunGenInfoExtraBits, entryCode, closureInfoPtr, getConstrTag, - infoTable, infoTableClosureType, + infoTable, infoTableClosureType, infoTableConstrTag, infoTablePtrs, infoTableNonPtrs, funInfoTable, retVec @@ -202,18 +202,19 @@ retVec :: CmmExpr -> CmmExpr -> CmmExpr -- Get a return vector from the info pointer retVec info_amode zero_indexed_tag = let slot = vectorSlot info_amode zero_indexed_tag -#ifdef x86_64_TARGET_ARCH - tableEntry = CmmMachOp (MO_S_Conv I32 I64) [CmmLoad slot I32] + table_slot = CmmLoad slot wordRep +#if defined(x86_64_TARGET_ARCH) + offset_slot = CmmMachOp (MO_S_Conv I32 I64) [CmmLoad slot I32] -- offsets are 32-bits on x86-64, due to the inability of -- the tools to handle 64-bit PC-relative relocations. See also -- PprMach.pprDataItem, and InfoTables.h:OFFSET_FIELD(). #else - tableEntry = CmmLoad slot wordRep + offset_slot = table_slot #endif in if tablesNextToCode - then CmmMachOp (MO_Add wordRep) [tableEntry, info_amode] - else tableEntry - + then CmmMachOp (MO_Add wordRep) [offset_slot, info_amode] + else table_slot + emitReturnTarget :: Name -> CgStmts -- The direct-return code (if any)