Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:ragge:20120826170731

Diff

Diff from 1.23 to:

Annotations

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

Annotated File View

ragge
1.23
1 /*      $Id: table.c,v 1.23 2012/08/26 17:07:31 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.21
204         SBREG|AWD,      TDOUBLE,
205         SBREG|AWD,      TDOUBLE,
ragge
1.1
206                 0,      RESCC,
ragge
1.2
207                 "       cmpd    AL,AR\n", },
ragge
1.1
208
ragge
1.2
209 OPLOG,        FORCC,
ragge
1.21
210         SAREG|AWD,      TFLOAT,
211         SAREG|AWD,      TFLOAT,
ragge
1.1
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.22
297 #if 0
ragge
1.4
298 UCALL,        FOREFF,
299         SNAME,  TANY,
300         SANY,   TANY,
301                 0,      0,      /* really reg 0 */
302                 "       calls   ZC,*AL\n", },
303
304 UCALL,        INAREG,
ragge
1.1
305         SNAME,  TANY,
ragge
1.11
306         SANY,   TAREG,
ragge
1.1
307                 NAREG|NASL,     RESC1,  /* really reg 0 */
ragge
1.2
308                 "       calls   ZC,*AL\n", },
ragge
1.1
309
ragge
1.4
310 UCALL,        FOREFF,
311         SSOREGTANY,
312         SANY,   TANY,
313                 0,      0,      /* really reg 0 */
314                 "       calls   ZC,*AL\n", },
315
316 UCALL,        INAREG,
ragge
1.1
317         SSOREGTANY,
ragge
1.11
318         SANY,   TAREG,
ragge
1.1
319                 NAREG|NASL,     RESC1,  /* really reg 0 */
ragge
1.2
320                 "       calls   ZC,*AL\n", },
ragge
1.22
321 #endif
ragge
1.2
322
ragge
1.5
323 STCALL,       INAREG,
324         SCON,   TANY,
ragge
1.11
325         SANY,   TAREG,
ragge
1.5
326                 NAREG|NASL,     RESC1/* should be register 0 */
327                 "       calls   ZC,CL\n", },
328
ragge
1.23
329 STCALL,       INAREG,
330         SAREG,  TANY,
331         SANY,   TAREG,
332                 NAREG|NASL,     RESC1,  /* should be 0 */
333                 "       calls   ZC,(AL)\n", },
ragge
1.5
334
ragge
1.2
335 /*
336  * Function arguments
337  */
338 FUNARG,       FOREFF,
ragge
1.12
339         SCON|SAREG|SNAME|SOREGTANY,
340         SANY,   TWORD|TPOINT|TFLOAT,
ragge
1.2
341                 0,      RNULL,
ragge
1.11
342                 "       pushl   AL\n" },
ragge
1.2
343
ragge
1.8
344 FUNARG,       FOREFF,
ragge
1.11
345         SCON|SBREG|SNAME|SOREGTLL|TDOUBLE,
ragge
1.8
346         SANY,   TANY,
347                 0,      RNULL,
ragge
1.11
348                 "       movq    AL,-(%sp)\n" },
ragge
1.8
349
ragge
1.15
350 /* RS for signed <= int converted to negative LS */
351 /* RS longlong converted to function call */
ragge
1.13
352 RS,   INBREG|FORCC,
353         SBREG|AWD,              TLONGLONG,
354         SAREG|SBREG|AWD,        TANY,
355                 NBREG|NBSL|NBSR,        RESC1|RESCC,
356                 "       ashq    AR,AL,A1\n", },
357
358 RS,   INAREG|FORCC,
359         SAREG,          TUCHAR,
ragge
1.15
360         SAREG|SAWM,     TANYFIXED,
ragge
1.13
361                 NAREG,  RLEFT|RESCC,
362                 "       subl3   AR,$8,A1\n      extzv   AR,A1,AL,AL\n", },
363
364 RS,   INAREG|FORCC,
365         SAREG,          TUSHORT,
ragge
1.15
366         SAREG|SAWM,     TANYFIXED,
ragge
1.13
367                 NAREG,  RLEFT|RESCC,
368                 "       subl3   AR,$16,A1\n     extzv   AR,A1,AL,AL\n", },
369
370 RS,   INAREG|FORCC,
371         SAREG,  TUNSIGNED,
ragge
1.15
372         SAREG|SAWM,     TANYFIXED,
ragge
1.13
373                 NAREG,  RLEFT|RESCC,
374                 "       subl3   AR,$32,A1\n     extzv   AR,A1,AL,AL\n", },
375
ragge
1.12
376 RS,   INAREG|FORCC,
ragge
1.15
377         SAREG,  TUNSIGNED|TUSHORT|TUCHAR,
378         SCON,   TANY,
ragge
1.1
379                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
380                 "       extzv   AR,ZU,AL,A1\n", },
ragge
1.1
381
ragge
1.8
382 LS,   INBREG|FORCC,
383         SBREG|AWD,      TLL,
384         SAREG|SBREG|AWD,        TANY,
385                 NBREG|NBSL|NBSR,        RESC1|RESCC,
386                 "       ashq    AR,AL,A1\n", },
387
ragge
1.2
388 LS,   INAREG|INAREG|FORCC,
ragge
1.13
389         SAREG|AWD,      TANYFIXED,
390         SAREG|AWD,      TANYFIXED,
ragge
1.1
391                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.16
392                 "       ashl    AR,AL,A1\n", },
ragge
1.1
393
ragge
1.2
394 #if 0
395 INCRFOREFF,
ragge
1.1
396         SAREG|AWD,      TANY,
397         SANY,   TANY,
398                 0,      RLEFT,
ragge
1.2
399                 "       ZE\n", },
ragge
1.1
400
ragge
1.2
401 DECRFOREFF,
ragge
1.1
402         SAREG|AWD,      TANY,
403         SCON,   TANY,
404                 0,      RLEFT,
ragge
1.2
405                 "       ZE\n", },
ragge
1.1
406
ragge
1.2
407 INCRINAREG|INAREG,
ragge
1.1
408         SAREG|AWD,      TANY,
409         SCON,   TANY,
410                 NAREG,  RESC1,
ragge
1.2
411                 "       ZD\n", },
ragge
1.1
412
ragge
1.2
413 DECRINAREG|INAREG,
ragge
1.1
414         SAREG|AWD,      TANY,
415         SCON,   TANY,
416                 NAREG,  RESC1,
ragge
1.2
417                 "       ZD\n", },
418 #endif
419
ragge
1.9
420 /* Assign to 64-bit register, three entries */
ragge
1.8
421 /* Have FOREFF first to catch mem-mem moves */
422 ASSIGN,       FOREFF,
423         SBREG|AWD,      TBREG,
ragge
1.9
424         SCON,           TBREG,
425                 0,      0,
426                 "ZA", },
427
428 ASSIGN,       FOREFF,
429         SBREG|AWD,      TBREG,
ragge
1.2
430         SBREG|AWD,      TBREG,
ragge
1.8
431                 0,      0,
432                 "       movq    AR,AL\n", },
433
434 ASSIGN,       INBREG,
435         SBREG,  TBREG,
ragge
1.2
436         SBREG|AWD,      TBREG,
437                 0,      RDEST,
ragge
1.8
438                 "       movq    AR,AL\n", },
439
440 ASSIGN,       INBREG,
441         SBREG|AWD,      TBREG,
442         SBREG,  TBREG,
443                 0,      RDEST,
444                 "       movq    AR,AL\n", },
445
ragge
1.9
446 /* Assign to 32-bit register, three entries */
447 ASSIGN,       FOREFF|FORCC,
448         SAREG|AWD,      TAREG,
449         SCON,           TAREG,
450                 0,      RESCC,
451                 "ZA", },
452
453 ASSIGN,       FOREFF|FORCC,
454         SAREG|AWD,      TAREG,
455         SAREG|AWD,      TAREG,
456                 0,      RESCC,
457                 "       movZL   AR,AL\n", },
458
459 ASSIGN,       INAREG|FORCC,
460         SAREG,          TAREG,
461         SAREG|AWD,      TAREG,
462                 0,      RDEST|RESCC,
463                 "       movZL   AR,AL\n", },
ragge
1.1
464
ragge
1.9
465 ASSIGN,       INAREG|FORCC,
466         SAREG|AWD,      TAREG,
467         SAREG,          TAREG,
ragge
1.2
468                 0,      RDEST|RESCC,
ragge
1.9
469                 "       movZL   AR,AL\n", },
ragge
1.1
470
ragge
1.9
471 /* Bitfields, not yet */
ragge
1.2
472 ASSIGN,       INAREG|FOREFF|FORCC,
ragge
1.1
473         SFLD,   TANY,
474         SAREG|AWD,      TWORD,
ragge
1.2
475                 0,      RDEST|RESCC,
476                 "       insv    AR,H,S,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,   TANYSIGNED,
ragge
1.2
481                 0,      RDEST|RESCC,
482                 "       extv    H,S,AR,AL\n", },
ragge
1.1
483
ragge
1.2
484 ASSIGN,       INAREG|FOREFF|FORCC,
ragge
1.1
485         SAREG|AWD,      TWORD,
ragge
1.8
486         SFLD,   TANYUSIGNED,
ragge
1.2
487                 0,      RDEST|RESCC,
488                 "       extzv   H,S,AR,AL\n", },
ragge
1.1
489
490 /* dummy UNARY MUL entry to get U* to possibly match OPLTYPE */
ragge
1.2
491 UMULFOREFF,
ragge
1.1
492         SCC,    TANY,
493         SCC,    TANY,
494                 0,      RNULL,
ragge
1.2
495                 "       HELP HELP HELP\n", },
ragge
1.1
496
ragge
1.8
497 UMULINBREG,
ragge
1.23
498         SANY,   TPOINT,
499         SOREG,  TBREG,
ragge
1.8
500                 NBREG|NBSL,     RESC1,
501                 "       movq AL,A1\n", },
502
ragge
1.7
503 UMULINAREG,
504         SANY,   TPOINT|TWORD,
505         SOREG,  TPOINT|TWORD,
506                 NAREG|NASL,     RESC1,
507                 "       movl AL,A1\n", },
508
ragge
1.8
509 UMULINAREG,
510         SANY,   TPOINT|TSHORT|TUSHORT,
511         SOREG,  TPOINT|TSHORT|TUSHORT,
512                 NAREG|NASL,     RESC1,
513                 "       movw AL,A1\n", },
514
515 UMULINAREG,
516         SANY,   TPOINT|TCHAR|TUCHAR,
517         SOREG,  TPOINT|TCHAR|TUCHAR,
518                 NAREG|NASL,     RESC1,
519                 "       movb AL,A1\n", },
520
ragge
1.2
521 #if 0
522 REG,  FORARG,
ragge
1.1
523         SANY,   TANY,
524         SAREG,  TDOUBLE|TFLOAT,
525                 0,      RNULL,
ragge
1.13
526                 "       movZR   AR,-(%sp)\n", },
ragge
1.1
527
ragge
1.2
528 REG,  INTEMP,
ragge
1.1
529         SANY,   TANY,
530         SAREG,  TDOUBLE,
531                 2*NTEMP,        RESC1,
ragge
1.2
532                 "       movd    AR,A1\n", },
ragge
1.1
533
ragge
1.2
534 REG,  INTEMP,
ragge
1.1
535         SANY,   TANY,
536         SAREG,  TANY,
537                 NTEMP,  RESC1,
ragge
1.2
538                 "       movZF   AR,A1\n", },
ragge
1.4
539 #endif
ragge
1.1
540
ragge
1.7
541 OPLTYPE,      INBREG,
542         SANY,   TANY,
543         SCON|SOREG|SNAME,       TLONGLONG|TULONGLONG,
544                 NBREG,  RESC1,
545                 "       movq AL,A1\n", },
546
ragge
1.9
547 OPLTYPE,      INBREG,
ragge
1.1
548         SANY,   TANY,
ragge
1.9
549         SANY,   TBREG,
550                 NBREG|NBSR,     RESC1,
551                 "       movZR AR,A1\n", },
ragge
1.1
552
ragge
1.2
553 OPLTYPE,      INAREG|INAREG,
ragge
1.1
554         SANY,   TANY,
ragge
1.9
555         SANY,   TAREG,
ragge
1.1
556                 NAREG|NASR,     RESC1,
ragge
1.9
557                 "       movZR AR,A1\n", },
ragge
1.1
558
ragge
1.2
559 OPLTYPE,      FORCC,
ragge
1.1
560         SANY,   TANY,
561         SANY,   TANY,
562                 0,      RESCC,
ragge
1.2
563                 "       tstZR   AR\n", },
ragge
1.1
564
ragge
1.2
565 #if 0
566 OPLTYPE,      FORARG,
ragge
1.1
567         SANY,   TANY,
568         SANY,   TWORD,
569                 0,      RNULL,
ragge
1.2
570                 "       pushl   AR\n", },
ragge
1.1
571
ragge
1.2
572 OPLTYPE,      FORARG,
ragge
1.1
573         SANY,   TANY,
574         SANY,   TCHAR|TSHORT,
575                 0,      RNULL,
ragge
1.13
576                 "       cvtZRl  AR,-(%sp)\n", },
ragge
1.1
577
ragge
1.2
578 OPLTYPE,      FORARG,
ragge
1.1
579         SANY,   TANY,
580         SANY,   TUCHAR|TUSHORT,
581                 0,      RNULL,
ragge
1.13
582                 "       movzZRl AR,-(%sp)\n", },
ragge
1.1
583
ragge
1.2
584 OPLTYPE,      FORARG,
ragge
1.1
585         SANY,   TANY,
586         SANY,   TDOUBLE,
587                 0,      RNULL,
ragge
1.13
588                 "       movd    AR,-(%sp)\n", },
ragge
1.1
589
ragge
1.2
590 OPLTYPE,      FORARG,
ragge
1.1
591         SANY,   TANY,
592         SANY,   TFLOAT,
593                 0,      RNULL,
ragge
1.13
594                 "       cvtfd   AR,-(%sp)\n", },
ragge
1.2
595 #endif
ragge
1.1
596
ragge
1.11
597 UMINUS,       INBREG,
ragge
1.12
598         SBREG|AWD,      TLL,
ragge
1.11
599         SANY,   TLL,
600                 NBREG|NBSL,     RESC1|RESCC,
601                 "       mnegl   UL,U1\n mnegl   AL,A1\n sbwc    $0,U1\n", },
602
ragge
1.2
603 UMINUS,       INAREG|FORCC,
ragge
1.17
604         SAREG|AWD,      TAREG|TDOUBLE,
ragge
1.1
605         SANY,   TANY,
606                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
607                 "       mnegZL  AL,A1\n", },
ragge
1.1
608
ragge
1.20
609 UMINUS,       INBREG|FORCC,
610         SBREG|AWD,      TDOUBLE,
611         SANY,   TANY,
612                 NBREG|NASL,     RESC1|RESCC,
613                 "       mnegZL  AL,A1\n", },
614
ragge
1.12
615 COMPL,        INBREG,
ragge
1.13
616         SBREG|AWD,      TLL,
ragge
1.12
617         SANY,           TLL,
618                 NBREG|NBSL,     RESC1|RESCC,
619                 "       mcoml   AL,A1\n mcoml   UL,U1\n", },
620
ragge
1.2
621 COMPL,        INAREG|FORCC,
ragge
1.1
622         SAREG|AWD,      TINT|TUNSIGNED,
623         SANY,   TANY,
624                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
625                 "       mcomZL  AL,A1\n", },
ragge
1.1
626
ragge
1.2
627 COMPL,        INAREG|FORCC,
ragge
1.8
628         SAREG|AWD,      TANYSIGNED|TANYUSIGNED,
ragge
1.1
629         SANY,   TANY,
630                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
631                 "       cvtZLl  AL,A1\n mcoml   A1,A1\n", },
ragge
1.1
632
ragge
1.2
633 AND,  FORCC,
ragge
1.1
634         SAREG|AWD,      TWORD,
635         SCON,   TWORD,
636                 0,      RESCC,
ragge
1.2
637                 "       bitl    ZZ,AL\n", },
ragge
1.1
638
ragge
1.2
639 AND,  FORCC,
ragge
1.1
640         SAREG|AWD,      TSHORT|TUSHORT,
641         SSCON,  TWORD,
642                 0,      RESCC,
ragge
1.2
643                 "       bitw    ZZ,AL\n", },
ragge
1.1
644
ragge
1.2
645 AND,  FORCC,
ragge
1.1
646         SAREG|AWD,      TCHAR|TUCHAR,
647         SCCON,  TWORD,
648                 0,      RESCC,
ragge
1.2
649                 "       bitb    ZZ,AL\n", },
ragge
1.1
650
ragge
1.13
651 MUL,  INAREG|FORCC,
652         SAREG|AWD,              TANYFIXED,
653         SAREG|AWD,              TANYFIXED,
654                 NAREG|NASL|NASR,        RESC1|RESCC,
655                 "       mulZL3  AR,AL,A1\n", },
656
ragge
1.2
657 OPMUL,        INAREG|INAREG|FORCC,
658         SAREG,  TINT|TUNSIGNED|TLONG|TULONG,
ragge
1.1
659         SAREG|AWD,      TINT|TUNSIGNED|TLONG|TULONG,
660                 0,      RLEFT|RESCC,
ragge
1.2
661                 "       OL2     AR,AL\n", },
ragge
1.1
662
ragge
1.2
663 OPMUL,        INAREG|INAREG|FORCC,
ragge
1.1
664         SAREG|AWD,      TINT|TUNSIGNED|TLONG|TULONG,
665         SAREG|AWD,      TINT|TUNSIGNED|TLONG|TULONG,
666                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.2
667                 "       OL3     AR,AL,A1\n", },
ragge
1.1
668
ragge
1.2
669 MOD,  INAREG|INAREG,
ragge
1.13
670         SAREG|AWD,      TINT,
671         SAREG|AWD,      TINT,
ragge
1.1
672                 NAREG,  RESC1,
ragge
1.2
673                 "       divl3   AR,AL,A1\n      mull2   AR,A1\n subl3   A1,AL,A1\n", },
ragge
1.1
674
ragge
1.8
675 PLUSINBREG|FORCC,
ragge
1.19
676         SBREG,          TLL,
ragge
1.8
677         SBREG|AWD,      TLL,
ragge
1.19
678                 0,      RLEFT,
679                 "       addl2   AR,AL\n"
680                 "       adwc    UR,UL\n", },
ragge
1.8
681
ragge
1.19
682 PLUS,         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                 "       incZL   AL\n", },
ragge
1.1
687
ragge
1.19
688 MINUS,        INAREG|FORCC,
ragge
1.8
689         SAREG,  TANYFIXED,
ragge
1.19
690         SONE,   TANY,
ragge
1.1
691                 0,      RLEFT|RESCC,
ragge
1.2
692                 "       decZL   AL\n", },
ragge
1.1
693
ragge
1.8
694 MINUS,        INBREG|FORCC,
ragge
1.19
695         SBREG,          TLL,
ragge
1.8
696         SBREG|AWD,      TLL,
ragge
1.19
697                 0,      RLEFT,
698                 "       subl2   AR,AL\n"
699                 "       sbwc    UR,UL\n", },
ragge
1.8
700 DIV,  INBREG,
701         SBREG|AWD,      TLL,
702         SBREG|AWD,      TLL,
703                 NSPECIAL|NBREG|NBSL|NBSR,       RESC1,
704                 "ZO", },
705
706 MOD,  INBREG,
707         SBREG|AWD,      TLL,
708         SBREG|AWD,      TLL,
709                 NSPECIAL|NBREG|NBSL|NBSR,       RESC1,
710                 "ZO", },
711
712 MUL,  INBREG,
713         SBREG|AWD,      TLL,
714         SBREG|AWD,      TLL,
715                 NSPECIAL|NBREG|NBSL|NBSR,       RESC1,
716                 "ZO", },
717
ragge
1.12
718 OR,   INBREG,
719         SBREG,          TLL,
720         SBREG|AWD,      TLL,
721                 0,      RLEFT,
722                 "       bisl2   AR,AL\n bisl2   UR,UL\n", },
723
724 OR,   INBREG,
725         SBREG|AWD,      TLL,
726         SBREG|AWD,      TLL,
ragge
1.19
727                 NBREG,  RESC1,
ragge
1.12
728                 "       bisl3   AR,AL,A1\n      bisl3   UR,UL,U1\n", },
729
730 ER,   INBREG,
731         SBREG,          TLL,
732         SBREG|AWD,      TLL,
733                 0,      RLEFT,
734                 "       xorl2   AR,AL\n xorl2   UR,UL\n", },
735
736 ER,   INBREG,
737         SBREG|AWD,      TLL,
738         SBREG|AWD,      TLL,
ragge
1.19
739                 NBREG,  RESC1,
ragge
1.12
740                 "       xorl3   AR,AL,A1\n      xorl3   UR,UL,U1\n", },
741
742 AND,  INBREG,
743         SBREG,          TLL,
744         SBREG|AWD,      TLL,
745                 0,      RLEFT,
746                 "       bicl2   AR,AL\n bicl2   UR,UL\n", },
747
748 AND,  INBREG,
749         SBREG|AWD,      TLL,
750         SBREG|AWD,      TLL,
ragge
1.19
751                 NBREG,  RESC1,
ragge
1.12
752                 "       bicl3   AR,AL,A1\n      bicl3   UR,UL,U1\n", },
753
ragge
1.10
754 OPSIMP,       INAREG|FOREFF|FORCC,
755         SAREG,          TWORD,
ragge
1.1
756         SAREG|AWD,      TWORD,
757                 0,      RLEFT|RESCC,
ragge
1.2
758                 "       OL2     AR,AL\n", },
ragge
1.1
759
ragge
1.10
760 OPSIMP,       INAREG|FORCC,
ragge
1.1
761         SAREG|AWD,      TWORD,
762         SAREG|AWD,      TWORD,
763                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.2
764                 "       OL3     AR,AL,A1\n", },
ragge
1.1
765
ragge
1.10
766 OPSIMP,       INAREG|FOREFF|FORCC,
767         SAREG,          TSHORT|TUSHORT,
768         SAREG|AWD,      TSHORT|TUSHORT,
ragge
1.1
769                 0,      RLEFT|RESCC,
ragge
1.15
770                 "       OW2     AR,AL\n", },
ragge
1.10
771
772 OPSIMP,       INAREG|FORCC,
773         SAREG|AWD,      TSHORT|TUSHORT,
774         SAREG|AWD,      TSHORT|TUSHORT,
775                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.15
776                 "       OW3     AR,AL,A1\n", },
ragge
1.1
777
ragge
1.10
778 OPSIMP,       INAREG|FOREFF|FORCC,
779         SAREG,          TCHAR|TUCHAR,
780         SAREG|AWD,      TCHAR|TUCHAR,
ragge
1.1
781                 0,      RLEFT|RESCC,
ragge
1.15
782                 "       OB2     AR,AL\n", },
ragge
1.1
783
ragge
1.10
784 OPSIMP,       INAREG|FORCC,
785         SAREG|AWD,      TCHAR|TUCHAR,
786         SAREG|AWD,      TCHAR|TUCHAR,
787                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.15
788                 "       OB3     AR,AL,A1\n", },
ragge
1.1
789
ragge
1.11
790 OPFLOAT,      INAREG|FORCC,
791         SAREG,          TFLOAT,
792         SAREG|AWD,      TFLOAT,
793                 0,      RLEFT|RESCC,
794                 "       OF2     AR,AL\n", },
795
796 OPFLOAT,      INAREG|FORCC,
797         SAREG|AWD,      TFLOAT,
798         SAREG|AWD,      TFLOAT,
799                 NAREG|NASL|NASR,        RESC1|RESCC,
800                 "       OF3     AR,AL,A1\n", },
801
802 OPFLOAT,      INBREG|FORCC,
803         SBREG,          TDOUBLE,
804         SBREG|AWD,      TDOUBLE,
ragge
1.1
805                 0,      RLEFT|RESCC,
ragge
1.2
806                 "       OD2     AR,AL\n", },
ragge
1.1
807
ragge
1.11
808 OPFLOAT,      INBREG|FORCC,
809         SBREG|AWD,      TDOUBLE,
810         SBREG|AWD,      TDOUBLE,
811                 NBREG|NBSL|NBSR,        RESC1|RESCC,
ragge
1.2
812                 "       OD3     AR,AL,A1\n", },
ragge
1.1
813
ragge
1.19
814 #if 0 /* XXX probably wrong */
ragge
1.2
815 OPFLOAT,      INAREG|INAREG|FORCC,
ragge
1.1
816         SAREG|AWD,      TFLOAT,
817         SAREG|AWD,      TDOUBLE,
818                 NAREG|NASL,     RESC1|RESCC,
ragge
1.2
819                 "       cvtfd   AL,A1\n OD2     AR,A1\n", },
ragge
1.1
820
ragge
1.2
821 OPFLOAT,      INAREG|INAREG|FORCC,
ragge
1.1
822         SAREG|AWD,      TDOUBLE,
823         SAREG|AWD,      TFLOAT,
824                 NAREG|NASR,     RESC1|RESCC,
ragge
1.2
825                 "       cvtfd   AR,A1\n OD3     A1,AL,A1\n", },
ragge
1.1
826
ragge
1.2
827 OPFLOAT,      INAREG|INAREG|FORCC,
ragge
1.1
828         SAREG|AWD,      TFLOAT,
829         SAREG|AWD,      TFLOAT,
830                 NAREG|NASL|NASR,        RESC1|RESCC,
ragge
1.2
831                 "       OF3     AR,AL,A1\n      cvtfd   A1,A1\n", },
ragge
1.19
832 #endif
ragge
1.1
833
834         /* Default actions for hard trees ... */
835
836 # define DF(x) FORREW,SANY,TANY,SANY,TANY,REWRITE,x,""
837
ragge
1.2
838 UMULDFUMUL ), },
ragge
1.1
839
ragge
1.2
840 ASSIGNDF(ASSIGN), },
ragge
1.1
841
ragge
1.2
842 STASGDF(STASG), },
ragge
1.1
843
ragge
1.2
844 OPLEAFDF(NAME), },
ragge
1.1
845
ragge
1.2
846 OPLOG,        FORCC,
ragge
1.1
847         SANY,   TANY,
848         SANY,   TANY,
849                 REWRITE,        BITYPE,
ragge
1.2
850                 "", },
ragge
1.1
851
ragge
1.2
852 OPUNARYDF(UMINUS), },
ragge
1.1
853
ragge
1.2
854 OPANYDF(BITYPE), },
ragge
1.1
855
ragge
1.2
856 FREEFREE,   FREE,   FREE,   FREE,   FREE,   FREE,   FREE,   "help; I'm in trouble\n" }
857 };
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-18 03:34 +0100