X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCicode.c;h=fe437728ce97f42e0c4663a2e65b8a25a3f8b5df;hb=eae1bd2f705a2c61e143c539f8c4d1e9c2b4efe6;hp=0c5264fddcaab7dd342cdc0fd5545e0528a087dc;hpb=55cda8264b973a7fa1c5fb5d88069901405e2292;p=fw%2Fsdcc diff --git a/src/SDCCicode.c b/src/SDCCicode.c index 0c5264fd..fe437728 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -1954,6 +1954,10 @@ getPtrType(sym_link *type) if (TARGET_Z80_LIKE) return POINTER; + //preserve original behaviour for PIC16 + if (TARGET_IS_PIC16) + return POINTER; + //for HC08 only zeropage ptr is different if (TARGET_IS_HC08) { @@ -3187,7 +3191,7 @@ geniCodeConditional (ast * tree,int lvl) ast *astTrue = tree->right->left; ast *astFalse = tree->right->right; operand *cond = ast2iCode (tree->left, lvl+1); - operand *result = newiTempOperand (tree->right->ftype, 0); + operand *result = newiTempOperand (tree->ftype, 0); operand *opTrue, *opFalse; ic = newiCodeCondition (geniCodeRValue (cond, FALSE), NULL, falseLabel); @@ -3976,7 +3980,7 @@ geniCodeCritical (ast *tree, int lvl) operand *op = NULL; sym_link *type; - if (!options.stackAuto) + if (!options.stackAuto && !TARGET_IS_HC08) { type = newLink(SPECIFIER); SPEC_VOLATILE(type) = 1;