Added post increment optimization for msc51 &
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 1 Apr 2001 00:35:11 +0000 (00:35 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 1 Apr 2001 00:35:11 +0000 (00:35 +0000)
made some progress on AVR

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@722 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/avr/gen.c
src/avr/main.c
src/avr/ralloc.c
src/ds390/main.c
src/izt/i186.c
src/izt/tlcs900h.c
src/mcs51/main.c
src/pic/main.c
src/z80/gbz80.c
src/z80/main.c

index d6cb5ff2bba5431eeaa0da08659bd9eabfec5542..a388da89887b003160663c00d631259dbcd5b1cd 100644 (file)
@@ -142,6 +142,36 @@ emitcode (char *inst, char *fmt, ...)
        va_end (ap);
 }
 
+/*-----------------------------------------------------------------*/
+/* hasInc - operand is incremented before any other use            */
+/*-----------------------------------------------------------------*/
+static iCode *
+hasInc (operand *op, iCode *ic)
+{
+  sym_link *type = operandType(op);
+  sym_link *retype = getSpec (type);
+  iCode *lic = ic->next;
+  int isize ;
+  
+  if (IS_BITVAR(retype)||!IS_PTR(type)) return NULL;
+  isize = getSize(type->next);
+  while (lic) {
+    /* if operand of the form op = op + <sizeof *op> */
+    if (lic->op == '+' && isOperandEqual(IC_LEFT(lic),op) &&
+       isOperandEqual(IC_RESULT(lic),op) && 
+       isOperandLiteral(IC_RIGHT(lic)) &&
+       operandLitValue(IC_RIGHT(lic)) == isize) {
+      return lic;
+    }
+    /* if the operand used or deffed */
+    if (bitVectBitValue(ic->uses,op->key) || ic->defKey == op->key) {
+      return NULL;
+    }
+    lic = lic->next;
+  }
+  return NULL;
+}
+
 /*-----------------------------------------------------------------*/
 /* getFreePtr - returns X or Z whichever is free or can be pushed  */
 /*-----------------------------------------------------------------*/
@@ -3768,7 +3798,7 @@ genDataPointerGet (operand * left, operand * result, iCode * ic)
 /* genNearPointerGet - emitcode for near pointer fetch             */
 /*-----------------------------------------------------------------*/
 static void
