DEBUGpic16_emitcode (";", " %s type:AOP_DIR",prefix);
DEBUGpic16_emitcode (";", " %s aopu.aop_dir:%s",prefix,aop->aopu.aop_dir);
}
- if (aop->type == AOP_DPTR)
- DEBUGpic16_emitcode (";", " %s type:AOP_DPTR",prefix);
- if (aop->type == AOP_DPTR2)
- DEBUGpic16_emitcode (";", " %s type:AOP_DPTR2",prefix);
- if (aop->type == AOP_R0)
- DEBUGpic16_emitcode (";", " %s type:AOP_R0",prefix);
- if (aop->type == AOP_R1)
- DEBUGpic16_emitcode (";", " %s type:AOP_R1",prefix);
if (aop->type == AOP_STK)
DEBUGpic16_emitcode (";", " %s type:AOP_STK",prefix);
if (aop->type == AOP_STA)
DEBUGpic16_emitcode (";", " %s type:AOP_STA",prefix);
- if (aop->type == AOP_IMMD)
- {
- DEBUGpic16_emitcode (";", " %s type:AOP_IMMD",prefix);
- DEBUGpic16_emitcode (";", " %s aopu.aop_immd:%s",prefix,aop->aopu.aop_immd);
- }
if (aop->type == AOP_STR)
{
DEBUGpic16_emitcode (";", " %s type:AOP_STR",prefix);
}
+void pic16_DumpOpX(FILE *fp, char *prefix, operand *op)
+{
+ if(!op)return;
+
+ fprintf(fp, "%s [", prefix);
+ fprintf(fp, "%s", IS_SYMOP(op)?"S":" ");
+ fprintf(fp, "%s", IS_VALOP(op)?"V":" ");
+ fprintf(fp, "%s", IS_TYPOP(op)?"T":" ");
+ fprintf(fp, "] ");
+
+ fprintf(fp, "isaddr:%d,", op->isaddr);
+ fprintf(fp, "isvolatile:%d,", op->isvolatile);
+ fprintf(fp, "isGlobal:%d,", op->isGlobal);
+ fprintf(fp, "isPtr:%d,", op->isPtr);
+ fprintf(fp, "isParm:%d,", op->isParm);
+ fprintf(fp, "isLit:%d\n", op->isLiteral);
+}
+
+
void _debugf(char *f, int l, char *frm, ...)
{
va_list ap;
if(isAOP_REGlike(left) && isAOP_LIT(right)) {
/* comparing register vs. literal */
- lit = (unsigned long)floatFromVal(AOP(right)->aopu.aop_lit);
+ lit = ulFromVal(AOP(right)->aopu.aop_lit);
if(size == 1) {
tmplbl = newiTempLabel( NULL );
pic16_emitpcode(POC_TSTFSZ, pic16_popGet(AOP(left), 0));
pic16_emitpcode(POC_BRA, pic16_popGetLabel(tmplbl->key));
- pic16_emitpcode(POC_BRA, pic16_popGetLabel(rIfx->lbl->key));
+ pic16_emitpcode(POC_GOTO, pic16_popGetLabel(rIfx->lbl->key));
pic16_emitpLabel(tmplbl->key);
ifx->generated = 1;