annotate mc-codegen.h @ 517:d686497e8fd2

cstring array fix.
author kono
date Mon, 26 Dec 2005 12:17:23 +0900
parents f84d4525ffc8
children 492f06738550
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
144
56211702f298 creg/freg continue
kono
parents: 138
diff changeset
1 /* for mc-codegen.c */
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
2
452
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
3 extern int use; /* generated value will be used in gexpr */
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
4 extern char *init_src; /* internal defenition string for each file */
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
5
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
6 /* these architecture dependent values are defined in mc-code-*.c */
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
7
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
8 extern int size_of_int;
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
9 extern int size_of_short;
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
10 extern int size_of_float;
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
11 extern int size_of_double;
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
12 extern int size_of_longlong;
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
13 extern int bit_of_byte;
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
14 extern int endian;
83
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
15
221
ceae585186d9 *** empty log message ***
kono
parents: 195
diff changeset
16 #define USE_CREG (-1)
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents: 305
diff changeset
17 #define ASM_INPUT 1
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents: 305
diff changeset
18 #define ASM_OUTPUT 2
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents: 305
diff changeset
19 #define ASM_USED 3
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents: 305
diff changeset
20 #define MAX_ASM_REG 30
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
21
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
22 /* used by mc-parse */
104
c21aeb12b78b *** empty log message ***
kono
parents: 102
diff changeset
23
445
kono
parents: 438
diff changeset
24 extern NMTBL * def(NMTBL *n,int ctmode);
331
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
25 extern int arg_reorder(int arg,int new_arg);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
26 extern int assign_data(int e, int t, NMTBL *n,int offset);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
27 extern int assign_expr(int e1,int e2,int t);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
28 extern int assign_expr0(int e1,int e2,int t,int type0);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
29 extern int assop(int e1,int e2,int op,int t,int no_float);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
30 extern int backdef(void);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
31 extern int binop(int op, int e1, int e2, int t1, int t2);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
32 extern int cexpr(int e);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
33 extern int cond(int t,int e1,int e2,int e3);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
34 extern int correct_type(int e,int t);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
35 extern int csvalue();
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
36 extern int function_type(int e1,int *dots);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
37 extern int gexpr(int e1,int use0);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
38 extern int indop(int e);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
39 extern int integral(int t);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
40 extern int new_lvar(int size);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
41 extern int new_lvar0(int sz);
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
42 extern int rvalue(int e);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
43 extern int rvalue_t(int e,int t);
331
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
44 extern int search_struct_type(int type,char *name,int *dsp);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
45 extern int strop(int e,int ind);
137
9fb09db54436 fix powerpc get_fregister_var's regs error.
kono
parents: 133
diff changeset
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
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
49 extern void checkret(void);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
50 extern void closing();
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
51 extern void cmpdimm(int e, int csreg,int label,int cond);
331
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
52 extern void codegen_decl_init(); /* called before each declaration */
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
53 extern void codegen_init(); /* called only once */
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
54 extern void codegen_reinit(); /* called for each file */
328
7ecb023d29b8 macro/codegen reorganization done.
kono
parents: 327
diff changeset
55 extern void data_closing(NMTBL *n);
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
56 extern void def_label(int cslabel, int dlabel);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
57 extern void emit_init_vars(void);
331
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
58 extern void fcheck(NMTBL *n);
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
59 extern void fdecl_struct(int fntype);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
60 extern void free_lvar(int disp);
456
b8f95294eb77 inline continue... if test passed.
kono
parents: 453
diff changeset
61 extern void gen_comment(char *s);
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
62 extern void gen_code_enter(char *name);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
63 extern void gen_code_enter1(int args);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
64 extern void gen_code_leave(char *name);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
65 extern void gen_enter(char *name);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
66 extern void gen_enter1();
331
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
67 extern void gen_jmp(int l);
363
f3f2b7906d50 label extension
kono
parents: 341
diff changeset
68 extern void gen_indirect_goto(int e1);
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
69 extern void gen_leave(int control, char *name);
331
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
70 extern void init_free_lvar_list();
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
71 extern void lcheck(int e);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
72 extern void opening(char *filename);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
73 extern void parallel_rassign(int assigns);
f25aa4f03198 bit-field continue...
kono
parents: 328
diff changeset
74 extern void replace_return_struct(int func,int left);
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
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
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
78
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
79 /* used by mc-cod-* */
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
80
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
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
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
83 extern int contains_p(int e,int (*p)(int));
449
c55363eff5e5 parallel assignment (modify not completed)
kono
parents: 445
diff changeset
84 extern int contains_p1(int arg,int e,int (*p)(int,int));
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
85 extern void fwddef(int l);
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
86 extern int fwdlabel(void);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
87 extern int g_expr(int e1);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
88 extern int g_expr0(int e1);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
89 extern int g_expr_u(int e1);
456
b8f95294eb77 inline continue... if test passed.
kono
parents: 453
diff changeset
90 extern int is_const(int e);
463
50a59dfb4606 inline continue...
kono
parents: 456
diff changeset
91 extern int is_memory(int e);
98
07c2554e1cfa *** empty log message ***
kono
parents: 95
diff changeset
92 extern int is_code(NMTBL *fnptr);
07c2554e1cfa *** empty log message ***
kono
parents: 95
diff changeset
93 extern int is_function(NMTBL *fnptr);
453
1e5ca85d3f97 inline on going...
kono
parents: 452
diff changeset
94 extern int is_inline(NMTBL *fnptr);
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
95 extern int scalar(int t);
336
d488b72254fb bit-field done.
kono
parents: 331
diff changeset
96 extern int make_mask(int from,int to);
d488b72254fb bit-field done.
kono
parents: 331
diff changeset
97
341
ca34f02b2056 ptr cache speed up
kono
parents: 336
diff changeset
98 extern void init_ptr_cache();
ca34f02b2056 ptr cache speed up
kono
parents: 336
diff changeset
99 extern void clear_ptr_cache_reg(int r);
ca34f02b2056 ptr cache speed up
kono
parents: 336
diff changeset
100 extern int last_ptr_cache();
ca34f02b2056 ptr cache speed up
kono
parents: 336
diff changeset
101 extern void clear_ptr_cache() ;
ca34f02b2056 ptr cache speed up
kono
parents: 336
diff changeset
102 extern int get_ptr_cache(NMTBL *nptr);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
103
366
2d510935c37d *** empty log message ***
kono
parents: 363
diff changeset
104 extern int ilog(int i);
2d510935c37d *** empty log message ***
kono
parents: 363
diff changeset
105
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
106 /* end */