Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:ragge:20120710132443

Diff

Diff from 1.20 to:

Annotations

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

Annotated File View

ragge
1.20
1 /*      $Id: table.c,v 1.20 2012/07/10 13:24:43 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,
ragge
1.19
169         SBREG|AWD,      TLONGLONG|TULONGLONG,
ragge
1.7
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.20
603 UMINUS,       INBREG|FORCC,
604         SBREG|AWD,      TDOUBLE,
605         SANY,   TANY,
606                 NBREG|NASL,     RESC1|RESCC,
607                 "       mnegZL  AL,A1\n", },
608
ragge
1.12
609 COMPL,        INBREG,
ragge
1.13
610         SBREG|AWD,      TLL,
ragge
1.12
611         SANY,           TLL,
612                 NBREG|NBSL,     RESC1|RESCC,
613                 "       mcoml   AL,A1\n mcoml   UL,U1\n", },
614
ragge
1.2
615 COMPL,        INAREG|FORCC,
ragge
1.1
616         SAREG|AWD,      TINT|TUNSIGNED,
617         SANY,   TANY,
618                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
619                 "       mcomZL  AL,A1\n", },
ragge
1.1
620
ragge
1.2
621 COMPL,        INAREG|FORCC,
ragge
1.8
622         SAREG|AWD,      TANYSIGNED|TANYUSIGNED,
ragge
1.1
623         SANY,   TANY,
624                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
625                 "       cvtZLl  AL,A1\n mcoml   A1,A1\n", },
ragge
1.1
626
ragge
1.2
627 AND,  FORCC,
ragge
1.1
628         SAREG|AWD,      TWORD,
629         SCON,   TWORD,
630                 0,      RESCC,
ragge
1.2
631                 "       bitl    ZZ,AL\n", },
ragge
1.1
632
ragge
1.2
633 AND,  FORCC,
ragge
1.1
634         SAREG|AWD,      TSHORT|TUSHORT,
635         SSCON,  TWORD,
636                 0,      RESCC,
ragge
1.2
637                 "       bitw    ZZ,AL\n", },
ragge
1.1
638
ragge
1.2
639 AND,  FORCC,
ragge
1.1
640         SAREG|AWD,      TCHAR|TUCHAR,
641         SCCON,  TWORD,
642                 0,      RESCC,
ragge
1.2
643                 "       bitb    ZZ,AL\n", },
ragge
1.1
644
ragge
1.13
645 MUL,  INAREG|FORCC,
646         SAREG|AWD,              TANYFIXED,
647         SAREG|AWD,              TANYFIXED,
648                 NAREG|NASL|NASR,        RESC1|RESCC,
649                 "       mulZL3  AR,AL,A1\n", },
650
ragge
1.2
651 OPMUL,        INAREG|INAREG|FORCC,
652         SAREG,  TINT|TUNSIGNED|TLONG|TULONG,
ragge
1.1
653         SAREG|AWD,      TINT|TUNSIGNED|TLONG|TULONG,
654                 0,      RLEFT|RESCC,
ragge
1.2
655                 "       OL2     AR,AL\n", },
ragge
1.1
656
ragge
1.2
657 OPMUL,        INAREG|INAREG|FORCC,
ragge
1.1
658         SAREG|AWD,      TINT|TUNSIGNED|TLONG|TULONG,
659         SAREG|AWD,      TINT|TUNSIGNED|TLONG|TULONG,
660                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.2
661                 "       OL3     AR,AL,A1\n", },
ragge
1.1
662
ragge
1.2
663 MOD,  INAREG|INAREG,
ragge
1.13
664         SAREG|AWD,      TINT,
665         SAREG|AWD,      TINT,
ragge
1.1
666                 NAREG,  RESC1,
ragge
1.2
667                 "       divl3   AR,AL,A1\n      mull2   AR,A1\n subl3   A1,AL,A1\n", },
ragge
1.1
668
ragge
1.8
669 PLUSINBREG|FORCC,
ragge
1.19
670         SBREG,          TLL,
ragge
1.8
671         SBREG|AWD,      TLL,
ragge
1.19
672                 0,      RLEFT,
673                 "       addl2   AR,AL\n"
674                 "       adwc    UR,UL\n", },
ragge
1.8
675
ragge
1.19
676 PLUS,         INAREG|FORCC,
ragge
1.8
677         SAREG,  TANYFIXED,
ragge
1.19
678         SONE,   TANY,
ragge
1.1
679                 0,      RLEFT|RESCC,
ragge
1.2
680                 "       incZL   AL\n", },
ragge
1.1
681
ragge
1.19
682 MINUS,        INAREG|FORCC,
ragge
1.8
683         SAREG,  TANYFIXED,
ragge
1.19
684         SONE,   TANY,
ragge
1.1
685                 0,      RLEFT|RESCC,
ragge
1.2
686                 "       decZL   AL\n", },
ragge
1.1
687
ragge
1.8
688 MINUS,        INBREG|FORCC,
ragge
1.19
689         SBREG,          TLL,
ragge
1.8
690         SBREG|AWD,      TLL,
ragge
1.19
691                 0,      RLEFT,
692                 "       subl2   AR,AL\n"
693                 "       sbwc    UR,UL\n", },
ragge
1.8
694 DIV,  INBREG,
695         SBREG|AWD,      TLL,
696         SBREG|AWD,      TLL,
697                 NSPECIAL|NBREG|NBSL|NBSR,       RESC1,
698                 "ZO", },
699
700 MOD,  INBREG,
701         SBREG|AWD,      TLL,
702         SBREG|AWD,      TLL,
703                 NSPECIAL|NBREG|NBSL|NBSR,       RESC1,
704                 "ZO", },
705
706 MUL,  INBREG,
707         SBREG|AWD,      TLL,
708         SBREG|AWD,      TLL,
709                 NSPECIAL|NBREG|NBSL|NBSR,       RESC1,
710                 "ZO", },
711
ragge
1.12
712 OR,   INBREG,
713         SBREG,          TLL,
714         SBREG|AWD,      TLL,
715                 0,      RLEFT,
716                 "       bisl2   AR,AL\n bisl2   UR,UL\n", },
717
718 OR,   INBREG,
719         SBREG|AWD,      TLL,
720         SBREG|AWD,      TLL,
ragge
1.19
721                 NBREG,  RESC1,
ragge
1.12
722                 "       bisl3   AR,AL,A1\n      bisl3   UR,UL,U1\n", },
723
724 ER,   INBREG,
725         SBREG,          TLL,
726         SBREG|AWD,      TLL,
727                 0,      RLEFT,
728                 "       xorl2   AR,AL\n xorl2   UR,UL\n", },
729
730 ER,   INBREG,
731         SBREG|AWD,      TLL,
732         SBREG|AWD,      TLL,
ragge
1.19
733                 NBREG,  RESC1,
ragge
1.12
734                 "       xorl3   AR,AL,A1\n      xorl3   UR,UL,U1\n", },
735
736 AND,  INBREG,
737         SBREG,          TLL,
738         SBREG|AWD,      TLL,
739                 0,      RLEFT,
740                 "       bicl2   AR,AL\n bicl2   UR,UL\n", },
741
742 AND,  INBREG,
743         SBREG|AWD,      TLL,
744         SBREG|AWD,      TLL,
ragge
1.19
745                 NBREG,  RESC1,
ragge
1.12
746                 "       bicl3   AR,AL,A1\n      bicl3   UR,UL,U1\n", },
747
ragge
1.10
748 OPSIMP,       INAREG|FOREFF|FORCC,
749         SAREG,          TWORD,
ragge
1.1
750         SAREG|AWD,      TWORD,
751                 0,      RLEFT|RESCC,
ragge
1.2
752                 "       OL2     AR,AL\n", },
ragge
1.1
753
ragge
1.10
754 OPSIMP,       INAREG|FORCC,
ragge
1.1
755         SAREG|AWD,      TWORD,
756         SAREG|AWD,      TWORD,
757                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.2
758                 "       OL3     AR,AL,A1\n", },
ragge
1.1
759
ragge
1.10
760 OPSIMP,       INAREG|FOREFF|FORCC,
761         SAREG,          TSHORT|TUSHORT,
762         SAREG|AWD,      TSHORT|TUSHORT,
ragge
1.1
763                 0,      RLEFT|RESCC,
ragge
1.15
764                 "       OW2     AR,AL\n", },
ragge
1.10
765
766 OPSIMP,       INAREG|FORCC,
767         SAREG|AWD,      TSHORT|TUSHORT,
768         SAREG|AWD,      TSHORT|TUSHORT,
769                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.15
770                 "       OW3     AR,AL,A1\n", },
ragge
1.1
771
ragge
1.10
772 OPSIMP,       INAREG|FOREFF|FORCC,
773         SAREG,          TCHAR|TUCHAR,
774         SAREG|AWD,      TCHAR|TUCHAR,
ragge
1.1
775                 0,      RLEFT|RESCC,
ragge
1.15
776                 "       OB2     AR,AL\n", },
ragge
1.1
777
ragge
1.10
778 OPSIMP,       INAREG|FORCC,
779         SAREG|AWD,      TCHAR|TUCHAR,
780         SAREG|AWD,      TCHAR|TUCHAR,
781                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.15
782                 "       OB3     AR,AL,A1\n", },
ragge
1.1
783
ragge
1.11
784 OPFLOAT,      INAREG|FORCC,
785         SAREG,          TFLOAT,
786         SAREG|AWD,      TFLOAT,
787                 0,      RLEFT|RESCC,
788                 "       OF2     AR,AL\n", },
789
790 OPFLOAT,      INAREG|FORCC,
791         SAREG|AWD,      TFLOAT,
792         SAREG|AWD,      TFLOAT,
793                 NAREG|NASL|NASR,        RESC1|RESCC,
794                 "       OF3     AR,AL,A1\n", },
795
796 OPFLOAT,      INBREG|FORCC,
797         SBREG,          TDOUBLE,
798         SBREG|AWD,      TDOUBLE,
ragge
1.1
799                 0,      RLEFT|RESCC,
ragge
1.2
800                 "       OD2     AR,AL\n", },
ragge
1.1
801
ragge
1.11
802 OPFLOAT,      INBREG|FORCC,
803         SBREG|AWD,      TDOUBLE,
804         SBREG|AWD,      TDOUBLE,
805                 NBREG|NBSL|NBSR,        RESC1|RESCC,
ragge
1.2
806                 "       OD3     AR,AL,A1\n", },
ragge
1.1
807
ragge
1.19
808 #if 0 /* XXX probably wrong */
ragge
1.2
809 OPFLOAT,      INAREG|INAREG|FORCC,
ragge
1.1
810         SAREG|AWD,      TFLOAT,
811         SAREG|AWD,      TDOUBLE,
812                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
813                 "       cvtfd   AL,A1\n OD2     AR,A1\n", },
ragge
1.1
814
ragge
1.2
815 OPFLOAT,      INAREG|INAREG|FORCC,
ragge
1.1
816         SAREG|AWD,      TDOUBLE,
817         SAREG|AWD,      TFLOAT,
818                 NAREG|NASR,     RESC1|RESCC,
ragge
1.2
819                 "       cvtfd   AR,A1\n OD3     A1,AL,A1\n", },
ragge
1.1
820
ragge
1.2
821 OPFLOAT,      INAREG|INAREG|FORCC,
ragge
1.1
822         SAREG|AWD,      TFLOAT,
823         SAREG|AWD,      TFLOAT,
824                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.2
825                 "       OF3     AR,AL,A1\n      cvtfd   A1,A1\n", },
ragge
1.19
826 #endif
ragge
1.1
827
828         /* Default actions for hard trees ... */
829
830 # define DF(x) FORREW,SANY,TANY,SANY,TANY,REWRITE,x,""
831
ragge
1.2
832 UMULDFUMUL ), },
ragge
1.1
833
ragge
1.2
834 ASSIGNDF(ASSIGN), },
ragge
1.1
835
ragge
1.2
836 STASGDF(STASG), },
ragge
1.1
837
ragge
1.2
838 OPLEAFDF(NAME), },
ragge
1.1
839
ragge
1.2
840 OPLOG,        FORCC,
ragge
1.1
841         SANY,   TANY,
842         SANY,   TANY,
843                 REWRITE,        BITYPE,
ragge
1.2
844                 "", },
ragge
1.1
845
ragge
1.2
846 OPUNARYDF(UMINUS), },
ragge
1.1
847
ragge
1.2
848 OPANYDF(BITYPE), },
ragge
1.1
849
ragge
1.2
850 FREEFREE,   FREE,   FREE,   FREE,   FREE,   FREE,   FREE,   "help; I'm in trouble\n" }
851 };
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-10-31 22:31 +0100