Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:ragge:20120807062457

Diff

Diff from 1.22 to:

Annotations

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

Annotated File View

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