gpsimio2_lit('\n');
}
+const char *gptr_fns[4][2] = {
+ { "_gptrget1", "_gptrput1" },
+ { "_gptrget2", "_gptrput2" },
+ { "_gptrget3", "_gptrput3" },
+ { "_gptrget4", "_gptrput4" } };
+
+extern set *externs;
+
+/* generate a call to the generic pointer read/write functions */
+void pic16_callGenericPointerRW(int rw, int size)
+{
+ char buf[32];
+ symbol *sym;
+
+ if(size>4) {
+ werror(W_POSSBUG2, __FILE__, __LINE__);
+ abort();
+ }
+
+ strcpy(buf, port->fun_prefix);
+ strcat(buf, gptr_fns[size-1][rw]);
+
+ pic16_emitpcode (POC_CALL, pic16_popGetWithString (buf));
+
+ sym = newSymbol( buf, 0 );
+ sym->used++;
+ strcpy(sym->rname, buf);
+ checkAddSym(&externs, sym);
+}
+
/* check all condition and return appropriate instruction, POC_CPFSGT or POC_CPFFSLT */
int offs=0;
symbol *tmplbl;
unsigned long lit;
- int op, cmp_op=0;
+ int op, cmp_op=0, cond_pre;
FENTRY;
if(!(pic16_options.opt_flags & OF_OPTIMIZE_CMP))return 0;
size = max(AOP_SIZE(left), AOP_SIZE(right));
+
+ cond_pre = rIfx->condition; // must restore old value on return with 0!!!
if(!isAOP_REGlike(left)) {
operand *dummy;
} /* */
+ rIfx->condition = cond_pre;
return 0;
}