[commit: ghc] wip/kavon-nosplit-llvm: update the translation of CmmStatics based on the SRT overhaul. (f9b84f6)
git at git.haskell.org
git at git.haskell.org
Wed May 16 22:36:45 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/kavon-nosplit-llvm
Link : http://ghc.haskell.org/trac/ghc/changeset/f9b84f633c9eee144824c7dc0a441caa2e04281a/ghc
>---------------------------------------------------------------
commit f9b84f633c9eee144824c7dc0a441caa2e04281a
Author: Kavon Farvardin <kavon at farvard.in>
Date: Wed May 16 17:36:19 2018 -0500
update the translation of CmmStatics based on the SRT overhaul.
[skip-ci]
>---------------------------------------------------------------
f9b84f633c9eee144824c7dc0a441caa2e04281a
compiler/llvmGen/LlvmCodeGen/Data.hs | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/compiler/llvmGen/LlvmCodeGen/Data.hs b/compiler/llvmGen/LlvmCodeGen/Data.hs
index d549d0c..75493d1 100644
--- a/compiler/llvmGen/LlvmCodeGen/Data.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Data.hs
@@ -193,23 +193,24 @@ cvtForMangler (Statics _ datum) = do
--
-- then a == b. We rely on this property when creating
-- its corresponding byte string.
- cvtLit (CmmLabelDiffOff srt _ off) = do
+ cvtLit (CmmLabelDiffOff srt _ off w) = do
srtVar <- getGlobalPtr =<< strCLabel_llvm srt
let srtLab = asmNameOf srtVar
- return $ mkDiffOff srtLab off
+ return $ mkDiffOff srtLab off w
- cvtLit _ = return $ dbg (B.pack "## some other lit for ")
+ cvtLit _ = error "cvtForMangler: unexpected lit."
+ -- return $ dbg (B.pack "## some other lit for ")
- mkDiffOff srt 0 mine = B.concat [
- szName W64,
+ mkDiffOff srt 0 w mine = B.concat [
+ szName w,
srt,
B.pack "-",
mine,
eol
]
- mkDiffOff srt off mine = B.concat [
- szName W64,
+ mkDiffOff srt off w mine = B.concat [
+ szName w,
B.pack "(",
srt,
B.pack "-",
@@ -230,8 +231,8 @@ cvtForMangler (Statics _ datum) = do
- -- XXX delete me later
- dbg bstr lab = B.concat [bstr, lab, eol]
+ -- XXX(kavon) delete me later
+ -- dbg bstr lab = B.concat [bstr, lab, eol]
szName :: Width -> B.ByteString
szName W8 = B.pack "\t.byte\t"
@@ -265,5 +266,3 @@ cvtForMangler (Statics _ datum) = do
-- -- TODO(kavon): does this change on ARM?
-- -- translate a size (in bytes) to its assembly directive, followed by a space.
--
-
-
More information about the ghc-commits
mailing list