-genMemPointerGet (operand * left, operand * result, iCode * ic)
+genMemPointerGet (operand * left, operand * result, iCode * ic, iCode *pi)
 {
        asmop *aop = NULL;
        regs *preg = NULL;
@@ -3799,7 +3829,9 @@ genMemPointerGet (operand * left, operand * result, iCode * ic)
                aop = newAsmop (0);
                preg = getFreePtr (ic, &aop, FALSE, 0);
                if (isRegPair (AOP (left) )) {
-                   emitcode ("movw", "%s,%s",aop->aopu.aop_ptr->name);
+                       emitcode ("movw", "%s,%s",
+                                 aop->aopu.aop_ptr->name,
+                                 aopGet(AOP(left),0));
                } else {
                        emitcode ("mov", "%s,%s", aop->aopu.aop_ptr->name, 
                                  aopGet (AOP (left), 0));
@@ -3822,7 +3854,6 @@ genMemPointerGet (operand * left, operand * result, iCode * ic)
                exit (0);
        }
 
-       freeAsmop (left, NULL, ic, TRUE);
        aopOp (result, ic, FALSE);
 
        /* if bitfield then unpack the bits */
@@ -3834,7 +3865,7 @@ genMemPointerGet (operand * left, operand * result, iCode * ic)
                int offset = 0;
 
                while (size--) {
-                       if (size) {
+                       if (size || pi) {
                                emitcode ("ld","%s,%s+",aopGet(AOP(result),offset), rname);
                        } else {
                                emitcode ("ld","%s,%s",aopGet(AOP(result),offset), rname);
@@ -3845,6 +3876,20 @@ genMemPointerGet (operand * left, operand * result, iCode * ic)
        /* now some housekeeping stuff */
        if (gotFreePtr) {
                /* we had to allocate for this iCode */
+               if (pi) {
+                       if (isRegPair (AOP (left) )) {
+                               emitcode ("movw", "%s,%s",
+                                         aopGet (AOP(left),0),
+                                         aop->aopu.aop_ptr->name);
+                       } else {
+                               emitcode ("mov", "%s,%s", 
+                                         aopGet (AOP (left), 0),
+                                         aop->aopu.aop_ptr->name);
+                               emitcode ("mov", "%s,%s", 
+                                         aopGet (AOP (left), 1),
+                                         aop->aop_ptr2->name);
+                       }
+               }
                freeAsmop (NULL, aop, ic, TRUE);
        } else {
 
@@ -3853,15 +3898,17 @@ genMemPointerGet (operand * left, operand * result, iCode * ic)
                   if size > 0 && this could be used again
                   we have to point it back to where it
                   belongs */
-               if (AOP_SIZE (result) > 1 &&
-                   !OP_SYMBOL (left)->remat &&
-                   (OP_SYMBOL (left)->liveTo > ic->seq || ic->depth)) {
+               if ((AOP_SIZE (result) > 1 &&
+                    !OP_SYMBOL (left)->remat &&
+                    (OP_SYMBOL (left)->liveTo > ic->seq || ic->depth)) && !pi) {
                        int size = AOP_SIZE (result) - 1;
                        emitcode ("sbiw", "%s,%d",frname,size);
                }
        }
 
        /* done */
+       if (pi) pi->generated = 1;
+       freeAsmop (left, NULL, ic, TRUE);
        freeAsmop (result, NULL, ic, TRUE);
 
 }
@@ -3870,7 +3917,7 @@ genMemPointerGet (operand * left, operand * result, iCode * ic)
 /* genCodePointerGet - gget value from code space                  */
 /*-----------------------------------------------------------------*/
 static void
-genCodePointerGet (operand * left, operand * result, iCode * ic)
+genCodePointerGet (operand * left, operand * result, iCode * ic, iCode *pi)
 {
        int size, offset;
        sym_link *retype = getSpec (operandType (result));      
@@ -3905,7 +3952,7 @@ genCodePointerGet (operand * left, operand * result, iCode * ic)
                offset = 0;
 
                while (size--) {
-                       if (size) {
+                       if (size || pi) {
                                emitcode ("lpm","%s,Z+",aopGet(AOP(result),offset++));
                        } else {
                                emitcode ("lpm","%s,Z",aopGet(AOP(result),offset++));
@@ -3913,10 +3960,17 @@ genCodePointerGet (operand * left, operand * result, iCode * ic)
                }
        }
 
-       freeAsmop (left, NULL, ic, TRUE);
        /* now some housekeeping stuff */
        if (gotFreePtr) {
                /* we had to allocate for this iCode */
+               if (pi) {
+                       if (isRegPair(AOP (left))) {
+                               emitcode ("movw","%s,r30",aopGet (AOP (left), 0));
+                       } else {                        
+                               emitcode ("mov", "%s,r30", aopGet (AOP (left), 0));
+                               emitcode ("mov", "%s,r31", aopGet (AOP (left), 1));
+                       }
+               }
                freeAsmop (NULL, aop, ic, TRUE);
        } else {
 
@@ -3925,15 +3979,18 @@ genCodePointerGet (operand * left, operand * result, iCode * ic)
                   if size > 0 && this could be used again
                   we have to point it back to where it
                   belongs */
-               if (AOP_SIZE (result) > 1 &&
-                   !OP_SYMBOL (left)->remat &&
-                   (OP_SYMBOL (left)->liveTo > ic->seq || ic->depth)) {
+               if ((AOP_SIZE (result) > 1 &&
+                    !OP_SYMBOL (left)->remat &&
+                    (OP_SYMBOL (left)->liveTo > ic->seq || ic->depth)) &&
+                   !pi) {
                        int size = AOP_SIZE (result) - 1;
                        emitcode ("sbiw", "r30,%d",size);
                }
        }
 
        /* done */
+       if (pi) pi->generated=1;
+       freeAsmop (left, NULL, ic, TRUE);
        freeAsmop (result, NULL, ic, TRUE);
 
 }
@@ -3942,7 +3999,7 @@ genCodePointerGet (operand * left, operand * result, iCode * ic)
 /* genGenPointerGet - gget value from generic pointer space        */
 /*-----------------------------------------------------------------*/
 static void
-genGenPointerGet (operand * left, operand * result, iCode * ic)
+genGenPointerGet (operand * left, operand * result, iCode * ic, iCode *pi)
 {
        int size, offset;
        int gotFreePtr = 0;
@@ -3977,7 +4034,7 @@ genGenPointerGet (operand * left, operand * result, iCode * ic)
                offset = 0;
 
                while (size--) {
-                       if (size) 
+                       if (size || pi
                                emitcode ("call", "__gptrget_pi");
                        else
                                emitcode ("call", "__gptrget");
@@ -3985,10 +4042,18 @@ genGenPointerGet (operand * left, operand * result, iCode * ic)
                }
        }
 
-       freeAsmop (left, NULL, ic, TRUE);
+
        /* now some housekeeping stuff */
        if (gotFreePtr) {
                /* we had to allocate for this iCode */
+               if (pi) {
+                       if (isRegPair(AOP (left))) {
+                               emitcode ("movw","%s,r30",aopGet (AOP (left), 0));
+                       } else {                        
+                               emitcode ("mov", "%s,r30", aopGet (AOP (left), 0));
+                               emitcode ("mov", "%s,r31", aopGet (AOP (left), 1));
+                       }
+               }
                freeAsmop (NULL, aop, ic, TRUE);
        } else {
 
@@ -3997,13 +4062,16 @@ genGenPointerGet (operand * left, operand * result, iCode * ic)
                   if size > 0 && this could be used again
                   we have to point it back to where it
                   belongs */
-               if (AOP_SIZE (result) > 1 &&
-                   !OP_SYMBOL (left)->remat &&
-                   (OP_SYMBOL (left)->liveTo > ic->seq || ic->depth)) {
+               if ((AOP_SIZE (result) > 1 &&
+                    !OP_SYMBOL (left)->remat &&
+                    (OP_SYMBOL (left)->liveTo > ic->seq || ic->depth)) &&
+                   !pi) {
                        int size = AOP_SIZE (result) - 1;
                        emitcode ("sbiw", "r30,%d",size);
                }
        }
+       if (pi) pi->generated=1;
+       freeAsmop (left, NULL, ic, TRUE);
        freeAsmop (result, NULL, ic, TRUE);
 }
 
@@ -4011,7 +4079,7 @@ genGenPointerGet (operand * left, operand * result, iCode * ic)
 /* genPointerGet - generate code for pointer get                   */
 /*-----------------------------------------------------------------*/
 static void
-genPointerGet (iCode * ic)
+genPointerGet (iCode * ic, iCode *pi)
 {
        operand *left, *result;
        sym_link *type, *etype;
@@ -4042,15 +4110,15 @@ genPointerGet (iCode * ic)
        case IPOINTER:
        case PPOINTER:
        case FPOINTER:
-               genMemPointerGet (left, result, ic);
+               genMemPointerGet (left, result, ic, pi);
                break;
 
        case CPOINTER:
-               genCodePointerGet (left, result, ic);
+               genCodePointerGet (left, result, ic, pi);
                break;
 
        case GPOINTER:
-               genGenPointerGet (left, result, ic);
+               genGenPointerGet (left, result, ic, pi);
                break;
        }
 
@@ -4230,10 +4298,10 @@ genDataPointerSet (operand * right, operand * result, iCode * ic)
 /* genNearPointerSet - emitcode for near pointer put               */
 /*-----------------------------------------------------------------*/
 static void
-genMemPointerSet (operand * right, operand * result, iCode * ic)
+genMemPointerSet (operand * right, operand * result, iCode * ic, iCode *pi)
 {
        asmop *aop = NULL;
-       char *frname, *rname, *l;
+       char *frname = NULL, *rname, *l;
        int gotFreePtr = 0;
        sym_link *retype;
        sym_link *ptype = operandType (result);
@@ -4254,14 +4322,15 @@ genMemPointerSet (operand * right, operand * result, iCode * ic)
                aop = newAsmop (0);
                getFreePtr (ic, &aop, FALSE, 0);
                if (isRegPair (AOP (result) )) {
-                       emitcode ("movw", "%s,%s",aop->aopu.aop_ptr->name);
+                       emitcode ("movw", "%s,%s",aop->aopu.aop_ptr->name,
+                                 aopGet(AOP (result), 0));
                } else {
                        emitcode ("mov", "%s,%s", aop->aopu.aop_ptr->name, 
                                  aopGet (AOP (result), 0));
                        emitcode ("mov", "%s,%s", aop->aop_ptr2->name,
                                  aopGet (AOP (result), 1));
                }
-               gotFreePtr = 1;
+               gotFreePtr = 1;         
        } else {
                aop = AOP(result);
                frname = aopGet(aop,0);
@@ -4287,18 +4356,29 @@ genMemPointerSet (operand * right, operand * result, iCode * ic)
 
                while (size--) {
                        l = aopGet (AOP (right), offset);
-                       if (size)
-                               emitcode ("sts", "%s+,%s", rname,l);
+                       if (size || pi)
+                               emitcode ("st", "%s+,%s", rname,l);
                        else
-                               emitcode ("sts", "%s,%s", rname,l);                             
+                               emitcode ("st", "%s,%s", rname,l);                              
                        offset++;
                }
        }
        
        /* now some housekeeping stuff */
-       freeAsmop (result, NULL, ic, TRUE);
        if (gotFreePtr) {
                /* we had to allocate for this iCode */
+               if (pi) {
+                       if (isRegPair (AOP (result) )) {
+                               emitcode ("movw", "%s,%s",
+                                         aopGet(AOP(result),0),
+                                         aop->aopu.aop_ptr->name);
+                       } else {
+                               emitcode ("mov", "%s,%s", aop->aopu.aop_ptr->name, 
+                                         aopGet (AOP (result), 0));
+                               emitcode ("mov", "%s,%s", aop->aop_ptr2->name,
+                                         aopGet (AOP (result), 1));
+                       }
+               }
                freeAsmop (NULL, aop, ic, TRUE);
        } else {
 
@@ -4307,15 +4387,17 @@ genMemPointerSet (operand * right, operand * result, iCode * ic)
                   if size > 0 && this could be used again
                   we have to point it back to where it
                   belongs */
-               if (AOP_SIZE (right) > 1 &&
-                   !OP_SYMBOL (result)->remat &&
-                   (OP_SYMBOL (right)->liveTo > ic->seq || ic->depth)) {
+               if ((AOP_SIZE (right) > 1 &&
+                    !OP_SYMBOL (result)->remat &&
+                    (OP_SYMBOL (right)->liveTo > ic->seq || ic->depth)) && !pi) {
                        int size = AOP_SIZE (right) - 1;
                        emitcode ("sbiw", "%s,%d",frname,size);
                }
        }
 
        /* done */
+       if (pi) pi->generated = 1;
+       freeAsmop (result, NULL, ic, TRUE);
        freeAsmop (right, NULL, ic, TRUE);
 }
 
@@ -4323,7 +4405,7 @@ genMemPointerSet (operand * right, operand * result, iCode * ic)
 /* genGenPointerSet - set value from generic pointer space         */
 /*-----------------------------------------------------------------*/
 static void
-genGenPointerSet (operand * right, operand * result, iCode * ic)
+genGenPointerSet (operand * right, operand * result, iCode * ic, iCode *pi)
 {
        int size, offset;
        int gotFreePtr = 0;
@@ -4339,10 +4421,13 @@ genGenPointerSet (operand * right, operand * result, iCode * ic)
        } else {
                aop = newAsmop(0);
                getFreePtr(ic,&aop,FALSE,TRUE);
-               
-               emitcode ("mov", "r30,%s", aopGet (AOP (result), 0));
-               emitcode ("mov", "r31,%s", aopGet (AOP (result), 1));
-               emitcode ("mov", "r0,%s",  aopGet (AOP (result), 2));
+               if (isRegPair(AOP(result))) {
+                       emitcode ("movw", "r30,%s", aopGet (AOP (result), 0));
+               } else {
+                       emitcode ("mov", "r30,%s", aopGet (AOP (result), 0));
+                       emitcode ("mov", "r31,%s", aopGet (AOP (result), 1));
+               }
+               emitcode ("mov", "r24,%s",  aopGet (AOP (result), 2));
                gotFreePtr=1;
        }
        
@@ -4360,17 +4445,24 @@ genGenPointerSet (operand * right, operand * result, iCode * ic)
                        char *l = aopGet(AOP (right), offset++);
                        MOVR0(l);
                        
-                       if (size) 
+                       if (size || pi
                                emitcode ("call", "__gptrput_pi");
                        else
                                emitcode ("call", "__gptrput");
                }
        }
 
-       freeAsmop (right, NULL, ic, TRUE);
        /* now some housekeeping stuff */
        if (gotFreePtr) {
                /* we had to allocate for this iCode */
+               if (pi) {
+                       if (isRegPair(AOP(result))) {
+                               emitcode ("movw", "%s,r30", aopGet (AOP (result), 0));
+                       } else {
+                               emitcode ("mov", "%s,r30", aopGet (AOP (result), 0));
+                               emitcode ("mov", "%s,r31", aopGet (AOP (result), 1));
+                       }
+               }
                freeAsmop (NULL, aop, ic, TRUE);
        } else {
 
@@ -4379,13 +4471,15 @@ genGenPointerSet (operand * right, operand * result, iCode * ic)
                   if size > 0 && this could be used again
                   we have to point it back to where it
                   belongs */
-               if (AOP_SIZE (right) > 1 &&
-                   !OP_SYMBOL (result)->remat &&
-                   (OP_SYMBOL (result)->liveTo > ic->seq || ic->depth)) {
+               if ((AOP_SIZE (right) > 1 &&
+                    !OP_SYMBOL (result)->remat &&
+                    (OP_SYMBOL (result)->liveTo > ic->seq || ic->depth)) && !pi) {
                        int size = AOP_SIZE (right) - 1;
                        emitcode ("sbiw", "r30,%d",size);
                }
        }
+       if (pi) pi->generated = 1;
+       freeAsmop (right, NULL, ic, TRUE);
        freeAsmop (result, NULL, ic, TRUE);
 }
 
@@ -4393,7 +4487,7 @@ genGenPointerSet (operand * right, operand * result, iCode * ic)
 /* genPointerSet - stores the value into a pointer location        */
 /*-----------------------------------------------------------------*/
 static void
-genPointerSet (iCode * ic)
+genPointerSet (iCode * ic, iCode *pi)
 {
        operand *right, *result;
        sym_link *type, *etype;
@@ -4424,11 +4518,11 @@ genPointerSet (iCode * ic)
        case IPOINTER:
        case PPOINTER:
        case FPOINTER:
-               genMemPointerSet (right, result, ic);
+               genMemPointerSet (right, result, ic, pi);
                break;
 
        case GPOINTER:
-               genGenPointerSet (right, result, ic);
+               genGenPointerSet (right, result, ic, pi);
                break;
        }
 
@@ -4441,32 +4535,36 @@ static void
 genIfx (iCode * ic, iCode * popIc)
 {
        operand *cond = IC_COND (ic);
-       int isbit = 0;
+       char *cname ;
+       symbol *lbl;
 
        aopOp (cond, ic, FALSE);
 
-       /* get the value into acc */
-       if (AOP_TYPE (cond) != AOP_CRY)
-               toBoolean (cond, "", 0);
-       else
-               isbit = 1;
+       /* get the value into acc */    
+       if (AOP_SIZE(cond) == 1 && AOP_ISHIGHREG(AOP(cond),0)) {
+               cname = aopGet(AOP(cond),0);
+       } else {
+               toBoolean (cond, "r24", 1);
+               cname = "r24";
+       }
        /* the result is now in the accumulator */
        freeAsmop (cond, NULL, ic, TRUE);
 
        /* if there was something to be popped then do it */
        if (popIc)
                genIpop (popIc);
-
-       /* if the condition is  a bit variable */
-       /*     if (isbit && IS_ITEMP(cond) && SPIL_LOC(cond)) { */
-       /*  //  genIfxJump(ic,SPIL_LOC(cond)->rname); */
-       /*     } */
-       /*     else */
-       /*  if (isbit && !IS_ITEMP(cond)) */
-       /*    //      genIfxJump(ic,OP_SYMBOL(cond)->rname); */
-       /*  else */
-       /*    // genIfxJump(ic,"a"); */
-
+       
+       emitcode("cpi","%s,0",cname);
+       lbl = newiTempLabel(NULL);
+       if (IC_TRUE(ic)) {
+               emitcode ("brne","L%05d",lbl->key);
+               emitcode ("jmp","L%05d",IC_TRUE(ic)->key);
+               emitcode ("","L%05d:",lbl->key);
+       } else {
+               emitcode ("breq","L%05d",lbl->key);
+               emitcode ("jmp","L%05d",IC_FALSE(ic)->key);
+               emitcode ("","L%05d:",lbl->key);
+       }
        ic->generated = 1;
 }
 
@@ -5122,12 +5220,12 @@ genAVRCode (iCode * lic)
                        break;
 
                case GET_VALUE_AT_ADDRESS:
-                       genPointerGet (ic);
+                       genPointerGet (ic, hasInc(IC_LEFT(ic),ic));
                        break;
 
                case '=':
                        if (POINTER_SET (ic))
-                               genPointerSet (ic);
+                               genPointerSet (ic, hasInc(IC_RESULT(ic),ic));
                        else
                                genAssign (ic);
                        break;
index c2172bf1d7fce084f60845526f1755587d889fea..c17fac1d69f0734dc64868d4937e1b487b326b3f 100644 (file)
@@ -142,7 +142,7 @@ static const char *_linkCmd[] = {
 };
 
 static const char *_asmCmd[] = {
-       "avr-as", "", "$1.asm", NULL
+       "avr-as", "-mmcu=avr3" , "$1.s", NULL
 };
 
 /* Globals */
@@ -158,7 +158,8 @@ PORT avr_port = {
         _asmCmd,
         "-plosgffc",           /* Options with debug */
         "-plosgff",            /* Options without debug */
-        0},
+        0,
+       ".s"},
        {
         _linkCmd,
         NULL,
index 0ad5bea98cdfdb02d04b6bd29cc1326b3ebecceb..87b84ef7eb276948c988b68ad150a7916232194d 100644 (file)
@@ -765,7 +765,7 @@ getRegPtr (iCode * ic, eBBlock * ebp, symbol * sym)
                return NULL;
 
        /* this looks like an infinite loop but 
-          in really selectSpil will abort  */
+          in reality selectSpil will abort  */
        goto tryAgain;
 }
 
@@ -992,6 +992,22 @@ willCauseSpill (int nr, int rt)
        return 1;
 }
 
+/*-----------------------------------------------------------------*/
+/* makeRegPair - if two registers then try to make a pair          */
+/*-----------------------------------------------------------------*/
+static void makeRegPair (operand *op)
+{
+       symbol *opsym = OP_SYMBOL(op);
+
+       if (opsym->isspilt || opsym->nRegs != 2)
+               return; 
+       if ((opsym->regs[0] - opsym->regs[1]) == 1) {
+               regs *tmp = opsym->regs[0];
+               opsym->regs[0] = opsym->regs[1];
+               opsym->regs[1] = tmp;
+       }
+}
+
 /*-----------------------------------------------------------------*/
 /* positionRegs - the allocator can allocate same registers to res- */
 /* ult and operand, if this happens make sure they are in the same */
@@ -1002,11 +1018,11 @@ positionRegs (symbol * result, symbol * opsym, int lineno)
 {
        int count = min (result->nRegs, opsym->nRegs);
        int i, j = 0, shared = 0;
-
+       
        /* if the result has been spilt then cannot share */
        if (opsym->isspilt)
-               return;
     again:
+               return; 
+ again:
        shared = 0;
        /* first make sure that they actually share */
        for (i = 0; i < count; i++) {
@@ -1017,13 +1033,13 @@ positionRegs (symbol * result, symbol * opsym, int lineno)
                        }
                }
        }
     xchgPositions:
+ xchgPositions:
        if (shared) {
                regs *tmp = result->regs[i];
                result->regs[i] = result->regs[j];
                result->regs[j] = tmp;
                goto again;
-       }
+       }       
 }
 
 /*-----------------------------------------------------------------*/
@@ -1143,21 +1159,22 @@ serialRegAssign (eBBlock ** ebbs, int count)
                                        if (!sym->regs[j])
                                                break;
                                }
