gen: use lea for calculating stack address
[neatcc.git] / gen.h
blob732a9a7be6211ab21489c1ceca4a6a972a9a42a5
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) ((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_load(void);
19 void o_arrayderef(unsigned bt);
20 void o_addr(void);
21 void o_symaddr(char *name, unsigned bt);
22 void o_call(int argc, unsigned *bt, unsigned ret_vs);
23 void o_add(void);
24 void o_sub(void);
25 void o_mul(void);
26 void o_shl(void);
27 void o_shr(void);
28 void o_lt(void);
30 long o_mklocal(int size);
31 long o_arg(int i, unsigned bt);
32 void o_tmpdrop(int n);
33 void o_tmpswap(void);
34 void o_tmpcopy(void);
35 void o_tmpjoin(void);
36 long o_mklabel(void);
37 long o_jz(long addr);
38 long o_jmp(long addr);
39 void o_filljmp(long addr);
41 void out_init(void);
42 void out_write(int fd);
43 void out_func_beg(char *name);
44 void out_func_end(char *buf, int len);
45 void out_rela(char *name, int off);