Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:ragge:20120925191750

Diff

Diff from 1.26 to:

Annotations

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

Annotated File View

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