X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FCgInfoTbls.hs;h=5a40a3d5c193bdf1ee3d527ea13b64019d67354c;hb=3e83dfb21b2f2220dce97427fff5c19459ae68d1;hp=b769950d874f18edf2f5f4104ae4382569953911;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgInfoTbls.hs b/compiler/codeGen/CgInfoTbls.hs index b769950..5a40a3d 100644 --- a/compiler/codeGen/CgInfoTbls.hs +++ b/compiler/codeGen/CgInfoTbls.hs @@ -51,7 +51,7 @@ import CgMonad import CmmUtils ( mkIntCLit, zeroCLit ) import Cmm ( CmmStmt(..), CmmExpr(..), CmmLit(..), LocalReg, CmmBasicBlock, nodeReg ) -import MachOp ( MachOp(..), wordRep, halfWordRep ) +import MachOp import CLabel import StgSyn ( SRT(..) ) import Name ( Name ) @@ -217,7 +217,14 @@ 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] + -- 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 +#endif in if tablesNextToCode then CmmMachOp (MO_Add wordRep) [tableEntry, info_amode] else tableEntry