Mercurial > hg > CbC > old > device
annotate mc-codegen.h @ 582:3f60e599cc04 intel-register-removal
*** empty log message ***
author | kono |
---|---|
date | Mon, 16 Jan 2006 00:52:56 +0900 |
parents | c3053086f790 |
children | 94d3a8c1b3e8 |
rev | line source |
---|---|
144 | 1 /* for mc-codegen.c */ |
61 | 2 |
452 | 3 extern int use; /* generated value will be used in gexpr */ |
4 extern char *init_src; /* internal defenition string for each file */ | |
5 | |
6 /* these architecture dependent values are defined in mc-code-*.c */ | |
7 | |
327 | 8 extern int size_of_int; |
9 extern int size_of_short; | |
10 extern int size_of_float; | |
11 extern int size_of_double; | |
12 extern int size_of_longlong; | |
13 extern int bit_of_byte; | |
14 extern int endian; | |
83 | 15 |
221 | 16 #define USE_CREG (-1) |
320 | 17 #define ASM_INPUT 1 |
18 #define ASM_OUTPUT 2 | |
19 #define ASM_USED 3 | |
20 #define MAX_ASM_REG 30 | |
61 | 21 |
327 | 22 /* used by mc-parse */ |
104 | 23 |
445 | 24 extern NMTBL * def(NMTBL *n,int ctmode); |
331 | 25 extern int arg_reorder(int arg,int new_arg); |
26 extern int assign_data(int e, int t, NMTBL *n,int offset); | |
27 extern int assign_expr(int e1,int e2,int t); | |
28 extern int assign_expr0(int e1,int e2,int t,int type0); | |
29 extern int assop(int e1,int e2,int op,int t,int no_float); | |
30 extern int backdef(void); | |
31 extern int binop(int op, int e1, int e2, int t1, int t2); | |
32 extern int cexpr(int e); | |
33 extern int cond(int t,int e1,int e2,int e3); | |
34 extern int correct_type(int e,int t); | |
35 extern int csvalue(); | |
36 extern int function_type(int e1,int *dots); | |
37 extern int gexpr(int e1,int use0); | |
38 extern int indop(int e); | |
39 extern int integral(int t); | |
40 extern int new_lvar(int size); | |
41 extern int new_lvar0(int sz); | |
327 | 42 extern int rvalue(int e); |
43 extern int rvalue_t(int e,int t); | |
331 | 44 extern int search_struct_type(int type,char *name,int *dsp); |
45 extern int strop(int e,int ind); | |
137 | 46 extern void arg_register(NMTBL *fnptr); |
438
626d705471d5
Unexecuted code in conditional. Lazy jmp code generation.
kono
parents:
397
diff
changeset
|
47 extern int bexpr(int e1, char cond, int l1); |
626d705471d5
Unexecuted code in conditional. Lazy jmp code generation.
kono
parents:
397
diff
changeset
|
48 extern int bexpr_u(int e1, char cond, int l1); |
552 | 49 extern void checkret(void); // check delayed jump, delayed last exp |
327 | 50 extern void closing(); |
51 extern void cmpdimm(int e, int csreg,int label,int cond); | |
331 | 52 extern void codegen_decl_init(); /* called before each declaration */ |
327 | 53 extern void codegen_init(); /* called only once */ |
54 extern void codegen_reinit(); /* called for each file */ | |
328 | 55 extern void data_closing(NMTBL *n); |
327 | 56 extern void def_label(int cslabel, int dlabel); |
57 extern void emit_init_vars(void); | |
331 | 58 extern void fcheck(NMTBL *n); |
327 | 59 extern void fdecl_struct(int fntype); |
60 extern void free_lvar(int disp); | |
456 | 61 extern void gen_comment(char *s); |
327 | 62 extern void gen_code_enter(char *name); |
63 extern void gen_code_enter1(int args); | |
64 extern void gen_code_leave(char *name); | |
65 extern void gen_enter(char *name); | |
66 extern void gen_enter1(); | |
331 | 67 extern void gen_jmp(int l); |
363 | 68 extern void gen_indirect_goto(int e1); |
327 | 69 extern void gen_leave(int control, char *name); |
331 | 70 extern void init_free_lvar_list(); |
71 extern void lcheck(int e); | |
72 extern void opening(char *filename); | |
73 extern void parallel_rassign(int assigns); | |
74 extern void replace_return_struct(int func,int left); | |
327 | 75 extern void ret(void); |
450
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
76 extern void gen_ret(void); |
eaf9e2746c83
parallel assign for simple expr. (too complex solution)
kono
parents:
449
diff
changeset
|
77 extern void gen_label_call(int l); |
542 | 78 extern void flush_delayed_decl_data(NMTBL *n); |
327 | 79 |
552 | 80 /* used by mc-inline */ |
81 | |
82 extern void checkjmp(int l); // generate delayed jump, l = current label | |
557 | 83 extern int reference(int e1); // recover lvalue from rvalue of memory or register |
84 extern int type_of_bop(int op); | |
85 extern int type_of_conv(int op); | |
86 extern int op_of(int op); | |
552 | 87 |
88 /* used by mc-code-* */ | |
327 | 89 |
90 extern int assign_expr0(int e1,int e2,int t,int type0) ; | |
438
626d705471d5
Unexecuted code in conditional. Lazy jmp code generation.
kono
parents:
397
diff
changeset
|
91 extern int b_expr(int e1, char cond, int l1,int err); |
327 | 92 extern int contains_p(int e,int (*p)(int)); |
449 | 93 extern int contains_p1(int arg,int e,int (*p)(int,int)); |
61 | 94 extern void fwddef(int l); |
327 | 95 extern int fwdlabel(void); |
96 extern int g_expr(int e1); | |
97 extern int g_expr0(int e1); | |
98 extern int g_expr_u(int e1); | |
456 | 99 extern int is_const(int e); |
463 | 100 extern int is_memory(int e); |
547 | 101 extern int is_local_memory(int e1); |
98 | 102 extern int is_code(NMTBL *fnptr); |
103 extern int is_function(NMTBL *fnptr); | |
453 | 104 extern int is_inline(NMTBL *fnptr); |
327 | 105 extern int scalar(int t); |
336 | 106 extern int make_mask(int from,int to); |
107 | |
341 | 108 extern void init_ptr_cache(); |
109 extern void clear_ptr_cache_reg(int r); | |
110 extern int last_ptr_cache(); | |
111 extern void clear_ptr_cache() ; | |
112 extern int get_ptr_cache(NMTBL *nptr); | |
61 | 113 |
366 | 114 extern int ilog(int i); |
115 | |
61 | 116 /* end */ |