Imported Upstream version 2.9.0
[debian/cc1111] / src / izt / izt.h
1 #include <common.h>
2 #include "gen.h"
3 #include "regs.h"
4 #include "aop.h"
5
6 #define TEST(_d, _a) \
7         (_a) ? (void)0 : (failures++, printf("Test %s \"%s\" failed.\n", #_a, _d), _dumpRegs())
8
9 #define NUM_OF(_a)      (sizeof(_a)/sizeof(*(_a)))
10
11 typedef struct {
12     REG *regs;
13     /// One for each size {1, 2, 4}
14     REG *returnRegs[3];
15     REG *scratch;
16     REG *base_ptr;
17 } IZT_PORT;
18
19 IZT_PORT *izt_port;
20
21 void izt_init(IZT_PORT *port);
22 void izt_assignRegisters (eBBlock **ebbs, int count);
23 void izt_gen(iCode *ic);
24 /// Return the base 2 log of i, providing i is a power of 2.
25 int izt_util_binLog(int i);