Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:ragge:20060730093048

Diff

Diff from 1.1 to:

Annotations

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

Annotated File View

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