fixed bug #507904
[fw/sdcc] / src / xa51 / gen.c
index bbe49199c34ed364aae25676df0cd8ccf89cf8d4..51a226da77922a143a71e1fe20bad371e1ac986f 100755 (executable)
@@ -139,8 +139,7 @@ static void emitcode (char *inst, char *fmt,...) {
 
 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);
@@ -1337,7 +1336,7 @@ void genXA51Code (iCode * lic) {
     }
   
   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 ==.",