Initial entry

This commit is contained in:
dick
1988-06-22 16:57:09 +00:00
parent 4934f830fc
commit a717832bfb
68 changed files with 15062 additions and 0 deletions

55
util/int/fra.c Normal file
View File

@@ -0,0 +1,55 @@
/* $Header$ */
#include "logging.h"
#include "global.h"
#include "mem.h"
#include "shadow.h"
#include "fra.h"
#include "alloc.h"
#ifdef LOGGING
char *FRA_sh; /* shadowbytes */
#endif LOGGING
init_FRA() {
FRA = Malloc(FRALimit, "Function Return Area");
#ifdef LOGGING
FRA_sh = Malloc(FRALimit, "shadowspace for Function Return Area");
#endif LOGGING
FRA_def = UNDEFINED; /* set FRA illegal */
}
pushFRA(sz)
size sz;
{
register int i;
if (sz == 0)
return;
st_inc(max(sz, wsize));
for (i = 0; i < sz; i++) {
stack_loc(SP + i) = FRA[i];
#ifdef LOGGING
st_sh(SP + i) = (i < FRASize ? FRA_sh[i] : UNDEFINED);
#endif LOGGING
}
}
popFRA(sz)
size sz;
{
register int i;
if (sz == 0)
return;
for (i = 0; i < sz; i++) {
FRA[i] = stack_loc(SP + i);
#ifdef LOGGING
FRA_sh[i] = st_sh(SP + i);
#endif LOGGING
}
st_dec(max(sz, wsize));
}