added option --no-xinit-opt
[fw/sdcc] / src / ds390 / gen.c
index effd7cf8b919e2b01ff52c92489c789fd4a734ad..77bae8aaf24e441ecfdb34b5652603453148d53a 100644 (file)
@@ -4156,7 +4156,8 @@ genMinus (iCode * ic)
   aopOp (IC_RIGHT (ic), ic, FALSE, 
         (AOP_INDPTRn(IC_LEFT(ic)) ? FALSE : (AOP_USESDPTR(IC_LEFT(ic)) ? TRUE : FALSE)));
   if ((AOP_TYPE (IC_LEFT (ic)) == AOP_DPTR) &&
-      (AOP_TYPE (IC_RIGHT (ic)) == AOP_DPTR2))
+      ((AOP_TYPE (IC_RIGHT (ic)) == AOP_DPTR2)
+       || OP_SYMBOL(IC_RESULT(ic))->ruonly))
     {
       pushResult = TRUE;
     }
@@ -9488,7 +9489,7 @@ genPointerGet (iCode * ic, iCode *pi)
   if (p_type == GPOINTER && OP_SYMBOL(left)->remat &&
       IS_CAST_ICODE(OP_SYMBOL(left)->rematiCode)) {
          left = IC_RIGHT(OP_SYMBOL(left)->rematiCode);
-         type =   type = operandType (left);
+         type = operandType (left);
          p_type = DCL_TYPE (type);
   }
   /* now that we have the pointer type we assign
@@ -10157,7 +10158,7 @@ genPointerSet (iCode * ic, iCode *pi)
   if (p_type == GPOINTER && OP_SYMBOL(result)->remat &&
       IS_CAST_ICODE(OP_SYMBOL(result)->rematiCode)) {
          result = IC_RIGHT(OP_SYMBOL(result)->rematiCode);
-         type =   type = operandType (result);
+         type = operandType (result);
          p_type = DCL_TYPE (type);
   }