annotate mc.h @ 151:81032a1b8a5d

MIPS continue
author kono
date Mon, 14 Jul 2003 14:40:35 +0900
parents f8271009a314
children 0c604d2ff585
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
1 /* Micro-C header file */
d35df41eac69 Initial revision
kono
parents:
diff changeset
2
d35df41eac69 Initial revision
kono
parents:
diff changeset
3 #define DEBUG error(-1)
d35df41eac69 Initial revision
kono
parents:
diff changeset
4
d35df41eac69 Initial revision
kono
parents:
diff changeset
5 /*#include "CCLIB.TXT" */
19
b62230ea38f6 ifdef debug
kono
parents: 18
diff changeset
6 #ifdef __micro_c__
b62230ea38f6 ifdef debug
kono
parents: 18
diff changeset
7 #include "stdio.h"
b62230ea38f6 ifdef debug
kono
parents: 18
diff changeset
8 #else
b62230ea38f6 ifdef debug
kono
parents: 18
diff changeset
9 #include <stdio.h>
b62230ea38f6 ifdef debug
kono
parents: 18
diff changeset
10 #endif
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
11
d35df41eac69 Initial revision
kono
parents:
diff changeset
12 #define SIZE_INT 4
d35df41eac69 Initial revision
kono
parents:
diff changeset
13
d35df41eac69 Initial revision
kono
parents:
diff changeset
14 #define INT (-1)
d35df41eac69 Initial revision
kono
parents:
diff changeset
15 #define CHAR (-2)
d35df41eac69 Initial revision
kono
parents:
diff changeset
16 #define UNSIGNED (-3)
d35df41eac69 Initial revision
kono
parents:
diff changeset
17 #define POINTER (-4)
d35df41eac69 Initial revision
kono
parents:
diff changeset
18 #define ARRAY (-5)
d35df41eac69 Initial revision
kono
parents:
diff changeset
19 #define STRUCT (-6)
d35df41eac69 Initial revision
kono
parents:
diff changeset
20 #define UNION (-7)
d35df41eac69 Initial revision
kono
parents:
diff changeset
21 #define FUNCTION (-8)
d35df41eac69 Initial revision
kono
parents:
diff changeset
22
d35df41eac69 Initial revision
kono
parents:
diff changeset
23 #define STATIC (-10)
d35df41eac69 Initial revision
kono
parents:
diff changeset
24 #define GOTO (-11)
d35df41eac69 Initial revision
kono
parents:
diff changeset
25 #define RETURN (-12)
d35df41eac69 Initial revision
kono
parents:
diff changeset
26 #define BREAK (-13)
d35df41eac69 Initial revision
kono
parents:
diff changeset
27 #define CONTINUE (-14)
d35df41eac69 Initial revision
kono
parents:
diff changeset
28 #define IF (-15)
d35df41eac69 Initial revision
kono
parents:
diff changeset
29 #define ELSE (-16)
d35df41eac69 Initial revision
kono
parents:
diff changeset
30 #define FOR (-17)
d35df41eac69 Initial revision
kono
parents:
diff changeset
31 #define DO (-18)
d35df41eac69 Initial revision
kono
parents:
diff changeset
32 #define WHILE (-19)
d35df41eac69 Initial revision
kono
parents:
diff changeset
33 #define SWITCH (-20)
d35df41eac69 Initial revision
kono
parents:
diff changeset
34 #define CASE (-21)
d35df41eac69 Initial revision
kono
parents:
diff changeset
35 #define DEFAULT (-22)
d35df41eac69 Initial revision
kono
parents:
diff changeset
36 #define RESERVE (-23)
d35df41eac69 Initial revision
kono
parents:
diff changeset
37 #define TAG (-24)
d35df41eac69 Initial revision
kono
parents:
diff changeset
38 #define FIELD (-25)
d35df41eac69 Initial revision
kono
parents:
diff changeset
39 #define IDENT (-26)
d35df41eac69 Initial revision
kono
parents:
diff changeset
40 #define STRING (-27)
d35df41eac69 Initial revision
kono
parents:
diff changeset
41 #define MACRO (-28)
d35df41eac69 Initial revision
kono
parents:
diff changeset
42 #define BLABEL (-29)
d35df41eac69 Initial revision
kono
parents:
diff changeset
43 #define FLABEL (-30)
d35df41eac69 Initial revision
kono
parents:
diff changeset
44 #define TYPEDEF (-31)
d35df41eac69 Initial revision
kono
parents:
diff changeset
45 #define SIZEOF (-32)
d35df41eac69 Initial revision
kono
parents:
diff changeset
46 #define TYPE (-33)
d35df41eac69 Initial revision
kono
parents:
diff changeset
47 #define LONG (-34)
d35df41eac69 Initial revision
kono
parents:
diff changeset
48 #define SHORT (-35)
d35df41eac69 Initial revision
kono
parents:
diff changeset
49 #define EXTRN (-36)
97
6d42fcac07af *** empty log message ***
kono
parents: 95
diff changeset
50 #define EXTRN1 (-37)
6d42fcac07af *** empty log message ***
kono
parents: 95
diff changeset
51 #define VOID (-38)
6d42fcac07af *** empty log message ***
kono
parents: 95
diff changeset
52 #define REGISTER (-39)
6d42fcac07af *** empty log message ***
kono
parents: 95
diff changeset
53 #define CODE (-40)
6d42fcac07af *** empty log message ***
kono
parents: 95
diff changeset
54 #define ENVIRONMENT (-41)
6d42fcac07af *** empty log message ***
kono
parents: 95
diff changeset
55 #define DEFINED (-42)
6d42fcac07af *** empty log message ***
kono
parents: 95
diff changeset
56 #define KONST (-43)
6d42fcac07af *** empty log message ***
kono
parents: 95
diff changeset
57 #define FMACRO (-44)
6d42fcac07af *** empty log message ***
kono
parents: 95
diff changeset
58 #define LMACRO (-45)
6d42fcac07af *** empty log message ***
kono
parents: 95
diff changeset
59 #define DOTS (-46)
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
60
97
6d42fcac07af *** empty log message ***
kono
parents: 95
diff changeset
61 #define FLOAT (-47)
6d42fcac07af *** empty log message ***
kono
parents: 95
diff changeset
62 #define DOUBLE (-48)
150
f8271009a314 MIPS continue
kono
parents: 137
diff changeset
63 #define LONGLONG (-49)
f8271009a314 MIPS continue
kono
parents: 137
diff changeset
64 #define FREGISTER (-50)
f8271009a314 MIPS continue
kono
parents: 137
diff changeset
65 #define DREGISTER (-51)
78
8418d4b7caa7 *** empty log message ***
kono
parents: 77
diff changeset
66
103
f849af4b5ea9 *** empty log message ***
kono
parents: 101
diff changeset
67 #define EMPTY (-99)
f849af4b5ea9 *** empty log message ***
kono
parents: 101
diff changeset
68
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
69 #define TOP 0
d35df41eac69 Initial revision
kono
parents:
diff changeset
70 #define GDECL 1
d35df41eac69 Initial revision
kono
parents:
diff changeset
71 #define GSDECL 2
d35df41eac69 Initial revision
kono
parents:
diff changeset
72 #define GUDECL 3
d35df41eac69 Initial revision
kono
parents:
diff changeset
73 #define ADECL 4
d35df41eac69 Initial revision
kono
parents:
diff changeset
74 #define LDECL 5
d35df41eac69 Initial revision
kono
parents:
diff changeset
75 #define LSDECL 6
d35df41eac69 Initial revision
kono
parents:
diff changeset
76 #define LUDECL 7
d35df41eac69 Initial revision
kono
parents:
diff changeset
77 #define STADECL 8
d35df41eac69 Initial revision
kono
parents:
diff changeset
78 #define STAT 9
d35df41eac69 Initial revision
kono
parents:
diff changeset
79 #define GTDECL 10
d35df41eac69 Initial revision
kono
parents:
diff changeset
80 #define LTDECL 11
18
df7fa8cee67b pass -Wall
kono
parents: 3
diff changeset
81 #define IFDEF 12
29
160e20394f80 macro function (imcomplete)
kono
parents: 28
diff changeset
82 #define MDECL 13
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
83
d35df41eac69 Initial revision
kono
parents:
diff changeset
84 #define GVAR 1
d35df41eac69 Initial revision
kono
parents:
diff changeset
85 #define RGVAR 2
d35df41eac69 Initial revision
kono
parents:
diff changeset
86 #define CRGVAR 3
d35df41eac69 Initial revision
kono
parents:
diff changeset
87 #define LVAR 4
d35df41eac69 Initial revision
kono
parents:
diff changeset
88 #define RLVAR 5
d35df41eac69 Initial revision
kono
parents:
diff changeset
89 #define CRLVAR 6
d35df41eac69 Initial revision
kono
parents:
diff changeset
90 #define CONST 7
d35df41eac69 Initial revision
kono
parents:
diff changeset
91 #define FNAME 8
d35df41eac69 Initial revision
kono
parents:
diff changeset
92 #define INDIRECT 9
d35df41eac69 Initial revision
kono
parents:
diff changeset
93 #define RINDIRECT 10
d35df41eac69 Initial revision
kono
parents:
diff changeset
94 #define CRINDIRECT 11
d35df41eac69 Initial revision
kono
parents:
diff changeset
95 #define ADDRESS 12
d35df41eac69 Initial revision
kono
parents:
diff changeset
96 #define MINUS 13
d35df41eac69 Initial revision
kono
parents:
diff changeset
97 #define LNOT 14
d35df41eac69 Initial revision
kono
parents:
diff changeset
98 #define BNOT 15
d35df41eac69 Initial revision
kono
parents:
diff changeset
99 #define INC 16
d35df41eac69 Initial revision
kono
parents:
diff changeset
100 #define POSTINC 17
d35df41eac69 Initial revision
kono
parents:
diff changeset
101 #define PREINC 18
d35df41eac69 Initial revision
kono
parents:
diff changeset
102 #define CPOSTINC 19
d35df41eac69 Initial revision
kono
parents:
diff changeset
103 #define CPREINC 20
d35df41eac69 Initial revision
kono
parents:
diff changeset
104 #define DEC 21
d35df41eac69 Initial revision
kono
parents:
diff changeset
105 #define CPOSTDEC 22
d35df41eac69 Initial revision
kono
parents:
diff changeset
106 #define CPREDEC 23
d35df41eac69 Initial revision
kono
parents:
diff changeset
107 #define MUL 24
d35df41eac69 Initial revision
kono
parents:
diff changeset
108 #define UMUL 25
d35df41eac69 Initial revision
kono
parents:
diff changeset
109 #define DIV 26
d35df41eac69 Initial revision
kono
parents:
diff changeset
110 #define UDIV 27
d35df41eac69 Initial revision
kono
parents:
diff changeset
111 #define MOD 28
d35df41eac69 Initial revision
kono
parents:
diff changeset
112 #define UMOD 29
d35df41eac69 Initial revision
kono
parents:
diff changeset
113 #define ADD 30
d35df41eac69 Initial revision
kono
parents:
diff changeset
114 #define SUB 31
89
917947ffeb7c power pc version
kono
parents: 85
diff changeset
115 #define CMP 32
917947ffeb7c power pc version
kono
parents: 85
diff changeset
116 #define RSHIFT 33
917947ffeb7c power pc version
kono
parents: 85
diff changeset
117 #define URSHIFT 34
917947ffeb7c power pc version
kono
parents: 85
diff changeset
118 #define LSHIFT 35
917947ffeb7c power pc version
kono
parents: 85
diff changeset
119 #define ULSHIFT 36
917947ffeb7c power pc version
kono
parents: 85
diff changeset
120 #define GT 37
917947ffeb7c power pc version
kono
parents: 85
diff changeset
121 #define UGT 38
917947ffeb7c power pc version
kono
parents: 85
diff changeset
122 #define GE 39
917947ffeb7c power pc version
kono
parents: 85
diff changeset
123 #define UGE 40
917947ffeb7c power pc version
kono
parents: 85
diff changeset
124 #define LT 41
917947ffeb7c power pc version
kono
parents: 85
diff changeset
125 #define ULT 42
917947ffeb7c power pc version
kono
parents: 85
diff changeset
126 #define LE 43
917947ffeb7c power pc version
kono
parents: 85
diff changeset
127 #define ULE 44
917947ffeb7c power pc version
kono
parents: 85
diff changeset
128 #define EQ 45
917947ffeb7c power pc version
kono
parents: 85
diff changeset
129 #define NEQ 46
917947ffeb7c power pc version
kono
parents: 85
diff changeset
130 #define BAND 47
917947ffeb7c power pc version
kono
parents: 85
diff changeset
131 #define EOR 48
917947ffeb7c power pc version
kono
parents: 85
diff changeset
132 #define BOR 49
917947ffeb7c power pc version
kono
parents: 85
diff changeset
133 #define LAND 50
917947ffeb7c power pc version
kono
parents: 85
diff changeset
134 #define LOR 51
917947ffeb7c power pc version
kono
parents: 85
diff changeset
135 #define COND 52
917947ffeb7c power pc version
kono
parents: 85
diff changeset
136 #define ASS 53
917947ffeb7c power pc version
kono
parents: 85
diff changeset
137 #define CASS 54
917947ffeb7c power pc version
kono
parents: 85
diff changeset
138 #define ASSOP 55
917947ffeb7c power pc version
kono
parents: 85
diff changeset
139 #define CASSOP 56
917947ffeb7c power pc version
kono
parents: 85
diff changeset
140 #define COMMA 57
917947ffeb7c power pc version
kono
parents: 85
diff changeset
141 #define LPAR 58
917947ffeb7c power pc version
kono
parents: 85
diff changeset
142 #define RPAR 59
917947ffeb7c power pc version
kono
parents: 85
diff changeset
143 #define LBRA 60
917947ffeb7c power pc version
kono
parents: 85
diff changeset
144 #define RBRA 61
917947ffeb7c power pc version
kono
parents: 85
diff changeset
145 #define LC 62
917947ffeb7c power pc version
kono
parents: 85
diff changeset
146 #define RC 63
917947ffeb7c power pc version
kono
parents: 85
diff changeset
147 #define COLON 64
917947ffeb7c power pc version
kono
parents: 85
diff changeset
148 #define SM 65
917947ffeb7c power pc version
kono
parents: 85
diff changeset
149 #define PERIOD 66
917947ffeb7c power pc version
kono
parents: 85
diff changeset
150 #define ARROW 67
917947ffeb7c power pc version
kono
parents: 85
diff changeset
151 #define CNAME 68
917947ffeb7c power pc version
kono
parents: 85
diff changeset
152 #define SASS 69
917947ffeb7c power pc version
kono
parents: 85
diff changeset
153 #define RSTRUCT 70
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
154
89
917947ffeb7c power pc version
kono
parents: 85
diff changeset
155 #define DASSOP (DOP+ASSOP)
917947ffeb7c power pc version
kono
parents: 85
diff changeset
156 #define DCMP (DOP+CMP)
917947ffeb7c power pc version
kono
parents: 85
diff changeset
157 #define DMINUS (DOP+MINUS)
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
158 #define DMUL (DOP+MUL)
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
159 #define DDIV (DOP+DIV)
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
160 #define DADD (DOP+ADD)
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
161 #define DSUB (DOP+SUB)
133
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
162 #define FASSOP (FOP+ASSOP)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
163 #define FCMP (FOP+CMP)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
164 #define FMINUS (FOP+MINUS)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
165 #define FMUL (FOP+MUL)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
166 #define FDIV (FOP+DIV)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
167 #define FADD (FOP+ADD)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
168 #define FSUB (FOP+SUB)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
169 #define CMPGE 72
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
170 #define DCMPGE (DOP+CMPGE)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
171 #define FCMPGE (FOP+CMPGE)
91
9b1aeb62e0b9 powerpc continue... (floating point)
kono
parents: 89
diff changeset
172 #define LMUL 73
9b1aeb62e0b9 powerpc continue... (floating point)
kono
parents: 89
diff changeset
173 #define LDIV 74
9b1aeb62e0b9 powerpc continue... (floating point)
kono
parents: 89
diff changeset
174 #define LADD 75
9b1aeb62e0b9 powerpc continue... (floating point)
kono
parents: 89
diff changeset
175 #define LSUB 76
78
8418d4b7caa7 *** empty log message ***
kono
parents: 77
diff changeset
176
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
177 #define FRGVAR 82
f94ca1168520 float first try...
kono
parents: 78
diff changeset
178 #define FRLVAR 83
f94ca1168520 float first try...
kono
parents: 78
diff changeset
179 #define FRINDIRECT 84
f94ca1168520 float first try...
kono
parents: 78
diff changeset
180 #define DRGVAR 85
f94ca1168520 float first try...
kono
parents: 78
diff changeset
181 #define DRLVAR 86
f94ca1168520 float first try...
kono
parents: 78
diff changeset
182 #define DRINDIRECT 87
f94ca1168520 float first try...
kono
parents: 78
diff changeset
183 #define LRGVAR 88
f94ca1168520 float first try...
kono
parents: 78
diff changeset
184 #define LRLVAR 89
f94ca1168520 float first try...
kono
parents: 78
diff changeset
185 #define LRINDIRECT 90
133
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
186 #define DCONST (DOP+CONST)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
187 #define FCONST (FOP+CONST)
85
3789aef7331d minor fix
kono
parents: 83
diff changeset
188 #define LCONST 93
3789aef7331d minor fix
kono
parents: 83
diff changeset
189 #define DASS 94
3789aef7331d minor fix
kono
parents: 83
diff changeset
190 #define FASS 95
3789aef7331d minor fix
kono
parents: 83
diff changeset
191 #define LASS 96
3789aef7331d minor fix
kono
parents: 83
diff changeset
192 #define SHASS 97
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
193
85
3789aef7331d minor fix
kono
parents: 83
diff changeset
194 #define I2D 98
3789aef7331d minor fix
kono
parents: 83
diff changeset
195 #define D2I 99
3789aef7331d minor fix
kono
parents: 83
diff changeset
196 #define U2D 100
3789aef7331d minor fix
kono
parents: 83
diff changeset
197 #define D2U 101
133
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
198 #define F2D 108
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
199 #define D2F 109
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
200 #define I2F 110
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
201 #define F2I 111
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
202 #define U2F 112
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
203 #define F2U 113
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
204 #define FPOSTINC (FOP+POSTINC)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
205 #define DPOSTINC (DOP+POSTINC)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
206 #define FPREINC (FOP+PREINC)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
207 #define DPREINC (DOP+PREINC)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
208 #define DCOND (DOP+COND)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
209 #define FCOND (FOP+COND)
108
69e2e763cce5 object assemble first try.
kono
parents: 105
diff changeset
210 #define CONV 107
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
211
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
212 #define US 1
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
213 #define AS 200
83
f3f75911d62c *** empty log message ***
kono
parents: 82
diff changeset
214 #define DOP 400
133
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
215 #define FOP 600
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
216
d35df41eac69 Initial revision
kono
parents:
diff changeset
217 #define FILERR 1
d35df41eac69 Initial revision
kono
parents:
diff changeset
218 #define DCERR 2
d35df41eac69 Initial revision
kono
parents:
diff changeset
219 #define STERR 3
d35df41eac69 Initial revision
kono
parents:
diff changeset
220 #define EXERR 4
d35df41eac69 Initial revision
kono
parents:
diff changeset
221 #define CNERR 5
d35df41eac69 Initial revision
kono
parents:
diff changeset
222 #define CHERR 6
d35df41eac69 Initial revision
kono
parents:
diff changeset
223 #define GSERR 7
d35df41eac69 Initial revision
kono
parents:
diff changeset
224 #define LSERR 8
d35df41eac69 Initial revision
kono
parents:
diff changeset
225 #define STRERR 9
d35df41eac69 Initial revision
kono
parents:
diff changeset
226 #define LNERR 10
d35df41eac69 Initial revision
kono
parents:
diff changeset
227 #define EOFERR 11
d35df41eac69 Initial revision
kono
parents:
diff changeset
228 #define MCERR 12
d35df41eac69 Initial revision
kono
parents:
diff changeset
229 #define INCERR 13
d35df41eac69 Initial revision
kono
parents:
diff changeset
230 #define HPERR 14
d35df41eac69 Initial revision
kono
parents:
diff changeset
231 #define TYERR 15
d35df41eac69 Initial revision
kono
parents:
diff changeset
232 #define LVERR 16
d35df41eac69 Initial revision
kono
parents:
diff changeset
233 #define UDERR 17
d35df41eac69 Initial revision
kono
parents:
diff changeset
234 #define OPTION 18
d35df41eac69 Initial revision
kono
parents:
diff changeset
235 #define REG_ERR 19
d35df41eac69 Initial revision
kono
parents:
diff changeset
236 #define CODE_ERR 20
29
160e20394f80 macro function (imcomplete)
kono
parents: 28
diff changeset
237 #define MSERR 21
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
238
d35df41eac69 Initial revision
kono
parents:
diff changeset
239 #define GSYMS 9000
d35df41eac69 Initial revision
kono
parents:
diff changeset
240 #define LSYMS 500
32
b35787d8a442 macro initialization
kono
parents: 30
diff changeset
241 #define MSYMS 3000
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
242
d35df41eac69 Initial revision
kono
parents:
diff changeset
243 #define HEAPSIZE 10000
d35df41eac69 Initial revision
kono
parents:
diff changeset
244 /* #define CHEAPSIZE 3000 */
d35df41eac69 Initial revision
kono
parents:
diff changeset
245 #define CHEAPSIZE 256000
d35df41eac69 Initial revision
kono
parents:
diff changeset
246 #define LBUFSIZE 4096
34
0756caa79167 macro function recursive and copy method
kono
parents: 33
diff changeset
247 #define MACROSIZE 16000
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
248
25
b7a94557bf92 *** empty log message ***
kono
parents: 20
diff changeset
249 #define FILES 10
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
250 #define OUTPUT_FILE_NAME "mcout.s"
d35df41eac69 Initial revision
kono
parents:
diff changeset
251
29
160e20394f80 macro function (imcomplete)
kono
parents: 28
diff changeset
252 EXTERN int sym,ch,type,mode,stmode,gfree,lfree,mflag,lineno,glineno;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
253 EXTERN int labelno,gpc,disp,reg_var,debug;
d35df41eac69 Initial revision
kono
parents:
diff changeset
254 EXTERN int symval,args,init_vars,heap[HEAPSIZE];
d35df41eac69 Initial revision
kono
parents:
diff changeset
255 EXTERN int blabel,clabel,dlabel,cslabel,ilabel,control,ac,ac2,lsrc,chk,asmf;
d35df41eac69 Initial revision
kono
parents:
diff changeset
256 EXTERN int MAX_REGISTER_VAR;
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
257 EXTERN double dsymval;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
258
d35df41eac69 Initial revision
kono
parents:
diff changeset
259 EXTERN unsigned hash;
d35df41eac69 Initial revision
kono
parents:
diff changeset
260
34
0756caa79167 macro function recursive and copy method
kono
parents: 33
diff changeset
261 EXTERN int chsave;
115
ebac635814dc fix nested macro function
kono
parents: 110
diff changeset
262 EXTERN int chptrsave;
29
160e20394f80 macro function (imcomplete)
kono
parents: 28
diff changeset
263 EXTERN char linebuf[LBUFSIZE],namebuf[LBUFSIZE],*chptr;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
264 EXTERN char *name,*cheapp,**av,/*obuf[320],*/*sptr,escape(void);
42
a89cf0d6904f regv assop
kono
parents: 37
diff changeset
265 EXTERN int arg_offset,stat_no,size_of_int,disp_offset,endian,csvalue1;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
266 EXTERN int code_arg_offset;
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
267 EXTERN int size_of_double,size_of_float,size_of_longlong;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
268 EXTERN int retlabel,retpending,retcont;
77
2b8ba655e572 fix arg type
kono
parents: 72
diff changeset
269 EXTERN int arglist;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
270
d35df41eac69 Initial revision
kono
parents:
diff changeset
271 EXTERN FILE *obuf;
d35df41eac69 Initial revision
kono
parents:
diff changeset
272
110
fb502a0071f8 first binary run
kono
parents: 108
diff changeset
273 #if 0
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
274 typedef struct nametable {
d35df41eac69 Initial revision
kono
parents:
diff changeset
275 char *nm;
d35df41eac69 Initial revision
kono
parents:
diff changeset
276 int sc,ty,dsp; } NMTBL;
110
fb502a0071f8 first binary run
kono
parents: 108
diff changeset
277 #else
fb502a0071f8 first binary run
kono
parents: 108
diff changeset
278 typedef struct nametable {
fb502a0071f8 first binary run
kono
parents: 108
diff changeset
279 char *nm;
fb502a0071f8 first binary run
kono
parents: 108
diff changeset
280 int sc; int ty; int dsp; } NMTBL;
fb502a0071f8 first binary run
kono
parents: 108
diff changeset
281 #endif
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
282
30
20ed2786a276 still macro
kono
parents: 29
diff changeset
283 EXTERN NMTBL mtable[MSYMS];
28
c6994794f084 functional macro (imcomplete)
kono
parents: 25
diff changeset
284 EXTERN NMTBL ntable[GSYMS+LSYMS];
c6994794f084 functional macro (imcomplete)
kono
parents: 25
diff changeset
285 EXTERN NMTBL *nptr,*gnptr;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
286 EXTERN NMTBL *fnptr;
105
7e3d59e56a53 save register ( incomplete )
kono
parents: 104
diff changeset
287 EXTERN NMTBL null_nptr;
72
3b5d293cea36 type def etc
kono
parents: 70
diff changeset
288 EXTERN int typedefed,gtypedefed;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
289
25
b7a94557bf92 *** empty log message ***
kono
parents: 20
diff changeset
290 EXTERN struct {int fd,ln;char *name0;FILE *fcb;} *filep,filestack[FILES];
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
291 EXTERN char cheap[CHEAPSIZE];
34
0756caa79167 macro function recursive and copy method
kono
parents: 33
diff changeset
292 EXTERN char *macropp,macro_buf[MACROSIZE];
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
293
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
294 extern void error(int n);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
295 extern int size(int t);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
296 extern int scalar(int t);
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
297 extern int dlist2(int e1, double e2);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
298 extern int list2(int e1, int e2);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
299 extern int list3(int e1, int e2, int e3);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
300 extern int list4(int e1, int e2, int e3,int e4);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
301 extern int reverse0(int t1);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
302 extern int assign_data(int e, int t, NMTBL *n,int offset);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
303 extern int assign_expr0(int e1,int e2,int t,int type) ;
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
304 extern int assign_expr(int e1,int e2,int t,int type) ;
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
305 extern int append4(int p,int a1,int a2,int a3);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
306
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
307
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
308
33
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
309 #define car(e) (heap[(int)(e)])
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
310
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
311 #define cadr(e) (heap[((int)(e))+1])
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
312
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
313 #define caddr(e) (heap[((int)(e))+2])
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
314
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
315 #define cadddr(e) (heap[((int)(e))+3])
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
316
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
317 #define dcadr(e) (*(double*)&heap[((int)(e))+1])
f94ca1168520 float first try...
kono
parents: 78
diff changeset
318 #define dcaddr(e) (*(double*)&heap[((int)(e))+2])
f94ca1168520 float first try...
kono
parents: 78
diff changeset
319
66
0b068058dd67 *** empty log message ***
kono
parents: 65
diff changeset
320 #include "conv/conv.h"
0b068058dd67 *** empty log message ***
kono
parents: 65
diff changeset
321 /*
59
eeca07d1b1c2 *** empty log message ***
kono
parents: 42
diff changeset
322 #include "conv/c2cbc.h"
eeca07d1b1c2 *** empty log message ***
kono
parents: 42
diff changeset
323 #include "conv/cbc2c.h"
66
0b068058dd67 *** empty log message ***
kono
parents: 65
diff changeset
324 */
59
eeca07d1b1c2 *** empty log message ***
kono
parents: 42
diff changeset
325
62
129f4802b027 separation done
kono
parents: 61
diff changeset
326 extern Converter *conv;
59
eeca07d1b1c2 *** empty log message ***
kono
parents: 42
diff changeset
327
119
b815fcd57b9d input var ( incomplete )
kono
parents: 117
diff changeset
328 EXTERN void extern_define(char *s,int dsp,int type,int use);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
329 EXTERN void error(int n);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
330 EXTERN int append4(int p,int a1,int a2,int a3);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
331 EXTERN int assign_expr(int e1,int e2,int t,int type);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
332 EXTERN int assign_expr0(int e1,int e2,int t,int type);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
333 EXTERN int backdef(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
334 EXTERN int fwdlabel(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
335 EXTERN int glist2(int e1,int e2);
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
336 EXTERN int glist3(int e1,int e2,int e3);
117
2d5a203cc3a6 lvar reuse
kono
parents: 115
diff changeset
337 EXTERN void free_glist2(int e1);
2d5a203cc3a6 lvar reuse
kono
parents: 115
diff changeset
338 EXTERN void free_glist3(int e1);
2d5a203cc3a6 lvar reuse
kono
parents: 115
diff changeset
339 EXTERN int integral(int t);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
340 EXTERN int integral(int t);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
341 EXTERN int list2(int e1, int e2);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
342 EXTERN int list3(int e1, int e2, int e3);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
343 EXTERN int list4(int e1, int e2, int e3, int e4);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
344 EXTERN int reverse0(int t1);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
345 EXTERN int rplacad(int e, int n);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
346 EXTERN int rplacadd(int e, int n);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
347 EXTERN int rvalue_t(int e,int type);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
348 EXTERN int scalar(int t);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
349 EXTERN void bexpr(int e1, char cond, int l1);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
350 EXTERN void def_label(int cslabel, int dlabel);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
351 EXTERN void display_ntable(NMTBL *n, char *s);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
352 EXTERN void exit(int l);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
353 EXTERN void fwddef(int l);
94
1ad7045741a7 float dbinop fix
kono
parents: 91
diff changeset
354 EXTERN int new_lvar(int size);
1ad7045741a7 float dbinop fix
kono
parents: 91
diff changeset
355
117
2d5a203cc3a6 lvar reuse
kono
parents: 115
diff changeset
356 EXTERN void free_lvar(int lvar);
2d5a203cc3a6 lvar reuse
kono
parents: 115
diff changeset
357 EXTERN void init_free_lvar_list();
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
358
33
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
359 /* end */