Mercurial > hg > CbC > old > device
annotate mc-codegen.h @ 517:d686497e8fd2
cstring array fix.
author | kono |
---|---|
date | Mon, 26 Dec 2005 12:17:23 +0900 |
parents | f84d4525ffc8 |
children | 492f06738550 |
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); |
327 | 49 extern void checkret(void); |
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); |
327 | 78 |
79 /* used by mc-cod-* */ | |
80 | |
81 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
|
82 extern int b_expr(int e1, char cond, int l1,int err); |
327 | 83 extern int contains_p(int e,int (*p)(int)); |
449 | 84 extern int contains_p1(int arg,int e,int (*p)(int,int)); |
61 | 85 extern void fwddef(int l); |
327 | 86 extern int fwdlabel(void); |
87 extern int g_expr(int e1); | |
88 extern int g_expr0(int e1); | |
89 extern int g_expr_u(int e1); | |
456 | 90 extern int is_const(int e); |
463 | 91 extern int is_memory(int e); |
98 | 92 extern int is_code(NMTBL *fnptr); |
93 extern int is_function(NMTBL *fnptr); | |
453 | 94 extern int is_inline(NMTBL *fnptr); |
327 | 95 extern int scalar(int t); |
336 | 96 extern int make_mask(int from,int to); |
97 | |
341 | 98 extern void init_ptr_cache(); |
99 extern void clear_ptr_cache_reg(int r); | |
100 extern int last_ptr_cache(); | |
101 extern void clear_ptr_cache() ; | |
102 extern int get_ptr_cache(NMTBL *nptr); | |
61 | 103 |
366 | 104 extern int ilog(int i); |
105 | |
61 | 106 /* end */ |