truelbl = newiTempLabel(NULL);
size = max(AOP_SIZE(left),AOP_SIZE(right));
+ DEBUGpic14_AopType(__LINE__,left,right,result);
+
#define _swapp
/* if literal is on the right then swap with left */
}
-#endif
+#endif // _swapp
+
if(AOP_TYPE(left) == AOP_LIT) {
//symbol *lbl = newiTempLabel(NULL);
emitpcode(POC_SUBFW, popGet(AOP(right),0));
DEBUGpic14_emitcode ("; ***","%s %d",__FUNCTION__,__LINE__);
rFalseIfx.condition ^= 1;
- genSkipc(&rFalseIfx);
+ if (AOP_TYPE(result) == AOP_CRY)
+ genSkipc(&rFalseIfx);
+ else {
+ emitpcode(POC_CLRF, popGet(AOP(result),0));
+ emitpcode(POC_RLF, popGet(AOP(result),0));
+ }
break;
}
}
if(ifx) ifx->generated = 1;
+ //goto check_carry;
return;
} else {
emitpLabel(lbl->key);
DEBUGpic14_emitcode ("; ***","%s %d",__FUNCTION__,__LINE__);
- genSkipc(&rFalseIfx);
+ if ((AOP_TYPE(result) == AOP_CRY && AOP_SIZE(result)) ||
+ (AOP_TYPE(result) == AOP_REG)) {
+ emitpcode(POC_CLRF, popGet(AOP(result),0));
+ emitpcode(POC_RLF, popGet(AOP(result),0));
+ } else {
+ genSkipc(&rFalseIfx);
+ }
+ //genSkipc(&rFalseIfx);
if(ifx) ifx->generated = 1;
+
return;
}
+ check_carry:
if (AOP_TYPE(result) == AOP_CRY && AOP_SIZE(result)) {
+ DEBUGpic14_emitcode ("; ***","%s %d",__FUNCTION__,__LINE__);
pic14_outBitC(result);
} else {
+ DEBUGpic14_emitcode ("; ***","%s %d",__FUNCTION__,__LINE__);
/* if the result is used in the next
ifx conditional branch then generate
code a little differently */
/* Hardcoded flags to change the behavior of the PIC port */
static int peepOptimizing = 1; /* run the peephole optimizer if nonzero */
static int functionInlining = 1; /* inline functions if nonzero */
-int debug_verbose = 0; /* Set true to inundate .asm file */
+int debug_verbose = 1; /* Set true to inundate .asm file */
static int GpCodeSequenceNumber = 1;
int GpcFlowSeq = 1;