+                               /* make the registers a pair */
+                               makeRegPair(IC_RESULT(ic));
+
                                /* if it shares registers with operands make sure
                                   that they are in the same position */
                                if (IC_LEFT (ic) && IS_SYMOP (IC_LEFT (ic)) &&
                                    OP_SYMBOL (IC_LEFT (ic))->nRegs
                                    && ic->op != '=')
-                                       positionRegs (OP_SYMBOL
-                                                     (IC_RESULT (ic)),
+                                       positionRegs (OP_SYMBOL (IC_RESULT (ic)),
                                                      OP_SYMBOL (IC_LEFT
                                                                 (ic)),
                                                      ic->lineno);
                                /* do the same for the right operand */
                                if (IC_RIGHT (ic) && IS_SYMOP (IC_RIGHT (ic))
                                    && OP_SYMBOL (IC_RIGHT (ic))->nRegs)
-                                       positionRegs (OP_SYMBOL
-                                                     (IC_RESULT (ic)),
+                                       positionRegs (OP_SYMBOL (IC_RESULT (ic)),
                                                      OP_SYMBOL (IC_RIGHT
                                                                 (ic)),
                                                      ic->lineno);
index f22ce997e82d50a725d33571a4f16d1f41614896..c1a2e477642967bd85011b6e7cd9466fd1a40f03 100644 (file)
@@ -210,7 +210,8 @@ PORT ds390_port =
     _asmCmd,
     "-plosgffc",               /* Options with debug */
     "-plosgff",                        /* Options without debug */
-    0
+    0,
+    ".asm"
   },
   {
     _linkCmd,
index d576980438167cd8e4f40c4c28c6006dfb72c999..f3bbf1cd5d392bc84e7cdb405934d9e5f5254cd5 100644 (file)
@@ -197,7 +197,8 @@ PORT i186_port =
     _asmCmd,
     NULL,
     NULL,
-    0
+    0,
+    NULL
   },
   {
     _linkCmd,
index f8b2ac9f9dfb0d54848bc57c39d76ca005f4fbe7..8e106a838a01890443199a93618862a6c5f61761 100644 (file)
@@ -143,7 +143,8 @@ PORT tlcs900h_port =
     _asmCmd,
     NULL,
     NULL,
-    0
+    0,
+    NULL
   },
   {
     _linkCmd,
index 05f50f114be03f54d2dfd0f42cff99cc6903fd7a..9b8e3ec1ae8e4ce8afe0b354782a37c7a612acc2 100644 (file)
@@ -150,7 +150,8 @@ PORT mcs51_port =
     _asmCmd,
     "-plosgffc",               /* Options with debug */
     "-plosgff",                        /* Options without debug */
-    0
+    0,
+    ".asm"
   },
   {
     _linkCmd,
index 2c0f3154da655250b50024ddbf6ef52b10cbff65..7a6f7687e023bc03b75594556c5fa21a5c113f5b 100644 (file)
@@ -228,7 +228,8 @@ PORT pic_port =
     NULL,
        //"-plosgffc",          /* Options with debug */
        //"-plosgff",           /* Options without debug */
-    0
+    0,
+    ".asm"
   },
   {
     _linkCmd,
index 27aca8c172d7a4abdcb734aa614d0318236fc2ca..0abc913f23722dccca87bd886f84f71d1a7469d9 100644 (file)
@@ -91,6 +91,8 @@ PORT gbz80_port =
     _asmCmd,
     "-plosgff",                        /* Options with debug */
     "-plosgff",                        /* Options without debug */
+    0,
+    ".asm"
   },
   {
     _linkCmd
index 381a673f21c0a7735c36a94383af4434e97d9bee..4675deada1d4d4a8fd7e7b8f6691ed33136509d9 100644 (file)
@@ -328,6 +328,8 @@ PORT z80_port =
     _z80_asmCmd,
     "-plosgff",                        /* Options with debug */
     "-plosgff",                        /* Options without debug */
+    0,
+    ".asm"
   },
   {
     _z80_linkCmd,