X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FUpdates.hc;h=6f0250f6c4a38addd2b1f63351ee6dee232838a1;hb=52c078343e70a170441fed71480ba8569475c4cd;hp=4e3b04676b400626d7ccdcbb4f90299af476a45c;hpb=de44a7c7e83f8d57856a615bb8c5a18c76604232;p=ghc-hetmet.git diff --git a/ghc/rts/Updates.hc b/ghc/rts/Updates.hc index 4e3b046..6f0250f 100644 --- a/ghc/rts/Updates.hc +++ b/ghc/rts/Updates.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Updates.hc,v 1.30 2000/11/14 12:47:38 simonmar Exp $ + * $Id: Updates.hc,v 1.34 2001/07/24 06:31:36 ken Exp $ * * (c) The GHC Team, 1998-1999 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "Stg.h" #include "Rts.h" #include "RtsUtils.h" #include "RtsFlags.h" @@ -305,7 +306,7 @@ EXTFUN(stg_update_PAP) /* Now fill in the closure fields */ p = Hp; - for (i = Words-1; i >= 0; i--) { + for (i = Words; --i >= 0; ) { *p-- = (W_) Sp[i]; } } @@ -383,7 +384,7 @@ EXTFUN(stg_update_PAP) /* * Squeeze out update frame from stack. */ - for (i = Words-1; i >= 0; i--) { + for (i = Words; --i >= 0; ) { Sp[i+(sizeofW(StgUpdateFrame))] = Sp[i]; } Sp += sizeofW(StgUpdateFrame); @@ -430,7 +431,7 @@ STGFUN(stg_AP_UPD_entry) /* * Check for stack overflow. */ - STK_CHK(Words+sizeofW(StgUpdateFrame),stg_AP_UPD_entry,R2.p,1,); + STK_CHK_GEN(Words+sizeofW(StgUpdateFrame), R1_PTR, stg_AP_UPD_entry, ); PUSH_UPD_FRAME(R1.p, 0); Sp -= sizeofW(StgUpdateFrame) + Words;