Checkpoint. More refactoring.
[tinycc/k1w1.git] / tccgen.h
blob476581e40116c4403f77295c8b9c29f36a0deb24
1 /*
2 * TCC - Tiny C Compiler
3 *
4 * Copyright (c) 2001-2004 Fabrice Bellard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef __TCCGEN_H__
21 #define __TCCGEN_H__
23 static void parse_expr_type(CType *type);
24 static void expr_type(CType *type);
25 static void unary_type(CType *type);
26 static void block(int *bsym, int *csym, int *case_sym, int *def_sym,
27 int case_reg, int is_expr);
28 int expr_const(void);
29 static void expr_eq(void);
30 void gexpr(void);
31 void gen_inline_functions(void);
32 void decl(int l);
33 void decl_initializer(CType *type, Section *sec, unsigned long c,
34 int first, int size_only);
35 void decl_initializer_alloc(CType *type, AttributeDef *ad, int r,
36 int has_init, int v, int scope);
37 int gv(int rc);
38 void gv2(int rc1, int rc2);
39 void move_reg(int r, int s);
40 void save_regs(int n);
41 void save_reg(int r);
42 void vpop(void);
43 void vswap(void);
44 void vdup(void);
45 int get_reg(int rc);
46 int get_reg_ex(int rc,int rc2);
47 void mk_pointer(CType *type);
49 void gen_op(int op);
50 void force_charshort_cast(int t);
51 void gen_cast(CType *type);
52 void vstore(void);
54 #endif /* __TCCGEN_H__ */