implement conditional expression
[neatcc/cc.git] / gen.h
blobd57989b0ab26950b1041c3bf9c398e3b64902c95
1 #define SECSIZE (1 << 12)
2 #define MAXTMP (1 << 12)
4 /* basic types */
5 #define BT_SZMASK 0x00ff
6 #define BT_SIGNED 0x0100
7 #define BT_FLOAT 0x0200
8 #define BT_SZ(bt) (1 << ((bt) & BT_SZMASK))
10 void o_func_beg(char *name);
11 void o_func_end(void);
12 void o_ret(unsigned bt);
14 void o_num(int n, unsigned bt);
15 void o_local(long addr, unsigned bt);
16 void o_assign(unsigned bt);
17 void o_deref(unsigned bt);
18 void o_addr(void);
19 void o_symaddr(char *name, unsigned bt);
20 void o_call(int argc, unsigned *bt, unsigned ret_vs);
21 void o_add(void);
22 void o_sub(void);
24 long o_mklocal(int size);
25 long o_arg(int i, unsigned bt);
26 void o_droptmp(int n);
27 long o_mklabel(void);
28 void o_jz(long addr);
29 void o_jmp(long addr);
30 long o_jmpstub(void);
31 long o_jzstub(void);
32 void o_filljmp(long addr);
34 void out_init(void);
35 void out_write(int fd);
36 void out_func_beg(char *name);
37 void out_func_end(char *buf, int len);
38 void out_rela(char *name, int off);