src/pic16/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
src/pic16/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3739
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2005-04-14 Borut Razem <borut.razem AT siol.net>
+
+ * fixed bug 1045046 - SIGSEGV with really simple code?:
+ src/pic16/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
+ src/pic16/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
+
2005-04-14 Borut Razem <borut.razem AT siol.net>
* src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
initialized = 1;
shareBankAddress = 0x7f; /* FIXME - some PIC ICs like 16C7X which do not have a shared bank need a different approach. */
- stkSize = 8; // Set pseudo stack size to 8
+// stkSize = 8; // Set pseudo stack size to 8
+ stkSize = 16; // Set pseudo stack size to 16
initStack(shareBankAddress, stkSize); // Putting the pseudo stack in shared memory so all modules use the same register when passing fn parameters
init_pic(port->processor);
if ((unsigned)shareBankAddress > getMaxRam())
debugLog ("Found a Stack Register!\n");
return dReg;
}
+ else {
+ werror (E_STACK_OUT, "Register");
+ /* return an existing register just to avoid the SDCC crash */
+ return regWithIdx ( dynStackRegs, 0x7f, fixed);
+ }
break;
case REG_SFR:
if( (dReg = regWithIdx ( dynProcessorRegs, idx, fixed)) != NULL ) {