From 93d047a1096571b75d9911536aecaca547a6f947 Mon Sep 17 00:00:00 2001 From: "dias@eecs.harvard.edu" Date: Mon, 13 Oct 2008 15:27:18 +0000 Subject: [PATCH] Floating infotables were reversed in C back end --- compiler/cmm/CmmBuildInfoTables.hs | 5 +++-- compiler/cmm/PprC.hs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/compiler/cmm/CmmBuildInfoTables.hs b/compiler/cmm/CmmBuildInfoTables.hs index 9a72166..f24aceb 100644 --- a/compiler/cmm/CmmBuildInfoTables.hs +++ b/compiler/cmm/CmmBuildInfoTables.hs @@ -494,8 +494,9 @@ lowerSafeForeignCalls procpoints rst then lowerSafeCallBlock state' b else return (state' { s_blocks = insertBlock b blocks }) State blocks' g_procpoints safeCalls <- fold_blocks block init g - return $ (ProcInfoTable (CmmProc info l args (LGraph entry off blocks')) g_procpoints - : safeCalls) : rst + return $ safeCalls + : [ProcInfoTable (CmmProc info l args (LGraph entry off blocks')) g_procpoints] + : rst -- Check for foreign calls -- if none, then we can avoid copying the block. hasSafeForeignCall :: CmmBlock -> Bool diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs index 374058f..3db1be5 100644 --- a/compiler/cmm/PprC.hs +++ b/compiler/cmm/PprC.hs @@ -143,8 +143,9 @@ pprTop top@(CmmData _section (CmmDataLabel lbl : lits)) = -- Floating info table for safe a foreign call. pprTop top@(CmmData _section d@(_ : _)) | CmmDataLabel lbl : lits <- reverse d = - pprDataExterns lits $$ - pprWordArray lbl lits + let lits' = reverse lits + in pprDataExterns lits' $$ + pprWordArray lbl lits' -- these shouldn't appear? pprTop (CmmData _ _) = panic "PprC.pprTop: can't handle this data" -- 1.7.10.4