annotate mc.h @ 235:c575422d8b6e

*** empty log message ***
author kono
date Thu, 29 Apr 2004 23:33:02 +0900
parents 3d214303bae9
children 1933266f1efa
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>
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
10 #include <stdlib.h>
19
b62230ea38f6 ifdef debug
kono
parents: 18
diff changeset
11 #endif
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
12
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
13 #define FLOAT_CODE 1
235
c575422d8b6e *** empty log message ***
kono
parents: 222
diff changeset
14 #define LONGLONG_CODE 0
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
15
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
16 #define SIZE_INT 4
d35df41eac69 Initial revision
kono
parents:
diff changeset
17
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
18 /* reserved word start */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
19
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
20 #define INT (-1)
162
0c604d2ff585 *** empty log message ***
kono
parents: 150
diff changeset
21 #define UNSIGNED (-2)
0c604d2ff585 *** empty log message ***
kono
parents: 150
diff changeset
22 #define CHAR (-3)
0c604d2ff585 *** empty log message ***
kono
parents: 150
diff changeset
23 #define UCHAR (-4)
0c604d2ff585 *** empty log message ***
kono
parents: 150
diff changeset
24 #define POINTER (-5)
0c604d2ff585 *** empty log message ***
kono
parents: 150
diff changeset
25 #define ARRAY (-6)
0c604d2ff585 *** empty log message ***
kono
parents: 150
diff changeset
26 #define STRUCT (-7)
0c604d2ff585 *** empty log message ***
kono
parents: 150
diff changeset
27 #define UNION (-8)
0c604d2ff585 *** empty log message ***
kono
parents: 150
diff changeset
28 #define FUNCTION (-9)
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
29
d35df41eac69 Initial revision
kono
parents:
diff changeset
30 #define STATIC (-10)
d35df41eac69 Initial revision
kono
parents:
diff changeset
31 #define GOTO (-11)
d35df41eac69 Initial revision
kono
parents:
diff changeset
32 #define RETURN (-12)
d35df41eac69 Initial revision
kono
parents:
diff changeset
33 #define BREAK (-13)
d35df41eac69 Initial revision
kono
parents:
diff changeset
34 #define CONTINUE (-14)
d35df41eac69 Initial revision
kono
parents:
diff changeset
35 #define IF (-15)
d35df41eac69 Initial revision
kono
parents:
diff changeset
36 #define ELSE (-16)
d35df41eac69 Initial revision
kono
parents:
diff changeset
37 #define FOR (-17)
d35df41eac69 Initial revision
kono
parents:
diff changeset
38 #define DO (-18)
d35df41eac69 Initial revision
kono
parents:
diff changeset
39 #define WHILE (-19)
d35df41eac69 Initial revision
kono
parents:
diff changeset
40 #define SWITCH (-20)
d35df41eac69 Initial revision
kono
parents:
diff changeset
41 #define CASE (-21)
d35df41eac69 Initial revision
kono
parents:
diff changeset
42 #define DEFAULT (-22)
d35df41eac69 Initial revision
kono
parents:
diff changeset
43 #define RESERVE (-23)
d35df41eac69 Initial revision
kono
parents:
diff changeset
44 #define TAG (-24)
d35df41eac69 Initial revision
kono
parents:
diff changeset
45 #define FIELD (-25)
d35df41eac69 Initial revision
kono
parents:
diff changeset
46 #define IDENT (-26)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
47 #define MACRO (-27)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
48 #define BLABEL (-28)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
49 #define FLABEL (-29)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
50 #define TYPEDEF (-30)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
51 #define SIZEOF (-31)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
52 #define TYPE (-32)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
53 #define LONG (-33)
178
0f395aa93438 gcc include file
kono
parents: 177
diff changeset
54 #define SHORT (-34)
0f395aa93438 gcc include file
kono
parents: 177
diff changeset
55 #define USHORT (-35)
0f395aa93438 gcc include file
kono
parents: 177
diff changeset
56 #define EXTRN (-36)
0f395aa93438 gcc include file
kono
parents: 177
diff changeset
57 #define EXTRN1 (-37)
0f395aa93438 gcc include file
kono
parents: 177
diff changeset
58 #define VOID (-38)
0f395aa93438 gcc include file
kono
parents: 177
diff changeset
59 #define INLINE (-39)
0f395aa93438 gcc include file
kono
parents: 177
diff changeset
60 #define REGISTER (-40)
0f395aa93438 gcc include file
kono
parents: 177
diff changeset
61 #define FREGISTER (-41)
0f395aa93438 gcc include file
kono
parents: 177
diff changeset
62 #define DREGISTER (-42)
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
63 #define LREGISTER (-43)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
64 #define CODE (-44)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
65 #define ENVIRONMENT (-45)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
66 #define DEFINED (-46)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
67 #define ENUM (-47)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
68 #define KONST (-48)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
69 #define FMACRO (-49)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
70 #define LMACRO (-50)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
71 #define SIGNED (-51)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
72 #define DOTS (-52)
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
73
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
74 #define FLOAT (-53)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
75 #define DOUBLE (-54)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
76 #define LONGLONG (-55)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
77 #define ULONGLONG (-56)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
78 #define VOLATILE (-57)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
79
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
80 /* reserved word end */
78
8418d4b7caa7 *** empty log message ***
kono
parents: 77
diff changeset
81
103
f849af4b5ea9 *** empty log message ***
kono
parents: 101
diff changeset
82 #define EMPTY (-99)
f849af4b5ea9 *** empty log message ***
kono
parents: 101
diff changeset
83
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
84 /* mode start */
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
85 #define TOP 0
d35df41eac69 Initial revision
kono
parents:
diff changeset
86 #define GDECL 1
d35df41eac69 Initial revision
kono
parents:
diff changeset
87 #define GSDECL 2
d35df41eac69 Initial revision
kono
parents:
diff changeset
88 #define GUDECL 3
d35df41eac69 Initial revision
kono
parents:
diff changeset
89 #define ADECL 4
d35df41eac69 Initial revision
kono
parents:
diff changeset
90 #define LDECL 5
d35df41eac69 Initial revision
kono
parents:
diff changeset
91 #define LSDECL 6
d35df41eac69 Initial revision
kono
parents:
diff changeset
92 #define LUDECL 7
d35df41eac69 Initial revision
kono
parents:
diff changeset
93 #define STADECL 8
d35df41eac69 Initial revision
kono
parents:
diff changeset
94 #define STAT 9
d35df41eac69 Initial revision
kono
parents:
diff changeset
95 #define GTDECL 10
d35df41eac69 Initial revision
kono
parents:
diff changeset
96 #define LTDECL 11
18
df7fa8cee67b pass -Wall
kono
parents: 3
diff changeset
97 #define IFDEF 12
29
160e20394f80 macro function (imcomplete)
kono
parents: 28
diff changeset
98 #define MDECL 13
176
kono
parents: 174
diff changeset
99 #define GEDECL 14
kono
parents: 174
diff changeset
100 #define LEDECL 15
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
101 /* mode end */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
102
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
103 #define US 1
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
104 #define AS 10000
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
105 #define SOP 200
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
106 #define COP 400
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
107 #define DOP 600
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
108 #define FOP 800
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
109 #define LOP 1000
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
110
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
111 /* tree node tags start */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
112
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
113 #define LIST_ARGS(i) (i==FUNCTION||i==CODE)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
114
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
115 /* nullary argments */
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
116
d35df41eac69 Initial revision
kono
parents:
diff changeset
117 #define GVAR 1
d35df41eac69 Initial revision
kono
parents:
diff changeset
118 #define RGVAR 2
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
119 #define URGVAR 3
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
120 #define LVAR 4
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
121 #define RLVAR 5
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
122 #define URLVAR 6
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
123 #define CRGVAR (COP+RGVAR)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
124 #define CURGVAR (COP+URGVAR)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
125 #define CRLVAR (COP+RLVAR)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
126 #define CURLVAR (COP+URLVAR)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
127 #define FRGVAR (FOP+RGVAR)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
128 #define FRLVAR (FOP+RLVAR)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
129 #define DRGVAR (DOP+RGVAR)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
130 #define DRLVAR (DOP+RLVAR)
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
131 #define SRGVAR (SOP+RGVAR)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
132 #define SURGVAR (SOP+URGVAR)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
133 #define SRLVAR (SOP+RLVAR)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
134 #define SURLVAR (SOP+URLVAR)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
135 #define LRGVAR (LOP+RGVAR)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
136 #define LURGVAR (LOP+URGVAR)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
137 #define LRLVAR (LOP+RLVAR)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
138 #define LURLVAR (LOP+URLVAR)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
139
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
140 #define CONST 7
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
141 #define DCONST (DOP+CONST)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
142 #define FCONST (FOP+CONST)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
143 #define LCONST (LOP+CONST)
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
144 #define STRING 8
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
145 #define FNAME 9
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
146
219
6190d24e178c long long code generation level 4
kono
parents: 216
diff changeset
147 #define NULLARY_ARGS(i) (i==REGISTER||i==DREGISTER||i==FREGISTER||i==LREGISTER||(GVAR<=(i%SOP)&&(i%SOP)<=FNAME))
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
148
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
149 /* unary argments */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
150
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
151 #define ADDRESS 10
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
152 #define MINUS 11
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
153 #define LNOT 12
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
154 #define BNOT 13
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
155 #define INC 14
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
156 #define POSTINC 15
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
157 #define UPOSTINC 16
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
158 #define PREINC 17
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
159 #define UPREINC 18
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
160 #define POSTDEC 19
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
161 #define UPOSTDEC 20
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
162 #define PREDEC 21
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
163 #define UPREDEC 22
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
164 #define DEC 23
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
165 #define CPOSTINC (COP+POSTINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
166 #define CUPOSTINC (COP+UPOSTINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
167 #define CPREINC (COP+PREINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
168 #define CUPREINC (COP+UPREINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
169 #define CPOSTDEC (COP+POSTDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
170 #define CUPOSTDEC (COP+UPOSTDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
171 #define CPREDEC (COP+CPREDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
172 #define CUPREDEC (COP+UPREDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
173 #define SPOSTINC (SOP+POSTINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
174 #define SUPOSTINC (SOP+UPOSTINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
175 #define SPREINC (SOP+PREINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
176 #define SUPREINC (SOP+UPREINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
177 #define SPOSTDEC (SOP+POSTDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
178 #define SUPOSTDEC (SOP+UPOSTDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
179 #define SPREDEC (SOP+PREDEC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
180 #define SUPREDEC (SOP+UPREDEC)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
181 #define FPOSTINC (FOP+POSTINC)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
182 #define FPREINC (FOP+PREINC)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
183 #define DPOSTINC (DOP+POSTINC)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
184 #define DPREINC (DOP+PREINC)
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
185 #define LPOSTINC (LOP+POSTINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
186 #define LPREINC (LOP+PREINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
187 #define LUPOSTINC (LOP+UPOSTINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
188 #define LUPREINC (LOP+UPREINC)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
189 #define INDIRECT 24
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
190 #define RINDIRECT 25
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
191 #define URINDIRECT 26
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
192 #define CRINDIRECT (COP+RINDIRECT)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
193 #define CURINDIRECT (COP+URINDIRECT)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
194 #define SRINDIRECT (SOP+RINDIRECT)
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
195 #define SURINDIRECT (SOP+URINDIRECT)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
196 #define FRINDIRECT (FOP+RINDIRECT)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
197 #define DRINDIRECT (DOP+RINDIRECT)
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
198 #define LRINDIRECT (LOP+RINDIRECT)
207
8a3516f6eb66 *** empty log message ***
kono
parents: 206
diff changeset
199 #define LURINDIRECT (LOP+URINDIRECT)
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
200 #define RSTRUCT 27
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
201 #define CONV 28
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
202
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
203 #define UNARY_ARGS(i) (ADDRESS<=(i%SOP)&&(i%SOP)<=CONV)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
204
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
205 /* binary argments */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
206
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
207 #define MUL 29
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
208 #define UMUL 30
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
209 #define DIV 31
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
210 #define UDIV 32
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
211 #define MOD 33
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
212 #define UMOD 34
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
213 #define ADD 35
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
214 #define SUB 36
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
215 #define CMP 37
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
216 #define RSHIFT 38
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
217 #define URSHIFT 39
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
218 #define LSHIFT 40
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
219 #define ULSHIFT 41
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
220 #define GT 42
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
221 #define UGT 43
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
222 #define GE 44
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
223 #define UGE 45
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
224 #define LT 46
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
225 #define ULT 47
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
226 #define LE 48
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
227 #define ULE 49
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
228 #define EQ 50
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
229 #define NEQ 51
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
230 #define BAND 52
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
231 #define EOR 53
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
232 #define BOR 54
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
233 #define LAND 55
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
234 #define LOR 56
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
235 #define ASS 57
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
236 #define CMPGE 58
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
237 #define ASSOP 59
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
238 #define COMMA 60
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
239
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
240 #define CASS 61
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
241 #define CASSOP 62
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
242 #define CUASSOP 63
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
243
165
kono
parents: 164
diff changeset
244 #define SASS (SOP+CASS)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
245 #define SASSOP (SOP+CASSOP)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
246 #define SUASSOP (SOP+CUASSOP)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
247
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
248 #define DASS (DOP+ASS)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
249 #define DCMPGE (DOP+CMPGE)
89
917947ffeb7c power pc version
kono
parents: 85
diff changeset
250 #define DASSOP (DOP+ASSOP)
917947ffeb7c power pc version
kono
parents: 85
diff changeset
251 #define DCMP (DOP+CMP)
917947ffeb7c power pc version
kono
parents: 85
diff changeset
252 #define DMINUS (DOP+MINUS)
82
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
253 #define DMUL (DOP+MUL)
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
254 #define DDIV (DOP+DIV)
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
255 #define DADD (DOP+ADD)
25654dc29ecc First Floating Point coding done.
kono
parents: 81
diff changeset
256 #define DSUB (DOP+SUB)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
257
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
258 #define FASS (FOP+ASS)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
259 #define FCMPGE (FOP+CMPGE)
133
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
260 #define FASSOP (FOP+ASSOP)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
261 #define FCMP (FOP+CMP)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
262 #define FMINUS (FOP+MINUS)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
263 #define FMUL (FOP+MUL)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
264 #define FDIV (FOP+DIV)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
265 #define FADD (FOP+ADD)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
266 #define FSUB (FOP+SUB)
78
8418d4b7caa7 *** empty log message ***
kono
parents: 77
diff changeset
267
165
kono
parents: 164
diff changeset
268 #define LASS (LOP+CASS)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
269 #define LCMPGE (LOP+CMPGE)
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
270 #define LASSOP (LOP+CASSOP)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
271 #define LUASSOP (LOP+CUASSOP)
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
272 #define LCMP (LOP+CMP)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
273 #define LMINUS (LOP+MINUS)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
274 #define LMUL (LOP+MUL)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
275 #define LDIV (LOP+DIV)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
276 #define LUMUL (LOP+UMUL)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
277 #define LUDIV (LOP+UDIV)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
278 #define LADD (LOP+ADD)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
279 #define LSUB (LOP+SUB)
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
280
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
281
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
282 #define LMOD (LOP+MOD)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
283 #define LUMOD (LOP+UMOD)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
284 #define LLSHIFT (LOP+LSHIFT)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
285 #define LULSHIFT (LOP+ULSHIFT)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
286 #define LRSHIFT (LOP+RSHIFT)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
287 #define LURSHIFT (LOP+URSHIFT)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
288 #define LBAND (LOP+BAND)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
289 #define LEOR (LOP+EOR)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
290 #define LBOR (LOP+BOR)
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
291
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
292
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
293 #define STASS 64
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
294
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
295 #define BINARY_ARGS(i) (MUL<=(i%SOP)&&(i%SOP)<=STASS)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
296
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
297 /* tarnary argments */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
298
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
299 #define COND 65
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
300 #define SCOND (SOP+COND)
133
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
301 #define DCOND (DOP+COND)
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
302 #define FCOND (FOP+COND)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
303 #define LCOND (LOP+COND)
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
304
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
305 #define TARNARY_ARGS(i) (COND==(i%SOP))
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
306
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
307 /* not appeared as tags */
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
308
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
309 #define I2I 66
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
310 #define I2U 67
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
311 #define I2D 68
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
312 #define I2F 69
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
313 #define I2LL 70
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
314 #define I2ULL 71
194
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
315
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
316 #define U2I 72
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
317 #define U2U 73
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
318 #define U2D 74
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
319 #define U2F 75
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
320 #define U2LL 76
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
321 #define U2ULL 77
194
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
322
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
323 #define D2I (DOP+I2I)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
324 #define D2U (DOP+I2U)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
325 #define D2D (DOP+I2D)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
326 #define D2F (DOP+I2F)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
327 #define D2LL (DOP+I2LL)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
328 #define D2ULL (DOP+I2ULL)
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
329
194
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
330 #define F2I (FOP+I2I)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
331 #define F2U (FOP+I2U)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
332 #define F2D (FOP+I2D)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
333 #define F2F (FOP+I2F)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
334 #define F2LL (FOP+I2LL)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
335 #define F2ULL (FOP+I2ULL)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
336
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
337 #define LL2I (LOP+I2I)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
338 #define LL2U (LOP+I2U)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
339 #define LL2D (LOP+I2D)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
340 #define LL2F (LOP+I2F)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
341 #define LL2LL (LOP+I2LL)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
342 #define LL2ULL (LOP+I2ULL)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
343
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
344 #define ULL2I (LOP+U2I)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
345 #define ULL2U (LOP+U2U)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
346 #define ULL2D (LOP+U2D)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
347 #define ULL2F (LOP+U2F)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
348 #define ULL2LL (LOP+U2LL)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
349 #define ULL2ULL (LOP+U2ULL)
114e9d64b5cc *** empty log message ***
kono
parents: 188
diff changeset
350
196
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
351 #define LPAR 78
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
352 #define RPAR 79
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
353 #define LBRA 80
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
354 #define RBRA 81
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
355 #define LC 82
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
356 #define RC 83
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
357 #define COLON 84
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
358 #define SM 85
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
359 #define PERIOD 86
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
360 #define ARROW 87
5f70abd9453d *** empty log message ***
kono
parents: 195
diff changeset
361 #define CNAME 88
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
362
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
363 /* tree node tags end */
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
364
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
365 /* error number start */
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
366
d35df41eac69 Initial revision
kono
parents:
diff changeset
367 #define FILERR 1
d35df41eac69 Initial revision
kono
parents:
diff changeset
368 #define DCERR 2
d35df41eac69 Initial revision
kono
parents:
diff changeset
369 #define STERR 3
d35df41eac69 Initial revision
kono
parents:
diff changeset
370 #define EXERR 4
d35df41eac69 Initial revision
kono
parents:
diff changeset
371 #define CNERR 5
d35df41eac69 Initial revision
kono
parents:
diff changeset
372 #define CHERR 6
d35df41eac69 Initial revision
kono
parents:
diff changeset
373 #define GSERR 7
d35df41eac69 Initial revision
kono
parents:
diff changeset
374 #define LSERR 8
d35df41eac69 Initial revision
kono
parents:
diff changeset
375 #define STRERR 9
d35df41eac69 Initial revision
kono
parents:
diff changeset
376 #define LNERR 10
d35df41eac69 Initial revision
kono
parents:
diff changeset
377 #define EOFERR 11
d35df41eac69 Initial revision
kono
parents:
diff changeset
378 #define MCERR 12
d35df41eac69 Initial revision
kono
parents:
diff changeset
379 #define INCERR 13
d35df41eac69 Initial revision
kono
parents:
diff changeset
380 #define HPERR 14
d35df41eac69 Initial revision
kono
parents:
diff changeset
381 #define TYERR 15
d35df41eac69 Initial revision
kono
parents:
diff changeset
382 #define LVERR 16
d35df41eac69 Initial revision
kono
parents:
diff changeset
383 #define UDERR 17
d35df41eac69 Initial revision
kono
parents:
diff changeset
384 #define OPTION 18
d35df41eac69 Initial revision
kono
parents:
diff changeset
385 #define REG_ERR 19
d35df41eac69 Initial revision
kono
parents:
diff changeset
386 #define CODE_ERR 20
29
160e20394f80 macro function (imcomplete)
kono
parents: 28
diff changeset
387 #define MSERR 21
164
1c2a9232ea93 mc.h generation
kono
parents: 162
diff changeset
388 /* error number end */
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
389
d35df41eac69 Initial revision
kono
parents:
diff changeset
390 #define GSYMS 9000
d35df41eac69 Initial revision
kono
parents:
diff changeset
391 #define LSYMS 500
32
b35787d8a442 macro initialization
kono
parents: 30
diff changeset
392 #define MSYMS 3000
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
393
183
1d80ad165831 recursive macros
kono
parents: 182
diff changeset
394 #define HEAPSIZE 30000
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
395 /* #define CHEAPSIZE 3000 */
183
1d80ad165831 recursive macros
kono
parents: 182
diff changeset
396 #define CHEAPSIZE 356000
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
397 #define LBUFSIZE 4096
34
0756caa79167 macro function recursive and copy method
kono
parents: 33
diff changeset
398 #define MACROSIZE 16000
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
399
25
b7a94557bf92 *** empty log message ***
kono
parents: 20
diff changeset
400 #define FILES 10
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
401 #define OUTPUT_FILE_NAME "mcout.s"
d35df41eac69 Initial revision
kono
parents:
diff changeset
402
29
160e20394f80 macro function (imcomplete)
kono
parents: 28
diff changeset
403 EXTERN int sym,ch,type,mode,stmode,gfree,lfree,mflag,lineno,glineno;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
404 EXTERN int labelno,gpc,disp,reg_var,debug;
d35df41eac69 Initial revision
kono
parents:
diff changeset
405 EXTERN int symval,args,init_vars,heap[HEAPSIZE];
d35df41eac69 Initial revision
kono
parents:
diff changeset
406 EXTERN int blabel,clabel,dlabel,cslabel,ilabel,control,ac,ac2,lsrc,chk,asmf;
d35df41eac69 Initial revision
kono
parents:
diff changeset
407 EXTERN int MAX_REGISTER_VAR;
d35df41eac69 Initial revision
kono
parents:
diff changeset
408
d35df41eac69 Initial revision
kono
parents:
diff changeset
409 EXTERN unsigned hash;
d35df41eac69 Initial revision
kono
parents:
diff changeset
410
34
0756caa79167 macro function recursive and copy method
kono
parents: 33
diff changeset
411 EXTERN int chsave;
115
ebac635814dc fix nested macro function
kono
parents: 110
diff changeset
412 EXTERN int chptrsave;
29
160e20394f80 macro function (imcomplete)
kono
parents: 28
diff changeset
413 EXTERN char linebuf[LBUFSIZE],namebuf[LBUFSIZE],*chptr;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
414 EXTERN char *name,*cheapp,**av,/*obuf[320],*/*sptr,escape(void);
166
9e55cc5551fb *** empty log message ***
kono
parents: 165
diff changeset
415 EXTERN int arg_offset,stat_no,size_of_int,size_of_short,disp_offset,endian,csvalue1;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
416 EXTERN int code_arg_offset;
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
417 EXTERN int size_of_double,size_of_float,size_of_longlong;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
418 EXTERN int retlabel,retpending,retcont;
77
2b8ba655e572 fix arg type
kono
parents: 72
diff changeset
419 EXTERN int arglist;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
420
d35df41eac69 Initial revision
kono
parents:
diff changeset
421 EXTERN FILE *obuf;
d35df41eac69 Initial revision
kono
parents:
diff changeset
422
168
b1297c82e926 cpostinc removal
kono
parents: 166
diff changeset
423 #if 1
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
424 typedef struct nametable {
d35df41eac69 Initial revision
kono
parents:
diff changeset
425 char *nm;
d35df41eac69 Initial revision
kono
parents:
diff changeset
426 int sc,ty,dsp; } NMTBL;
110
fb502a0071f8 first binary run
kono
parents: 108
diff changeset
427 #else
fb502a0071f8 first binary run
kono
parents: 108
diff changeset
428 typedef struct nametable {
fb502a0071f8 first binary run
kono
parents: 108
diff changeset
429 char *nm;
fb502a0071f8 first binary run
kono
parents: 108
diff changeset
430 int sc; int ty; int dsp; } NMTBL;
fb502a0071f8 first binary run
kono
parents: 108
diff changeset
431 #endif
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
432
30
20ed2786a276 still macro
kono
parents: 29
diff changeset
433 EXTERN NMTBL mtable[MSYMS];
28
c6994794f084 functional macro (imcomplete)
kono
parents: 25
diff changeset
434 EXTERN NMTBL ntable[GSYMS+LSYMS];
c6994794f084 functional macro (imcomplete)
kono
parents: 25
diff changeset
435 EXTERN NMTBL *nptr,*gnptr;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
436 EXTERN NMTBL *fnptr;
105
7e3d59e56a53 save register ( incomplete )
kono
parents: 104
diff changeset
437 EXTERN NMTBL null_nptr;
72
3b5d293cea36 type def etc
kono
parents: 70
diff changeset
438 EXTERN int typedefed,gtypedefed;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
439
173
3b33c7daae95 *** empty log message ***
kono
parents: 168
diff changeset
440 EXTERN struct {int fd,ln;char *name0;int inc;FILE *fcb;} *filep,filestack[FILES];
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
441 EXTERN char cheap[CHEAPSIZE];
34
0756caa79167 macro function recursive and copy method
kono
parents: 33
diff changeset
442 EXTERN char *macropp,macro_buf[MACROSIZE];
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
443
173
3b33c7daae95 *** empty log message ***
kono
parents: 168
diff changeset
444 extern void macro_define(char *n);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
445 extern void error(int n);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
446 extern int size(int t);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
447 extern int scalar(int t);
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
448 #if FLOAT_CODE
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
449 EXTERN double dsymval;
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
450 extern int dlist2(int e1, double e2);
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
451 #endif
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
452 #if LONGLONG_CODE
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
453 EXTERN long long lsymval;
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
454 extern int llist2(int e1, long long e2);
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
455 #endif
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
456 extern int list2(int e1, int e2);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
457 extern int list3(int e1, int e2, int e3);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
458 extern int list4(int e1, int e2, int e3,int e4);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
459 extern int reverse0(int t1);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
460 extern int assign_data(int e, int t, NMTBL *n,int offset);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
461 extern int assign_expr0(int e1,int e2,int t,int type) ;
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
462 extern int assign_expr(int e1,int e2,int t,int type) ;
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
463 extern int append4(int p,int a1,int a2,int a3);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
464
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
465
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
466
33
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
467 #define car(e) (heap[(int)(e)])
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
468
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
469 #define cadr(e) (heap[((int)(e))+1])
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
470
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
471 #define caddr(e) (heap[((int)(e))+2])
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
472
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
473 #define cadddr(e) (heap[((int)(e))+3])
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
474
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
475 #if FLOAT_CODE
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
476 #define dcadr(e) (*(double*)&heap[((int)(e))+1])
f94ca1168520 float first try...
kono
parents: 78
diff changeset
477 #define dcaddr(e) (*(double*)&heap[((int)(e))+2])
195
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
478 #endif
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
479
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
480 #if LONGLONG_CODE
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
481 #define lcadr(e) (*(long long*)&heap[((int)(e))+1])
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
482 #define lcaddr(e) (*(long long*)&heap[((int)(e))+2])
c193120ee2a6 *** empty log message ***
kono
parents: 194
diff changeset
483 #endif
81
f94ca1168520 float first try...
kono
parents: 78
diff changeset
484
66
0b068058dd67 *** empty log message ***
kono
parents: 65
diff changeset
485 #include "conv/conv.h"
0b068058dd67 *** empty log message ***
kono
parents: 65
diff changeset
486 /*
59
eeca07d1b1c2 *** empty log message ***
kono
parents: 42
diff changeset
487 #include "conv/c2cbc.h"
eeca07d1b1c2 *** empty log message ***
kono
parents: 42
diff changeset
488 #include "conv/cbc2c.h"
66
0b068058dd67 *** empty log message ***
kono
parents: 65
diff changeset
489 */
59
eeca07d1b1c2 *** empty log message ***
kono
parents: 42
diff changeset
490
62
129f4802b027 separation done
kono
parents: 61
diff changeset
491 extern Converter *conv;
59
eeca07d1b1c2 *** empty log message ***
kono
parents: 42
diff changeset
492
119
b815fcd57b9d input var ( incomplete )
kono
parents: 117
diff changeset
493 EXTERN void extern_define(char *s,int dsp,int type,int use);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
494 EXTERN void error(int n);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
495 EXTERN int append4(int p,int a1,int a2,int a3);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
496 EXTERN int assign_expr(int e1,int e2,int t,int type);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
497 EXTERN int assign_expr0(int e1,int e2,int t,int type);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
498 EXTERN int backdef(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
499 EXTERN int fwdlabel(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
500 EXTERN int glist2(int e1,int e2);
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
501 EXTERN int glist3(int e1,int e2,int e3);
117
2d5a203cc3a6 lvar reuse
kono
parents: 115
diff changeset
502 EXTERN void free_glist2(int e1);
2d5a203cc3a6 lvar reuse
kono
parents: 115
diff changeset
503 EXTERN void free_glist3(int e1);
2d5a203cc3a6 lvar reuse
kono
parents: 115
diff changeset
504 EXTERN int integral(int t);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
505 EXTERN int integral(int t);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
506 EXTERN int list2(int e1, int e2);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
507 EXTERN int list3(int e1, int e2, int e3);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
508 EXTERN int list4(int e1, int e2, int e3, int e4);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
509 EXTERN int reverse0(int t1);
188
4303255fc3cf minor fix
kono
parents: 183
diff changeset
510 /*
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
511 EXTERN int rplacad(int e, int n);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
512 EXTERN int rplacadd(int e, int n);
188
4303255fc3cf minor fix
kono
parents: 183
diff changeset
513 */
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
514 EXTERN int rvalue_t(int e,int type);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
515 EXTERN int scalar(int t);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
516 EXTERN void bexpr(int e1, char cond, int l1);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
517 EXTERN void def_label(int cslabel, int dlabel);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
518 EXTERN void display_ntable(NMTBL *n, char *s);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
519 EXTERN void exit(int l);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
520 EXTERN void fwddef(int l);
94
1ad7045741a7 float dbinop fix
kono
parents: 91
diff changeset
521 EXTERN int new_lvar(int size);
1ad7045741a7 float dbinop fix
kono
parents: 91
diff changeset
522
117
2d5a203cc3a6 lvar reuse
kono
parents: 115
diff changeset
523 EXTERN void free_lvar(int lvar);
2d5a203cc3a6 lvar reuse
kono
parents: 115
diff changeset
524 EXTERN void init_free_lvar_list();
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 59
diff changeset
525
33
8500dbb69dd9 bad macro processing. give up this method.
kono
parents: 32
diff changeset
526 /* end */