toBoolean(left);
emitcode(_shortJP, "nz," LABEL_STR,tlbl->key+100);
toBoolean(right);
- emitcode("", LABEL_STR,tlbl->key+100);
+ emitcode("", LABEL_STR ":",tlbl->key+100);
outBitAcc(result);
}
return 0;
}
+/*-----------------------------------------------------------------*/
+/* jmpTrueOrFalse - */
+/*-----------------------------------------------------------------*/
+static void jmpTrueOrFalse (iCode *ic, symbol *tlbl)
+{
+ // ugly but optimized by peephole
+ if(IC_TRUE(ic)){
+ symbol *nlbl = newiTempLabel(NULL);
+ emitcode("jp", LABEL_STR, nlbl->key+100);
+ emitcode("", LABEL_STR ":",tlbl->key+100);
+ emitcode("jp",LABEL_STR,IC_TRUE(ic)->key+100);
+ emitcode("", LABEL_STR ":",nlbl->key+100);
+ }
+ else{
+ emitcode("jp", LABEL_STR, IC_FALSE(ic)->key+100);
+ emitcode("", LABEL_STR ":",tlbl->key+100);
+ }
+ ic->generated = 1;
+}
+
/*-----------------------------------------------------------------*/
/* genAnd - code for and */
/*-----------------------------------------------------------------*/
// if(left & literal)
else{
if(ifx)
-#if 0
jmpTrueOrFalse(ifx, tlbl);
-#else
- assert(0);
-#endif
goto release ;
}
}
while (size--) {
char *l = aopGet(AOP(right),offset,FALSE);
if (isRegOrLit(AOP(right)) && !IS_GB) {
- emitcode("ld", "(%s),%s", l);
+ emitcode("ld", "(%s),%s", ptr, l);
}
else {
MOVA(l);