projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Floating infotables were reversed in C back end
[ghc-hetmet.git]
/
compiler
/
cmm
/
PprC.hs
diff --git
a/compiler/cmm/PprC.hs
b/compiler/cmm/PprC.hs
index
fea2374
..
3db1be5
100644
(file)
--- a/
compiler/cmm/PprC.hs
+++ b/
compiler/cmm/PprC.hs
@@
-140,6
+140,13
@@
pprTop top@(CmmData _section (CmmDataLabel lbl : lits)) =
pprDataExterns lits $$
pprWordArray lbl lits
pprDataExterns lits $$
pprWordArray lbl lits
+-- Floating info table for safe a foreign call.
+pprTop top@(CmmData _section d@(_ : _))
+ | CmmDataLabel lbl : lits <- reverse d =
+ let lits' = reverse lits
+ in pprDataExterns lits' $$
+ pprWordArray lbl lits'
+
-- these shouldn't appear?
pprTop (CmmData _ _) = panic "PprC.pprTop: can't handle this data"
-- these shouldn't appear?
pprTop (CmmData _ _) = panic "PprC.pprTop: can't handle this data"
@@
-432,6
+439,8
@@
pprLit lit = case lit of
-- these constants come from <math.h>
-- see #1861
-- these constants come from <math.h>
-- see #1861
+ CmmBlock bid -> mkW_ <> pprCLabelAddr (infoTblLbl bid)
+ CmmHighStackMark -> panic "PprC printing high stack mark"
CmmLabel clbl -> mkW_ <> pprCLabelAddr clbl
CmmLabelOff clbl i -> mkW_ <> pprCLabelAddr clbl <> char '+' <> int i
CmmLabelDiffOff clbl1 clbl2 i
CmmLabel clbl -> mkW_ <> pprCLabelAddr clbl
CmmLabelOff clbl i -> mkW_ <> pprCLabelAddr clbl <> char '+' <> int i
CmmLabelDiffOff clbl1 clbl2 i