annotate mc-code.h @ 173:3b33c7daae95

*** empty log message ***
author kono
date Wed, 26 Nov 2003 18:55:37 +0900
parents b1297c82e926
children dffcccf8b1cb
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
144
56211702f298 creg/freg continue
kono
parents: 139
diff changeset
6 #define MAX_MAX 50
56211702f298 creg/freg continue
kono
parents: 139
diff changeset
7 #define INPUT_REG 2 /* input register ( can be reused ) */
56211702f298 creg/freg continue
kono
parents: 139
diff changeset
8 #define USING_REG 1 /* unreusable register usage */
56211702f298 creg/freg continue
kono
parents: 139
diff changeset
9
173
3b33c7daae95 *** empty log message ***
kono
parents: 168
diff changeset
10 extern char *l_include_path[];
3b33c7daae95 *** empty log message ***
kono
parents: 168
diff changeset
11
83
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
12 extern int size_of_int;
165
kono
parents: 162
diff changeset
13 extern int size_of_short;
83
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
14 extern int size_of_float;
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
15 extern int size_of_double;
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
16 extern int size_of_longlong;
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
17 extern int endian;
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
18 extern int MAX_REGISTER;
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
19 extern int MAX_REGISTGER_VAR;
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
20 extern int MAX_FREGISTER;
103
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
21
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
22 extern int MAX_INPUT_REGISTER_VAR;
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
23 extern int MAX_CODE_INPUT_REGISTER_VAR;
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
24 extern int MAX_INPUT_DREGISTER_VAR;
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
25 extern int MAX_CODE_INPUT_FREGISTER_VAR;
103
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
26 extern int MAX_CODE_INPUT_DREGISTER_VAR;
99
53899975154c *** empty log message ***
kono
parents: 97
diff changeset
27
94
1ad7045741a7 float dbinop fix
kono
parents: 93
diff changeset
28 #define REG_LVAR_OFFSET 2
83
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
29
102
3cf2f8c120b9 *** empty log message ***
kono
parents: 99
diff changeset
30 extern void code_init();
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
31 extern void gexpr_code_init(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
32 extern int register_var(int r);
105
7e3d59e56a53 save register ( incomplete )
kono
parents: 104
diff changeset
33 extern int get_register_var(NMTBL *n);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
34 extern int get_dregister_var(NMTBL *n,int d);
126
1d1612fe705a *** empty log message ***
kono
parents: 119
diff changeset
35 extern int get_input_register_var(int,NMTBL *,int);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
36 extern int get_input_dregister_var(int,NMTBL *,int,int);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
37 extern void emit_push();
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
38 extern int emit_pop(int type);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
39 extern void gexpr_code_init();
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
40 extern int code_csvalue();
147
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
41 extern void code_gexpr(int e);
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
42 extern void code_cmpdimm(int e, int csreg);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
43 extern void code_gvar(int e1,int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
44 extern void code_rgvar(int e1,int reg);
165
kono
parents: 162
diff changeset
45 extern void code_crgvar(int e1,int reg,int sign,int sz);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
46 extern void code_lvar(int e2,int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
47 extern void code_register(int e2,int reg);
94
1ad7045741a7 float dbinop fix
kono
parents: 93
diff changeset
48 extern void code_rlvar(int e2,int reg);
165
kono
parents: 162
diff changeset
49 extern void code_crlvar(int e2,int reg,int sign,int sz);
109
e09f9de6f5d3 *** empty log message ***
kono
parents: 108
diff changeset
50 extern void code_fname(NMTBL *n,int reg);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
51 extern void code_const(int e2,int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
52 extern void code_neg(int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
53 extern void code_not(int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
54 extern void code_lnot(int reg);
168
b1297c82e926 cpostinc removal
kono
parents: 167
diff changeset
55 extern void code_preinc(int e1,int e2,int dir,int sign,int sz,int reg);
b1297c82e926 cpostinc removal
kono
parents: 167
diff changeset
56 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
57 extern void code_return(int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
58 extern void code_environment(int reg);
116
b14ff9671c90 register offset fix
kono
parents: 111
diff changeset
59 extern void code_bool(int e1);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
60 extern char *code_gt(int cond);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
61 extern char *code_ugt(int cond);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
62 extern char *code_ge(int cond);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
63 extern char *code_uge(int cond);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
64 extern char *code_eq(int cond);
167
0197ca125567 mips short
kono
parents: 165
diff changeset
65 extern void code_cmp_crgvar(int e1,int sz);
0197ca125567 mips short
kono
parents: 165
diff changeset
66 extern void code_cmp_crlvar(int e1,int sz);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
67 extern void code_cmp_rgvar(int e1);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
68 extern void code_cmp_rlvar(int e1);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
69 extern void code_cmp_register(int e2);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
70 extern void code_string(int e1,int reg);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
71 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
72 extern int function(int e1);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
73 extern void code_frame_pointer(int e3);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
74 extern void code_fix_frame_pointer(int disp_offset);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
75 extern void code_jmp(char *s);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
76 extern void code_indirect_jmp(int e2);
94
1ad7045741a7 float dbinop fix
kono
parents: 93
diff changeset
77 extern int rindirect(int e1);
103
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
78 extern void code_assign_gvar(int e2,int reg,int byte);
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
79 extern void code_assign_lvar(int e2,int reg,int byte);
111
7aa449aff3e6 floating point
kono
parents: 109
diff changeset
80 extern void code_assign_register(int e2,int byte,int reg);
118
07b91b625f84 assignment optimization
kono
parents: 116
diff changeset
81 extern void code_assign(int e2,int byte,int reg);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
82 extern void code_register_assop(int e2,int op,int byte);
162
0c604d2ff585 *** empty log message ***
kono
parents: 147
diff changeset
83 extern void code_assop(int op,int byte,int sign);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
84 extern void tosop(int op,int oreg);
66
0b068058dd67 *** empty log message ***
kono
parents: 61
diff changeset
85 extern void code_opening(char *filename);
0b068058dd67 *** empty log message ***
kono
parents: 61
diff changeset
86 extern void code_closing();
89
917947ffeb7c power pc version
kono
parents: 85
diff changeset
87 extern void rexpr(int e1, int l1, char *s,int t);
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
88 extern void drexpr(int e1, int e2,int l1, int op);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
89 extern void jcond(int l, char cond);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
90 extern void jmp(int l);
108
69e2e763cce5 object assemble first try.
kono
parents: 107
diff changeset
91 extern void code_set_fixed_creg(int mode,int type);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
92 extern void code_set_return_register(int mode);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
93 extern void text_mode(void);
66
0b068058dd67 *** empty log message ***
kono
parents: 61
diff changeset
94 extern void global_table(void);
92
e7f8515ba882 *** empty log message ***
kono
parents: 89
diff changeset
95 extern void code_label(int labelno);
e7f8515ba882 *** empty log message ***
kono
parents: 89
diff changeset
96
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
97
81
f94ca1168520 float first try...
kono
parents: 66
diff changeset
98 /* floating point part */
f94ca1168520 float first try...
kono
parents: 66
diff changeset
99
f94ca1168520 float first try...
kono
parents: 66
diff changeset
100 extern int dpop_register();
f94ca1168520 float first try...
kono
parents: 66
diff changeset
101 extern int emit_dpop(int);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
102 extern void code_dregister(int e2,int reg,int d);
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
103 extern void code_cmp_dregister(int,int);
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
104 extern void code_cmp_drgvar(int,int);
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
105 extern void code_cmp_drlvar(int,int);
103
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
106 extern void code_dassign(int,int,int);
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
107 extern void code_dassign_gvar(int,int,int);
f849af4b5ea9 *** empty log message ***
kono
parents: 102
diff changeset
108 extern void code_dassign_lvar(int,int,int);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
109 extern void code_dassign_dregister(int e2,int d,int reg);
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
110 extern void code_dconst(int,int,int);
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
111 extern void code_dneg(int,int);
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
112 extern void code_drgvar(int,int,int);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
113 extern void code_drlvar(int,int,int);
81
f94ca1168520 float first try...
kono
parents: 66
diff changeset
114 extern void dtosop(int,int);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
115 extern void emit_dpop_free(int,int);
133
7d436c08e949 separate float / double flow
kono
parents: 126
diff changeset
116 extern void emit_dpush(int);
147
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
117 extern void code_i2d(int);
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
118 extern void code_d2i(int);
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
119 extern void code_u2d(int);
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
120 extern void code_d2u(int);
133
7d436c08e949 separate float / double flow
kono
parents: 126
diff changeset
121 extern void code_d2f(int freg);
7d436c08e949 separate float / double flow
kono
parents: 126
diff changeset
122 extern void code_f2d(int freg);
147
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
123 extern void code_f2i(int freg);
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
124 extern void code_f2u(int freg);
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
125 extern void code_i2f(int creg);
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
126 extern void code_u2f(int creg);
133
7d436c08e949 separate float / double flow
kono
parents: 126
diff changeset
127
81
f94ca1168520 float first try...
kono
parents: 66
diff changeset
128
107
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
129 extern void code_dpreinc(int e1,int e2,int d,int reg);
06f72222d6b5 prevent destorying function argument (incomeplete)
kono
parents: 105
diff changeset
130 extern void code_dpostinc(int e1,int e2,int d,int reg);
83
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
131 extern void code_dassop(int op,int d);
89
917947ffeb7c power pc version
kono
parents: 85
diff changeset
132
137
9fb09db54436 fix powerpc get_fregister_var's regs error.
kono
parents: 133
diff changeset
133 extern void code_arg_register(NMTBL *fnptr);
89
917947ffeb7c power pc version
kono
parents: 85
diff changeset
134
917947ffeb7c power pc version
kono
parents: 85
diff changeset
135 extern int get_register(void);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
136 extern int get_dregister(int);
89
917947ffeb7c power pc version
kono
parents: 85
diff changeset
137 extern void free_register(int i) ;
917947ffeb7c power pc version
kono
parents: 85
diff changeset
138 extern int pop_register(void);
917947ffeb7c power pc version
kono
parents: 85
diff changeset
139 extern void emit_pop_free(int xreg);
917947ffeb7c power pc version
kono
parents: 85
diff changeset
140
147
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
141 extern int use_int(int);
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
142 extern int use_float(int);
cb7aa0089681 creg/ireg done for powerpc.
kono
parents: 144
diff changeset
143 extern int use_double(int);
138
e6e77af048a1 float/dobule configuration
kono
parents: 137
diff changeset
144
89
917947ffeb7c power pc version
kono
parents: 85
diff changeset
145 /* */