Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:ragge:20140603201950

Diff

Diff from 1.3 to:

Annotations

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

Annotated File View

ragge
1.3
1 /*      $Id: table.c,v 1.3 2014/06/03 20:19:50 ragge Exp $      */
ragge
1.1
2 /*
3  * Copyright (c) 2006 Anders Magnusson (ragge@ludd.luth.se).
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  * 3. The name of the author may not be used to endorse or promote products
15  *    derived from this software without specific prior written permission
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28
29
30 # include "pass2.h"
31
32 # define ANYSIGNED TINT|TLONG|TSHORT|TCHAR
33 # define ANYUSIGNED TUNSIGNED|TULONG|TUSHORT|TUCHAR
34 # define ANYFIXED ANYSIGNED|ANYUSIGNED
ragge
1.3
35 # define ANYREG (INAREG|INBREG|INCREG)
ragge
1.1
36 # define TUWORD TUNSIGNED|TULONG
37 # define TSWORD TINT|TLONG
38 # define TWORD TUWORD|TSWORD
39
40 struct optab table[] = {
41 /* First entry must be an empty entry */
42 { -1FOREFFSANYTANYSANYTANY00"", },
43
ragge
1.3
44 /*
45  * All ASSIGN entries.
46  */
47 /* reg->reg */
48 ASSIGN,       FOREFF|INAREG|INBREG,
49         SAREG|SBREG,    TWORD|TPOINT,
50         SAREG|SBREG,    TWORD|TPOINT,
51                 0,      RDEST,
52                 "       mov AR,AL\n", },
53 /* reg->mem */
54 ASSIGN,       FOREFF|INAREG|INBREG,
55         SNAME|SOREG,    TWORD|TPOINT,
56         SAREG|SBREG,    TWORD|TPOINT,
ragge
1.1
57                 0,      RDEST,
ragge
1.3
58                 "       sta AR,AL\n", },
59 /* mem->reg */
60 ASSIGN,       FOREFF|INAREG|INBREG,
61         SAREG|SBREG,    TWORD|TPOINT,
62         SNAME|SOREG,    TWORD|TPOINT,
ragge
1.1
63                 0,      RDEST,
ragge
1.3
64                 "       lda AL,AR\n", },
ragge
1.1
65
ragge
1.3
66 /*
67  * LEAF type movements.
68  */
69 /* 0 -> reg */
70 OPLTYPE,      INAREG|INBREG,
71         SANY,   TANY,
72         SZERO,  TWORD,
73                 NAREG,  RESC1,
74                 "       subo A1,A1\n", },
ragge
1.1
75
ragge
1.3
76 /* 1 -> reg */
77 OPLTYPE,      INAREG|INBREG,
ragge
1.1
78         SANY,   TANY,
79         SONE,   TWORD,
ragge
1.3
80                 NAREG|NBREG,    RESC1,
81                 "       subzl A1,A1     # 1\n", },
ragge
1.1
82
ragge
1.3
83 /* constant -> reg */
84 OPLTYPE,      INAREG|INBREG,
ragge
1.1
85         SANY,   TANY,
ragge
1.3
86         SCON,   TWORD|TPOINT,
87                 NAREG|NBREG,    RESC1,
88                 "       lda A1,AR\n", },
ragge
1.1
89
ragge
1.3
90 /* mem -> reg */
ragge
1.1
91 OPLTYPE,      INAREG,
ragge
1.3
92         SANY,           TANY,
93         SNAME|SOREG,    TWORD,
ragge
1.1
94                 NAREG,  RESC1,
ragge
1.3
95                 "       lda A1,AR\n", },
ragge
1.1
96
ragge
1.3
97 /* reg -> A-reg */
ragge
1.1
98 OPLTYPE,      INAREG,
ragge
1.3
99         SANY,           TANY,
100         SAREG|SBREG,    TWORD,
ragge
1.1
101                 NAREG,  RESC1,
ragge
1.3
102                 "       mov AR,A1\n", },
ragge
1.1
103
ragge
1.3
104 /* reg -> B-reg */
ragge
1.1
105 OPLTYPE,      INBREG,
ragge
1.3
106         SANY,           TANY,
107         SAREG|SBREG,    TWORD,
108                 NBREG,  RESC1,
109                 "       mov AR,A1\n", },
110
111 OPLTYPE,      INBREG,
112         SANY,           TANY,
113         SNAME|SOREG,    TPOINT,
ragge
1.1
114                 NBREG,  RESC1,
ragge
1.3
115                 "       lda A1,AR\n", },
ragge
1.1
116
117 OPLTYPE,      INBREG,
ragge
1.3
118         SANY,           TANY,
119         SLDFPSP,        TANY,
ragge
1.1
120                 NBREG,  RESC1,
121                 "       lda A1,AR\n", },
122
ragge
1.3
123 /*
124  * Simple ops.
125  */
126 PLUS,         INBREG|INAREG,
ragge
1.1
127         SAREG|SBREG,    TWORD|TPOINT,
128         SONE,           TANY,
129                 0,      RLEFT,
130                 "       inc AL,AL\n", },
131
132 OPSIMP,       INBREG|INAREG|FOREFF,
133         SAREG|SBREG,    TWORD|TPOINT,
134         SAREG|SBREG,    TWORD|TPOINT,
135                 0,      RLEFT,
136                 "       O AR,AL\n", },
137
ragge
1.3
138 /*
139  * Indirections
140  */
ragge
1.1
141 UMULINAREG,
142         SANY,   TPOINT|TWORD,
143         SOREG,  TPOINT|TWORD,
144                 NAREG|NASL,     RESC1,
ragge
1.3
145                 "       lda A1,AL #\n", },
146
147 UMULINAREG,
148         SANY,   TPOINT|TWORD,
149         SOREG,  TCHAR|TUCHAR,
150                 NAREG|NASL,     RESC1,
151                 "       lda A1,AL #\n", },
152
153 UMULINBREG,
154         SANY,   TPOINT|TWORD,
155         SOREG,  TPOINT|TWORD,
156                 NBREG|NBSL,     RESC1,
157                 "       lda A1,AL  # #\n", },
ragge
1.1
158
159 #if 0
160
161 /* PCONVs are usually not necessary */
162 PCONV,        INAREG,
163         SAREG,  TWORD|TPOINT,
164         SAREG,  TWORD|TPOINT,
165                 0,      RLEFT,
166                 "", },
167
168 /*
169  * A bunch conversions of integral<->integral types
170  * There are lots of them, first in table conversions to itself
171  * and then conversions from each type to the others.
172  */
173
174 /* itself to itself, including pointers */
175
176 /* convert (u)char to (u)char. */
177 SCONV,        INCH,
178         SHCH,   TCHAR|TUCHAR,
179         SHCH,   TCHAR|TUCHAR,
180                 0,      RLEFT,
181                 "", },
182
183 /* convert pointers to int. */
184 SCONV,        ININT,
185         SHINT,  TPOINT|TWORD,
186         SANY,   TWORD,
187                 0,      RLEFT,
188                 "", },
189
190 /* convert (u)longlong to (u)longlong. */
191 SCONV,        INLL,
192         SHLL,   TLL,
193         SHLL,   TLL,
194                 0,      RLEFT,
195                 "", },
196
197 /* convert double <-> float. nothing to do here */
198 SCONV,        INFL,
199         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
200         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
201                 0,      RLEFT,
202                 "", },
203
204 /* convert pointers to pointers. */
205 SCONV,        ININT,
206         SHINT,  TPOINT,
207         SANY,   TPOINT,
208                 0,      RLEFT,
209                 "", },
210
211 /* char to something */
212
213 /* convert char to (unsigned) short. */
214 SCONV,        ININT,
215         SBREG|SOREG|SNAME,      TCHAR,
216         SAREG,  TSHORT|TUSHORT,
217                 NASL|NAREG,     RESC1,
218                 "       movsbw AL,A1\n", },
219
220 /* convert unsigned char to (u)short. */
221 SCONV,        ININT,
222         SHCH|SOREG|SNAME,       TUCHAR,
223         SAREG,  TSHORT|TUSHORT,
224                 NASL|NAREG,     RESC1,
225                 "       movzbw AL,A1\n", },
226
227 /* convert signed char to int (or pointer). */
228 SCONV,        ININT,
229         SHCH|SOREG|SNAME,       TCHAR,
230         SAREG,  TWORD|TPOINT,
231                 NASL|NAREG,     RESC1,
232                 "       movsbl AL,A1\n", },
233
234 /* convert unsigned char to (u)int. */
235 SCONV,        ININT,
236         SHCH|SOREG|SNAME,       TUCHAR,
237         SAREG,  TWORD,
238                 NASL|NAREG,     RESC1,
239                 "       movzbl AL,A1\n", },
240
241 /* convert char to (u)long long */
242 SCONV,        INLL,
243         SHCH|SOREG|SNAME,       TCHAR,
244         SANY,   TLL,
245                 NSPECIAL|NAREG|NASL,    RESC1,
246                 "       movsbl AL,%eax\n        cltd\n", },
247
248 /* convert unsigned char to (u)long long */
249 SCONV,        INLL,
250         SHCH|SOREG|SNAME,       TUCHAR,
251         SANY,                   TLL,
252                 NCREG|NCSL,     RESC1,
253                 "       movzbl AL,A1\n  xorl U1,U1\n", },
254
255 /* convert char (in register) to double XXX - use NTEMP */
256 SCONV,        INFL,
257         SHCH|SOREG|SNAME,       TCHAR,
258         SHFL,                   TLDOUBLE|TDOUBLE|TFLOAT,
259                 NAREG|NASL|NDREG,       RESC2,
260                 "       movsbl AL,A1\n  pushl A1\n"
261                 "       fildl (%esp)\n  addl $4,%esp\n", },
262
263 /* convert (u)char (in register) to double XXX - use NTEMP */
264 SCONV,        INFL,
265         SHCH|SOREG|SNAME,       TUCHAR,
266         SHFL,                   TLDOUBLE|TDOUBLE|TFLOAT,
267                 NAREG|NASL|NDREG,       RESC2,
268                 "       movzbl AL,A1\n  pushl A1\n"
269                 "       fildl (%esp)\n  addl $4,%esp\n", },
270
271 /* short to something */
272
273 /* convert short (in memory) to char */
274 SCONV,        INCH,
275         SNAME|SOREG,    TSHORT|TUSHORT,
276         SHCH,           TCHAR|TUCHAR,
277                 NBREG|NBSL,     RESC1,
278                 "       movb AL,A1\n", },
279
280 /* convert short (in reg) to char. */
281 SCONV,        INCH,
282         SAREG|SNAME|SOREG,      TSHORT|TUSHORT,
283         SHCH,                   TCHAR|TUCHAR,
284                 NSPECIAL|NBREG|NBSL,    RESC1,
285                 "ZM", },
286
287 /* convert short to (u)int. */
288 SCONV,        ININT,
289         SAREG|SOREG|SNAME,      TSHORT,
290         SAREG,  TWORD,
291                 NASL|NAREG,     RESC1,
292                 "       movswl AL,A1\n", },
293
294 /* convert unsigned short to (u)int. */
295 SCONV,        ININT,
296         SAREG|SOREG|SNAME,      TUSHORT,
297         SAREG,  TWORD,
298                 NASL|NAREG,     RESC1,
299                 "       movzwl AL,A1\n", },
300
301 /* convert short to (u)long long */
302 SCONV,        INLL,
303         SAREG|SOREG|SNAME,      TSHORT,
304         SHLL,                   TLL,
305                 NSPECIAL|NCREG|NCSL,    RESC1,
306                 "       movswl AL,%eax\n        cltd\n", },
307
308 /* convert unsigned short to (u)long long */
309 SCONV,        INLL,
310         SAREG|SOREG|SNAME,      TUSHORT,
311         SHLL,                   TLL,
312                 NCREG|NCSL,     RESC1,
313                 "       movzwl AL,A1\n  xorl U1,U1\n", },
314
315 /* convert short (in memory) to float/double */
316 SCONV,        INFL,
317         SOREG|SNAME,    TSHORT,
318         SDREG,  TLDOUBLE|TDOUBLE|TFLOAT,
319                 NDREG,  RESC1,
320                 "       fild AL\n", },
321
322 /* convert short (in register) to float/double */
323 SCONV,        INFL,
324         SAREG,  TSHORT,
325         SDREG,  TLDOUBLE|TDOUBLE|TFLOAT,
326                 NTEMP|NDREG,    RESC1,
327                 "       pushw AL\n      fild (%esp)\n   addl $2,%esp\n", },
328
329 /* convert unsigned short to double XXX - use NTEMP */
330 SCONV,        INFL,
331         SAREG|SOREG|SNAME,      TUSHORT,
332         SHFL,                   TLDOUBLE|TDOUBLE|TFLOAT,
333                 NAREG|NASL|NDREG|NTEMPRESC2,
334                 "       movzwl AL,A1\n  pushl A1\n"
335                 "       fildl (%esp)\n  addl $4,%esp\n", },
336
337 /* int to something */
338
339 /* convert int to char. This is done when register is loaded */
340 SCONV,        INCH,
341         SAREG,  TWORD,
342         SANY,   TCHAR|TUCHAR,
343                 NSPECIAL|NBREG|NBSL,    RESC1,
344                 "ZM", },
345
346 /* convert int to short. Nothing to do */
347 SCONV,        INAREG,
348         SAREG,  TWORD,
349         SANY,   TSHORT|TUSHORT,
350                 0,      RLEFT,
351                 "", },
352
353 /* convert int to long long */
354 SCONV,        INLL,
355         SAREG,  TWORD|TPOINT,
356         SCREG,  TLONGLONG,
357                 NSPECIAL|NCREG|NCSL,    RESC1,
358                 "       cltd\n", },
359
360 /* convert int to unsigned long long */
361 SCONV,        INLL,
362         SAREG|SOREG|SNAME,      TWORD|TPOINT,
363         SHLL,   TULONGLONG,
364                 NCSL|NCREG,     RESC1,
365                 "       movl AL,A1\n    xorl U1,U1\n", },
366
367 /* convert int (in memory) to double */
368 SCONV,        INFL,
369         SOREG|SNAME,    TWORD,
370         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
371                 NDREG,  RESC1,
372                 "       fildl AL\n", },
373
374 /* convert int (in register) to double */
375 SCONV,        INFL,
376         SAREG,  TWORD,
377         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
378                 NTEMP|NDREG,    RESC1,
379                 "       pushl AL\n      fildl (%esp)\n  addl $4,%esp\n", },
380
381 /* long long to something */
382
383 /* convert (u)long long to (u)char (mem->reg) */
384 SCONV,        INCH,
385         SOREG|SNAME,    TLL,
386         SANY,   TCHAR|TUCHAR,
387                 NAREG|NASL,     RESC1,
388                 "       movb AL,A1\n", },
389
390 /* convert (u)long long to (u)char (reg->reg, hopefully nothing) */
391 SCONV,        INCH,
392         SHLL,   TLL,
393         SANY,   TCHAR|TUCHAR,
394                 NAREG|NASL,     RESC1,
395                 "ZS", },
396
397 /* convert (u)long long to (u)short (mem->reg) */
398 SCONV,        INAREG,
399         SOREG|SNAME,    TLL,
400         SAREG,  TSHORT|TUSHORT,
401                 NAREG|NASL,     RESC1,
402                 "       movw AL,A1\n", },
403
404 /* convert (u)long long to (u)short (reg->reg, hopefully nothing) */
405 SCONV,        INAREG,
406         SHLL|SOREG|SNAME,       TLL,
407         SAREG,  TSHORT|TUSHORT,
408                 NAREG|NASL,     RESC1,
409                 "ZS", },
410
411 /* convert long long to int (mem->reg) */
412 SCONV,        INAREG,
413         SOREG|SNAME,    TLL,
414         SAREG,  TWORD|TPOINT,
415                 NAREG|NASL,     RESC1,
416                 "       movl AL,A1\n", },
417
418 /* convert long long to int (reg->reg, hopefully nothing) */
419 SCONV,        INAREG,
420         SHLL|SOREG|SNAME,       TLL,
421         SAREG,  TWORD|TPOINT,
422                 NAREG|NASL,     RESC1,
423                 "ZS", },
424
425 /* convert long long (in memory) to floating */
426 SCONV,        INFL,
427         SOREG|SNAME,    TLONGLONG,
428         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
429                 NDREG,  RESC1,
430                 "       fildq AL\n", },
431
432 /* convert long long (in register) to floating */
433 SCONV,        INFL,
434         SHLL,   TLONGLONG,
435         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
436                 NTEMP|NDREG,    RESC1,
437                 "       pushl UL\n      pushl AL\n"
438                 "       fildq (%esp)\n  addl $8,%esp\n", },
439
440 /* convert unsigned long long to floating */
441 SCONV,        INFL,
442         SCREG,  TULONGLONG,
443         SDREG,  TLDOUBLE|TDOUBLE|TFLOAT,
444                 NDREG,  RESC1,
445                 "ZJ", },
446
447 /* float to something */
448
449 #if 0 /* go via int by adding an extra sconv in clocal() */
450 /* convert float/double to (u) char. XXX should use NTEMP here */
451 SCONV,        INCH,
452         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
453         SHCH,   TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR,
454                 NBREG,  RESC1,
455                 "       subl $4,%esp\n  fistpl (%esp)\n popl A1\n", },
456
457 /* convert float/double to (u) int/short/char. XXX should use NTEMP here */
458 SCONV,        INCH,
459         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
460         SHCH,   TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR,
461                 NCREG,  RESC1,
462                 "       subl $4,%esp\n  fistpl (%esp)\n popl A1\n", },
463 #endif
464
465 /* convert float/double to (u)int. XXX should use NTEMP here */
466 SCONV,        INAREG,
467         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
468         SAREG,  TWORD,
469                 NAREG,  RESC1,
470                 "       subl $4,%esp\n  fistpl (%esp)\n popl A1\n", },
471
472 /* convert float/double (in register) to (unsigned) long long */
473 /* XXX - unsigned is not handled correct */
474 SCONV,        INLL,
475         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
476         SHLL,   TLONGLONG|TULONGLONG,
477                 NCREG,  RESC1,
478                 "       subl $8,%esp\n  fistpq (%esp)\n"
479                 "       popl A1\n       popl U1\n", },
480
481 /* slut sconv */
ragge
1.3
482 #endif
ragge
1.1
483
484 /*
485  * Subroutine calls.
486  */
487
488 CALL,         FOREFF,
489         SCON,   TANY,
490         SANY,   TANY,
491                 0,      0,
ragge
1.3
492                 "       jsr CL\nZC", },
ragge
1.1
493
494 UCALL,        FOREFF,
495         SCON,   TANY,
ragge
1.3
496         SANY,   TANY,
ragge
1.1
497                 0,      0,
ragge
1.3
498                 "       jsr CL\n", },
499
500 CALL,         INAREG|FOREFF,
501         SCON,   TANY,
502         SANY,   TANY,
503                 NAREG|NASL,     RESC1,
504                 "       jsr CL\nZC", },
505
506 UCALL,        INAREG|FOREFF,
507         SCON,   TANY,
508         SANY,   TANY,
509                 NAREG|NASL,     RESC1,
510                 "       jsr CL\n", },
ragge
1.1
511
ragge
1.3
512 #if 0
ragge
1.1
513 CALLINAREG,
514         SCON,   TANY,
515         SAREG,  TWORD|TPOINT,
516                 NAREG|NASL,     RESC1,  /* should be 0 */
517                 "       call CL\nZC", },
518
519 UCALL,        INAREG,
520         SCON,   TANY,
521         SAREG,  TWORD|TPOINT,
522                 NAREG|NASL,     RESC1,  /* should be 0 */
523                 "       call CL\n", },
524
525 CALLINBREG,
526         SCON,   TANY,
527         SBREG,  TCHAR|TUCHAR,
528                 NBREG,  RESC1,  /* should be 0 */
529                 "       call CL\nZC", },
530
531 UCALL,        INBREG,
532         SCON,   TANY,
533         SBREG,  TCHAR|TUCHAR,
534                 NBREG,  RESC1,  /* should be 0 */
535                 "       call CL\n", },
536
537 CALL,         INCREG,
538         SCON,   TANY,
539         SCREG,  TANY,
540                 NCREG|NCSL,     RESC1,  /* should be 0 */
541                 "       call CL\nZC", },
542
543 UCALL,        INCREG,
544         SCON,   TANY,
545         SCREG,  TANY,
546                 NCREG|NCSL,     RESC1,  /* should be 0 */
547                 "       call CL\n", },
548
549 CALLINDREG,
550         SCON,   TANY,
551         SDREG,  TANY,
552                 NDREG|NDSL,     RESC1,  /* should be 0 */
553                 "       call CL\nZC", },
554
555 UCALL,        INDREG,
556         SCON,   TANY,
557         SDREG,  TANY,
558                 NDREG|NDSL,     RESC1,  /* should be 0 */
559                 "       call CL\nZC", },
560
561 CALL,         FOREFF,
562         SAREG,  TANY,
563         SANY,   TANY,
564                 0,      0,
565                 "       call *AL\nZC", },
566
567 UCALL,        FOREFF,
568         SAREG,  TANY,
569         SANY,   TANY,
570                 0,      0,
571                 "       call *AL\nZC", },
572
573 CALL,         INAREG,
574         SAREG,  TANY,
575         SANY,   TANY,
576                 NAREG|NASL,     RESC1,  /* should be 0 */
577                 "       call *AL\nZC", },
578
579 UCALL,        INAREG,
580         SAREG,  TANY,
581         SANY,   TANY,
582                 NAREG|NASL,     RESC1,  /* should be 0 */
583                 "       call *AL\nZC", },
584
585 CALL,         INBREG,
586         SAREG,  TANY,
587         SANY,   TANY,
588                 NBREG|NBSL,     RESC1,  /* should be 0 */
589                 "       call *AL\nZC", },
590
591 UCALL,        INBREG,
592         SAREG,  TANY,
593         SANY,   TANY,
594                 NBREG|NBSL,     RESC1,  /* should be 0 */
595                 "       call *AL\nZC", },
596
597 CALL,         INCREG,
598         SAREG,  TANY,
599         SANY,   TANY,
600                 NCREG|NCSL,     RESC1,  /* should be 0 */
601                 "       call *AL\nZC", },
602
603 UCALL,        INCREG,
604         SAREG,  TANY,
605         SANY,   TANY,
606                 NCREG|NCSL,     RESC1,  /* should be 0 */
607                 "       call *AL\nZC", },
608
609 CALL,         INDREG,
610         SAREG,  TANY,
611         SANY,   TANY,
612                 NDREG|NDSL,     RESC1,  /* should be 0 */
613                 "       call *AL\nZC", },
614
615 UCALL,        INDREG,
616         SAREG,  TANY,
617         SANY,   TANY,
618                 NDREG|NDSL,     RESC1,  /* should be 0 */
619                 "       call *AL\nZC", },
620
621 /* struct return */
622 USTCALL,      FOREFF,
623         SCON,   TANY,
624         SANY,   TANY,
625                 NAREG|NASL,     0,
626                 "ZP     call CL\nZC", },
627
628 USTCALL,      INAREG,
629         SCON,   TANY,
630         SANY,   TANY,
631                 NAREG|NASL,     RESC1,  /* should be 0 */
632                 "ZP     call CL\nZC", },
633
634 USTCALL,      INAREG,
635         SNAME|SAREG,    TANY,
636         SANY,   TANY,
637                 NAREG|NASL,     RESC1,  /* should be 0 */
638                 "ZP     call *AL\nZC", },
639
640 STCALL,       FOREFF,
641         SCON,   TANY,
642         SANY,   TANY,
643                 NAREG|NASL,     0,
644                 "ZP     call CL\nZC", },
645
646 STCALL,       INAREG,
647         SCON,   TANY,
648         SANY,   TANY,
649                 NAREG|NASL,     RESC1,  /* should be 0 */
650                 "ZP     call CL\nZC", },
651
652 STCALL,       INAREG,
653         SNAME|SAREG,    TANY,
654         SANY,   TANY,
655                 NAREG|NASL,     RESC1,  /* should be 0 */
656                 "ZP     call *AL\nZC", },
657
658 /*
659  * The next rules handle all binop-style operators.
660  */
661 /* Special treatment for long long */
662 PLUS,         INLL|FOREFF,
663         SHLL,           TLL,
664         SHLL|SNAME|SOREG,       TLL,
665                 0,      RLEFT,
666                 "       addl AR,AL\n    adcl UR,UL\n", },
667
668 /* Special treatment for long long  XXX - fix commutative check */
669 PLUS,         INLL|FOREFF,
670         SHLL|SNAME|SOREG,       TLL,
671         SHLL,                   TLL,
672                 0,      RRIGHT,
673                 "       addl AL,AR\n    adcl UL,UR\n", },
674
675 PLUS,         INFL,
676         SHFL,           TDOUBLE,
677         SNAME|SOREG,    TDOUBLE,
678                 0,      RLEFT,
679                 "       faddl AR\n", },
680
681 PLUS,         INFL|FOREFF,
682         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
683         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
684                 0,      RLEFT,
685                 "       faddp\n", },
686
687 PLUS,         INAREG,
688         SAREG|SNAME|SOREG,      TWORD|TPOINT,
689         SONE,   TANY,
690                 0,      RLEFT,
691                 "       incl AL\n", },
692
693 PLUS,         INAREG,
694         SAREG,  TWORD|TPOINT,
695         SCON,   TANY,
696                 NAREG|NASL,     RESC1,
697                 "       leal CR(AL),A1\n", },
698
699 PLUS,         INCH,
700         SHCH|SNAME|SOREG,       TCHAR|TUCHAR,
701         SONE,   TANY,
702                 0,      RLEFT,
703                 "       incb AL\n", },
704
705 PLUS,         INAREG,
706         SAREG,  TWORD,
707         SAREG,  TWORD,
708                 NAREG|NASL|NASR,        RESC1,
709                 "       leal (AL,AR),A1\n", },
710
711
712 /* address as register offset, negative */
713 MINUS,        INAREG,
714         SAREG,  TWORD|TPOINT,
715         SPCON,  TANY,
716                 NAREG|NASL,     RESC1,
717                 "       leal -CR(AL),A1\n", },
718
719 MINUS,        INLL|FOREFF,
720         SHLL,   TLL,
721         SHLL|SNAME|SOREG,       TLL,
722                 0,      RLEFT,
723                 "       subl AR,AL\n    sbbl UR,UL\n", },
724
725 MINUS,        INFL,
726         SHFL,   TDOUBLE,
727         SNAME|SOREG,    TDOUBLE,
728                 0,      RLEFT,
729                 "       fsubl AR\n", },
730
731 MINUS,        INFL|FOREFF,
732         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
733         SHFL,   TLDOUBLE|TDOUBLE|TFLOAT,
734                 0,      RLEFT,
735                 "       fsubZAp\n", },
736
737 /* Simple r/m->reg ops */
738 OPSIMP,       INAREG|FOREFF,
739         SAREG,                  TWORD|TPOINT,
740         SAREG|SNAME|SOREG,      TWORD|TPOINT,
741                 0,      RLEFT,
742                 "       Ol AR,AL\n", },
743
744 OPSIMP,       INAREG|FOREFF,
745         SHINT,          TSHORT|TUSHORT,
746         SHINT|SNAME|SOREG,      TSHORT|TUSHORT,
747                 0,      RLEFT,
748                 "       Ow AR,AL\n", },
749
750 OPSIMP,       INCH|FOREFF,
751         SHCH,           TCHAR|TUCHAR,
752         SHCH|SNAME|SOREG,       TCHAR|TUCHAR,
753                 0,      RLEFT,
754                 "       Ob AR,AL\n", },
755
756 OPSIMP,       INAREG|FOREFF,
757         SAREG,  TWORD|TPOINT,
758         SCON,   TWORD|TPOINT,
759                 0,      RLEFT,
760                 "       Ol AR,AL\n", },
761
762 OPSIMP,       INAREG|FOREFF,
763         SHINT|SNAME|SOREG,      TSHORT|TUSHORT,
764         SCON,   TANY,
765                 0,      RLEFT,
766                 "       Ow AR,AL\n", },
767
768 OPSIMP,       INCH|FOREFF,
769         SHCH|SNAME|SOREG,       TCHAR|TUCHAR,
770         SCON,   TANY,
771                 0,      RLEFT,
772                 "       Ob AR,AL\n", },
773
774 OPSIMP,       INLL|FOREFF,
775         SHLL,   TLL,
776         SHLL|SNAME|SOREG,       TLL,
777                 0,      RLEFT,
778                 "       Ol AR,AL\n      Ol UR,UL\n", },
779
780
781 /*
782  * The next rules handle all shift operators.
783  */
784 /* (u)longlong left shift is emulated */
785 LS,   INCREG,
786         SCREG|SNAME|SOREG|SCONTLL,
787         SAREG|SNAME|SOREG|SCONTINT/* will be int */
788                 NSPECIAL|NCREG|NCSL|NCSR,       RESC1,
789                 "ZO", },
790
791 LS,   INAREG|FOREFF,
792         SAREG|SNAME|SOREG,      TWORD,
793         SHCH,           TCHAR|TUCHAR,
794                 NSPECIAL,       RLEFT,
795                 "       sall AR,AL\n", },
796
797 LS,   INAREG|FOREFF,
798         SAREG,  TWORD,
799         SCON,   TANY,
800                 0,      RLEFT,
801                 "       sall AR,AL\n", },
802
803 LS,   INAREG|FOREFF,
804         SAREG|SNAME|SOREG,      TSHORT|TUSHORT,
805         SHCH,                   TCHAR|TUCHAR,
806                 NSPECIAL,       RLEFT,
807                 "       shlw AR,AL\n", },
808
809 LS,   INAREG|FOREFF,
810         SAREG|SNAME|SOREG,      TSHORT|TUSHORT,
811         SCON,   TANY,
812                 0,      RLEFT,
813                 "       shlw AR,AL\n", },
814
815 LS,   INCH|FOREFF,
816         SHCH|SNAME|SOREG,       TCHAR|TUCHAR,
817         SHCH,                   TCHAR|TUCHAR,
818                 NSPECIAL,       RLEFT,
819                 "       salb AR,AL\n", },
820
821 LS,   INCH|FOREFF,
822         SHCH|SNAME|SOREG,       TCHAR|TUCHAR,
823         SCON,                   TANY,
824                 0,      RLEFT,
825                 "       salb AR,AL\n", },
826
827 /* (u)longlong right shift is emulated */
828 RS,   INCREG,
829         SCREG|SNAME|SOREG|SCONTLL,
830         SAREG|SNAME|SOREG|SCONTINT/* will be int */
831                 NSPECIAL|NCREG|NCSL|NCSR,       RESC1,
832                 "ZO", },
833
834 RS,   INAREG|FOREFF,
835         SAREG|SNAME|SOREG,      TSWORD,
836         SHCH,                   TCHAR|TUCHAR,
837                 NSPECIAL,       RLEFT,
838                 "       sarl AR,AL\n", },
839
840 RS,   INAREG|FOREFF,
841         SAREG|SNAME|SOREG,      TSWORD,
842         SCON,                   TWORD|TCHAR|TUCHAR|TSHORT|TUSHORT,
843                 0,              RLEFT,
844                 "       sarl AR,AL\n", },
845
846 RS,   INAREG|FOREFF,
847         SAREG|SNAME|SOREG,      TUWORD,
848         SHCH,                   TCHAR|TUCHAR,
849                 NSPECIAL,       RLEFT,
850                 "       shrl AR,AL\n", },
851
852 RS,   INAREG|FOREFF,
853         SAREG|SNAME|SOREG,      TUWORD,
854         SCON,                   TWORD|TCHAR|TUCHAR|TSHORT|TUSHORT,
855                 0,              RLEFT,
856                 "       shrl AR,AL\n", },
857
858 RS,   INAREG|FOREFF,
859         SAREG|SNAME|SOREG,      TSHORT,
860         SHCH,                   TCHAR|TUCHAR,
861                 NSPECIAL,       RLEFT,
862                 "       sarw AR,AL\n", },
863
864 RS,   INAREG|FOREFF,
865         SAREG|SNAME|SOREG,      TSHORT,
866         SCON,                   TANY,
867                 0,              RLEFT,
868                 "       sarw AR,AL\n", },
869
870 RS,   INAREG|FOREFF,
871         SAREG|SNAME|SOREG,      TUSHORT,
872         SHCH,                   TCHAR|TUCHAR,
873                 NSPECIAL,       RLEFT,
874                 "       shrw AR,AL\n", },
875
876 RS,   INAREG|FOREFF,
877         SAREG|SNAME|SOREG,      TUSHORT,
878         SCON,                   TANY,
879                 0,              RLEFT,
880                 "       shrw AR,AL\n", },
881
882 RS,   INCH|FOREFF,
883         SHCH|SNAME|SOREG,       TCHAR,
884         SHCH,                   TCHAR|TUCHAR,
885                 NSPECIAL,       RLEFT,
886                 "       sarb AR,AL\n", },
887
888 RS,   INCH|FOREFF,
889         SHCH|SNAME|SOREG,       TCHAR,
890         SCON,                   TANY,
891                 0,              RLEFT,
892                 "       sarb AR,AL\n", },
893
894 RS,   INCH|FOREFF,
895         SHCH|SNAME|SOREG,       TUCHAR,
896         SHCH,                   TCHAR|TUCHAR,
897                 NSPECIAL,       RLEFT,
898                 "       shrb AR,AL\n", },
899
900 RS,   INCH|FOREFF,
901         SHCH|SNAME|SOREG,       TUCHAR,
902         SCON,                   TANY,
903                 0,              RLEFT,
904                 "       shrb AR,AL\n", },
905
906 /*
907  * The next rules takes care of assignments. "=".
908  */
909 ASSIGN,       FOREFF,
910         SHLL|SNAME|SOREG,       TLL,
911         SCON,           TANY,
912                 0,      0,
913                 "       movl AR,AL\n    movl UR,UL\n", },
914
915 ASSIGN,       FOREFF|INLL,
916         SHLL,           TLL,
917         SCON,           TANY,
918                 0,      RDEST,
919                 "       movl AR,AL\n    movl UR,UL\n", },
920
921 ASSIGN,       FOREFF,
922         SAREG|SNAME|SOREG,      TWORD|TPOINT,
923         SCON,           TANY,
924                 0,      0,
925                 "       movl AR,AL\n", },
926
927 ASSIGN,       FOREFF|INAREG,
928         SAREG,  TWORD|TPOINT,
929         SCON,           TANY,
930                 0,      RDEST,
931                 "       movl AR,AL\n", },
932
933 ASSIGN,       FOREFF,
934         SAREG|SNAME|SOREG,      TSHORT|TUSHORT,
935         SCON,           TANY,
936                 0,      0,
937                 "       movw AR,AL\n", },
938
939 ASSIGN,       FOREFF|INAREG,
940         SAREG,  TSHORT|TUSHORT,
941         SCON,           TANY,
942                 0,      RDEST,
943                 "       movw AR,AL\n", },
944
945 ASSIGN,       FOREFF,
946         SHCH|SNAME|SOREG,       TCHAR|TUCHAR,
947         SCON,           TANY,
948                 0,      0,
949                 "       movb AR,AL\n", },
950
951 ASSIGN,       FOREFF|INCH,
952         SHCH,           TCHAR|TUCHAR,
953         SCON,           TANY,
954                 0,      RDEST,
955                 "       movb AR,AL\n", },
956
957 ASSIGN,       FOREFF|INLL,
958         SHLL|SNAME|SOREG,       TLL,
959         SHLL,                   TLL,
960                 0,      RDEST,
961                 "       movl AR,AL\n    movl UR,UL\n", },
962
963 ASSIGN,       FOREFF|INAREG,
964         SAREG|SNAME|SOREG,      TWORD|TPOINT,
965         SAREG,          TWORD|TPOINT,
966                 0,      RDEST,
967                 "       movl AR,AL\n", },
968
969 ASSIGN,       FOREFF|INAREG,
970         SAREG,                  TWORD|TPOINT,
971         SAREG|SNAME|SOREG,      TWORD|TPOINT,
972                 0,      RDEST,
973                 "       movl AR,AL\n", },
974
975 ASSIGN,       FOREFF|INAREG,
976         SAREG|SNAME|SOREG,      TSHORT|TUSHORT,
977         SAREG,          TSHORT|TUSHORT,
978                 0,      RDEST,
979                 "       movw AR,AL\n", },
980
981 ASSIGN,       FOREFF|INCH,
982         SHCH|SNAME|SOREG,       TCHAR|TUCHAR,
983         SHCH,           TCHAR|TUCHAR|TWORD,
984                 0,      RDEST,
985                 "       movb AR,AL\n", },
986
987 ASSIGN,       FOREFF|INAREG,
988         SFLD,           TANY,
989         SAREG,  TANY,
990                 NAREG,  RDEST,
991                 "ZE", },
992
993 ASSIGN,       FOREFF,
994         SFLD,           TANY,
995         SAREG|SNAME|SOREG|SCONTANY,
996                 NAREG,  0,
997                 "ZE", },
998
999 ASSIGN,       INDREG|FOREFF,
1000         SHFL,   TFLOAT|TDOUBLE|TLDOUBLE,
1001         SHFL,   TFLOAT|TDOUBLE|TLDOUBLE,
1002                 0,      RDEST,
1003                 "", }, /* This will always be in the correct register */
1004
1005 /* order of table entries is very important here! */
1006 ASSIGN,       INFL,
1007         SNAME|SOREG,    TLDOUBLE,
1008         SHFL,   TFLOAT|TDOUBLE|TLDOUBLE,
1009                 0,      RDEST,
1010                 "       fstt AL\n", },
1011
1012 ASSIGN,       FOREFF,
1013         SNAME|SOREG,    TLDOUBLE,
1014         SHFL,   TFLOAT|TDOUBLE|TLDOUBLE,
1015                 0,      0,
1016                 "       fstpt AL\n", },
1017
1018 ASSIGN,       INFL,
1019         SNAME|SOREG,    TDOUBLE,
1020         SHFL,   TFLOAT|TDOUBLE|TLDOUBLE,
1021                 0,      RDEST,
1022                 "       fstl AL\n", },
1023
1024 ASSIGN,       FOREFF,
1025         SNAME|SOREG,    TDOUBLE,
1026         SHFL,   TFLOAT|TDOUBLE|TLDOUBLE,
1027                 0,      0,
1028                 "       fstpl AL\n", },
1029
1030 ASSIGN,       INFL,
1031         SNAME|SOREG,    TFLOAT,
1032         SHFL,   TFLOAT|TDOUBLE|TLDOUBLE,
1033                 0,      RDEST,
1034                 "       fsts AL\n", },
1035
1036 ASSIGN,       FOREFF,
1037         SNAME|SOREG,    TFLOAT,
1038         SHFL,   TFLOAT|TDOUBLE|TLDOUBLE,
1039                 0,      0,
1040                 "       fstps AL\n", },
1041 /* end very important order */
1042
1043 ASSIGN,       INFL|FOREFF,
1044         SHFL,           TLDOUBLE,
1045         SHFL|SOREG|SNAME,       TLDOUBLE,
1046                 0,      RDEST,
1047                 "       fldt AR\n", },
1048
1049 ASSIGN,       INFL|FOREFF,
1050         SHFL,           TDOUBLE,
1051         SHFL|SOREG|SNAME,       TDOUBLE,
1052                 0,      RDEST,
1053                 "       fldl AR\n", },
1054
1055 ASSIGN,       INFL|FOREFF,
1056         SHFL,           TFLOAT,
1057         SHFL|SOREG|SNAME,       TFLOAT,
1058                 0,      RDEST,
1059                 "       flds AR\n", },
1060
1061 /* Do not generate memcpy if return from funcall */
1062 #if 0
1063 STASG,        INAREG|FOREFF,
1064         SOREG|SNAME|SAREG,      TPTRTO|TSTRUCT,
1065         SFUNCALL,       TPTRTO|TSTRUCT,
1066                 0,      RRIGHT,
1067                 "", },
1068 #endif
1069
1070 STASG,        INAREG|FOREFF,
1071         SOREG|SNAME,    TANY,
1072         SAREG|SOREG|SNAME,      TPTRTO|TANY,
1073                 NSPECIAL,       RRIGHT,
1074                 "ZQ", },
1075
1076 /*
1077  * DIV/MOD/MUL 
1078  */
1079 /* long long div is emulated */
1080 DIV,  INCREG,
1081         SCREG|SNAME|SOREG|SCONTLL,
1082         SCREG|SNAME|SOREG|SCONTLL,
1083                 NSPECIAL|NCREG|NCSL|NCSR,       RESC1,
1084                 "ZO", },
1085
1086 DIV,  INAREG,
1087         SAREG,                  TSWORD,
1088         SAREG|SNAME|SOREG,      TWORD,
1089                 NSPECIAL,       RDEST,
1090                 "       cltd\n  idivl AR\n", },
1091
1092 DIV,  INAREG,
1093         SAREG,                  TUWORD|TPOINT,
1094         SAREG|SNAME|SOREG,      TUWORD|TPOINT,
1095                 NSPECIAL,       RDEST,
1096                 "       xorl %edx,%edx\n        divl AR\n", },
1097
1098 DIV,  INAREG,
1099         SAREG,                  TUSHORT,
1100         SAREG|SNAME|SOREG,      TUSHORT,
1101                 NSPECIAL,       RDEST,
1102                 "       xorl %edx,%edx\n        divw AR\n", },
1103
1104 DIV,  INCH,
1105         SHCH,                   TUCHAR,
1106         SHCH|SNAME|SOREG,       TUCHAR,
1107                 NSPECIAL,       RDEST,
1108                 "       xorb %ah,%ah\n  divb AR\n", },
1109
1110 DIV,  INFL,
1111         SHFL,           TDOUBLE,
1112         SNAME|SOREG,    TDOUBLE,
1113                 0,      RLEFT,
1114                 "       fdivl AR\n", },
1115
1116 DIV,  INFL,
1117         SHFL,           TLDOUBLE|TDOUBLE|TFLOAT,
1118         SHFL,           TLDOUBLE|TDOUBLE|TFLOAT,
1119                 0,      RLEFT,
1120                 "       fdivZAp\n", },
1121
1122 /* (u)longlong mod is emulated */
1123 MOD,  INCREG,
1124         SCREG|SNAME|SOREG|SCONTLL,
1125         SCREG|SNAME|SOREG|SCONTLL,
1126                 NSPECIAL|NCREG|NCSL|NCSR,       RESC1,
1127                 "ZO", },
1128
1129 MOD,  INAREG,
1130         SAREG,                  TSWORD,
1131         SAREG|SNAME|SOREG,      TSWORD,
1132                 NAREG|NSPECIALRESC1,
1133                 "       cltd\n  idivl AR\n", },
1134
1135 MOD,  INAREG,
1136         SAREG,                  TUWORD|TPOINT,
1137         SAREG|SNAME|SOREG,      TUWORD|TPOINT,
1138                 NAREG|NSPECIALRESC1,
1139                 "       xorl %edx,%edx\n        divl AR\n", },
1140
1141 MOD,  INAREG,
1142         SAREG,                  TUSHORT,
1143         SAREG|SNAME|SOREG,      TUSHORT,
1144                 NAREG|NSPECIALRESC1,
1145                 "       xorl %edx,%edx\n        divw AR\n", },
1146
1147 MOD,  INCH,
1148         SHCH,                   TUCHAR,
1149         SHCH|SNAME|SOREG,       TUCHAR,
1150                 NBREG|NSPECIALRESC1,
1151                 "       xorb %ah,%ah\n  divb AR\n", },
1152
1153 /* (u)longlong mul is emulated */
1154 MUL,  INCREG,
1155         SCREG|SNAME|SOREG|SCONTLL,
1156         SCREG|SNAME|SOREG|SCONTLL,
1157                 NSPECIAL|NCREG|NCSL|NCSR,       RESC1,
1158                 "ZO", },
1159
1160 MUL,  INAREG,
1161         SAREG,                          TWORD|TPOINT,
1162         SAREG|SNAME|SOREG|SCON,         TWORD|TPOINT,
1163                 0,      RLEFT,
1164                 "       imull AR,AL\n", },
1165
1166 MUL,  INAREG,
1167         SAREG,                  TSHORT|TUSHORT,
1168         SAREG|SNAME|SOREG,      TSHORT|TUSHORT,
1169                 0,      RLEFT,
1170                 "       imulw AR,AL\n", },
1171
1172 MUL,  INCH,
1173         SHCH,                   TCHAR|TUCHAR,
1174         SHCH|SNAME|SOREG,       TCHAR|TUCHAR,
1175                 NSPECIAL,       RDEST,
1176                 "       imulb AR\n", },
1177
1178 MUL,  INFL,
1179         SHFL,           TDOUBLE,
1180         SNAME|SOREG,    TDOUBLE,
1181                 0,      RLEFT,
1182                 "       fmull AR\n", },
1183
1184 MUL,  INFL,
1185         SHFL,           TLDOUBLE|TDOUBLE|TFLOAT,
1186         SHFL,           TLDOUBLE|TDOUBLE|TFLOAT,
1187                 0,      RLEFT,
1188                 "       fmulp\n", },
1189
1190 /*
1191  * Indirection operators.
1192  */
1193 UMULINLL,
1194         SANY,   TANY,
1195         SOREG,  TLL,
1196                 NCREG|NCSL,     RESC1,
1197                 "       movl UL,U1\n    movl AL,A1\n", },
1198
1199 UMULINAREG,
1200         SANY,   TPOINT|TWORD,
1201         SOREG,  TPOINT|TWORD,
1202                 NAREG|NASL,     RESC1,
1203                 "       movl AL,A1\n", },
1204
1205 UMULINCH,
1206         SANY,   TANY,
1207         SOREG,  TCHAR|TUCHAR,
1208                 NBREG|NBSL,     RESC1,
1209                 "       movb AL,A1\n", },
1210
1211 UMULINAREG,
1212         SANY,   TANY,
1213         SOREG,  TSHORT|TUSHORT,
1214                 NAREG|NASL,     RESC1,
1215                 "       movw AL,A1\n", },
1216
1217 UMULINFL,
1218         SANY,   TANY,
1219         SOREG,  TLDOUBLE,
1220                 NDREG|NDSL,     RESC1,
1221                 "       fldt AL\n", },
1222
1223 UMULINFL,
1224         SANY,   TANY,
1225         SOREG,  TDOUBLE,
1226                 NDREG|NDSL,     RESC1,
1227                 "       fldl AL\n", },
1228
1229 UMULINFL,
1230         SANY,   TANY,
1231         SOREG,  TFLOAT,
1232                 NDREG|NDSL,     RESC1,
1233                 "       flds AL\n", },
1234
1235 /*
1236  * Logical/branching operators
1237  */
1238
1239 /* Comparisions, take care of everything */
1240 OPLOG,        FORCC,
1241         SHLL|SOREG|SNAME,       TLL,
1242         SHLL,                   TLL,
1243                 0,      0,
1244                 "ZD", },
1245
1246 OPLOG,        FORCC,
1247         SAREG|SOREG|SNAME,      TWORD|TPOINT,
1248         SCON|SAREG,     TWORD|TPOINT,
1249                 0,      RESCC,
1250                 "       cmpl AR,AL\n", },
1251
1252 OPLOG,        FORCC,
1253         SCON|SAREG,     TWORD|TPOINT,
1254         SAREG|SOREG|SNAME,      TWORD|TPOINT,
1255                 0,      RESCC,
1256                 "       cmpl AR,AL\n", },
1257
1258 OPLOG,        FORCC,
1259         SAREG|SOREG|SNAME,      TSHORT|TUSHORT,
1260         SCON|SAREG,     TANY,
1261                 0,      RESCC,
1262                 "       cmpw AR,AL\n", },