for (ic = lic; ic; ic = ic->next)
{
- if (cln != ic->lineno)
+ if (ic->lineno && cln != ic->lineno)
{
if (options.debug)
{
return;
}
+ /* if we are calling a reentrant function that has stack parameters */
+ if (ic->op == CALL &&
+ IFFUNC_ISREENT(operandType(IC_LEFT(ic))) &&
+ FUNC_HASSTACKPARM(operandType(IC_LEFT(ic))))
+ return;
+
+ if (ic->op == PCALL &&
+ IFFUNC_ISREENT(operandType(IC_LEFT(ic))->next) &&
+ FUNC_HASSTACKPARM(operandType(IC_LEFT(ic))->next))
+ return;
+
/* if + or - then it has to be one byte result */
if ((ic->op == '+' || ic->op == '-')
&& getSize (operandType (IC_RESULT (ic))) > 1)
for (ic = lic; ic; ic = ic->next)
{
- if (cln != ic->lineno)
+ if (ic->lineno && cln != ic->lineno)
{
if (options.debug)
{
return;
}
+ /* if we are calling a reentrant function that has stack parameters */
+ if (ic->op == CALL &&
+ IFFUNC_ISREENT(operandType(IC_LEFT(ic))) &&
+ FUNC_HASSTACKPARM(operandType(IC_LEFT(ic))))
+ return;
+
+ if (ic->op == PCALL &&
+ IFFUNC_ISREENT(operandType(IC_LEFT(ic))->next) &&
+ FUNC_HASSTACKPARM(operandType(IC_LEFT(ic))->next))
+ return;
+
/* if + or - then it has to be one byte result */
if ((ic->op == '+' || ic->op == '-')
&& getSize (operandType (IC_RESULT (ic))) > 1)
char *getStackOffset(int stack) {
static char gsoBuf[1024];
- // dit slaat natuurlijk nergens op, maar ja voor nou
- sprintf (gsoBuf, "r7+(%+d+0%+d%+d)", stack,
+ sprintf (gsoBuf, "r7+(%d%+d%+d)", stack,
FUNC_ISISR(currFunc->type) ?
port->stack.isr_overhead : port->stack.call_overhead,
_G.nRegsSaved);
}
for (ic = lic; ic; ic = ic->next) {
- if (cln != ic->lineno) {
+ if (ic->lineno && cln != ic->lineno) {
if (options.debug) {
_G.debugLine = 1;
emitcode ("", "C$%s$%d$%d$%d ==.",
static int
_xa51_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts)
{
- return FALSE;
+ fprintf (of, "\t.dw\t0x8f00\n");
+ fprintf (of, "\t.dw\t__sdcc_gsinit_startup\n");
+ // no IVT yet
+ return TRUE;
}
/* Generate code to copy XINIT to XISEG */
/* $3 is replaced by assembler.debug_opts resp. port->assembler.plain_opts */
static const char *_asmCmd[] =
{
- "xa_asm", "$l", "$3", "$1.xa", NULL
+ "xa_asm -dontcomplain", "$l", "$3", "$1.xa", NULL
};
/* Globals */