summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/codeGen')
-rw-r--r--compiler/codeGen/CgInfoTbls.hs13
-rw-r--r--compiler/codeGen/SMRep.lhs11
2 files changed, 7 insertions, 17 deletions
diff --git a/compiler/codeGen/CgInfoTbls.hs b/compiler/codeGen/CgInfoTbls.hs
index e6d36c0580..1c30d066c1 100644
--- a/compiler/codeGen/CgInfoTbls.hs
+++ b/compiler/codeGen/CgInfoTbls.hs
@@ -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
-#if defined(x86_64_TARGET_ARCH) && defined(TABLES_NEXT_TO_CODE)
- 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)
diff --git a/compiler/codeGen/SMRep.lhs b/compiler/codeGen/SMRep.lhs
index 2419ba1dec..96b53135cd 100644
--- a/compiler/codeGen/SMRep.lhs
+++ b/compiler/codeGen/SMRep.lhs
@@ -31,7 +31,6 @@ module SMRep (
isStaticRep,
fixedHdrSize, arrWordsHdrSize, arrPtrsHdrSize,
profHdrSize, thunkHdrSize,
- tablesNextToCode,
smRepClosureType, smRepClosureTypeInt,
rET_SMALL, rET_VEC_SMALL, rET_BIG, rET_VEC_BIG
@@ -295,16 +294,6 @@ thunkHdrSize = fixedHdrSize + smp_hdr
\end{code}
\begin{code}
--- IA64 mangler doesn't place tables next to code
-tablesNextToCode :: Bool
-#if defined(ia64_TARGET_ARCH) || defined(powerpc64_TARGET_ARCH)
-tablesNextToCode = False
-#else
-tablesNextToCode = not opt_Unregisterised
-#endif
-\end{code}
-
-\begin{code}
isStaticRep :: SMRep -> Bool
isStaticRep (GenericRep is_static _ _ _) = is_static
isStaticRep BlackHoleRep = False