X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCcse.c;h=45a0aef708ffb048489b391d6b610f53c41f9b08;hb=55eadd00cad5f29a448778a687446ec5d6306d47;hp=52bd5593cbdb9884cfb5fb9e609076a164132afb;hpb=931cf7619cfa666ea0ae845462111379e17c6212;p=fw%2Fsdcc diff --git a/src/SDCCcse.c b/src/SDCCcse.c index 52bd5593..45a0aef7 100644 --- a/src/SDCCcse.c +++ b/src/SDCCcse.c @@ -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;