gen: remove the unused c_op()
[neatcc.git] / gen.h
blob40f8664fc585a15b6ff4609e7f818ac6487ddaa1
1 #define SECSIZE (1 << 18)
2 #define MAXTMP (1 << 12)
3 #define LONGSZ 4
5 /* basic types */
6 #define BT_SZMASK 0x00ff
7 #define BT_SIGNED 0x0100
8 #define BT_FLOAT 0x0200
9 #define BT_SZ(bt) ((bt) & BT_SZMASK)
11 #define O_ADD 0x00
12 #define O_SUB 0x01
13 #define O_AND 0x02
14 #define O_OR 0x03
15 #define O_XOR 0x04
16 #define O_SHL 0x10
17 #define O_SHR 0x11
18 #define O_MUL 0x20
19 #define O_DIV 0x21
20 #define O_MOD 0x22
21 #define O_LT 0x30
22 #define O_GT 0x31
23 #define O_LE 0x32
24 #define O_GE 0x33
25 #define O_EQ 0x34
26 #define O_NEQ 0x35
27 #define O_NEG 0x40
28 #define O_NOT 0x41
29 #define O_LNOT 0x42
30 #define O_INC 0x50
31 #define O_DEC 0x51
33 #define O_SET 0x100
35 void o_bop(int op);
36 void o_uop(int op);
38 void o_num(long n, unsigned bt);
39 void o_local(long addr, unsigned bt);
40 void o_assign(unsigned bt);
41 void o_deref(unsigned bt);
42 void o_load(void);
43 void o_addr(void);
44 void o_symaddr(long addr, unsigned bt);
45 void o_call(int argc, unsigned *bt, unsigned ret_vs);
47 long o_mklocal(int size);
48 long o_arg(int i, unsigned bt);
49 void o_rmlocal(long addr, int sz);
50 void o_tmpdrop(int n);
51 void o_tmpswap(void);
52 void o_tmpcopy(void);
53 void o_fork(void);
54 void o_forkpush(void);
55 void o_forkjoin(void);
56 void o_cast(unsigned bt);
57 int o_popnum(long *c);
58 long o_mklabel(void);
59 long o_jz(long addr);
60 long o_jnz(long addr);
61 long o_jmp(long addr);
62 void o_filljmp(long addr);
63 void o_filljmp2(long addr, long jmpdst);
64 void o_memcpy(int sz);
65 void o_memset(int x, int sz);
66 void o_datset(long addr, int off, unsigned bt);
68 long o_func_beg(char *name, int global);
69 void o_func_end(void);
70 void o_ret(unsigned bt);
72 int o_nogen(void);
73 void o_dogen(void);
75 void out_init(void);
76 void out_write(int fd);
77 long out_func_beg(char *name, int global);
78 void out_func_end(char *buf, int len);
79 long out_mkvar(char *name, int size, int global);
80 long out_mkdat(char *name, char *buf, int len, int global);
81 long out_mkundef(char *name, int sz);
82 void out_rela(long addr, int off, int rel);
83 void out_datcpy(long addr, int off, char *buf, int len);
84 void out_datrela(long addr, long dataddr, int off);