Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:ragge:20110728194139

Diff

Diff from 1.18 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/pcc/pcc/arch/vax/table.c

Annotated File View

ragge
1.18
1 /*      $Id: table.c,v 1.18 2011/07/28 19:41:39 ragge Exp $     */
ragge
1.1
2 /*
3  * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * Redistributions of source code and documentation must retain the above
10  * copyright notice, this list of conditions and the following disclaimer.
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditionsand the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  * All advertising materials mentioning features or use of this software
15  * must display the following acknowledgement:
16  *      This product includes software developed or owned by Caldera
17  *      International, Inc.
18  * Neither the name of Caldera International, Inc. nor the names of other
19  * contributors may be used to endorse or promote products derived from
20  * this software without specific prior written permission.
21  *
22  * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
23  * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
24  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26  * DISCLAIMED.  IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE
27  * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30  * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT,
31  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
32  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
33  * POSSIBILITY OF SUCH DAMAGE.
34  */
35
ragge
1.2
36 # include "pass2.h"
ragge
1.1
37
ragge
1.8
38 # define WPTR TPTRTO|TINT|TFLOAT|TDOUBLE|TPOINT|TUNSIGNED
ragge
1.9
39 # define SAWM SNAME|SOREG|STARNM|STARREG
40 # define AWD SAWM|SCON
ragge
1.1
41 /* tbl */
ragge
1.8
42 # define TANYSIGNED TINT|TSHORT|TCHAR
43 # define TANYUSIGNED TPOINT|TUNSIGNED|TUSHORT|TUCHAR
44 # define TANYFIXED TANYSIGNED|TANYUSIGNED
45 # define TWORD TINT|TUNSIGNED|TPOINT
ragge
1.1
46 /* tbl */
ragge
1.8
47 # define TLL TLONGLONG|TULONGLONG
ragge
1.2
48 # define TBREG TLONGLONG|TULONGLONG|TDOUBLE
ragge
1.9
49 # define TAREG TANYFIXED|TFLOAT
ragge
1.1
50
51 struct optab  table[] = {
ragge
1.2
52 /* First entry must be an empty entry */
53 { -1FOREFFSANYTANYSANYTANY00"", },
ragge
1.1
54
ragge
1.12
55 /* PCONVs are usually not necessary */
56 PCONV,        INAREG,
57         SAREG,  TWORD,
58         SAREG,  TWORD,
59                 0,      RLEFT,
60                 "", },
61
ragge
1.2
62 PCONV,        INAREG|INAREG,
ragge
1.1
63         SAREG|AWD,      TCHAR|TSHORT,
64         SANY,   TPOINT,
65                 NAREG|NASL,     RESC1,
ragge
1.2
66                 "       cvtZLl  AL,A1\n", },
ragge
1.1
67
ragge
1.2
68 PCONV,        INAREG|INAREG,
ragge
1.1
69         SAREG|AWD,      TUCHAR|TUSHORT,
70         SANY,   TPOINT,
71                 NAREG|NASL,     RESC1,
ragge
1.2
72                 "       movzZLl AL,A1\n", },
ragge
1.1
73
ragge
1.8
74 /* Handle conversions in C code */
ragge
1.13
75 SCONV,        INAREG,
ragge
1.14
76         SAREG|AWD,      TAREG,
77         SANY,           TANY,
78                 NAREG|NASL,     RESC1|RESCC,
79                 "ZG", },
80
81 SCONV,        INAREG,
82         SBREG|AWD,      TBREG,
ragge
1.13
83         SANY,           TANY,
84                 NAREG|NASL,     RESC1|RESCC,
85                 "ZG", },
86
87 SCONV,        INBREG,
ragge
1.14
88         SBREG|AWD,      TBREG,
89         SANY,           TANY,
90                 NBREG|NBSL,     RESC1|RESCC,
91                 "ZG", },
92
93 SCONV,        INBREG,
94         SAREG|AWD,      TAREG,
ragge
1.8
95         SANY,           TANY,
ragge
1.4
96                 NBREG|NBSL,     RESC1|RESCC,
ragge
1.8
97                 "ZG", },
ragge
1.1
98
ragge
1.2
99 GOTOFOREFF,
ragge
1.1
100         SCON,   TANY,
101         SANY,   TANY,
102                 0,      RNOP,
ragge
1.3
103                 "       ZJ\n", },
ragge
1.1
104
ragge
1.2
105 GOTOFOREFF,
ragge
1.1
106         SAREG,  TANY,
107         SANY,   TANY,
108                 0,      RNOP,
ragge
1.2
109                 "       jmp     (AL)\n", },
ragge
1.1
110
ragge
1.6
111 STARG,        FOREFF,
ragge
1.1
112         SCON|SAREG,     TANY,
113         SANY,   TANY,
ragge
1.6
114                 NSPECIAL,       RNOP,
ragge
1.2
115                 "ZS", },
ragge
1.1
116
ragge
1.3
117 ADDROF,       INAREG,
118         SNAME,  TANY,
119         SAREG,  TANY,
120                 NAREG,  RESC1,
121                 "       movab   AL,A1\n", },
122
ragge
1.2
123 STASG,        FOREFF,
ragge
1.1
124         SNAME|SOREG,    TANY,
125         SCON|SAREG,     TANY,
ragge
1.18
126                 NSPECIAL,       RNOP,
ragge
1.2
127                 "ZS", },
ragge
1.1
128
ragge
1.2
129 STASG,        INAREG,
ragge
1.1
130         SNAME|SOREG,    TANY,
131         SCON,   TANY,
ragge
1.18
132                 NSPECIAL|NAREGRDEST,
ragge
1.2
133                 "ZS     movl    AR,A1\n", },
ragge
1.1
134
ragge
1.2
135 STASG,        INAREG,
ragge
1.1
136         SNAME|SOREG,    TANY,
137         SAREG,  TANY,
ragge
1.18
138                 NSPECIAL,       RDEST,
ragge
1.13
139                 "       pushl   AR\nZS  movl    (%sp)+,AR\n", },
ragge
1.1
140
ragge
1.2
141 FLD,  INAREG|INAREG,
ragge
1.1
142         SANY,   TANY,
ragge
1.8
143         SFLD,   TANYSIGNED,
ragge
1.1
144                 NAREG|NASR,     RESC1,
ragge
1.2
145                 "       extv    H,S,AR,A1\n", },
ragge
1.1
146
ragge
1.2
147 FLD,  INAREG|INAREG,
ragge
1.1
148         SANY,   TANY,
ragge
1.8
149         SFLD,   TANYUSIGNED,
ragge
1.1
150                 NAREG|NASR,     RESC1,
ragge
1.2
151                 "       extzv   H,S,AR,A1\n", },
ragge
1.1
152
ragge
1.2
153 #if 0
154 FLD,  FORARG,
ragge
1.1
155         SANY,   TANY,
156         SFLD,   ANYSIGNED,
157                 0,      RNULL,
ragge
1.13
158                 "       extv    H,S,AR,-(%sp)\n", },
ragge
1.1
159
ragge
1.2
160 FLD,  FORARG,
ragge
1.1
161         SANY,   TANY,
162         SFLD,   ANYUSIGNED,
163                 0,      RNULL,
ragge
1.13
164                 "       extzv   H,S,AR,-(%sp)\n", },
ragge
1.2
165 #endif
ragge
1.1
166
ragge
1.2
167 OPLOG,        FORCC,
ragge
1.7
168         SBREG|AWD,      TLONGLONG|TULONGLONG,
169         SBREG,          TLONGLONG|TULONGLONG,
170                 0,      0,
171                 "ZB", },
172
173 OPLOG,        FORCC,
ragge
1.1
174         SAREG|AWD,      TWORD,
175         SAREG|AWD,      TWORD,
176                 0,      RESCC,
ragge
1.2
177                 "       cmpl    AL,AR\n", },
ragge
1.1
178
ragge
1.2
179 OPLOG,        FORCC,
ragge
1.1
180         SAREG|AWD,      TSHORT|TUSHORT,
181         SAREG|AWD,      TSHORT|TUSHORT,
182                 0,      RESCC,
ragge
1.2
183                 "       cmpw    AL,AR\n", },
ragge
1.1
184
ragge
1.2
185 OPLOG,        FORCC,
ragge
1.1
186         SAREG|AWD,      TCHAR|TUCHAR,
187         SAREG|AWD,      TCHAR|TUCHAR,
188                 0,      RESCC,
ragge
1.2
189                 "       cmpb    AL,AR\n", },
ragge
1.1
190
ragge
1.2
191 OPLOG,        FORCC,
ragge
1.1
192         SAREG|AWD,      TSHORT|TUSHORT,
193         SSCON,  TANY,
194                 0,      RESCC,
ragge
1.2
195                 "       cmpw    AL,AR\n", },
ragge
1.1
196
ragge
1.2
197 OPLOG,        FORCC,
ragge
1.1
198         SAREG|AWD,      TCHAR|TUCHAR,
199         SCCON,  TANY,
200                 0,      RESCC,
ragge
1.2
201                 "       cmpb    AL,AR\n", },
ragge
1.1
202
ragge
1.2
203 OPLOG,        FORCC,
ragge
1.1
204         SAREG|AWD,      TDOUBLE,
205         SAREG|AWD,      TDOUBLE,
206                 0,      RESCC,
ragge
1.2
207                 "       cmpd    AL,AR\n", },
ragge
1.1
208
ragge
1.2
209 OPLOG,        FORCC,
ragge
1.1
210         SAREG|AWD,      TFLOAT|TDOUBLE,
211         SAREG|AWD,      TFLOAT|TDOUBLE,
212                 0,      RESCC,
ragge
1.2
213                 "       cmpf    AL,AR\n", },
ragge
1.1
214
ragge
1.2
215 CCODES,       INAREG|INAREG,
ragge
1.1
216         SANY,   TANY,
217         SANY,   TANY,
218                 NAREG,  RESC1,
ragge
1.2
219                 "       movl    $1,A1\nZN", },
220
221 /*
222  * Subroutine calls.
223  */
ragge
1.1
224
ragge
1.2
225 CALL,         FOREFF,
ragge
1.1
226         SCON,   TANY,
ragge
1.2
227         SANY,   TANY,
228                 0,      0,
229                 "       calls   ZC,CL\n", },
230
231 UCALL,        FOREFF,
232         SCON,   TANY,
233         SANY,   TANY,
234                 0,      0,
235                 "       calls   $0,CL\n", },
236
237 CALL,         INAREG,
238         SCON,   TANY,
ragge
1.11
239         SANY,   TAREG,
ragge
1.2
240                 NAREG|NASL,     RESC1/* should be register 0 */
ragge
1.11
241                 "       calls   ZC,CL # 1\n", },
ragge
1.2
242
243 UCALL,        INAREG,
244         SCON,   TANY,
ragge
1.11
245         SANY,   TAREG,
ragge
1.1
246                 NAREG|NASL,     RESC1/* should be register 0 */
ragge
1.2
247                 "       calls   $0,CL\n", },
ragge
1.1
248
ragge
1.11
249 CALL,         INBREG,
250         SCON,   TANY,
251         SANY,   TBREG,
252                 NBREG|NBSL,     RESC1/* should be register 0 */
253                 "       calls   ZC,CL # 2\n", },
254
255 UCALL,        INBREG,
256         SCON,   TANY,
257         SANY,   TBREG,
258                 NBREG|NASL,     RESC1/* should be register 0 */
259                 "       calls   $0,CL\n", },
260
ragge
1.13
261 CALL,         INBREG,
262         SAREG,  TANY,
263         SANY,   TBREG,
264                 NBREG|NBSL,     RESC1,  /* should be 0 */
265                 "       calls   ZC,(AL)\n", },
266
267 UCALL,        INBREG,
268         SAREG,  TANY,
269         SANY,   TBREG,
270                 NBREG|NBSL,     RESC1,  /* should be 0 */
271                 "       calls   ZC,(AL)\n", },
272
ragge
1.4
273 CALL,         FOREFF,
274         SAREG,  TANY,
275         SANY,   TANY,
276                 0,      0,      /* should be 0 */
277                 "       calls   ZC,(AL)\n", },
278
279 CALL,         INAREG,
ragge
1.3
280         SAREG,  TANY,
ragge
1.11
281         SANY,   TAREG,
ragge
1.3
282                 NAREG|NASL,     RESC1,  /* should be 0 */
283                 "       calls   ZC,(AL)\n", },
284
ragge
1.4
285 UCALL,        FOREFF,
286         SAREG,  TANY,
ragge
1.11
287         SANY,   TANY,
ragge
1.4
288                 0,      0,      /* should be 0 */
289                 "       calls   ZC,(AL)\n", },
290
291 UCALL,        INAREG,
ragge
1.1
292         SAREG,  TANY,
ragge
1.11
293         SANY,   TAREG,
ragge
1.1
294                 NAREG|NASL,     RESC1,  /* should be 0 */
ragge
1.2
295                 "       calls   ZC,(AL)\n", },
ragge
1.1
296
ragge
1.4
297 UCALL,        FOREFF,
298         SNAME,  TANY,
299         SANY,   TANY,
300                 0,      0,      /* really reg 0 */
301                 "       calls   ZC,*AL\n", },
302
303 UCALL,        INAREG,
ragge
1.1
304         SNAME,  TANY,
ragge
1.11
305         SANY,   TAREG,
ragge
1.1
306                 NAREG|NASL,     RESC1,  /* really reg 0 */
ragge
1.2
307                 "       calls   ZC,*AL\n", },
ragge
1.1
308
ragge
1.4
309 UCALL,        FOREFF,
310         SSOREGTANY,
311         SANY,   TANY,
312                 0,      0,      /* really reg 0 */
313                 "       calls   ZC,*AL\n", },
314
315 UCALL,        INAREG,
ragge
1.1
316         SSOREGTANY,
ragge
1.11
317         SANY,   TAREG,
ragge
1.1
318                 NAREG|NASL,     RESC1,  /* really reg 0 */
ragge
1.2
319                 "       calls   ZC,*AL\n", },
320
ragge
1.5
321 STCALL,       INAREG,
322         SCON,   TANY,
ragge
1.11
323         SANY,   TAREG,
ragge
1.5
324                 NAREG|NASL,     RESC1/* should be register 0 */
325                 "       calls   ZC,CL\n", },
326
327
328
ragge
1.2
329 /*
330  * Function arguments
331  */
332 FUNARG,       FOREFF,
ragge
1.12
333         SCON|SAREG|SNAME|SOREGTANY,
334         SANY,   TWORD|TPOINT|TFLOAT,
ragge
1.2
335                 0,      RNULL,
ragge
1.11
336                 "       pushl   AL\n" },
ragge
1.2
337
ragge
1.8
338 FUNARG,       FOREFF,
ragge
1.11
339         SCON|SBREG|SNAME|SOREGTLL|TDOUBLE,
ragge
1.8
340         SANY,   TANY,
341                 0,      RNULL,
ragge
1.11
342                 "       movq    AL,-(%sp)\n" },
ragge
1.8
343
ragge
1.15
344 /* RS for signed <= int converted to negative LS */
345 /* RS longlong converted to function call */
ragge
1.13
346 RS,   INBREG|FORCC,
347         SBREG|AWD,              TLONGLONG,
348         SAREG|SBREG|AWD,        TANY,
349                 NBREG|NBSL|NBSR,        RESC1|RESCC,
350                 "       ashq    AR,AL,A1\n", },
351
352 RS,   INAREG|FORCC,
353         SAREG,          TUCHAR,
ragge
1.15
354         SAREG|SAWM,     TANYFIXED,
ragge
1.13
355                 NAREG,  RLEFT|RESCC,
356                 "       subl3   AR,$8,A1\n      extzv   AR,A1,AL,AL\n", },
357
358 RS,   INAREG|FORCC,
359         SAREG,          TUSHORT,
ragge
1.15
360         SAREG|SAWM,     TANYFIXED,
ragge
1.13
361                 NAREG,  RLEFT|RESCC,
362                 "       subl3   AR,$16,A1\n     extzv   AR,A1,AL,AL\n", },
363
364 RS,   INAREG|FORCC,
365         SAREG,  TUNSIGNED,
ragge
1.15
366         SAREG|SAWM,     TANYFIXED,
ragge
1.13
367                 NAREG,  RLEFT|RESCC,
368                 "       subl3   AR,$32,A1\n     extzv   AR,A1,AL,AL\n", },
369
ragge
1.12
370 RS,   INAREG|FORCC,
ragge
1.15
371         SAREG,  TUNSIGNED|TUSHORT|TUCHAR,
372         SCON,   TANY,
ragge
1.1
373                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
374                 "       extzv   AR,ZU,AL,A1\n", },
ragge
1.1
375
ragge
1.8
376 LS,   INBREG|FORCC,
377         SBREG|AWD,      TLL,
378         SAREG|SBREG|AWD,        TANY,
379                 NBREG|NBSL|NBSR,        RESC1|RESCC,
380                 "       ashq    AR,AL,A1\n", },
381
ragge
1.2
382 LS,   INAREG|INAREG|FORCC,
ragge
1.13
383         SAREG|AWD,      TANYFIXED,
384         SAREG|AWD,      TANYFIXED,
ragge
1.1
385                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.16
386                 "       ashl    AR,AL,A1\n", },
ragge
1.1
387
ragge
1.2
388 #if 0
389 INCRFOREFF,
ragge
1.1
390         SAREG|AWD,      TANY,
391         SANY,   TANY,
392                 0,      RLEFT,
ragge
1.2
393                 "       ZE\n", },
ragge
1.1
394
ragge
1.2
395 DECRFOREFF,
ragge
1.1
396         SAREG|AWD,      TANY,
397         SCON,   TANY,
398                 0,      RLEFT,
ragge
1.2
399                 "       ZE\n", },
ragge
1.1
400
ragge
1.2
401 INCRINAREG|INAREG,
ragge
1.1
402         SAREG|AWD,      TANY,
403         SCON,   TANY,
404                 NAREG,  RESC1,
ragge
1.2
405                 "       ZD\n", },
ragge
1.1
406
ragge
1.2
407 DECRINAREG|INAREG,
ragge
1.1
408         SAREG|AWD,      TANY,
409         SCON,   TANY,
410                 NAREG,  RESC1,
ragge
1.2
411                 "       ZD\n", },
412 #endif
413
ragge
1.9
414 /* Assign to 64-bit register, three entries */
ragge
1.8
415 /* Have FOREFF first to catch mem-mem moves */
416 ASSIGN,       FOREFF,
417         SBREG|AWD,      TBREG,
ragge
1.9
418         SCON,           TBREG,
419                 0,      0,
420                 "ZA", },
421
422 ASSIGN,       FOREFF,
423         SBREG|AWD,      TBREG,
ragge
1.2
424         SBREG|AWD,      TBREG,
ragge
1.8
425                 0,      0,
426                 "       movq    AR,AL\n", },
427
428 ASSIGN,       INBREG,
429         SBREG,  TBREG,
ragge
1.2
430         SBREG|AWD,      TBREG,
431                 0,      RDEST,
ragge
1.8
432                 "       movq    AR,AL\n", },
433
434 ASSIGN,       INBREG,
435         SBREG|AWD,      TBREG,
436         SBREG,  TBREG,
437                 0,      RDEST,
438                 "       movq    AR,AL\n", },
439
ragge
1.9
440 /* Assign to 32-bit register, three entries */
441 ASSIGN,       FOREFF|FORCC,
442         SAREG|AWD,      TAREG,
443         SCON,           TAREG,
444                 0,      RESCC,
445                 "ZA", },
446
447 ASSIGN,       FOREFF|FORCC,
448         SAREG|AWD,      TAREG,
449         SAREG|AWD,      TAREG,
450                 0,      RESCC,
451                 "       movZL   AR,AL\n", },
452
453 ASSIGN,       INAREG|FORCC,
454         SAREG,          TAREG,
455         SAREG|AWD,      TAREG,
456                 0,      RDEST|RESCC,
457                 "       movZL   AR,AL\n", },
ragge
1.1
458
ragge
1.9
459 ASSIGN,       INAREG|FORCC,
460         SAREG|AWD,      TAREG,
461         SAREG,          TAREG,
ragge
1.2
462                 0,      RDEST|RESCC,
ragge
1.9
463                 "       movZL   AR,AL\n", },
ragge
1.1
464
ragge
1.9
465 /* Bitfields, not yet */
ragge
1.2
466 ASSIGN,       INAREG|FOREFF|FORCC,
ragge
1.1
467         SFLD,   TANY,
468         SAREG|AWD,      TWORD,
ragge
1.2
469                 0,      RDEST|RESCC,
470                 "       insv    AR,H,S,AL\n", },
ragge
1.1
471
ragge
1.2
472 ASSIGN,       INAREG|FOREFF|FORCC,
ragge
1.1
473         SAREG|AWD,      TWORD,
ragge
1.8
474         SFLD,   TANYSIGNED,
ragge
1.2
475                 0,      RDEST|RESCC,
476                 "       extv    H,S,AR,AL\n", },
ragge
1.1
477
ragge
1.2
478 ASSIGN,       INAREG|FOREFF|FORCC,
ragge
1.1
479         SAREG|AWD,      TWORD,
ragge
1.8
480         SFLD,   TANYUSIGNED,
ragge
1.2
481                 0,      RDEST|RESCC,
482                 "       extzv   H,S,AR,AL\n", },
ragge
1.1
483
484 /* dummy UNARY MUL entry to get U* to possibly match OPLTYPE */
ragge
1.2
485 UMULFOREFF,
ragge
1.1
486         SCC,    TANY,
487         SCC,    TANY,
488                 0,      RNULL,
ragge
1.2
489                 "       HELP HELP HELP\n", },
ragge
1.1
490
ragge
1.8
491 UMULINBREG,
492         SANY,   TPOINT|TLL,
493         SOREG,  TPOINT|TLL,
494                 NBREG|NBSL,     RESC1,
495                 "       movq AL,A1\n", },
496
ragge
1.7
497 UMULINAREG,
498         SANY,   TPOINT|TWORD,
499         SOREG,  TPOINT|TWORD,
500                 NAREG|NASL,     RESC1,
501                 "       movl AL,A1\n", },
502
ragge
1.8
503 UMULINAREG,
504         SANY,   TPOINT|TSHORT|TUSHORT,
505         SOREG,  TPOINT|TSHORT|TUSHORT,
506                 NAREG|NASL,     RESC1,
507                 "       movw AL,A1\n", },
508
509 UMULINAREG,
510         SANY,   TPOINT|TCHAR|TUCHAR,
511         SOREG,  TPOINT|TCHAR|TUCHAR,
512                 NAREG|NASL,     RESC1,
513                 "       movb AL,A1\n", },
514
ragge
1.2
515 #if 0
516 REG,  FORARG,
ragge
1.1
517         SANY,   TANY,
518         SAREG,  TDOUBLE|TFLOAT,
519                 0,      RNULL,
ragge
1.13
520                 "       movZR   AR,-(%sp)\n", },
ragge
1.1
521
ragge
1.2
522 REG,  INTEMP,
ragge
1.1
523         SANY,   TANY,
524         SAREG,  TDOUBLE,
525                 2*NTEMP,        RESC1,
ragge
1.2
526                 "       movd    AR,A1\n", },
ragge
1.1
527
ragge
1.2
528 REG,  INTEMP,
ragge
1.1
529         SANY,   TANY,
530         SAREG,  TANY,
531                 NTEMP,  RESC1,
ragge
1.2
532                 "       movZF   AR,A1\n", },
ragge
1.4
533 #endif
ragge
1.1
534
ragge
1.7
535 OPLTYPE,      INBREG,
536         SANY,   TANY,
537         SCON|SOREG|SNAME,       TLONGLONG|TULONGLONG,
538                 NBREG,  RESC1,
539                 "       movq AL,A1\n", },
540
ragge
1.9
541 OPLTYPE,      INBREG,
ragge
1.1
542         SANY,   TANY,
ragge
1.9
543         SANY,   TBREG,
544                 NBREG|NBSR,     RESC1,
545                 "       movZR AR,A1\n", },
ragge
1.1
546
ragge
1.2
547 OPLTYPE,      INAREG|INAREG,
ragge
1.1
548         SANY,   TANY,
ragge
1.9
549         SANY,   TAREG,
ragge
1.1
550                 NAREG|NASR,     RESC1,
ragge
1.9
551                 "       movZR AR,A1\n", },
ragge
1.1
552
ragge
1.2
553 OPLTYPE,      FORCC,
ragge
1.1
554         SANY,   TANY,
555         SANY,   TANY,
556                 0,      RESCC,
ragge
1.2
557                 "       tstZR   AR\n", },
ragge
1.1
558
ragge
1.2
559 #if 0
560 OPLTYPE,      FORARG,
ragge
1.1
561         SANY,   TANY,
562         SANY,   TWORD,
563                 0,      RNULL,
ragge
1.2
564                 "       pushl   AR\n", },
ragge
1.1
565
ragge
1.2
566 OPLTYPE,      FORARG,
ragge
1.1
567         SANY,   TANY,
568         SANY,   TCHAR|TSHORT,
569                 0,      RNULL,
ragge
1.13
570                 "       cvtZRl  AR,-(%sp)\n", },
ragge
1.1
571
ragge
1.2
572 OPLTYPE,      FORARG,
ragge
1.1
573         SANY,   TANY,
574         SANY,   TUCHAR|TUSHORT,
575                 0,      RNULL,
ragge
1.13
576                 "       movzZRl AR,-(%sp)\n", },
ragge
1.1
577
ragge
1.2
578 OPLTYPE,      FORARG,
ragge
1.1
579         SANY,   TANY,
580         SANY,   TDOUBLE,
581                 0,      RNULL,
ragge
1.13
582                 "       movd    AR,-(%sp)\n", },
ragge
1.1
583
ragge
1.2
584 OPLTYPE,      FORARG,
ragge
1.1
585         SANY,   TANY,
586         SANY,   TFLOAT,
587                 0,      RNULL,
ragge
1.13
588                 "       cvtfd   AR,-(%sp)\n", },
ragge
1.2
589 #endif
ragge
1.1
590
ragge
1.11
591 UMINUS,       INBREG,
ragge
1.12
592         SBREG|AWD,      TLL,
ragge
1.11
593         SANY,   TLL,
594                 NBREG|NBSL,     RESC1|RESCC,
595                 "       mnegl   UL,U1\n mnegl   AL,A1\n sbwc    $0,U1\n", },
596
ragge
1.2
597 UMINUS,       INAREG|FORCC,
ragge
1.17
598         SAREG|AWD,      TAREG|TDOUBLE,
ragge
1.1
599         SANY,   TANY,
600                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
601                 "       mnegZL  AL,A1\n", },
ragge
1.1
602
ragge
1.12
603 COMPL,        INBREG,
ragge
1.13
604         SBREG|AWD,      TLL,
ragge
1.12
605         SANY,           TLL,
606                 NBREG|NBSL,     RESC1|RESCC,
607                 "       mcoml   AL,A1\n mcoml   UL,U1\n", },
608
ragge
1.2
609 COMPL,        INAREG|FORCC,
ragge
1.1
610         SAREG|AWD,      TINT|TUNSIGNED,
611         SANY,   TANY,
612                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
613                 "       mcomZL  AL,A1\n", },
ragge
1.1
614
ragge
1.2
615 COMPL,        INAREG|FORCC,
ragge
1.8
616         SAREG|AWD,      TANYSIGNED|TANYUSIGNED,
ragge
1.1
617         SANY,   TANY,
618                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
619                 "       cvtZLl  AL,A1\n mcoml   A1,A1\n", },
ragge
1.1
620
ragge
1.2
621 AND,  FORCC,
ragge
1.1
622         SAREG|AWD,      TWORD,
623         SCON,   TWORD,
624                 0,      RESCC,
ragge
1.2
625                 "       bitl    ZZ,AL\n", },
ragge
1.1
626
ragge
1.2
627 AND,  FORCC,
ragge
1.1
628         SAREG|AWD,      TSHORT|TUSHORT,
629         SSCON,  TWORD,
630                 0,      RESCC,
ragge
1.2
631                 "       bitw    ZZ,AL\n", },
ragge
1.1
632
ragge
1.2
633 AND,  FORCC,
ragge
1.1
634         SAREG|AWD,      TCHAR|TUCHAR,
635         SCCON,  TWORD,
636                 0,      RESCC,
ragge
1.2
637                 "       bitb    ZZ,AL\n", },
ragge
1.1
638
ragge
1.13
639 MUL,  INAREG|FORCC,
640         SAREG|AWD,              TANYFIXED,
641         SAREG|AWD,              TANYFIXED,
642                 NAREG|NASL|NASR,        RESC1|RESCC,
643                 "       mulZL3  AR,AL,A1\n", },
644
ragge
1.2
645 OPMUL,        INAREG|INAREG|FORCC,
646         SAREG,  TINT|TUNSIGNED|TLONG|TULONG,
ragge
1.1
647         SAREG|AWD,      TINT|TUNSIGNED|TLONG|TULONG,
648                 0,      RLEFT|RESCC,
ragge
1.2
649                 "       OL2     AR,AL\n", },
ragge
1.1
650
ragge
1.2
651 OPMUL,        INAREG|INAREG|FORCC,
ragge
1.1
652         SAREG|AWD,      TINT|TUNSIGNED|TLONG|TULONG,
653         SAREG|AWD,      TINT|TUNSIGNED|TLONG|TULONG,
654                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.2
655                 "       OL3     AR,AL,A1\n", },
ragge
1.1
656
ragge
1.2
657 MOD,  INAREG|INAREG,
ragge
1.13
658         SAREG|AWD,      TINT,
659         SAREG|AWD,      TINT,
ragge
1.1
660                 NAREG,  RESC1,
ragge
1.2
661                 "       divl3   AR,AL,A1\n      mull2   AR,A1\n subl3   A1,AL,A1\n", },
ragge
1.1
662
ragge
1.8
663 PLUSINBREG|FORCC,
664         SBREG|AWD,      TLL,
665         SBREG|AWD,      TLL,
666                 NBREG|NBSL|NBSR,        RESC1|RESCC,
667                 "       movq    AL,A1\n"
668                 "       addl2   AR,A1\n"
669                 "       adwc    UR,U1\n", },
670
ragge
1.2
671 PLUSINAREG|INAREG|FORCC,
ragge
1.8
672         SAREG,  TANYFIXED,
ragge
1.1
673         SONE,   TWORD,
674                 0,      RLEFT|RESCC,
ragge
1.2
675                 "       incZL   AL\n", },
ragge
1.1
676
ragge
1.2
677 MINUS,        INAREG|INAREG|FORCC,
ragge
1.8
678         SAREG,  TANYFIXED,
ragge
1.1
679         SONE,   TWORD,
680                 0,      RLEFT|RESCC,
ragge
1.2
681                 "       decZL   AL\n", },
ragge
1.1
682
ragge
1.8
683 MINUS,        INBREG|FORCC,
684         SBREG|AWD,      TLL,
685         SBREG|AWD,      TLL,
686                 NBREG|NBSL|NBSR,        RESC1|RESCC,
687                 "       movq    AL,A1\n"
688                 "       subl2   AR,A1\n"
689                 "       sbwc    UR,U1\n", },
690 DIV,  INBREG,
691         SBREG|AWD,      TLL,
692         SBREG|AWD,      TLL,
693                 NSPECIAL|NBREG|NBSL|NBSR,       RESC1,
694                 "ZO", },
695
696 MOD,  INBREG,
697         SBREG|AWD,      TLL,
698         SBREG|AWD,      TLL,
699                 NSPECIAL|NBREG|NBSL|NBSR,       RESC1,
700                 "ZO", },
701
702 MUL,  INBREG,
703         SBREG|AWD,      TLL,
704         SBREG|AWD,      TLL,
705                 NSPECIAL|NBREG|NBSL|NBSR,       RESC1,
706                 "ZO", },
707
ragge
1.12
708 OR,   INBREG,
709         SBREG,          TLL,
710         SBREG|AWD,      TLL,
711                 0,      RLEFT,
712                 "       bisl2   AR,AL\n bisl2   UR,UL\n", },
713
714 OR,   INBREG,
715         SBREG|AWD,      TLL,
716         SBREG|AWD,      TLL,
717                 NBREG|NBSL|NBSR,        RESC1,
718                 "       bisl3   AR,AL,A1\n      bisl3   UR,UL,U1\n", },
719
720 ER,   INBREG,
721         SBREG,          TLL,
722         SBREG|AWD,      TLL,
723                 0,      RLEFT,
724                 "       xorl2   AR,AL\n xorl2   UR,UL\n", },
725
726 ER,   INBREG,
727         SBREG|AWD,      TLL,
728         SBREG|AWD,      TLL,
729                 NBREG|NBSL|NBSR,        RESC1,
730                 "       xorl3   AR,AL,A1\n      xorl3   UR,UL,U1\n", },
731
732 AND,  INBREG,
733         SBREG,          TLL,
734         SBREG|AWD,      TLL,
735                 0,      RLEFT,
736                 "       bicl2   AR,AL\n bicl2   UR,UL\n", },
737
738 AND,  INBREG,
739         SBREG|AWD,      TLL,
740         SBREG|AWD,      TLL,
741                 NBREG|NBSL|NBSR,        RESC1,
742                 "       bicl3   AR,AL,A1\n      bicl3   UR,UL,U1\n", },
743
ragge
1.10
744 OPSIMP,       INAREG|FOREFF|FORCC,
745         SAREG,          TWORD,
ragge
1.1
746         SAREG|AWD,      TWORD,
747                 0,      RLEFT|RESCC,
ragge
1.2
748                 "       OL2     AR,AL\n", },
ragge
1.1
749
ragge
1.10
750 OPSIMP,       INAREG|FORCC,
ragge
1.1
751         SAREG|AWD,      TWORD,
752         SAREG|AWD,      TWORD,
753                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.2
754                 "       OL3     AR,AL,A1\n", },
ragge
1.1
755
ragge
1.10
756 OPSIMP,       INAREG|FOREFF|FORCC,
757         SAREG,          TSHORT|TUSHORT,
758         SAREG|AWD,      TSHORT|TUSHORT,
ragge
1.1
759                 0,      RLEFT|RESCC,
ragge
1.15
760                 "       OW2     AR,AL\n", },
ragge
1.10
761
762 OPSIMP,       INAREG|FORCC,
763         SAREG|AWD,      TSHORT|TUSHORT,
764         SAREG|AWD,      TSHORT|TUSHORT,
765                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.15
766                 "       OW3     AR,AL,A1\n", },
ragge
1.1
767
ragge
1.10
768 OPSIMP,       INAREG|FOREFF|FORCC,
769         SAREG,          TCHAR|TUCHAR,
770         SAREG|AWD,      TCHAR|TUCHAR,
ragge
1.1
771                 0,      RLEFT|RESCC,
ragge
1.15
772                 "       OB2     AR,AL\n", },
ragge
1.1
773
ragge
1.10
774 OPSIMP,       INAREG|FORCC,
775         SAREG|AWD,      TCHAR|TUCHAR,
776         SAREG|AWD,      TCHAR|TUCHAR,
777                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.15
778                 "       OB3     AR,AL,A1\n", },
ragge
1.1
779
ragge
1.11
780 OPFLOAT,      INAREG|FORCC,
781         SAREG,          TFLOAT,
782         SAREG|AWD,      TFLOAT,
783                 0,      RLEFT|RESCC,
784                 "       OF2     AR,AL\n", },
785
786 OPFLOAT,      INAREG|FORCC,
787         SAREG|AWD,      TFLOAT,
788         SAREG|AWD,      TFLOAT,
789                 NAREG|NASL|NASR,        RESC1|RESCC,
790                 "       OF3     AR,AL,A1\n", },
791
792 OPFLOAT,      INBREG|FORCC,
793         SBREG,          TDOUBLE,
794         SBREG|AWD,      TDOUBLE,
ragge
1.1
795                 0,      RLEFT|RESCC,
ragge
1.2
796                 "       OD2     AR,AL\n", },
ragge
1.1
797
ragge
1.11
798 OPFLOAT,      INBREG|FORCC,
799         SBREG|AWD,      TDOUBLE,
800         SBREG|AWD,      TDOUBLE,
801                 NBREG|NBSL|NBSR,        RESC1|RESCC,
ragge
1.2
802                 "       OD3     AR,AL,A1\n", },
ragge
1.1
803
ragge
1.11
804
805
ragge
1.2
806 OPFLOAT,      INAREG|INAREG|FORCC,
ragge
1.1
807         SAREG|AWD,      TFLOAT,
808         SAREG|AWD,      TDOUBLE,
809                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
810                 "       cvtfd   AL,A1\n OD2     AR,A1\n", },
ragge
1.1
811
ragge
1.2
812 OPFLOAT,      INAREG|INAREG|FORCC,
ragge
1.1
813         SAREG|AWD,      TDOUBLE,
814         SAREG|AWD,      TFLOAT,
815                 NAREG|NASR,     RESC1|RESCC,
ragge
1.2
816                 "       cvtfd   AR,A1\n OD3     A1,AL,A1\n", },
ragge
1.1
817
ragge
1.2
818 OPFLOAT,      INAREG|INAREG|FORCC,
ragge
1.1
819         SAREG|AWD,      TFLOAT,
820         SAREG|AWD,      TFLOAT,
821                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.2
822                 "       OF3     AR,AL,A1\n      cvtfd   A1,A1\n", },
ragge
1.1
823
824         /* Default actions for hard trees ... */
825
826 # define DF(x) FORREW,SANY,TANY,SANY,TANY,REWRITE,x,""
827
ragge
1.2
828 UMULDFUMUL ), },
ragge
1.1
829
ragge
1.2
830 ASSIGNDF(ASSIGN), },
ragge
1.1
831
ragge
1.2
832 STASGDF(STASG), },
ragge
1.1
833
ragge
1.2
834 OPLEAFDF(NAME), },
ragge
1.1
835
ragge
1.2
836 OPLOG,        FORCC,
ragge
1.1
837         SANY,   TANY,
838         SANY,   TANY,
839                 REWRITE,        BITYPE,
ragge
1.2
840                 "", },
ragge
1.1
841
ragge
1.2
842 OPUNARYDF(UMINUS), },
ragge
1.1
843
ragge
1.2
844 OPANYDF(BITYPE), },
ragge
1.1
845
ragge
1.2
846 FREEFREE,   FREE,   FREE,   FREE,   FREE,   FREE,   FREE,   "help; I'm in trouble\n" }
847 };
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-20 15:27 +0100