From 1617947052388bb14a484ae8a8cd10c66ccdc245 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 30 May 2001 13:20:11 +0000 Subject: [PATCH] [project @ 2001-05-30 13:20:11 by simonmar] Fix a difference between the NCG implementation of the UPD_CAF() macro and the C version. I think the C version was changed recently but the NCG version never caught up. Fixes a crash in GHCi with NCG compiled code. --- ghc/compiler/nativeGen/StixMacro.lhs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ghc/compiler/nativeGen/StixMacro.lhs b/ghc/compiler/nativeGen/StixMacro.lhs index 0d234b1..6f4a5d1 100644 --- a/ghc/compiler/nativeGen/StixMacro.lhs +++ b/ghc/compiler/nativeGen/StixMacro.lhs @@ -72,13 +72,13 @@ adding an indirection. macroCode UPD_CAF args = let [cafptr,bhptr] = map amodeToStix args + new_caf = StCall SLIT("newCAF") CCallConv VoidRep [cafptr] w0 = StInd PtrRep cafptr w1 = StInd PtrRep (StIndex PtrRep cafptr fixedHS) - a1 = StAssign PtrRep w0 ind_static_info - a2 = StAssign PtrRep w1 bhptr - a3 = StCall SLIT("newCAF") CCallConv VoidRep [cafptr] + a1 = StAssign PtrRep w1 bhptr + a2 = StAssign PtrRep w0 ind_static_info in - returnUs (\xs -> a1 : a2 : a3 : xs) + returnUs (\xs -> new_caf : a1 : a2 : xs) \end{code} ----------------------------------------------------------------------------- -- 1.7.10.4