__rlrr array lacking extern
[fw/sdcc] / src / SDCCcse.c
index 52bd5593cbdb9884cfb5fb9e609076a164132afb..45a0aef708ffb048489b391d6b610f53c41f9b08 100644 (file)
@@ -327,11 +327,13 @@ DEFSETFUNC (findCheaperOp)
        }
 
       if ((*opp)->type==VALUE && 
-         IS_SYMOP(cop) && 
-         !IS_SPEC(OP_SYMBOL(cop)->type)) {
-       // this could be a pointer to some space, so we can not
-       *opp=NULL;
-       return 0;
+         IS_SYMOP(cop) && IS_GENPTR(OP_SYMBOL(cop)->type)) {
+       // This is a value assigned to a gpointer
+       if (1) {
+         // this value is used for a cast, so we can not
+         *opp=NULL;
+         return 0;
+       }       
       }
 
       return 1;
@@ -901,6 +903,7 @@ updateSpillLocation (iCode * ic, int induction)
                /* special case for inductions */
                if (induction && 
                    OP_SYMBOL(IC_RIGHT(ic))->isreqv && 
+                   !OP_SYMBOL(IC_RESULT (ic))->noSpilLoc &&
                    !SPIL_LOC(IC_RESULT(ic))) {
                        SPIL_LOC (IC_RESULT (ic)) = SPIL_LOC (IC_RIGHT (ic));
                }
@@ -1228,7 +1231,8 @@ fixUpTypes (iCode * ic)
 {
   sym_link *t1 = operandType (IC_LEFT (ic)), *t2;
 
-  if (TARGET_IS_DS390)
+  /* if (TARGET_IS_DS390) */
+  if (options.model == MODEL_FLAT24)
     {
       /* hack-o-matic! */
       return;