annotate mc-code.h @ 456:b8f95294eb77

inline continue... if test passed.
author kono
date Wed, 01 Dec 2004 19:32:34 +0900
parents 8e3284b0a8c9
children bfa4c834a3b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
1 /* function required by mc-codegen.c
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
2 mc-code-*.c have to provied these
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
3 */
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
4
173
3b33c7daae95 *** empty log message ***
kono
parents: 168
diff changeset
5
452
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
6 #define MAX_MAX 50 /* architecture independent max registers */
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
7 #define INPUT_REG 2 /* input register ( can be reused ) */
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
8 #define USING_REG 1 /* unreusable register usage */
144
56211702f298 creg/freg continue
kono
parents: 139
diff changeset
9
452
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
10 extern char *l_include_path[]; /* library including path */
173
3b33c7daae95 *** empty log message ***
kono
parents: 168
diff changeset
11
452
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
12 extern int disp_offset; /* displacement offset in code and function */
254
5aaca4f9d96b *** empty log message ***
kono
parents: 239
diff changeset
13
83
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
14 extern int MAX_REGISTER;
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
15 extern int MAX_REGISTGER_VAR;
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
16 extern int MAX_FREGISTER;
103
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
17
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
18 extern int MAX_INPUT_REGISTER_VAR;
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
19 extern int MAX_CODE_INPUT_REGISTER_VAR;
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
20 extern int MAX_INPUT_DREGISTER_VAR;
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
21 extern int MAX_CODE_INPUT_FREGISTER_VAR;
103
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
22 extern int MAX_CODE_INPUT_DREGISTER_VAR;
99
53899975154c *** empty log message ***
kono
parents: 97
diff changeset
23
94
1ad7045741a7 float dbinop fix
kono
parents: 93
diff changeset
24 #define REG_LVAR_OFFSET 2
83
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
25
340
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
26 extern int data_alignment;
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
27
452
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
28 extern int code_lassop_p; /* architecture has code_lassop */
238
d64e9a6a66bd ia32 long long code written.
kono
parents: 229
diff changeset
29
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
30 /* used by mc-codegen */
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
31
452
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
32 extern void gexpr_init(void); /* code generator initialize for each statement */
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
33 extern void emit_init(void); /* called before delcalartion */
452
8e3284b0a8c9 minor update
kono
parents: 450
diff changeset
34 extern void gen_gdecl(char *n, int gpc); /* global definition */
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
35
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
36 extern void code_init(); /* called only once */
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
37 extern void emit_reinit(); /* called for each file */
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
38
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
39 extern void gexpr_code_init(void);
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
40
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
41 extern void code_enter(char *name);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
42 extern void code_enter1(int args);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
43 extern void code_leave(char *name);
450
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
44 extern void code_label_call(int i);
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
45 extern void code_ret();
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
46 extern void enter(char *name);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
47 extern void enter1();
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
48 extern void leave(int control, char *name);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
49 extern void jmp(int l);
449
c55363eff5e5 parallel assignment (modify not completed)
kono
parents: 438
diff changeset
50 extern int not_simple_p(int l);
450
eaf9e2746c83 parallel assign for simple expr. (too complex solution)
kono
parents: 449
diff changeset
51 extern void code_save_stacks();
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
52
105
7e3d59e56a53 save register ( incomplete )
kono
parents: 104
diff changeset
53 extern int get_register_var(NMTBL *n);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
54 extern int get_dregister_var(NMTBL *n,int d);
195
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
55 extern int get_lregister_var(NMTBL *n);
126
1d1612fe705a *** empty log message ***
kono
parents: 119
diff changeset
56 extern int get_input_register_var(int,NMTBL *,int);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
57 extern int get_input_dregister_var(int,NMTBL *,int,int);
195
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
58 extern int get_input_lregister_var(int,NMTBL *,int);
341
ca34f02b2056 ptr cache speed up
kono
parents: 340
diff changeset
59 extern void code_ptr_cache_def(int r,NMTBL *nptr);
ca34f02b2056 ptr cache speed up
kono
parents: 340
diff changeset
60 extern void use_ptr_cache(int r);
345
2b3946ee4fc9 *** empty log message ***
kono
parents: 341
diff changeset
61 extern int code_register_overlap(int s,int t);
341
ca34f02b2056 ptr cache speed up
kono
parents: 340
diff changeset
62
426
fb136af3bf09 Bitfield reorganization.
kono
parents: 382
diff changeset
63 extern int emit_push();
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
64 extern int emit_pop(int type);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
65 extern void gexpr_code_init();
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
66 extern int code_csvalue();
147
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
67 extern void code_gexpr(int e);
287
a0779a414855 *** empty log message ***
kono
parents: 280
diff changeset
68 extern void code_cmpdimm(int e, int csreg,int label,int cond);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
69 extern void code_gvar(int e1,int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
70 extern void code_rgvar(int e1,int reg);
165
kono
parents: 162
diff changeset
71 extern void code_crgvar(int e1,int reg,int sign,int sz);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
72 extern void code_lvar(int e2,int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
73 extern void code_register(int e2,int reg);
94
1ad7045741a7 float dbinop fix
kono
parents: 93
diff changeset
74 extern void code_rlvar(int e2,int reg);
165
kono
parents: 162
diff changeset
75 extern void code_crlvar(int e2,int reg,int sign,int sz);
109
e09f9de6f5d3 *** empty log message ***
kono
parents: 108
diff changeset
76 extern void code_fname(NMTBL *n,int reg);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
77 extern void code_const(int e2,int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
78 extern void code_neg(int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
79 extern void code_not(int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
80 extern void code_lnot(int reg);
168
b1297c82e926 cpostinc removal
kono
parents: 167
diff changeset
81 extern void code_preinc(int e1,int e2,int dir,int sign,int sz,int reg);
b1297c82e926 cpostinc removal
kono
parents: 167
diff changeset
82 extern void code_postinc(int e1,int e2,int dir,int sign,int sz,int reg);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
83 extern void code_return(int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
84 extern void code_environment(int reg);
221
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
85 extern void code_bool(int e1,int reg);
287
a0779a414855 *** empty log message ***
kono
parents: 280
diff changeset
86 extern void code_cmp_crgvar(int e1,int reg,int sz,int label,int cond);
a0779a414855 *** empty log message ***
kono
parents: 280
diff changeset
87 extern void code_cmp_crlvar(int e1,int reg,int sz,int label,int cond);
a0779a414855 *** empty log message ***
kono
parents: 280
diff changeset
88 extern void code_cmp_rgvar(int e1,int reg,int label,int cond);
a0779a414855 *** empty log message ***
kono
parents: 280
diff changeset
89 extern void code_cmp_rlvar(int e1,int reg,int label,int cond);
a0779a414855 *** empty log message ***
kono
parents: 280
diff changeset
90 extern void code_cmp_register(int e2,int label,int cond);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
91 extern void code_string(int e1,int reg);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
92 extern void emit_copy(int from,int to,int length,int offset,int value,int det);
94
1ad7045741a7 float dbinop fix
kono
parents: 93
diff changeset
93 extern int function(int e1);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
94 extern void code_frame_pointer(int e3);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
95 extern void code_fix_frame_pointer(int disp_offset);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
96 extern void code_jmp(char *s);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
97 extern void code_indirect_jmp(int e2);
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
98
355
6188f66c0c0b cond op, and arg scope.
kono
parents: 353
diff changeset
99 extern void code_rindirect(int e1, int reg,int offset, int us,int sz);
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
100 #if FLOAT_CODE
221
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
101 extern int code_drindirect(int e1, int reg,int offset, int d);
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
102 #endif
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
103 #if LONGLONG_CODE
221
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
104 extern int code_lrindirect(int e1, int reg,int offset, int us);
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
105 #endif
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
106
103
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
107 extern void code_assign_gvar(int e2,int reg,int byte);
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
108 extern void code_assign_lvar(int e2,int reg,int byte);
111
7aa449aff3e6 floating point
kono
parents: 109
diff changeset
109 extern void code_assign_register(int e2,int byte,int reg);
118
07b91b625f84 assignment optimization
kono
parents: 116
diff changeset
110 extern void code_assign(int e2,int byte,int reg);
221
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
111 extern void code_register_assop(int e2,int reg,int op,int byte);
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
112 extern void code_assop(int op,int reg,int byte,int sign);
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
113 extern void tosop(int op,int reg,int oreg);
66
0b068058dd67 *** empty log message ***
kono
parents: 61
diff changeset
114 extern void code_opening(char *filename);
0b068058dd67 *** empty log message ***
kono
parents: 61
diff changeset
115 extern void code_closing();
438
626d705471d5 Unexecuted code in conditional. Lazy jmp code generation.
kono
parents: 430
diff changeset
116 extern int rexpr(int e1, int l1, int cond,int t);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
117 extern void jmp(int l);
187
dffcccf8b1cb nested COND
kono
parents: 173
diff changeset
118 extern int code_get_fixed_creg(int reg,int type);
dffcccf8b1cb nested COND
kono
parents: 173
diff changeset
119 extern void code_set_fixed_creg(int reg,int mode,int type);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
120 extern void code_set_return_register(int mode);
66
0b068058dd67 *** empty log message ***
kono
parents: 61
diff changeset
121 extern void global_table(void);
92
e7f8515ba882 *** empty log message ***
kono
parents: 89
diff changeset
122 extern void code_label(int labelno);
363
f3f2b7906d50 label extension
kono
parents: 355
diff changeset
123 extern void code_label_value(int labelno,int reg);
92
e7f8515ba882 *** empty log message ***
kono
parents: 89
diff changeset
124
189
f53d70110377 immediate instructions.
kono
parents: 187
diff changeset
125 extern int code_const_op_p(int op,int v);
221
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
126 extern void oprtc(int op,int reg,int v);
189
f53d70110377 immediate instructions.
kono
parents: 187
diff changeset
127
340
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
128 extern void align(int t);
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
129 extern void emit_global(char *name,int t);
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
130 extern void emit_space(int sp);
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
131 extern void emit_char(int d);
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
132 extern void emit_short(int d);
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
133 extern void emit_int(int d);
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
134 extern void emit_longlong(int e);
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
135 extern void emit_double(int e);
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
136 extern void emit_float(int e);
367
4efbb07f556b global variable offset
kono
parents: 365
diff changeset
137 extern void emit_address(char *s,int offset);
340
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
138 extern void emit_label(int labelno);
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
139 extern int emit_string_label();
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
140 extern void ascii(char *s);
0150de6a3244 emit_data moved.
kono
parents: 331
diff changeset
141
353
41ed77cb9c67 name table reogranization, extendable cheap done.
kono
parents: 345
diff changeset
142 extern void code_i2c(int reg);
41ed77cb9c67 name table reogranization, extendable cheap done.
kono
parents: 345
diff changeset
143 extern void code_i2s(int reg);
41ed77cb9c67 name table reogranization, extendable cheap done.
kono
parents: 345
diff changeset
144 extern void code_u2uc(int reg);
41ed77cb9c67 name table reogranization, extendable cheap done.
kono
parents: 345
diff changeset
145 extern void code_u2us(int reg);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
146
195
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
147 #if FLOAT_CODE
81
f94ca1168520 float first try...
kono
parents: 66
diff changeset
148 /* floating point part */
f94ca1168520 float first try...
kono
parents: 66
diff changeset
149
438
626d705471d5 Unexecuted code in conditional. Lazy jmp code generation.
kono
parents: 430
diff changeset
150 extern int drexpr(int e1, int e2,int l1, int op,int cond);
81
f94ca1168520 float first try...
kono
parents: 66
diff changeset
151 extern int dpop_register();
f94ca1168520 float first try...
kono
parents: 66
diff changeset
152 extern int emit_dpop(int);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
153 extern void code_dregister(int e2,int reg,int d);
287
a0779a414855 *** empty log message ***
kono
parents: 280
diff changeset
154 extern void code_cmp_dregister(int,int,int,int);
a0779a414855 *** empty log message ***
kono
parents: 280
diff changeset
155 extern void code_cmp_drgvar(int,int,int,int,int);
a0779a414855 *** empty log message ***
kono
parents: 280
diff changeset
156 extern void code_cmp_drlvar(int,int,int,int,int);
103
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
157 extern void code_dassign(int,int,int);
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
158 extern void code_dassign_gvar(int,int,int);
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
159 extern void code_dassign_lvar(int,int,int);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
160 extern void code_dassign_dregister(int e2,int d,int reg);
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
161 extern void code_dconst(int,int,int);
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
162 extern void code_dneg(int,int);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
163 extern void code_drgvar(int,int,int);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
164 extern void code_drlvar(int,int,int);
221
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
165 extern void dtosop(int,int,int);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
166 extern void emit_dpop_free(int,int);
133
7d436c08e949 separate float / double flow
kono
parents: 126
diff changeset
167 extern void emit_dpush(int);
221
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
168 extern void code_i2d();
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
169 extern void code_d2i();
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
170 extern void code_u2d();
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
171 extern void code_d2u();
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
172 extern void code_d2f();
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
173 extern void code_f2d();
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
174 extern void code_f2i();
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
175 extern void code_f2u();
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
176 extern void code_i2f();
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
177 extern void code_u2f();
133
7d436c08e949 separate float / double flow
kono
parents: 126
diff changeset
178
81
f94ca1168520 float first try...
kono
parents: 66
diff changeset
179
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
180 extern void code_dpreinc(int e1,int e2,int d,int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
181 extern void code_dpostinc(int e1,int e2,int d,int reg);
221
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
182 extern void code_dassop(int op,int reg,int d);
219
6190d24e178c long long code generation level 4
kono
parents: 218
diff changeset
183 extern void code_register_dassop(int reg,int op,int d);
89
917947ffeb7c power pc version
kono
parents: 85
diff changeset
184
195
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
185 #endif
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
186
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
187 #if LONGLONG_CODE
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
188 /* 64bit int part */
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
189
438
626d705471d5 Unexecuted code in conditional. Lazy jmp code generation.
kono
parents: 430
diff changeset
190 extern int lrexpr(int e1, int e2,int l1, int op,int cond);
195
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
191 extern int lpop_register();
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
192 extern int emit_lpop();
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
193 extern void code_lregister(int e2,int reg);
287
a0779a414855 *** empty log message ***
kono
parents: 280
diff changeset
194 extern void code_cmp_lregister(int,int,int);
a0779a414855 *** empty log message ***
kono
parents: 280
diff changeset
195 extern void code_cmp_lrgvar(int,int,int,int);
a0779a414855 *** empty log message ***
kono
parents: 280
diff changeset
196 extern void code_cmp_lrlvar(int,int,int,int);
195
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
197 extern void code_lassign(int,int);
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
198 extern void code_lassign_gvar(int,int);
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
199 extern void code_lassign_lvar(int,int);
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
200 extern void code_lassign_lregister(int e2,int reg);
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
201 extern void code_lconst(int,int);
212
32f54ab63b35 *** empty log message ***
kono
parents: 205
diff changeset
202 extern void code_lneg(int);
195
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
203 extern void code_lrgvar(int,int);
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
204 extern void code_lrlvar(int,int);
221
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
205 extern void ltosop(int,int,int);
195
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
206 extern void emit_lpop_free(int);
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
207 extern void emit_lpush();
213
kono
parents: 212
diff changeset
208 extern int code_lconst_op_p(int op,int e);
221
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
209 extern void loprtc(int op,int reg, int e);
239
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
210 extern void code_i2ll(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
211 extern void code_i2ull(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
212 extern void code_u2ll(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
213 extern void code_u2ull(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
214 extern void code_ll2i(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
215 extern void code_ll2u(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
216 extern void code_ull2i(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
217 extern void code_ull2u(int reg);
195
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
218 #if FLOAT_CODE
239
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
219 extern void code_d2ll(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
220 extern void code_d2ull(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
221 extern void code_f2ll(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
222 extern void code_f2ull(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
223 extern void code_ll2d(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
224 extern void code_ll2f(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
225 extern void code_ull2d(int reg);
1849e0079f08 ia32 long long continue
kono
parents: 238
diff changeset
226 extern void code_ull2f(int reg);
195
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
227 #endif
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
228
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
229
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
230
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
231
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
232 extern void code_lpreinc(int e1,int e2,int reg);
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
233 extern void code_lpostinc(int e1,int e2,int reg);
221
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
234 extern void code_lassop(int op,int reg);
219
6190d24e178c long long code generation level 4
kono
parents: 218
diff changeset
235 extern void code_register_lassop(int reg,int op);
195
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
236
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
237 #endif
c193120ee2a6 *** empty log message ***
kono
parents: 189
diff changeset
238
313
f73b93de216a alloca done for ia32, powerpc, mips
kono
parents: 308
diff changeset
239 extern void code_alloca(int e,int reg);
137
9fb09db54436 fix powerpc get_fregister_var's regs error.
kono
parents: 133
diff changeset
240 extern void code_arg_register(NMTBL *fnptr);
89
917947ffeb7c power pc version
kono
parents: 85
diff changeset
241
430
ba5faa547607 ARM bitfield done.
kono
parents: 426
diff changeset
242 extern int get_register();
ba5faa547607 ARM bitfield done.
kono
parents: 426
diff changeset
243 extern int get_dregister();
ba5faa547607 ARM bitfield done.
kono
parents: 426
diff changeset
244 extern int get_lregister();
89
917947ffeb7c power pc version
kono
parents: 85
diff changeset
245 extern void free_register(int i) ;
917947ffeb7c power pc version
kono
parents: 85
diff changeset
246 extern int pop_register(void);
917947ffeb7c power pc version
kono
parents: 85
diff changeset
247 extern void emit_pop_free(int xreg);
308
e1d17d6adfcc struct field init (first try, no compile error)
kono
parents: 304
diff changeset
248 extern void emit_data_closing(NMTBL *n);
e1d17d6adfcc struct field init (first try, no compile error)
kono
parents: 304
diff changeset
249
89
917947ffeb7c power pc version
kono
parents: 85
diff changeset
250
221
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
251 // extern int use_int(int);
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
252 // extern int use_float(int);
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
253 // extern int use_double(int);
ceae585186d9 *** empty log message ***
kono
parents: 219
diff changeset
254 // extern int use_longlong(int);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
255
300
86255dd7f148 table done. (?)
kono
parents: 287
diff changeset
256 #if CASE_CODE
382
832e1f6bba82 ARM wrote all code. Check compile error.
kono
parents: 367
diff changeset
257 extern int code_table_jump_p(int delta);
302
bea7ab2fb218 switch table jump finished.
kono
parents: 300
diff changeset
258 extern void code_table_jump(int table,int csvalue,int delta,int max,int min,int dlabel);
300
86255dd7f148 table done. (?)
kono
parents: 287
diff changeset
259 extern void code_table_open(int table);
86255dd7f148 table done. (?)
kono
parents: 287
diff changeset
260 extern void code_table_value(int label,int table);
86255dd7f148 table done. (?)
kono
parents: 287
diff changeset
261 extern void code_table_close();
86255dd7f148 table done. (?)
kono
parents: 287
diff changeset
262 #endif
86255dd7f148 table done. (?)
kono
parents: 287
diff changeset
263
316
22d92986c7f7 asm, valued statement, local decls continue...
kono
parents: 313
diff changeset
264 #if ASM_CODE
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents: 316
diff changeset
265
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
266 extern void code_asm(char *asm_str,int repl);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
267 extern int code_asm_operand(char *p,int e1,int mode,int repl,int n,int repl0);
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
268 extern void code_free_asm_operand(int repl);
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents: 316
diff changeset
269
316
22d92986c7f7 asm, valued statement, local decls continue...
kono
parents: 313
diff changeset
270 #endif
22d92986c7f7 asm, valued statement, local decls continue...
kono
parents: 313
diff changeset
271
456
b8f95294eb77 inline continue... if test passed.
kono
parents: 452
diff changeset
272 extern void code_comment(char *s);
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
273
329
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
274 #if BIT_FIELD_CODE
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
275
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
276 /* bit field alignment calcuration */
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
277
331
f25aa4f03198 bit-field continue...
kono
parents: 329
diff changeset
278 extern int code_bit_field_disp(int type,int *offset,int *bfd,int *sz);
329
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
279
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
280 /* bit field value */
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
281
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
282 /* reg contains address of bit_field, result should goto reg */
426
fb136af3bf09 Bitfield reorganization.
kono
parents: 382
diff changeset
283 extern void code_bit_field(int type,int adr,int reg);
329
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
284
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
285 /* bit field replacement */
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
286
426
fb136af3bf09 Bitfield reorganization.
kono
parents: 382
diff changeset
287 extern void code_bit_replace(int value,int lvalue,int type);
329
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
288 /* register, register */
426
fb136af3bf09 Bitfield reorganization.
kono
parents: 382
diff changeset
289 extern void code_bit_replace_const(int value,int lvalue,int type);
365
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 363
diff changeset
290 /* exp, register */
329
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
291
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
292 #endif
4c8f8ef8c0cf bit field continue...
kono
parents: 327
diff changeset
293
327
da2e3f2d127d macro/codegen reorganization
kono
parents: 320
diff changeset
294 /* end */