/* -----------------------------------------------------------------------------
- * $Id: Updates.hc,v 1.30 2000/11/14 12:47:38 simonmar Exp $
+ * $Id: Updates.hc,v 1.35 2001/11/08 12:46:31 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
*
* ---------------------------------------------------------------------------*/
+#include "Stg.h"
#include "Rts.h"
#include "RtsUtils.h"
#include "RtsFlags.h"
-#include "HeapStackCheck.h"
#include "Storage.h"
#if defined(GRAN) || defined(PAR)
# include "FetchMe.h"
This function is called whenever an argument satisfaction check fails.
-------------------------------------------------------------------------- */
-EXTFUN(stg_update_PAP)
+EXTFUN(__stg_update_PAP)
{
nat Words, PapSize;
#ifdef PROFILING
/* Now fill in the closure fields */
p = Hp;
- for (i = Words-1; i >= 0; i--) {
+ for (i = Words; --i >= 0; ) {
*p-- = (W_) Sp[i];
}
}
/*
* 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);
/*
* 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;