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