13 #if !defined(__BORLANDC__) && !defined(_MSC_VER)
14 #define DEBUGpc(fmt,...) DEBUGpic16_emitcode("; =:=", "%s:%s:%d: " fmt, __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)
16 #define isAOP_LIT(x) (AOP_TYPE(x) == AOP_LIT)
17 #define isAOP_REGlike(x) (AOP_TYPE(x) == AOP_REG || AOP_TYPE(x) == AOP_DIR || AOP_TYPE(x) == AOP_PCODE || AOP_TYPE(x) == AOP_STA)
20 /* Resolved ifx structure. This structure stores information
21 * about an iCode ifx that makes it easier to generate code.
23 typedef struct resolvedIfx {
24 symbol *lbl; /* pointer to a label */
25 int condition; /* true or false ifx */
26 int generated; /* set true when the code associated with the ifx
32 * The various GEN_xxxxx macros handle which functions
33 * should be included in the gen.c source. We are going to use
34 * our own functions here so, they must be commented out from
39 void pic16_genNot(iCode *ic);
42 void pic16_genCpl(iCode *ic);
46 * global function definitions
48 void pic16_DumpValue(char *prefix, value *val);
49 void pic16_DumpPcodeOp(char *prefix, pCodeOp *pcop);
50 void pic16_DumpAop(char *prefix, asmop *aop);
51 void pic16_DumpSymbol(char *prefix, symbol *sym);
52 void pic16_DumpOp(char *prefix, operand *op);
54 void gpsimio2_pcop(pCodeOp *pcop);
55 void gpsimio2_lit(unsigned char lit);
57 void gpsimDebug_StackDump(char *fname, int line, char *info);
59 int pic16_genCmp_special(operand *left, operand *right, operand *result,
60 iCode *ifx, resolvedIfx *rIfx, int sign);
63 #define debugf(frm, rest) _debugf(__FILE__, __LINE__, frm, rest)
65 void _debugf(char *f, int l, char *frm, ...);
67 #endif /* __GENUTILS_H__ */