From: sandeep Date: Mon, 7 Feb 2000 18:28:19 +0000 (+0000) Subject: some more parmBytes problem stack not adjusted X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=c0037eb2c5021f3ab03a57df12fc03f5607a55fa;p=fw%2Fsdcc some more parmBytes problem stack not adjusted when call made to reentrant support functions eg (when _moduint/_muluint ...etc are called) git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@84 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCast.c b/src/SDCCast.c index e26c925e..d917e84f 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -447,7 +447,7 @@ symbol *funcOfType (char *name, link *type, link *argType, int nArgs , int rent) { symbol *sym; - + int argStack = 0; /* create the symbol */ sym = newSymbol (name,0); @@ -458,6 +458,7 @@ symbol *funcOfType (char *name, link *type, link *argType, args = sym->args = newValue(); while (nArgs--) { + argStack += getSize(type); args->type = copyLinkChain(argType); args->etype = getSpec(args->type); if (!nArgs) @@ -476,6 +477,7 @@ symbol *funcOfType (char *name, link *type, link *argType, /* save it */ addSymChain(sym); sym->cdef = 1; + sym->argStack = (rent ? argStack : 0); allocVariables (sym); return sym; diff --git a/src/SDCCicode.c b/src/SDCCicode.c index bdee802c..fd7b49a1 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -1084,6 +1084,7 @@ operand *operandFromSymbol (symbol *sym) op->key = sym->key ; op->isvolatile = isOperandVolatile(op,TRUE); op->isGlobal = isOperandGlobal(op); + op->parmBytes = sym->argStack; return op; } diff --git a/src/SDCCsymt.h b/src/SDCCsymt.h index 1b38daa5..b6bebde0 100644 --- a/src/SDCCsymt.h +++ b/src/SDCCsymt.h @@ -228,6 +228,7 @@ typedef struct symbol { int liveTo ; /* live to sequence number */ int used ; /* no. of times this was used */ int recvSize ; /* size of first argument */ + int argStack ; /* stacks used by parameters */ } symbol ;