1 /* A Bison parser, made by GNU Bison 2.1. */
2
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
20
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
25
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
28
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
35
36 /* Identify Bison output. */
37 #define YYBISON 1
38
39 /* Bison version. */
40 #define YYBISON_VERSION "2.1"
41
42 /* Skeleton name. */
43 #define YYSKELETON_NAME "yacc.c"
44
45 /* Pure parsers. */
46 #define YYPURE 0
47
48 /* Using locations. */
49 #define YYLSP_NEEDED 0
50
51
52
53 /* Tokens. */
54 #ifndef YYTOKENTYPE
55 # define YYTOKENTYPE
56 /* Put the tokens into the symbol table, so that GDB and other debuggers
57 know about them. */
58 enum yytokentype {
59 BYTEOP16P = 258,
60 BYTEOP16M = 259,
61 BYTEOP1P = 260,
62 BYTEOP2P = 261,
63 BYTEOP2M = 262,
64 BYTEOP3P = 263,
65 BYTEUNPACK = 264,
66 BYTEPACK = 265,
67 PACK = 266,
68 SAA = 267,
69 ALIGN8 = 268,
70 ALIGN16 = 269,
71 ALIGN24 = 270,
72 VIT_MAX = 271,
73 EXTRACT = 272,
74 DEPOSIT = 273,
75 EXPADJ = 274,
76 SEARCH = 275,
77 ONES = 276,
78 SIGN = 277,
79 SIGNBITS = 278,
80 LINK = 279,
81 UNLINK = 280,
82 REG = 281,
83 PC = 282,
84 CCREG = 283,
85 BYTE_DREG = 284,
86 REG_A_DOUBLE_ZERO = 285,
87 REG_A_DOUBLE_ONE = 286,
88 A_ZERO_DOT_L = 287,
89 A_ZERO_DOT_H = 288,
90 A_ONE_DOT_L = 289,
91 A_ONE_DOT_H = 290,
92 HALF_REG = 291,
93 NOP = 292,
94 RTI = 293,
95 RTS = 294,
96 RTX = 295,
97 RTN = 296,
98 RTE = 297,
99 HLT = 298,
100 IDLE = 299,
101 STI = 300,
102 CLI = 301,
103 CSYNC = 302,
104 SSYNC = 303,
105 EMUEXCPT = 304,
106 RAISE = 305,
107 EXCPT = 306,
108 LSETUP = 307,
109 LOOP = 308,
110 LOOP_BEGIN = 309,
111 LOOP_END = 310,
112 DISALGNEXCPT = 311,
113 JUMP = 312,
114 JUMP_DOT_S = 313,
115 JUMP_DOT_L = 314,
116 CALL = 315,
117 ABORT = 316,
118 NOT = 317,
119 TILDA = 318,
120 BANG = 319,
121 AMPERSAND = 320,
122 BAR = 321,
123 PERCENT = 322,
124 CARET = 323,
125 BXOR = 324,
126 MINUS = 325,
127 PLUS = 326,
128 STAR = 327,
129 SLASH = 328,
130 NEG = 329,
131 MIN = 330,
132 MAX = 331,
133 ABS = 332,
134 DOUBLE_BAR = 333,
135 _PLUS_BAR_PLUS = 334,
136 _PLUS_BAR_MINUS = 335,
137 _MINUS_BAR_PLUS = 336,
138 _MINUS_BAR_MINUS = 337,
139 _MINUS_MINUS = 338,
140 _PLUS_PLUS = 339,
141 SHIFT = 340,
142 LSHIFT = 341,
143 ASHIFT = 342,
144 BXORSHIFT = 343,
145 _GREATER_GREATER_GREATER_THAN_ASSIGN = 344,
146 ROT = 345,
147 LESS_LESS = 346,
148 GREATER_GREATER = 347,
149 _GREATER_GREATER_GREATER = 348,
150 _LESS_LESS_ASSIGN = 349,
151 _GREATER_GREATER_ASSIGN = 350,
152 DIVS = 351,
153 DIVQ = 352,
154 ASSIGN = 353,
155 _STAR_ASSIGN = 354,
156 _BAR_ASSIGN = 355,
157 _CARET_ASSIGN = 356,
158 _AMPERSAND_ASSIGN = 357,
159 _MINUS_ASSIGN = 358,
160 _PLUS_ASSIGN = 359,
161 _ASSIGN_BANG = 360,
162 _LESS_THAN_ASSIGN = 361,
163 _ASSIGN_ASSIGN = 362,
164 GE = 363,
165 LT = 364,
166 LE = 365,
167 GT = 366,
168 LESS_THAN = 367,
169 FLUSHINV = 368,
170 FLUSH = 369,
171 IFLUSH = 370,
172 PREFETCH = 371,
173 PRNT = 372,
174 OUTC = 373,
175 WHATREG = 374,
176 TESTSET = 375,
177 ASL = 376,
178 ASR = 377,
179 B = 378,
180 W = 379,
181 NS = 380,
182 S = 381,
183 CO = 382,
184 SCO = 383,
185 TH = 384,
186 TL = 385,
187 BP = 386,
188 BREV = 387,
189 X = 388,
190 Z = 389,
191 M = 390,
192 MMOD = 391,
193 R = 392,
194 RND = 393,
195 RNDL = 394,
196 RNDH = 395,
197 RND12 = 396,
198 RND20 = 397,
199 V = 398,
200 LO = 399,
201 HI = 400,
202 BITTGL = 401,
203 BITCLR = 402,
204 BITSET = 403,
205 BITTST = 404,
206 BITMUX = 405,
207 DBGAL = 406,
208 DBGAH = 407,
209 DBGHALT = 408,
210 DBG = 409,
211 DBGA = 410,
212 DBGCMPLX = 411,
213 IF = 412,
214 COMMA = 413,
215 BY = 414,
216 COLON = 415,
217 SEMICOLON = 416,
218 RPAREN = 417,
219 LPAREN = 418,
220 LBRACK = 419,
221 RBRACK = 420,
222 STATUS_REG = 421,
223 MNOP = 422,
224 SYMBOL = 423,
225 NUMBER = 424,
226 GOT = 425,
227 GOT17M4 = 426,
228 FUNCDESC_GOT17M4 = 427,
229 AT = 428,
230 PLTPC = 429
231 };
232 #endif
233 /* Tokens. */
234 #define BYTEOP16P 258
235 #define BYTEOP16M 259
236 #define BYTEOP1P 260
237 #define BYTEOP2P 261
238 #define BYTEOP2M 262
239 #define BYTEOP3P 263
240 #define BYTEUNPACK 264
241 #define BYTEPACK 265
242 #define PACK 266
243 #define SAA 267
244 #define ALIGN8 268
245 #define ALIGN16 269
246 #define ALIGN24 270
247 #define VIT_MAX 271
248 #define EXTRACT 272
249 #define DEPOSIT 273
250 #define EXPADJ 274
251 #define SEARCH 275
252 #define ONES 276
253 #define SIGN 277
254 #define SIGNBITS 278
255 #define LINK 279
256 #define UNLINK 280
257 #define REG 281
258 #define PC 282
259 #define CCREG 283
260 #define BYTE_DREG 284
261 #define REG_A_DOUBLE_ZERO 285
262 #define REG_A_DOUBLE_ONE 286
263 #define A_ZERO_DOT_L 287
264 #define A_ZERO_DOT_H 288
265 #define A_ONE_DOT_L 289
266 #define A_ONE_DOT_H 290
267 #define HALF_REG 291
268 #define NOP 292
269 #define RTI 293
270 #define RTS 294
271 #define RTX 295
272 #define RTN 296
273 #define RTE 297
274 #define HLT 298
275 #define IDLE 299
276 #define STI 300
277 #define CLI 301
278 #define CSYNC 302
279 #define SSYNC 303
280 #define EMUEXCPT 304
281 #define RAISE 305
282 #define EXCPT 306
283 #define LSETUP 307
284 #define LOOP 308
285 #define LOOP_BEGIN 309
286 #define LOOP_END 310
287 #define DISALGNEXCPT 311
288 #define JUMP 312
289 #define JUMP_DOT_S 313
290 #define JUMP_DOT_L 314
291 #define CALL 315
292 #define ABORT 316
293 #define NOT 317
294 #define TILDA 318
295 #define BANG 319
296 #define AMPERSAND 320
297 #define BAR 321
298 #define PERCENT 322
299 #define CARET 323
300 #define BXOR 324
301 #define MINUS 325
302 #define PLUS 326
303 #define STAR 327
304 #define SLASH 328
305 #define NEG 329
306 #define MIN 330
307 #define MAX 331
308 #define ABS 332
309 #define DOUBLE_BAR 333
310 #define _PLUS_BAR_PLUS 334
311 #define _PLUS_BAR_MINUS 335
312 #define _MINUS_BAR_PLUS 336
313 #define _MINUS_BAR_MINUS 337
314 #define _MINUS_MINUS 338
315 #define _PLUS_PLUS 339
316 #define SHIFT 340
317 #define LSHIFT 341
318 #define ASHIFT 342
319 #define BXORSHIFT 343
320 #define _GREATER_GREATER_GREATER_THAN_ASSIGN 344
321 #define ROT 345
322 #define LESS_LESS 346
323 #define GREATER_GREATER 347
324 #define _GREATER_GREATER_GREATER 348
325 #define _LESS_LESS_ASSIGN 349
326 #define _GREATER_GREATER_ASSIGN 350
327 #define DIVS 351
328 #define DIVQ 352
329 #define ASSIGN 353
330 #define _STAR_ASSIGN 354
331 #define _BAR_ASSIGN 355
332 #define _CARET_ASSIGN 356
333 #define _AMPERSAND_ASSIGN 357
334 #define _MINUS_ASSIGN 358
335 #define _PLUS_ASSIGN 359
336 #define _ASSIGN_BANG 360
337 #define _LESS_THAN_ASSIGN 361
338 #define _ASSIGN_ASSIGN 362
339 #define GE 363
340 #define LT 364
341 #define LE 365
342 #define GT 366
343 #define LESS_THAN 367
344 #define FLUSHINV 368
345 #define FLUSH 369
346 #define IFLUSH 370
347 #define PREFETCH 371
348 #define PRNT 372
349 #define OUTC 373
350 #define WHATREG 374
351 #define TESTSET 375
352 #define ASL 376
353 #define ASR 377
354 #define B 378
355 #define W 379
356 #define NS 380
357 #define S 381
358 #define CO 382
359 #define SCO 383
360 #define TH 384
361 #define TL 385
362 #define BP 386
363 #define BREV 387
364 #define X 388
365 #define Z 389
366 #define M 390
367 #define MMOD 391
368 #define R 392
369 #define RND 393
370 #define RNDL 394
371 #define RNDH 395
372 #define RND12 396
373 #define RND20 397
374 #define V 398
375 #define LO 399
376 #define HI 400
377 #define BITTGL 401
378 #define BITCLR 402
379 #define BITSET 403
380 #define BITTST 404
381 #define BITMUX 405
382 #define DBGAL 406
383 #define DBGAH 407
384 #define DBGHALT 408
385 #define DBG 409
386 #define DBGA 410
387 #define DBGCMPLX 411
388 #define IF 412
389 #define COMMA 413
390 #define BY 414
391 #define COLON 415
392 #define SEMICOLON 416
393 #define RPAREN 417
394 #define LPAREN 418
395 #define LBRACK 419
396 #define RBRACK 420
397 #define STATUS_REG 421
398 #define MNOP 422
399 #define SYMBOL 423
400 #define NUMBER 424
401 #define GOT 425
402 #define GOT17M4 426
403 #define FUNCDESC_GOT17M4 427
404 #define AT 428
405 #define PLTPC 429
406
407
408
409
410 /* Copy the first part of user declarations. */
411 #line 21 "bfin-parse.y"
412
413
414 #include <stdio.h>
415 #include <stdarg.h>
416 #include <obstack.h>
417
418 #include "bfin-aux.h" // opcode generating auxiliaries
419 #include "libbfd.h"
420 #include "elf/common.h"
421 #include "elf/bfin.h"
422
423 #define DSP32ALU(aopcde, HL, dst1, dst0, src0, src1, s, x, aop) \
424 bfin_gen_dsp32alu (HL, aopcde, aop, s, x, dst0, dst1, src0, src1)
425
426 #define DSP32MAC(op1, MM, mmod, w1, P, h01, h11, h00, h10, dst, op0, src0, src1, w0) \
427 bfin_gen_dsp32mac (op1, MM, mmod, w1, P, h01, h11, h00, h10, op0, \
428 dst, src0, src1, w0)
429
430 #define DSP32MULT(op1, MM, mmod, w1, P, h01, h11, h00, h10, dst, op0, src0, src1, w0) \
431 bfin_gen_dsp32mult (op1, MM, mmod, w1, P, h01, h11, h00, h10, op0, \
432 dst, src0, src1, w0)
433
434 #define DSP32SHIFT(sopcde, dst0, src0, src1, sop, hls) \
435 bfin_gen_dsp32shift (sopcde, dst0, src0, src1, sop, hls)
436
437 #define DSP32SHIFTIMM(sopcde, dst0, immag, src1, sop, hls) \
438 bfin_gen_dsp32shiftimm (sopcde, dst0, immag, src1, sop, hls)
439
440 #define LDIMMHALF_R(reg, h, s, z, hword) \
441 bfin_gen_ldimmhalf (reg, h, s, z, hword, 1)
442
443 #define LDIMMHALF_R5(reg, h, s, z, hword) \
444 bfin_gen_ldimmhalf (reg, h, s, z, hword, 2)
445
446 #define LDSTIDXI(ptr, reg, w, sz, z, offset) \
447 bfin_gen_ldstidxi (ptr, reg, w, sz, z, offset)
448
449 #define LDST(ptr, reg, aop, sz, z, w) \
450 bfin_gen_ldst (ptr, reg, aop, sz, z, w)
451
452 #define LDSTII(ptr, reg, offset, w, op) \
453 bfin_gen_ldstii (ptr, reg, offset, w, op)
454
455 #define DSPLDST(i, m, reg, aop, w) \
456 bfin_gen_dspldst (i, reg, aop, w, m)
457
458 #define LDSTPMOD(ptr, reg, idx, aop, w) \
459 bfin_gen_ldstpmod (ptr, reg, aop, w, idx)
460
461 #define LDSTIIFP(offset, reg, w) \
462 bfin_gen_ldstiifp (reg, offset, w)
463
464 #define LOGI2OP(dst, src, opc) \
465 bfin_gen_logi2op (opc, src, dst.regno & CODE_MASK)
466
467 #define ALU2OP(dst, src, opc) \
468 bfin_gen_alu2op (dst, src, opc)
469
470 #define BRCC(t, b, offset) \
471 bfin_gen_brcc (t, b, offset)
472
473 #define UJUMP(offset) \
474 bfin_gen_ujump (offset)
475
476 #define PROGCTRL(prgfunc, poprnd) \
477 bfin_gen_progctrl (prgfunc, poprnd)
478
479 #define PUSHPOPMULTIPLE(dr, pr, d, p, w) \
480 bfin_gen_pushpopmultiple (dr, pr, d, p, w)
481
482 #define PUSHPOPREG(reg, w) \
483 bfin_gen_pushpopreg (reg, w)
484
485 #define CALLA(addr, s) \
486 bfin_gen_calla (addr, s)
487
488 #define LINKAGE(r, framesize) \
489 bfin_gen_linkage (r, framesize)
490
491 #define COMPI2OPD(dst, src, op) \
492 bfin_gen_compi2opd (dst, src, op)
493
494 #define COMPI2OPP(dst, src, op) \
495 bfin_gen_compi2opp (dst, src, op)
496
497 #define DAGMODIK(i, op) \
498 bfin_gen_dagmodik (i, op)
499
500 #define DAGMODIM(i, m, op, br) \
501 bfin_gen_dagmodim (i, m, op, br)
502
503 #define COMP3OP(dst, src0, src1, opc) \
504 bfin_gen_comp3op (src0, src1, dst, opc)
505
506 #define PTR2OP(dst, src, opc) \
507 bfin_gen_ptr2op (dst, src, opc)
508
509 #define CCFLAG(x, y, opc, i, g) \
510 bfin_gen_ccflag (x, y, opc, i, g)
511
512 #define CCMV(src, dst, t) \
513 bfin_gen_ccmv (src, dst, t)
514
515 #define CACTRL(reg, a, op) \
516 bfin_gen_cactrl (reg, a, op)
517
518 #define LOOPSETUP(soffset, c, rop, eoffset, reg) \
519 bfin_gen_loopsetup (soffset, c, rop, eoffset, reg)
520
521 #define HL2(r1, r0) (IS_H (r1) << 1 | IS_H (r0))
522 #define IS_RANGE(bits, expr, sign, mul) \
523 value_match(expr, bits, sign, mul, 1)
524 #define IS_URANGE(bits, expr, sign, mul) \
525 value_match(expr, bits, sign, mul, 0)
526 #define IS_CONST(expr) (expr->type == Expr_Node_Constant)
527 #define IS_RELOC(expr) (expr->type != Expr_Node_Constant)
528 #define IS_IMM(expr, bits) value_match (expr, bits, 0, 1, 1)
529 #define IS_UIMM(expr, bits) value_match (expr, bits, 0, 1, 0)
530
531 #define IS_PCREL4(expr) \
532 (value_match (expr, 4, 0, 2, 0))
533
534 #define IS_LPPCREL10(expr) \
535 (value_match (expr, 10, 0, 2, 0))
536
537 #define IS_PCREL10(expr) \
538 (value_match (expr, 10, 0, 2, 1))
539
540 #define IS_PCREL12(expr) \
541 (value_match (expr, 12, 0, 2, 1))
542
543 #define IS_PCREL24(expr) \
544 (value_match (expr, 24, 0, 2, 1))
545
546
547 static int value_match (Expr_Node *expr, int sz, int sign, int mul, int issigned);
548
549 extern FILE *errorf;
550 extern INSTR_T insn;
551
552 static Expr_Node *binary (Expr_Op_Type, Expr_Node *, Expr_Node *);
553 static Expr_Node *unary (Expr_Op_Type, Expr_Node *);
554
555 static void notethat (char *format, ...);
556
557 char *current_inputline;
558 extern char *yytext;
559 int yyerror (char *msg);
560
error(char * format,...)561 void error (char *format, ...)
562 {
563 va_list ap;
564 char buffer[2000];
565
566 va_start (ap, format);
567 vsprintf (buffer, format, ap);
568 va_end (ap);
569
570 as_bad (buffer);
571 }
572
573 int
yyerror(char * msg)574 yyerror (char *msg)
575 {
576 if (msg[0] == '\0')
577 error ("%s", msg);
578
579 else if (yytext[0] != ';')
580 error ("%s. Input text was %s.", msg, yytext);
581 else
582 error ("%s.", msg);
583
584 return -1;
585 }
586
587 static int
in_range_p(Expr_Node * expr,int from,int to,unsigned int mask)588 in_range_p (Expr_Node *expr, int from, int to, unsigned int mask)
589 {
590 int val = EXPR_VALUE (expr);
591 if (expr->type != Expr_Node_Constant)
592 return 0;
593 if (val < from || val > to)
594 return 0;
595 return (val & mask) == 0;
596 }
597
598 extern int yylex (void);
599
600 #define imm3(x) EXPR_VALUE (x)
601 #define imm4(x) EXPR_VALUE (x)
602 #define uimm4(x) EXPR_VALUE (x)
603 #define imm5(x) EXPR_VALUE (x)
604 #define uimm5(x) EXPR_VALUE (x)
605 #define imm6(x) EXPR_VALUE (x)
606 #define imm7(x) EXPR_VALUE (x)
607 #define imm16(x) EXPR_VALUE (x)
608 #define uimm16s4(x) ((EXPR_VALUE (x)) >> 2)
609 #define uimm16(x) EXPR_VALUE (x)
610
611 /* Return true if a value is inside a range. */
612 #define IN_RANGE(x, low, high) \
613 (((EXPR_VALUE(x)) >= (low)) && (EXPR_VALUE(x)) <= ((high)))
614
615 /* Auxiliary functions. */
616
617 static void
neg_value(Expr_Node * expr)618 neg_value (Expr_Node *expr)
619 {
620 expr->value.i_value = -expr->value.i_value;
621 }
622
623 static int
valid_dreg_pair(Register * reg1,Expr_Node * reg2)624 valid_dreg_pair (Register *reg1, Expr_Node *reg2)
625 {
626 if (!IS_DREG (*reg1))
627 {
628 yyerror ("Dregs expected");
629 return 0;
630 }
631
632 if (reg1->regno != 1 && reg1->regno != 3)
633 {
634 yyerror ("Bad register pair");
635 return 0;
636 }
637
638 if (imm7 (reg2) != reg1->regno - 1)
639 {
640 yyerror ("Bad register pair");
641 return 0;
642 }
643
644 reg1->regno--;
645 return 1;
646 }
647
648 static int
check_multiply_halfregs(Macfunc * aa,Macfunc * ab)649 check_multiply_halfregs (Macfunc *aa, Macfunc *ab)
650 {
651 if ((!REG_EQUAL (aa->s0, ab->s0) && !REG_EQUAL (aa->s0, ab->s1))
652 || (!REG_EQUAL (aa->s1, ab->s1) && !REG_EQUAL (aa->s1, ab->s0)))
653 return yyerror ("Source multiplication register mismatch");
654
655 return 0;
656 }
657
658
659 /* Check (vector) mac funcs and ops. */
660
661 static int
check_macfuncs(Macfunc * aa,Opt_mode * opa,Macfunc * ab,Opt_mode * opb)662 check_macfuncs (Macfunc *aa, Opt_mode *opa,
663 Macfunc *ab, Opt_mode *opb)
664 {
665 /* Variables for swapping. */
666 Macfunc mtmp;
667 Opt_mode otmp;
668
669 /* If a0macfunc comes before a1macfunc, swap them. */
670
671 if (aa->n == 0)
672 {
673 /* (M) is not allowed here. */
674 if (opa->MM != 0)
675 return yyerror ("(M) not allowed with A0MAC");
676 if (ab->n != 1)
677 return yyerror ("Vector AxMACs can't be same");
678
679 mtmp = *aa; *aa = *ab; *ab = mtmp;
680 otmp = *opa; *opa = *opb; *opb = otmp;
681 }
682 else
683 {
684 if (opb->MM != 0)
685 return yyerror ("(M) not allowed with A0MAC");
686 if (opa->mod != 0)
687 return yyerror ("Bad opt mode");
688 if (ab->n != 0)
689 return yyerror ("Vector AxMACs can't be same");
690 }
691
692 /* If both ops are != 3, we have multiply_halfregs in both
693 assignment_or_macfuncs. */
694 if (aa->op == ab->op && aa->op != 3)
695 {
696 if (check_multiply_halfregs (aa, ab) < 0)
697 return -1;
698 }
699 else
700 {
701 /* Only one of the assign_macfuncs has a half reg multiply
702 Evil trick: Just 'OR' their source register codes:
703 We can do that, because we know they were initialized to 0
704 in the rules that don't use multiply_halfregs. */
705 aa->s0.regno |= (ab->s0.regno & CODE_MASK);
706 aa->s1.regno |= (ab->s1.regno & CODE_MASK);
707 }
708
709 if (aa->w == ab->w && aa->P != ab->P)
710 {
711 return yyerror ("macfuncs must differ");
712 if (aa->w && (aa->dst.regno - ab->dst.regno != 1))
713 return yyerror ("Destination Dregs must differ by one");
714 }
715 /* We assign to full regs, thus obey even/odd rules. */
716 else if ((aa->w && aa->P && IS_EVEN (aa->dst))
717 || (ab->w && ab->P && !IS_EVEN (ab->dst)))
718 return yyerror ("Even/Odd register assignment mismatch");
719 /* We assign to half regs, thus obey hi/low rules. */
720 else if ( (aa->w && !aa->P && !IS_H (aa->dst))
721 || (ab->w && !aa->P && IS_H (ab->dst)))
722 return yyerror ("High/Low register assignment mismatch");
723
724 /* Make sure first macfunc has got both P flags ORed. */
725 aa->P |= ab->P;
726
727 /* Make sure mod flags get ORed, too. */
728 opb->mod |= opa->mod;
729 return 0;
730 }
731
732
733 static int
is_group1(INSTR_T x)734 is_group1 (INSTR_T x)
735 {
736 /* Group1 is dpsLDST, LDSTpmod, LDST, LDSTiiFP, LDSTii. */
737 if ((x->value & 0xc000) == 0x8000 || (x->value == 0x0000))
738 return 1;
739
740 return 0;
741 }
742
743 static int
is_group2(INSTR_T x)744 is_group2 (INSTR_T x)
745 {
746 if ((((x->value & 0xfc00) == 0x9c00) /* dspLDST. */
747 && !((x->value & 0xfde0) == 0x9c60) /* dagMODim. */
748 && !((x->value & 0xfde0) == 0x9ce0) /* dagMODim with bit rev. */
749 && !((x->value & 0xfde0) == 0x9d60)) /* pick dagMODik. */
750 || (x->value == 0x0000))
751 return 1;
752 return 0;
753 }
754
755
756
757 /* Enabling traces. */
758 #ifndef YYDEBUG
759 # define YYDEBUG 0
760 #endif
761
762 /* Enabling verbose error messages. */
763 #ifdef YYERROR_VERBOSE
764 # undef YYERROR_VERBOSE
765 # define YYERROR_VERBOSE 1
766 #else
767 # define YYERROR_VERBOSE 0
768 #endif
769
770 /* Enabling the token table. */
771 #ifndef YYTOKEN_TABLE
772 # define YYTOKEN_TABLE 0
773 #endif
774
775 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
776 #line 366 "bfin-parse.y"
777 typedef union YYSTYPE {
778 INSTR_T instr;
779 Expr_Node *expr;
780 SYMBOL_T symbol;
781 long value;
782 Register reg;
783 Macfunc macfunc;
784 struct { int r0; int s0; int x0; int aop; } modcodes;
785 struct { int r0; } r0;
786 Opt_mode mod;
787 } YYSTYPE;
788 /* Line 196 of yacc.c. */
789 #line 790 "bfin-parse.c"
790 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
791 # define YYSTYPE_IS_DECLARED 1
792 # define YYSTYPE_IS_TRIVIAL 1
793 #endif
794
795
796
797 /* Copy the second part of user declarations. */
798
799
800 /* Line 219 of yacc.c. */
801 #line 802 "bfin-parse.c"
802
803 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
804 # define YYSIZE_T __SIZE_TYPE__
805 #endif
806 #if ! defined (YYSIZE_T) && defined (size_t)
807 # define YYSIZE_T size_t
808 #endif
809 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
810 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
811 # define YYSIZE_T size_t
812 #endif
813 #if ! defined (YYSIZE_T)
814 # define YYSIZE_T unsigned int
815 #endif
816
817 #ifndef YY_
818 # if YYENABLE_NLS
819 # if ENABLE_NLS
820 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
821 # define YY_(msgid) dgettext ("bison-runtime", msgid)
822 # endif
823 # endif
824 # ifndef YY_
825 # define YY_(msgid) msgid
826 # endif
827 #endif
828
829 #if ! defined (yyoverflow) || YYERROR_VERBOSE
830
831 /* The parser invokes alloca or malloc; define the necessary symbols. */
832
833 # ifdef YYSTACK_USE_ALLOCA
834 # if YYSTACK_USE_ALLOCA
835 # ifdef __GNUC__
836 # define YYSTACK_ALLOC __builtin_alloca
837 # else
838 # define YYSTACK_ALLOC alloca
839 # if defined (__STDC__) || defined (__cplusplus)
840 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
841 # define YYINCLUDED_STDLIB_H
842 # endif
843 # endif
844 # endif
845 # endif
846
847 # ifdef YYSTACK_ALLOC
848 /* Pacify GCC's `empty if-body' warning. */
849 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
850 # ifndef YYSTACK_ALLOC_MAXIMUM
851 /* The OS might guarantee only one guard page at the bottom of the stack,
852 and a page size can be as small as 4096 bytes. So we cannot safely
853 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
854 to allow for a few compiler-allocated temporary stack slots. */
855 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
856 # endif
857 # else
858 # define YYSTACK_ALLOC YYMALLOC
859 # define YYSTACK_FREE YYFREE
860 # ifndef YYSTACK_ALLOC_MAXIMUM
861 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
862 # endif
863 # ifdef __cplusplus
864 extern "C" {
865 # endif
866 # ifndef YYMALLOC
867 # define YYMALLOC malloc
868 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
869 && (defined (__STDC__) || defined (__cplusplus)))
870 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
871 # endif
872 # endif
873 # ifndef YYFREE
874 # define YYFREE free
875 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
876 && (defined (__STDC__) || defined (__cplusplus)))
877 void free (void *); /* INFRINGES ON USER NAME SPACE */
878 # endif
879 # endif
880 # ifdef __cplusplus
881 }
882 # endif
883 # endif
884 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
885
886
887 #if (! defined (yyoverflow) \
888 && (! defined (__cplusplus) \
889 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
890
891 /* A type that is properly aligned for any stack member. */
892 union yyalloc
893 {
894 short int yyss;
895 YYSTYPE yyvs;
896 };
897
898 /* The size of the maximum gap between one aligned stack and the next. */
899 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
900
901 /* The size of an array large to enough to hold all stacks, each with
902 N elements. */
903 # define YYSTACK_BYTES(N) \
904 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
905 + YYSTACK_GAP_MAXIMUM)
906
907 /* Copy COUNT objects from FROM to TO. The source and destination do
908 not overlap. */
909 # ifndef YYCOPY
910 # if defined (__GNUC__) && 1 < __GNUC__
911 # define YYCOPY(To, From, Count) \
912 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
913 # else
914 # define YYCOPY(To, From, Count) \
915 do \
916 { \
917 YYSIZE_T yyi; \
918 for (yyi = 0; yyi < (Count); yyi++) \
919 (To)[yyi] = (From)[yyi]; \
920 } \
921 while (0)
922 # endif
923 # endif
924
925 /* Relocate STACK from its old location to the new one. The
926 local variables YYSIZE and YYSTACKSIZE give the old and new number of
927 elements in the stack, and YYPTR gives the new location of the
928 stack. Advance YYPTR to a properly aligned location for the next
929 stack. */
930 # define YYSTACK_RELOCATE(Stack) \
931 do \
932 { \
933 YYSIZE_T yynewbytes; \
934 YYCOPY (&yyptr->Stack, Stack, yysize); \
935 Stack = &yyptr->Stack; \
936 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
937 yyptr += yynewbytes / sizeof (*yyptr); \
938 } \
939 while (0)
940
941 #endif
942
943 #if defined (__STDC__) || defined (__cplusplus)
944 typedef signed char yysigned_char;
945 #else
946 typedef short int yysigned_char;
947 #endif
948
949 /* YYFINAL -- State number of the termination state. */
950 #define YYFINAL 149
951 /* YYLAST -- Last index in YYTABLE. */
952 #define YYLAST 1315
953
954 /* YYNTOKENS -- Number of terminals. */
955 #define YYNTOKENS 175
956 /* YYNNTS -- Number of nonterminals. */
957 #define YYNNTS 47
958 /* YYNRULES -- Number of rules. */
959 #define YYNRULES 349
960 /* YYNRULES -- Number of states. */
961 #define YYNSTATES 1024
962
963 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
964 #define YYUNDEFTOK 2
965 #define YYMAXUTOK 429
966
967 #define YYTRANSLATE(YYX) \
968 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
969
970 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
971 static const unsigned char yytranslate[] =
972 {
973 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
974 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
975 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
976 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
977 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
978 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
979 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
980 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
981 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
982 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
983 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
984 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
985 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
986 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
987 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
988 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
989 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
990 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
991 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
992 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
993 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
994 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
995 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
996 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
997 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
998 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
999 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1000 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1001 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1002 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1003 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1004 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1005 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1006 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1007 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1008 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1009 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1010 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
1011 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
1012 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
1013 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
1014 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
1015 165, 166, 167, 168, 169, 170, 171, 172, 173, 174
1016 };
1017
1018 #if YYDEBUG
1019 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1020 YYRHS. */
1021 static const unsigned short int yyprhs[] =
1022 {
1023 0, 0, 3, 4, 6, 9, 16, 21, 23, 25,
1024 28, 34, 36, 43, 50, 54, 58, 76, 94, 106,
1025 118, 130, 143, 156, 169, 175, 179, 183, 187, 196,
1026 210, 223, 237, 251, 265, 274, 292, 299, 309, 313,
1027 320, 324, 330, 337, 346, 355, 358, 361, 366, 370,
1028 373, 378, 382, 389, 394, 402, 410, 414, 418, 425,
1029 429, 434, 438, 442, 446, 458, 470, 480, 486, 492,
1030 502, 508, 514, 521, 528, 534, 540, 546, 553, 560,
1031 566, 568, 572, 576, 580, 584, 589, 594, 604, 614,
1032 620, 628, 633, 640, 646, 653, 661, 671, 680, 689,
1033 701, 711, 716, 722, 729, 737, 744, 749, 756, 762,
1034 769, 776, 781, 790, 801, 812, 825, 831, 838, 844,
1035 851, 856, 861, 866, 874, 884, 894, 904, 911, 918,
1036 925, 934, 943, 950, 956, 962, 971, 976, 984, 986,
1037 988, 990, 992, 994, 996, 998, 1000, 1002, 1004, 1007,
1038 1010, 1015, 1020, 1027, 1034, 1037, 1040, 1045, 1048, 1051,
1039 1054, 1057, 1060, 1063, 1070, 1077, 1083, 1088, 1092, 1096,
1040 1100, 1104, 1108, 1112, 1117, 1120, 1125, 1128, 1133, 1136,
1041 1141, 1144, 1152, 1161, 1170, 1178, 1186, 1194, 1204, 1212,
1042 1221, 1231, 1240, 1247, 1255, 1264, 1274, 1283, 1291, 1299,
1043 1306, 1310, 1322, 1330, 1342, 1350, 1354, 1357, 1359, 1367,
1044 1377, 1389, 1393, 1399, 1407, 1409, 1412, 1415, 1420, 1422,
1045 1429, 1436, 1443, 1445, 1447, 1448, 1454, 1460, 1464, 1468,
1046 1472, 1476, 1477, 1479, 1481, 1483, 1485, 1487, 1488, 1492,
1047 1493, 1497, 1501, 1502, 1506, 1510, 1516, 1522, 1523, 1527,
1048 1531, 1532, 1536, 1540, 1541, 1545, 1549, 1553, 1559, 1565,
1049 1566, 1570, 1571, 1575, 1577, 1579, 1581, 1583, 1584, 1588,
1050 1592, 1596, 1602, 1608, 1610, 1612, 1614, 1615, 1619, 1620,
1051 1624, 1629, 1634, 1636, 1638, 1640, 1642, 1644, 1646, 1648,
1052 1650, 1654, 1658, 1662, 1666, 1672, 1678, 1684, 1690, 1694,
1053 1698, 1704, 1710, 1711, 1713, 1715, 1718, 1721, 1724, 1728,
1054 1730, 1736, 1742, 1746, 1749, 1752, 1755, 1759, 1761, 1763,
1055 1765, 1767, 1771, 1775, 1779, 1783, 1785, 1787, 1789, 1791,
1056 1795, 1797, 1799, 1803, 1805, 1807, 1811, 1814, 1817, 1819,
1057 1823, 1827, 1831, 1835, 1839, 1843, 1847, 1851, 1855, 1859
1058 };
1059
1060 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1061 static const short int yyrhs[] =
1062 {
1063 176, 0, -1, -1, 177, -1, 178, 161, -1, 178,
1064 78, 178, 78, 178, 161, -1, 178, 78, 178, 161,
1065 -1, 1, -1, 167, -1, 209, 180, -1, 209, 180,
1066 158, 209, 180, -1, 56, -1, 26, 98, 163, 208,
1067 179, 162, -1, 36, 98, 163, 208, 179, 162, -1,
1068 33, 98, 36, -1, 35, 98, 36, -1, 163, 26,
1069 158, 26, 162, 98, 3, 163, 26, 160, 220, 158,
1070 26, 160, 220, 162, 193, -1, 163, 26, 158, 26,
1071 162, 98, 4, 163, 26, 160, 220, 158, 26, 160,
1072 220, 162, 193, -1, 163, 26, 158, 26, 162, 98,
1073 9, 26, 160, 220, 193, -1, 163, 26, 158, 26,
1074 162, 98, 20, 26, 163, 192, 162, -1, 26, 98,
1075 34, 71, 35, 158, 26, 98, 32, 71, 33, -1,
1076 26, 98, 179, 71, 179, 158, 26, 98, 179, 70,
1077 179, 185, -1, 26, 98, 26, 202, 26, 158, 26,
1078 98, 26, 202, 26, 185, -1, 26, 98, 26, 201,
1079 26, 158, 26, 98, 26, 201, 26, 186, -1, 26,
1080 98, 77, 26, 190, -1, 206, 77, 179, -1, 32,
1081 98, 36, -1, 34, 98, 36, -1, 26, 98, 195,
1082 163, 26, 158, 26, 162, -1, 26, 98, 5, 163,
1083 26, 160, 220, 158, 26, 160, 220, 162, 194, -1,
1084 26, 98, 5, 163, 26, 160, 220, 158, 26, 160,
1085 220, 162, -1, 26, 98, 6, 163, 26, 160, 220,
1086 158, 26, 160, 220, 162, 203, -1, 26, 98, 7,
1087 163, 26, 160, 220, 158, 26, 160, 220, 162, 203,
1088 -1, 26, 98, 8, 163, 26, 160, 220, 158, 26,
1089 160, 220, 162, 204, -1, 26, 98, 10, 163, 26,
1090 158, 26, 162, -1, 36, 98, 36, 98, 22, 163,
1091 36, 162, 72, 36, 71, 22, 163, 36, 162, 72,
1092 36, -1, 26, 98, 26, 202, 26, 185, -1, 26,
1093 98, 200, 163, 26, 158, 26, 162, 190, -1, 206,
1094 70, 179, -1, 36, 98, 36, 202, 36, 185, -1,
1095 206, 206, 220, -1, 206, 179, 163, 126, 162, -1,
1096 36, 98, 26, 163, 138, 162, -1, 36, 98, 26,
1097 202, 26, 163, 141, 162, -1, 36, 98, 26, 202,
1098 26, 163, 142, 162, -1, 206, 179, -1, 206, 26,
1099 -1, 26, 98, 36, 187, -1, 36, 98, 220, -1,
1100 206, 220, -1, 26, 98, 220, 188, -1, 36, 98,
1101 26, -1, 26, 98, 26, 201, 26, 184, -1, 26,
1102 98, 29, 187, -1, 206, 77, 179, 158, 206, 77,
1103 179, -1, 206, 70, 179, 158, 206, 70, 179, -1,
1104 207, 179, 196, -1, 26, 103, 220, -1, 26, 104,
1105 26, 163, 132, 162, -1, 26, 103, 26, -1, 179,
1106 104, 179, 196, -1, 26, 104, 26, -1, 26, 104,
1107 220, -1, 26, 99, 26, -1, 12, 163, 26, 160,
1108 220, 158, 26, 160, 220, 162, 193, -1, 206, 179,
1109 163, 126, 162, 158, 206, 179, 163, 126, 162, -1,
1110 26, 98, 163, 26, 71, 26, 162, 91, 220, -1,
1111 26, 98, 26, 66, 26, -1, 26, 98, 26, 68,
1112 26, -1, 26, 98, 26, 71, 163, 26, 91, 220,
1113 162, -1, 28, 98, 179, 107, 179, -1, 28, 98,
1114 179, 112, 179, -1, 28, 98, 26, 112, 26, 197,
1115 -1, 28, 98, 26, 112, 220, 197, -1, 28, 98,
1116 26, 107, 26, -1, 28, 98, 26, 107, 220, -1,
1117 28, 98, 179, 106, 179, -1, 28, 98, 26, 106,
1118 26, 197, -1, 28, 98, 26, 106, 220, 197, -1,
1119 26, 98, 26, 65, 26, -1, 213, -1, 26, 98,
1120 26, -1, 28, 98, 26, -1, 26, 98, 28, -1,
1121 28, 105, 28, -1, 36, 98, 211, 180, -1, 26,
1122 98, 211, 180, -1, 36, 98, 211, 180, 158, 36,
1123 98, 211, 180, -1, 26, 98, 211, 180, 158, 26,
1124 98, 211, 180, -1, 206, 87, 179, 159, 36, -1,
1125 36, 98, 87, 36, 159, 36, 191, -1, 206, 179,
1126 91, 220, -1, 26, 98, 26, 91, 220, 189, -1,
1127 36, 98, 36, 91, 220, -1, 36, 98, 36, 91,
1128 220, 191, -1, 26, 98, 87, 26, 159, 36, 189,
1129 -1, 36, 98, 19, 163, 26, 158, 36, 162, 190,
1130 -1, 36, 98, 19, 163, 36, 158, 36, 162, -1,
1131 26, 98, 18, 163, 26, 158, 26, 162, -1, 26,
1132 98, 18, 163, 26, 158, 26, 162, 163, 133, 162,
1133 -1, 26, 98, 17, 163, 26, 158, 36, 162, 187,
1134 -1, 206, 179, 93, 220, -1, 206, 86, 179, 159,
1135 36, -1, 36, 98, 86, 36, 159, 36, -1, 26,
1136 98, 86, 26, 159, 36, 190, -1, 26, 98, 85,
1137 26, 159, 36, -1, 206, 179, 92, 220, -1, 26,
1138 98, 26, 92, 220, 190, -1, 36, 98, 36, 92,
1139 220, -1, 36, 98, 36, 93, 220, 191, -1, 26,
1140 98, 26, 93, 220, 189, -1, 36, 98, 21, 26,
1141 -1, 26, 98, 11, 163, 36, 158, 36, 162, -1,
1142 36, 98, 28, 98, 88, 163, 179, 158, 26, 162,
1143 -1, 36, 98, 28, 98, 69, 163, 179, 158, 26,
1144 162, -1, 36, 98, 28, 98, 69, 163, 179, 158,
1145 179, 158, 28, 162, -1, 206, 90, 179, 159, 36,
1146 -1, 26, 98, 90, 26, 159, 36, -1, 206, 90,
1147 179, 159, 220, -1, 26, 98, 90, 26, 159, 220,
1148 -1, 36, 98, 23, 179, -1, 36, 98, 23, 26,
1149 -1, 36, 98, 23, 36, -1, 36, 98, 16, 163,
1150 26, 162, 181, -1, 26, 98, 16, 163, 26, 158,
1151 26, 162, 181, -1, 150, 163, 26, 158, 26, 158,
1152 179, 162, 181, -1, 206, 88, 163, 179, 158, 179,
1153 158, 28, 162, -1, 147, 163, 26, 158, 220, 162,
1154 -1, 148, 163, 26, 158, 220, 162, -1, 146, 163,
1155 26, 158, 220, 162, -1, 28, 105, 149, 163, 26,
1156 158, 220, 162, -1, 28, 98, 149, 163, 26, 158,
1157 220, 162, -1, 157, 64, 28, 26, 98, 26, -1,
1158 157, 28, 26, 98, 26, -1, 157, 64, 28, 57,
1159 220, -1, 157, 64, 28, 57, 220, 163, 131, 162,
1160 -1, 157, 28, 57, 220, -1, 157, 28, 57, 220,
1161 163, 131, 162, -1, 37, -1, 39, -1, 38, -1,
1162 40, -1, 41, -1, 42, -1, 44, -1, 47, -1,
1163 48, -1, 49, -1, 46, 26, -1, 45, 26, -1,
1164 57, 163, 26, 162, -1, 60, 163, 26, 162, -1,
1165 60, 163, 27, 71, 26, 162, -1, 57, 163, 27,
1166 71, 26, 162, -1, 50, 220, -1, 51, 220, -1,
1167 120, 163, 26, 162, -1, 57, 220, -1, 58, 220,
1168 -1, 59, 220, -1, 59, 218, -1, 60, 220, -1,
1169 60, 218, -1, 97, 163, 26, 158, 26, 162, -1,
1170 96, 163, 26, 158, 26, 162, -1, 26, 98, 70,
1171 26, 189, -1, 26, 98, 63, 26, -1, 26, 95,
1172 26, -1, 26, 95, 220, -1, 26, 89, 26, -1,
1173 26, 94, 26, -1, 26, 94, 220, -1, 26, 89,
1174 220, -1, 114, 164, 26, 165, -1, 114, 199, -1,
1175 113, 164, 26, 165, -1, 113, 199, -1, 115, 164,
1176 26, 165, -1, 115, 199, -1, 116, 164, 26, 165,
1177 -1, 116, 199, -1, 123, 164, 26, 205, 165, 98,
1178 26, -1, 123, 164, 26, 202, 220, 165, 98, 26,
1179 -1, 124, 164, 26, 202, 220, 165, 98, 26, -1,
1180 124, 164, 26, 205, 165, 98, 26, -1, 124, 164,
1181 26, 205, 165, 98, 36, -1, 164, 26, 202, 220,
1182 165, 98, 26, -1, 26, 98, 124, 164, 26, 202,
1183 220, 165, 187, -1, 36, 98, 124, 164, 26, 205,
1184 165, -1, 26, 98, 124, 164, 26, 205, 165, 187,
1185 -1, 26, 98, 124, 164, 26, 84, 26, 165, 187,
1186 -1, 36, 98, 124, 164, 26, 84, 26, 165, -1,
1187 164, 26, 205, 165, 98, 26, -1, 164, 26, 84,
1188 26, 165, 98, 26, -1, 124, 164, 26, 84, 26,
1189 165, 98, 36, -1, 26, 98, 123, 164, 26, 202,
1190 220, 165, 187, -1, 26, 98, 123, 164, 26, 205,
1191 165, 187, -1, 26, 98, 164, 26, 84, 26, 165,
1192 -1, 26, 98, 164, 26, 202, 217, 165, -1, 26,
1193 98, 164, 26, 205, 165, -1, 220, 98, 220, -1,
1194 198, 98, 163, 26, 160, 220, 158, 26, 160, 220,
1195 162, -1, 198, 98, 163, 26, 160, 220, 162, -1,
1196 163, 26, 160, 220, 158, 26, 160, 220, 162, 98,
1197 199, -1, 163, 26, 160, 220, 162, 98, 199, -1,
1198 198, 98, 26, -1, 24, 220, -1, 25, -1, 52,
1199 163, 220, 158, 220, 162, 26, -1, 52, 163, 220,
1200 158, 220, 162, 26, 98, 26, -1, 52, 163, 220,
1201 158, 220, 162, 26, 98, 26, 92, 220, -1, 53,
1202 220, 26, -1, 53, 220, 26, 98, 26, -1, 53,
1203 220, 26, 98, 26, 92, 220, -1, 154, -1, 154,
1204 179, -1, 154, 26, -1, 156, 163, 26, 162, -1,
1205 153, -1, 155, 163, 36, 158, 220, 162, -1, 152,
1206 163, 26, 158, 220, 162, -1, 151, 163, 26, 158,
1207 220, 162, -1, 30, -1, 31, -1, -1, 163, 135,
1208 158, 136, 162, -1, 163, 136, 158, 135, 162, -1,
1209 163, 136, 162, -1, 163, 135, 162, -1, 163, 121,
1210 162, -1, 163, 122, 162, -1, -1, 126, -1, 127,
1211 -1, 128, -1, 121, -1, 122, -1, -1, 163, 182,
1212 162, -1, -1, 163, 125, 162, -1, 163, 126, 162,
1213 -1, -1, 163, 183, 162, -1, 163, 182, 162, -1,
1214 163, 183, 158, 182, 162, -1, 163, 182, 158, 183,
1215 162, -1, -1, 163, 134, 162, -1, 163, 133, 162,
1216 -1, -1, 163, 133, 162, -1, 163, 134, 162, -1,
1217 -1, 163, 125, 162, -1, 163, 126, 162, -1, 163,
1218 143, 162, -1, 163, 143, 158, 126, 162, -1, 163,
1219 126, 158, 143, 162, -1, -1, 163, 143, 162, -1,
1220 -1, 163, 126, 162, -1, 108, -1, 111, -1, 110,
1221 -1, 109, -1, -1, 163, 137, 162, -1, 163, 137,
1222 162, -1, 163, 136, 162, -1, 163, 136, 158, 137,
1223 162, -1, 163, 137, 158, 136, 162, -1, 13, -1,
1224 14, -1, 15, -1, -1, 163, 136, 162, -1, -1,
1225 163, 136, 162, -1, 164, 83, 26, 165, -1, 164,
1226 26, 84, 165, -1, 75, -1, 76, -1, 79, -1,
1227 80, -1, 81, -1, 82, -1, 71, -1, 70, -1,
1228 163, 140, 162, -1, 163, 129, 162, -1, 163, 139,
1229 162, -1, 163, 130, 162, -1, 163, 140, 158, 137,
1230 162, -1, 163, 129, 158, 137, 162, -1, 163, 139,
1231 158, 137, 162, -1, 163, 130, 158, 137, 162, -1,
1232 163, 144, 162, -1, 163, 145, 162, -1, 163, 144,
1233 158, 137, 162, -1, 163, 145, 158, 137, 162, -1,
1234 -1, 84, -1, 83, -1, 179, 98, -1, 179, 103,
1235 -1, 179, 104, -1, 26, 98, 179, -1, 210, -1,
1236 26, 98, 163, 210, 162, -1, 36, 98, 163, 210,
1237 162, -1, 36, 98, 179, -1, 206, 211, -1, 208,
1238 211, -1, 207, 211, -1, 36, 72, 36, -1, 98,
1239 -1, 100, -1, 102, -1, 101, -1, 28, 212, 166,
1240 -1, 28, 212, 143, -1, 166, 212, 28, -1, 143,
1241 212, 28, -1, 168, -1, 170, -1, 171, -1, 172,
1242 -1, 214, 173, 215, -1, 216, -1, 220, -1, 214,
1243 173, 174, -1, 169, -1, 214, -1, 163, 221, 162,
1244 -1, 63, 221, -1, 70, 221, -1, 221, -1, 221,
1245 72, 221, -1, 221, 73, 221, -1, 221, 67, 221,
1246 -1, 221, 71, 221, -1, 221, 70, 221, -1, 221,
1247 91, 221, -1, 221, 92, 221, -1, 221, 65, 221,
1248 -1, 221, 68, 221, -1, 221, 66, 221, -1, 219,
1249 -1
1250 };
1251
1252 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1253 static const unsigned short int yyrline[] =
1254 {
1255 0, 567, 567, 568, 580, 582, 615, 642, 653, 657,
1256 692, 712, 717, 727, 737, 742, 747, 763, 779, 791,
1257 801, 814, 833, 851, 874, 896, 901, 911, 922, 933,
1258 947, 962, 978, 994, 1010, 1021, 1035, 1061, 1079, 1084,
1259 1090, 1102, 1113, 1124, 1135, 1146, 1157, 1168, 1194, 1208,
1260 1218, 1263, 1282, 1293, 1304, 1315, 1326, 1337, 1353, 1370,
1261 1386, 1397, 1408, 1439, 1450, 1463, 1474, 1513, 1523, 1533,
1262 1553, 1563, 1573, 1583, 1594, 1602, 1612, 1622, 1633, 1657,
1263 1668, 1674, 1685, 1696, 1707, 1715, 1736, 1761, 1788, 1822,
1264 1836, 1847, 1861, 1895, 1905, 1915, 1940, 1952, 1970, 1981,
1265 1992, 2003, 2016, 2027, 2038, 2049, 2060, 2071, 2104, 2114,
1266 2127, 2147, 2158, 2169, 2182, 2195, 2206, 2217, 2228, 2239,
1267 2249, 2260, 2271, 2283, 2294, 2305, 2316, 2329, 2341, 2353,
1268 2364, 2375, 2386, 2398, 2410, 2421, 2432, 2443, 2453, 2459,
1269 2465, 2471, 2477, 2483, 2489, 2495, 2501, 2507, 2513, 2524,
1270 2535, 2546, 2557, 2568, 2579, 2590, 2596, 2607, 2618, 2629,
1271 2640, 2651, 2661, 2674, 2682, 2690, 2714, 2725, 2736, 2747,
1272 2758, 2769, 2781, 2794, 2803, 2814, 2825, 2837, 2848, 2859,
1273 2870, 2884, 2896, 2911, 2930, 2941, 2959, 2993, 3011, 3028,
1274 3039, 3050, 3061, 3082, 3101, 3114, 3128, 3140, 3156, 3196,
1275 3229, 3237, 3253, 3272, 3286, 3305, 3321, 3329, 3338, 3349,
1276 3361, 3375, 3383, 3393, 3405, 3410, 3415, 3421, 3429, 3435,
1277 3441, 3447, 3460, 3464, 3474, 3478, 3483, 3488, 3493, 3500,
1278 3504, 3511, 3515, 3520, 3525, 3533, 3537, 3544, 3548, 3556,
1279 3561, 3567, 3576, 3581, 3587, 3593, 3599, 3608, 3611, 3615,
1280 3622, 3625, 3629, 3636, 3641, 3647, 3653, 3659, 3664, 3672,
1281 3675, 3682, 3685, 3692, 3696, 3700, 3704, 3711, 3714, 3721,
1282 3726, 3733, 3740, 3752, 3756, 3760, 3767, 3770, 3780, 3783,
1283 3792, 3798, 3807, 3811, 3818, 3822, 3826, 3830, 3837, 3841,
1284 3848, 3856, 3864, 3872, 3880, 3887, 3894, 3902, 3912, 3917,
1285 3922, 3927, 3935, 3938, 3942, 3951, 3958, 3965, 3972, 3987,
1286 3993, 4001, 4009, 4027, 4034, 4041, 4051, 4064, 4068, 4072,
1287 4076, 4083, 4089, 4095, 4101, 4111, 4120, 4122, 4124, 4128,
1288 4136, 4140, 4147, 4153, 4159, 4163, 4167, 4171, 4177, 4183,
1289 4187, 4191, 4195, 4199, 4203, 4207, 4211, 4215, 4219, 4223
1290 };
1291 #endif
1292
1293 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1294 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1295 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1296 static const char *const yytname[] =
1297 {
1298 "$end", "error", "$undefined", "BYTEOP16P", "BYTEOP16M", "BYTEOP1P",
1299 "BYTEOP2P", "BYTEOP2M", "BYTEOP3P", "BYTEUNPACK", "BYTEPACK", "PACK",
1300 "SAA", "ALIGN8", "ALIGN16", "ALIGN24", "VIT_MAX", "EXTRACT", "DEPOSIT",
1301 "EXPADJ", "SEARCH", "ONES", "SIGN", "SIGNBITS", "LINK", "UNLINK", "REG",
1302 "PC", "CCREG", "BYTE_DREG", "REG_A_DOUBLE_ZERO", "REG_A_DOUBLE_ONE",
1303 "A_ZERO_DOT_L", "A_ZERO_DOT_H", "A_ONE_DOT_L", "A_ONE_DOT_H", "HALF_REG",
1304 "NOP", "RTI", "RTS", "RTX", "RTN", "RTE", "HLT", "IDLE", "STI", "CLI",
1305 "CSYNC", "SSYNC", "EMUEXCPT", "RAISE", "EXCPT", "LSETUP", "LOOP",
1306 "LOOP_BEGIN", "LOOP_END", "DISALGNEXCPT", "JUMP", "JUMP_DOT_S",
1307 "JUMP_DOT_L", "CALL", "ABORT", "NOT", "TILDA", "BANG", "AMPERSAND",
1308 "BAR", "PERCENT", "CARET", "BXOR", "MINUS", "PLUS", "STAR", "SLASH",
1309 "NEG", "MIN", "MAX", "ABS", "DOUBLE_BAR", "_PLUS_BAR_PLUS",
1310 "_PLUS_BAR_MINUS", "_MINUS_BAR_PLUS", "_MINUS_BAR_MINUS", "_MINUS_MINUS",
1311 "_PLUS_PLUS", "SHIFT", "LSHIFT", "ASHIFT", "BXORSHIFT",
1312 "_GREATER_GREATER_GREATER_THAN_ASSIGN", "ROT", "LESS_LESS",
1313 "GREATER_GREATER", "_GREATER_GREATER_GREATER", "_LESS_LESS_ASSIGN",
1314 "_GREATER_GREATER_ASSIGN", "DIVS", "DIVQ", "ASSIGN", "_STAR_ASSIGN",
1315 "_BAR_ASSIGN", "_CARET_ASSIGN", "_AMPERSAND_ASSIGN", "_MINUS_ASSIGN",
1316 "_PLUS_ASSIGN", "_ASSIGN_BANG", "_LESS_THAN_ASSIGN", "_ASSIGN_ASSIGN",
1317 "GE", "LT", "LE", "GT", "LESS_THAN", "FLUSHINV", "FLUSH", "IFLUSH",
1318 "PREFETCH", "PRNT", "OUTC", "WHATREG", "TESTSET", "ASL", "ASR", "B", "W",
1319 "NS", "S", "CO", "SCO", "TH", "TL", "BP", "BREV", "X", "Z", "M", "MMOD",
1320 "R", "RND", "RNDL", "RNDH", "RND12", "RND20", "V", "LO", "HI", "BITTGL",
1321 "BITCLR", "BITSET", "BITTST", "BITMUX", "DBGAL", "DBGAH", "DBGHALT",
1322 "DBG", "DBGA", "DBGCMPLX", "IF", "COMMA", "BY", "COLON", "SEMICOLON",
1323 "RPAREN", "LPAREN", "LBRACK", "RBRACK", "STATUS_REG", "MNOP", "SYMBOL",
1324 "NUMBER", "GOT", "GOT17M4", "FUNCDESC_GOT17M4", "AT", "PLTPC", "$accept",
1325 "statement", "asm", "asm_1", "REG_A", "opt_mode", "asr_asl", "sco",
1326 "asr_asl_0", "amod0", "amod1", "amod2", "xpmod", "xpmod1", "vsmod",
1327 "vmod", "smod", "searchmod", "aligndir", "byteop_mod", "c_align",
1328 "w32_or_nothing", "iu_or_nothing", "reg_with_predec", "reg_with_postinc",
1329 "min_max", "op_bar_op", "plus_minus", "rnd_op", "b3_op", "post_op",
1330 "a_assign", "a_minusassign", "a_plusassign", "assign_macfunc",
1331 "a_macfunc", "multiply_halfregs", "cc_op", "ccstat", "symbol",
1332 "any_gotrel", "got", "got_or_expr", "pltpc", "eterm", "expr", "expr_1", 0
1333 };
1334 #endif
1335
1336 # ifdef YYPRINT
1337 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1338 token YYLEX-NUM. */
1339 static const unsigned short int yytoknum[] =
1340 {
1341 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1342 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1343 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1344 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1345 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1346 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1347 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1348 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1349 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1350 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1351 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1352 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1353 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1354 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1355 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1356 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
1357 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1358 425, 426, 427, 428, 429
1359 };
1360 # endif
1361
1362 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1363 static const unsigned char yyr1[] =
1364 {
1365 0, 175, 176, 176, 177, 177, 177, 177, 178, 178,
1366 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1367 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1368 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1369 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1370 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1371 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1372 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1373 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1374 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1375 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1376 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1377 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1378 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1379 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1380 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1381 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1382 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1383 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1384 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1385 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1386 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1387 178, 178, 179, 179, 180, 180, 180, 180, 180, 181,
1388 181, 182, 182, 182, 182, 183, 183, 184, 184, 185,
1389 185, 185, 186, 186, 186, 186, 186, 187, 187, 187,
1390 188, 188, 188, 189, 189, 189, 189, 189, 189, 190,
1391 190, 191, 191, 192, 192, 192, 192, 193, 193, 194,
1392 194, 194, 194, 195, 195, 195, 196, 196, 197, 197,
1393 198, 199, 200, 200, 201, 201, 201, 201, 202, 202,
1394 203, 203, 203, 203, 203, 203, 203, 203, 204, 204,
1395 204, 204, 205, 205, 205, 206, 207, 208, 209, 209,
1396 209, 209, 209, 210, 210, 210, 211, 212, 212, 212,
1397 212, 213, 213, 213, 213, 214, 215, 215, 215, 216,
1398 217, 217, 218, 219, 219, 219, 219, 219, 220, 221,
1399 221, 221, 221, 221, 221, 221, 221, 221, 221, 221
1400 };
1401
1402 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1403 static const unsigned char yyr2[] =
1404 {
1405 0, 2, 0, 1, 2, 6, 4, 1, 1, 2,
1406 5, 1, 6, 6, 3, 3, 17, 17, 11, 11,
1407 11, 12, 12, 12, 5, 3, 3, 3, 8, 13,
1408 12, 13, 13, 13, 8, 17, 6, 9, 3, 6,
1409 3, 5, 6, 8, 8, 2, 2, 4, 3, 2,
1410 4, 3, 6, 4, 7, 7, 3, 3, 6, 3,
1411 4, 3, 3, 3, 11, 11, 9, 5, 5, 9,
1412 5, 5, 6, 6, 5, 5, 5, 6, 6, 5,
1413 1, 3, 3, 3, 3, 4, 4, 9, 9, 5,
1414 7, 4, 6, 5, 6, 7, 9, 8, 8, 11,
1415 9, 4, 5, 6, 7, 6, 4, 6, 5, 6,
1416 6, 4, 8, 10, 10, 12, 5, 6, 5, 6,
1417 4, 4, 4, 7, 9, 9, 9, 6, 6, 6,
1418 8, 8, 6, 5, 5, 8, 4, 7, 1, 1,
1419 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1420 4, 4, 6, 6, 2, 2, 4, 2, 2, 2,
1421 2, 2, 2, 6, 6, 5, 4, 3, 3, 3,
1422 3, 3, 3, 4, 2, 4, 2, 4, 2, 4,
1423 2, 7, 8, 8, 7, 7, 7, 9, 7, 8,
1424 9, 8, 6, 7, 8, 9, 8, 7, 7, 6,
1425 3, 11, 7, 11, 7, 3, 2, 1, 7, 9,
1426 11, 3, 5, 7, 1, 2, 2, 4, 1, 6,
1427 6, 6, 1, 1, 0, 5, 5, 3, 3, 3,
1428 3, 0, 1, 1, 1, 1, 1, 0, 3, 0,
1429 3, 3, 0, 3, 3, 5, 5, 0, 3, 3,
1430 0, 3, 3, 0, 3, 3, 3, 5, 5, 0,
1431 3, 0, 3, 1, 1, 1, 1, 0, 3, 3,
1432 3, 5, 5, 1, 1, 1, 0, 3, 0, 3,
1433 4, 4, 1, 1, 1, 1, 1, 1, 1, 1,
1434 3, 3, 3, 3, 5, 5, 5, 5, 3, 3,
1435 5, 5, 0, 1, 1, 2, 2, 2, 3, 1,
1436 5, 5, 3, 2, 2, 2, 3, 1, 1, 1,
1437 1, 3, 3, 3, 3, 1, 1, 1, 1, 3,
1438 1, 1, 3, 1, 1, 3, 2, 2, 1, 3,
1439 3, 3, 3, 3, 3, 3, 3, 3, 3, 1
1440 };
1441
1442 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1443 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1444 means the default is an error. */
1445 static const unsigned short int yydefact[] =
1446 {
1447 0, 7, 0, 0, 207, 0, 0, 222, 223, 0,
1448 0, 0, 0, 0, 138, 140, 139, 141, 142, 143,
1449 144, 0, 0, 145, 146, 147, 0, 0, 0, 0,
1450 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1451 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1452 0, 0, 0, 218, 214, 0, 0, 0, 0, 0,
1453 0, 8, 325, 333, 0, 3, 0, 0, 0, 0,
1454 0, 0, 224, 309, 80, 334, 349, 0, 338, 0,
1455 0, 206, 0, 0, 0, 0, 0, 0, 0, 317,
1456 318, 320, 319, 0, 0, 0, 0, 0, 0, 0,
1457 149, 148, 154, 155, 0, 0, 0, 157, 158, 334,
1458 160, 159, 0, 162, 161, 336, 337, 0, 0, 0,
1459 176, 0, 174, 0, 178, 0, 180, 0, 0, 0,
1460 317, 0, 0, 0, 0, 0, 0, 0, 216, 215,
1461 0, 0, 0, 0, 0, 0, 302, 0, 0, 1,
1462 0, 4, 305, 306, 307, 0, 46, 0, 0, 0,
1463 0, 0, 0, 0, 45, 0, 313, 49, 276, 315,
1464 314, 0, 9, 0, 0, 0, 0, 0, 0, 0,
1465 0, 0, 0, 0, 0, 169, 172, 170, 171, 167,
1466 168, 0, 0, 0, 0, 0, 0, 273, 274, 275,
1467 0, 0, 0, 81, 83, 247, 0, 247, 0, 0,
1468 282, 283, 0, 0, 0, 0, 0, 0, 0, 0,
1469 0, 308, 0, 0, 224, 250, 63, 59, 57, 61,
1470 62, 82, 0, 0, 84, 0, 322, 321, 26, 14,
1471 27, 15, 0, 0, 0, 0, 51, 0, 0, 0,
1472 0, 0, 0, 312, 224, 48, 0, 211, 0, 0,
1473 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1474 302, 302, 324, 0, 0, 0, 0, 0, 0, 0,
1475 0, 0, 0, 0, 0, 0, 335, 289, 288, 304,
1476 303, 0, 0, 0, 323, 0, 276, 205, 0, 0,
1477 38, 25, 0, 0, 0, 0, 0, 0, 0, 0,
1478 40, 0, 56, 0, 0, 0, 200, 346, 348, 341,
1479 347, 343, 342, 339, 340, 344, 345, 0, 0, 0,
1480 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1481 288, 284, 285, 286, 287, 0, 0, 0, 0, 0,
1482 0, 53, 0, 47, 166, 253, 259, 0, 0, 0,
1483 0, 0, 0, 0, 0, 0, 0, 0, 0, 302,
1484 0, 0, 0, 86, 0, 50, 0, 0, 0, 0,
1485 0, 0, 0, 0, 0, 0, 0, 111, 121, 122,
1486 120, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1487 0, 0, 0, 0, 85, 0, 0, 150, 0, 332,
1488 151, 0, 0, 0, 0, 175, 173, 177, 179, 156,
1489 303, 0, 0, 303, 0, 0, 0, 0, 0, 0,
1490 0, 0, 0, 217, 0, 136, 0, 0, 0, 0,
1491 0, 0, 0, 280, 0, 6, 60, 0, 316, 0,
1492 0, 0, 0, 0, 0, 91, 106, 101, 0, 0,
1493 0, 228, 0, 227, 0, 0, 224, 0, 0, 0,
1494 0, 0, 0, 0, 0, 0, 0, 79, 67, 68,
1495 0, 253, 259, 253, 237, 239, 0, 0, 0, 0,
1496 165, 0, 24, 0, 0, 0, 0, 302, 302, 0,
1497 307, 0, 310, 303, 0, 0, 0, 0, 0, 0,
1498 0, 0, 0, 278, 278, 74, 75, 278, 278, 0,
1499 76, 70, 71, 0, 0, 0, 0, 0, 0, 0,
1500 0, 93, 108, 261, 0, 239, 0, 0, 302, 0,
1501 311, 0, 0, 212, 0, 0, 0, 0, 281, 0,
1502 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1503 0, 133, 0, 0, 134, 0, 0, 0, 0, 0,
1504 0, 0, 0, 0, 0, 0, 102, 89, 0, 116,
1505 118, 41, 277, 0, 0, 0, 0, 10, 0, 0,
1506 0, 0, 0, 0, 0, 0, 0, 0, 0, 92,
1507 107, 110, 0, 231, 52, 0, 0, 36, 249, 248,
1508 0, 0, 0, 0, 0, 105, 259, 253, 117, 119,
1509 0, 0, 303, 0, 0, 0, 12, 0, 334, 330,
1510 0, 331, 199, 0, 0, 0, 0, 251, 252, 58,
1511 0, 77, 78, 72, 73, 0, 0, 0, 0, 0,
1512 42, 0, 0, 0, 0, 94, 109, 0, 39, 103,
1513 261, 303, 0, 13, 0, 0, 0, 153, 152, 164,
1514 163, 0, 0, 0, 0, 0, 129, 127, 128, 0,
1515 221, 220, 219, 0, 132, 0, 0, 0, 0, 0,
1516 0, 192, 5, 0, 0, 0, 0, 0, 225, 226,
1517 0, 308, 0, 0, 0, 0, 0, 0, 0, 0,
1518 0, 0, 0, 0, 0, 232, 233, 234, 0, 0,
1519 0, 0, 0, 254, 0, 255, 0, 256, 260, 104,
1520 95, 0, 247, 0, 0, 247, 0, 197, 0, 198,
1521 0, 0, 0, 0, 0, 0, 0, 0, 123, 0,
1522 0, 0, 0, 0, 0, 0, 0, 90, 0, 188,
1523 0, 208, 213, 0, 181, 0, 0, 184, 185, 0,
1524 137, 0, 0, 0, 0, 0, 0, 0, 204, 193,
1525 186, 0, 202, 55, 54, 0, 0, 0, 0, 0,
1526 0, 0, 34, 112, 0, 247, 98, 0, 0, 238,
1527 0, 240, 241, 0, 0, 0, 247, 196, 247, 247,
1528 189, 0, 326, 327, 328, 329, 0, 28, 259, 224,
1529 279, 131, 130, 0, 0, 259, 97, 43, 44, 0,
1530 0, 262, 0, 191, 224, 0, 182, 194, 183, 0,
1531 135, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1532 0, 0, 0, 0, 0, 124, 100, 0, 69, 0,
1533 0, 0, 258, 257, 195, 190, 187, 66, 0, 37,
1534 88, 229, 230, 96, 0, 0, 0, 0, 87, 209,
1535 125, 0, 0, 0, 0, 0, 0, 126, 0, 267,
1536 0, 0, 0, 0, 0, 0, 0, 0, 0, 114,
1537 0, 113, 0, 0, 0, 0, 267, 263, 266, 265,
1538 264, 0, 0, 0, 0, 0, 64, 0, 0, 0,
1539 0, 99, 242, 239, 20, 239, 0, 0, 210, 0,
1540 0, 18, 19, 203, 201, 65, 0, 30, 0, 0,
1541 0, 231, 23, 22, 21, 115, 0, 0, 0, 268,
1542 0, 29, 0, 31, 32, 0, 33, 235, 236, 0,
1543 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1544 0, 0, 0, 244, 231, 243, 0, 0, 0, 0,
1545 270, 0, 269, 0, 291, 0, 293, 0, 292, 0,
1546 290, 0, 298, 0, 299, 0, 0, 0, 0, 0,
1547 0, 0, 0, 0, 0, 0, 0, 0, 246, 245,
1548 0, 267, 267, 271, 272, 295, 297, 296, 294, 300,
1549 301, 35, 16, 17
1550 };
1551
1552 /* YYDEFGOTO[NTERM-NUM]. */
1553 static const short int yydefgoto[] =
1554 {
1555 -1, 64, 65, 66, 364, 172, 748, 718, 960, 604,
1556 607, 942, 351, 375, 490, 492, 655, 911, 916, 951,
1557 222, 312, 641, 68, 120, 223, 348, 291, 953, 956,
1558 292, 365, 366, 71, 72, 73, 170, 94, 74, 75,
1559 815, 629, 630, 110, 76, 77, 78
1560 };
1561
1562 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1563 STATE-NUM. */
1564 #define YYPACT_NINF -903
1565 static const short int yypact[] =
1566 {
1567 697, -903, -94, 277, -903, 676, 315, -903, -903, 23,
1568 32, 41, 58, 65, -903, -903, -903, -903, -903, -903,
1569 -903, 121, 158, -903, -903, -903, 277, 277, 29, 277,
1570 -903, 318, 277, 277, 320, 277, 277, 94, 100, 64,
1571 104, 108, 131, 137, 152, 165, 376, 160, 171, 176,
1572 182, 219, 238, -903, 566, 244, 251, 79, 96, 44,
1573 376, -903, -903, -903, 350, -903, -57, 187, 337, 63,
1574 245, 394, 278, -903, -903, -903, -903, 349, 563, 436,
1575 277, -903, 146, 159, 167, 489, 438, 186, 188, 37,
1576 -903, -903, -903, 15, -118, 446, 462, 480, 485, 28,
1577 -903, -903, -903, -903, 277, 513, 50, -903, -903, 353,
1578 -903, -903, 85, -903, -903, -903, -903, 521, 534, 537,
1579 -903, 542, -903, 567, -903, 575, -903, 578, 583, 585,
1580 -903, 619, 590, 598, 630, 651, 656, 680, -903, -903,
1581 677, 693, 62, 692, 204, 470, 200, 698, 712, -903,
1582 886, -903, -903, -903, 180, -6, -903, 419, 302, 180,
1583 180, 180, 589, 180, 97, 277, -903, -903, 595, -903,
1584 -903, 297, 568, 277, 277, 277, 277, 277, 277, 277,
1585 277, 277, 277, 277, 591, -903, -903, -903, -903, -903,
1586 -903, 599, 600, 601, 603, 605, 606, -903, -903, -903,
1587 609, 613, 614, 580, -903, 615, 688, -38, 210, 226,
1588 -903, -903, 735, 755, 756, 757, 759, 622, 623, 98,
1589 762, 718, 627, 628, 278, 629, -903, -903, -903, 632,
1590 -903, 205, 633, 332, -903, 634, -903, -903, -903, -903,
1591 -903, -903, 635, 636, 774, 449, -25, 703, 227, 766,
1592 768, 641, 302, -903, 278, -903, 648, 709, 647, 743,
1593 642, 653, 747, 661, 664, -62, -31, -19, 16, 662,
1594 326, 372, -903, 665, 667, 668, 669, 670, 671, 672,
1595 673, 733, 277, 84, 806, 277, -903, -903, -903, -903,
1596 808, 277, 674, 690, -903, -16, 595, -903, 810, 801,
1597 683, 684, 679, 699, 180, 700, 277, 277, 277, 730,
1598 -903, 721, -903, -26, 116, 520, -903, 441, 616, -903,
1599 457, 313, 313, -903, -903, 500, 500, 277, 836, 841,
1600 842, 843, 844, 835, 846, 848, 849, 850, 851, 852,
1601 716, -903, -903, -903, -903, 277, 277, 277, 855, 856,
1602 316, -903, 857, -903, -903, 722, 723, 725, 732, 734,
1603 736, 868, 870, 826, 487, 394, 394, 245, 737, 389,
1604 180, 877, 878, 748, 324, -903, 773, 243, 268, 300,
1605 881, 180, 180, 180, 882, 883, 189, -903, -903, -903,
1606 -903, 775, 903, 110, 277, 277, 277, 918, 905, 788,
1607 789, 924, 245, 790, 793, 277, 927, -903, 928, -903,
1608 -903, 929, 931, 932, 794, -903, -903, -903, -903, -903,
1609 -903, 277, 795, 935, 277, 797, 277, 277, 277, 937,
1610 277, 277, 277, -903, 938, 802, 869, 277, 804, 179,
1611 803, 805, 871, -903, 886, -903, -903, 811, -903, 180,
1612 180, 936, 940, 815, 72, -903, -903, -903, 816, 817,
1613 845, -903, 853, -903, 879, 887, 278, 822, 824, 827,
1614 829, 830, 828, 833, 834, 837, 838, -903, -903, -903,
1615 967, 722, 723, 722, -66, 92, 832, 854, 839, 95,
1616 -903, 860, -903, 962, 968, 969, 124, 326, 474, 981,
1617 -903, 858, -903, 982, 277, 847, 859, 861, 863, 985,
1618 862, 864, 865, 867, 867, -903, -903, 867, 867, 873,
1619 -903, -903, -903, 888, 866, 889, 890, 894, 872, 895,
1620 896, 897, -903, 897, 898, 899, 977, 978, 426, 901,
1621 -903, 979, 902, 926, 904, 906, 907, 908, -903, 880,
1622 925, 892, 900, 946, 909, 910, 911, 893, 912, 913,
1623 914, -903, 891, 999, 915, 983, 1041, 984, 986, 987,
1624 1051, 919, 277, 988, 1009, 1006, -903, -903, 180, -903,
1625 -903, 930, -903, 933, 934, 2, 6, -903, 1061, 277,
1626 277, 277, 277, 1063, 1054, 1065, 1056, 1067, 1003, -903,
1627 -903, -903, 1071, 427, -903, 1072, 455, -903, -903, -903,
1628 1073, 939, 190, 209, 941, -903, 723, 722, -903, -903,
1629 277, 942, 1074, 277, 943, 944, -903, 945, 947, -903,
1630 948, -903, -903, 1076, 1078, 1079, 1011, -903, -903, -903,
1631 975, -903, -903, -903, -903, 277, 277, 949, 1080, 1081,
1632 -903, 497, 180, 180, 989, -903, -903, 1082, -903, -903,
1633 897, 1088, 954, -903, 1023, 1096, 277, -903, -903, -903,
1634 -903, 1025, 1098, 1027, 1028, 191, -903, -903, -903, 180,
1635 -903, -903, -903, 965, -903, 997, 357, 970, 971, 1103,
1636 1105, -903, -903, 246, 180, 180, 974, 180, -903, -903,
1637 180, -903, 180, 973, 976, 980, 990, 991, 992, 993,
1638 994, 995, 996, 277, 1038, -903, -903, -903, 998, 1039,
1639 1000, 1001, 1042, -903, 1002, -903, 1013, -903, -903, -903,
1640 -903, 1004, 615, 1005, 1007, 615, 1050, -903, 533, -903,
1641 1044, 1012, 1014, 394, 1015, 1016, 1017, 477, -903, 1018,
1642 1019, 1020, 1021, 1008, 1010, 1022, 1024, -903, 1026, -903,
1643 394, 1045, -903, 1118, -903, 1110, 1121, -903, -903, 1030,
1644 -903, 1031, 1032, 1033, 1124, 1125, 277, 1126, -903, -903,
1645 -903, 1127, -903, -903, -903, 1131, 180, 277, 1135, 1138,
1646 1139, 1141, -903, -903, 949, 615, 1034, 1036, 1145, -903,
1647 1147, -903, -903, 1143, 1037, 1040, 615, -903, 615, 615,
1648 -903, 277, -903, -903, -903, -903, 180, -903, 723, 278,
1649 -903, -903, -903, 1043, 1046, 723, -903, -903, -903, 588,
1650 1159, -903, 1115, -903, 278, 1162, -903, -903, -903, 949,
1651 -903, 1163, 1164, 1047, 1048, 1052, 1116, 1049, 1053, 1055,
1652 1057, 1060, 1062, 1064, 1066, -903, -903, 1068, -903, 586,
1653 624, 1123, -903, -903, -903, -903, -903, -903, 1133, -903,
1654 -903, -903, -903, -903, 1059, 1058, 1069, 1168, -903, 1114,
1655 -903, 1070, 1075, 277, 582, 1112, 277, -903, 1086, 1077,
1656 277, 277, 277, 277, 1083, 1187, 1191, 1190, 180, -903,
1657 1197, -903, 1156, 277, 277, 277, 1077, -903, -903, -903,
1658 -903, 1084, 971, 1085, 1087, 1091, -903, 1089, 1090, 1092,
1659 1093, -903, 1094, 899, -903, 899, 1097, 1207, -903, 1095,
1660 1100, -903, -903, -903, -903, -903, 1099, 1101, 1102, 1102,
1661 1104, 456, -903, -903, -903, -903, 1106, 1206, 1208, -903,
1662 579, -903, 229, -903, -903, 555, -903, -903, -903, 264,
1663 448, 1200, 1108, 1111, 463, 464, 465, 479, 482, 516,
1664 517, 518, 596, -903, 427, -903, 1113, 277, 277, 1107,
1665 -903, 1120, -903, 1129, -903, 1136, -903, 1137, -903, 1140,
1666 -903, 1142, -903, 1144, -903, 1122, 1128, 1161, 1130, 1132,
1667 1134, 1146, 1148, 1149, 1150, 1151, 1152, 1153, -903, -903,
1668 1201, 1077, 1077, -903, -903, -903, -903, -903, -903, -903,
1669 -903, -903, -903, -903
1670 };
1671
1672 /* YYPGOTO[NTERM-NUM]. */
1673 static const short int yypgoto[] =
1674 {
1675 -903, -903, -903, -134, 17, -219, -716, -902, 266, -903,
1676 -520, -903, -201, -903, -443, -472, -478, -903, -788, -903,
1677 -903, 952, -275, -903, -39, -903, 380, -196, 303, -903,
1678 -252, 4, 8, -162, 955, -210, -58, 49, -903, -20,
1679 -903, -903, -903, 1209, -903, -3, 25
1680 };
1681
1682 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1683 positive, shift that token. If negative, reduce the rule which
1684 number is the opposite. If zero, do what YYDEFACT says.
1685 If YYTABLE_NINF, syntax error. */
1686 #define YYTABLE_NINF -3
1687 static const short int yytable[] =
1688 {
1689 81, 122, 124, 126, 69, 373, 353, 349, 70, 368,
1690 600, 166, 169, 109, 109, 658, 295, 67, 422, 425,
1691 297, 150, 414, 102, 103, 236, 105, 224, 107, 108,
1692 111, 114, 7, 8, 299, 404, 7, 8, 599, 959,
1693 601, 254, 403, 234, 242, 287, 288, 243, 237, 244,
1694 392, 245, 398, 414, 246, 656, 247, 367, 7, 8,
1695 115, 116, 444, 231, 248, 414, 167, 7, 8, 79,
1696 146, 139, 996, 165, 421, 424, 258, 259, 855, 186,
1697 188, 190, 225, 145, 228, 230, 164, 168, 281, 156,
1698 402, 35, 602, 7, 8, 131, 255, 603, 36, 157,
1699 414, 256, 221, 415, 151, 145, 233, 142, 579, 148,
1700 436, 261, 262, 35, 249, 250, 253, 505, 931, 282,
1701 36, 95, 144, 880, 363, 350, 35, 147, 7, 8,
1702 96, 145, 460, 158, 416, 35, 461, 145, 391, 97,
1703 159, 437, 36, 143, 729, 445, 417, 100, 35, 160,
1704 161, 162, 251, 163, 69, 36, 98, 298, 70, 35,
1705 618, 35, 310, 99, 235, 700, 36, 67, 36, 702,
1706 316, 296, 185, 504, 730, 300, 301, 302, 303, 529,
1707 305, 418, 757, 116, 101, 187, 232, 35, 306, 307,
1708 308, 252, 104, 189, 36, 152, 62, 63, 530, 317,
1709 318, 319, 320, 321, 322, 323, 324, 325, 326, 35,
1710 7, 8, 227, 80, 229, 525, 36, 767, 62, 63,
1711 611, 612, 35, 1022, 1023, 526, 80, 768, 119, 36,
1712 35, 62, 63, 115, 116, 80, 354, 36, 613, 642,
1713 62, 63, 643, 644, 145, 621, 624, 587, 80, 35,
1714 605, 35, 355, 62, 63, 606, 36, 117, 36, 80,
1715 309, 80, 390, 118, 62, 63, 62, 63, 121, 513,
1716 287, 288, 123, 35, 462, 7, 8, 145, 463, 435,
1717 36, 157, 439, 289, 290, 152, 662, 80, 441, 35,
1718 153, 154, 62, 63, 515, 125, 36, 287, 288, 299,
1719 127, 620, 623, 455, 456, 457, 35, 166, 169, 80,
1720 571, 377, 378, 36, 62, 63, 128, 379, 394, 395,
1721 396, 453, 80, 132, 467, 397, 517, 62, 63, 129,
1722 80, 35, 7, 8, 133, 62, 63, 566, 36, 134,
1723 35, 567, 481, 482, 483, 135, 869, 36, 724, 80,
1724 149, 80, 725, 873, 62, 63, 62, 63, 966, 967,
1725 772, 773, 284, 35, 285, 35, 774, 726, 968, 969,
1726 36, 727, 36, 80, 514, 516, 518, 775, 62, 63,
1727 176, 35, 136, 35, 501, 180, 181, 506, 36, 80,
1728 36, 531, 532, 533, 62, 63, 287, 288, 520, 521,
1729 522, 137, 542, 943, 781, 944, 80, 140, 782, 289,
1730 420, 62, 63, 89, 141, 90, 91, 92, 549, 539,
1731 93, 552, 972, 554, 555, 556, 973, 558, 559, 560,
1732 157, 80, 313, 314, 564, 155, 62, 63, 381, 382,
1733 80, 171, 287, 288, 383, 62, 63, 173, 69, 486,
1734 487, 580, 70, 574, 575, 289, 423, 510, 511, 287,
1735 288, 67, 184, 80, 226, 80, 573, 573, 62, 63,
1736 62, 63, 289, 503, 130, 388, 90, 91, 92, 7,
1737 8, 106, 238, 112, 628, 389, 62, 63, 62, 63,
1738 368, 299, 403, 619, 191, 192, 193, 194, 239, 195,
1739 196, 631, 197, 198, 199, 200, 201, 202, 176, 289,
1740 661, 178, 179, 180, 181, 203, 240, 204, 205, 7,
1741 8, 241, 174, 206, 176, 207, 260, 178, 179, 180,
1742 181, 807, 182, 183, 810, 174, 175, 176, 177, 257,
1743 178, 179, 180, 181, 287, 288, 464, 263, 182, 183,
1744 7, 8, 208, 715, 716, 717, 465, 289, 622, 209,
1745 264, 182, 183, 265, 210, 211, 212, 176, 266, 693,
1746 178, 179, 180, 181, 213, 214, 215, 957, 958, 216,
1747 720, 721, 715, 716, 717, 152, 704, 705, 706, 707,
1748 153, 500, 138, 267, 856, 696, 7, 8, 823, 824,
1749 870, 268, 701, 253, 269, 864, 974, 865, 866, 270,
1750 975, 271, 217, 218, 874, 878, 273, 731, 7, 8,
1751 734, 979, 981, 983, 274, 980, 982, 984, 174, 175,
1752 176, 177, 286, 178, 179, 180, 181, 985, 751, 752,
1753 987, 986, 745, 746, 988, 337, 338, 272, 339, 778,
1754 287, 340, 219, 220, 182, 183, 275, 62, 63, 341,
1755 342, 343, 344, 762, 896, 341, 342, 343, 344, 753,
1756 754, 345, 346, 347, 989, 991, 993, 276, 990, 992,
1757 994, 174, 277, 176, 177, 819, 178, 179, 180, 181,
1758 907, 908, 909, 910, 287, 288, 769, -2, 1, 970,
1759 971, 786, 834, 812, 813, 814, 278, 182, 183, 2,
1760 797, 783, 784, 279, 573, 964, 965, 957, 958, 280,
1761 283, 3, 4, 5, 293, 6, 315, 7, 8, 9,
1762 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1763 294, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1764 29, 327, 304, 30, 31, 32, 33, 34, 311, 352,
1765 35, 356, 328, 329, 330, 82, 331, 36, 332, 333,
1766 83, 84, 334, 845, 85, 86, 335, 336, 350, 87,
1767 88, 357, 358, 359, 850, 360, 361, 362, 369, 370,
1768 371, 372, 374, 37, 38, 376, 380, 384, 385, 386,
1769 387, 393, 399, 849, 400, 401, 405, 406, 867, 407,
1770 39, 40, 41, 42, 408, 410, 409, 43, 411, 412,
1771 44, 45, 413, 426, 419, 427, 428, 429, 430, 431,
1772 432, 434, 438, 868, 440, 433, 447, 448, 451, 442,
1773 46, 449, 450, 47, 48, 49, 875, 50, 51, 52,
1774 53, 54, 55, 56, 57, 443, 458, 459, 452, 454,
1775 58, 59, 468, 60, 61, 62, 63, 469, 470, 471,
1776 472, 473, 474, 933, 475, 476, 477, 478, 479, 480,
1777 906, 484, 485, 913, 493, 489, 491, 917, 918, 919,
1778 920, 494, 488, 495, 497, 496, 498, 499, 2, 502,
1779 928, 929, 930, 507, 508, 512, 509, 519, 523, 524,
1780 3, 4, 5, 527, 6, 925, 7, 8, 9, 10,
1781 11, 12, 13, 14, 15, 16, 17, 18, 19, 528,
1782 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1783 534, 535, 30, 31, 32, 33, 34, 536, 537, 35,
1784 538, 541, 540, 543, 544, 545, 36, 546, 547, 548,
1785 550, 551, 553, 557, 561, 562, 565, 563, 568, 570,
1786 569, 572, 576, 578, 998, 999, 577, 585, 581, 582,
1787 588, 583, 37, 38, 589, 586, 593, 590, 584, 591,
1788 592, 594, 595, 598, 608, 596, 597, 610, 615, 39,
1789 40, 41, 42, 614, 616, 617, 43, 625, 627, 44,
1790 45, 636, 632, 659, 660, 664, 609, 633, 666, 634,
1791 626, 635, 683, 672, 637, 684, 638, 639, 647, 46,
1792 640, 645, 47, 48, 49, 651, 50, 51, 52, 53,
1793 54, 55, 56, 57, 675, 671, 646, 648, 649, 58,
1794 59, 679, 60, 61, 62, 63, 650, 673, 652, 653,
1795 654, 657, 606, 663, 665, 674, 667, 687, 668, 669,
1796 670, 676, 677, 678, 680, 681, 682, 691, 685, 694,
1797 692, 686, 688, 695, 689, 690, 152, 703, 697, 708,
1798 709, 710, 711, 712, 713, 698, 699, 714, 719, 722,
1799 733, 723, 740, 728, 741, 742, 736, 732, 735, 743,
1800 737, 744, 747, 739, 758, 755, 749, 750, 756, 759,
1801 738, 760, 761, 763, 764, 765, 766, 770, 771, 779,
1802 776, 780, 785, 787, 788, 777, 798, 800, 789, 805,
1803 803, 811, 816, 835, 836, 804, 837, 838, 790, 791,
1804 843, 844, 846, 847, 792, 793, 794, 795, 796, 848,
1805 799, 851, 801, 802, 852, 853, 829, 854, 830, 806,
1806 808, 859, 809, 860, 817, 861, 818, 820, 821, 822,
1807 825, 826, 827, 828, 831, 876, 832, 877, 879, 881,
1808 882, 833, 839, 840, 897, 841, 842, 857, 858, 862,
1809 414, 894, 863, 898, 902, 871, 903, 883, 872, 886,
1810 912, 884, 914, 922, 885, 887, 900, 923, 888, 889,
1811 890, 899, 891, 924, 892, 926, 893, 927, 936, 946,
1812 904, 901, 962, 1010, 963, 905, 976, 1021, 995, 895,
1813 915, 0, 954, 113, 1000, 921, 932, 934, 446, 935,
1814 0, 937, 938, 947, 939, 940, 1001, 941, 948, 945,
1815 0, 949, 0, 0, 950, 952, 1002, 955, 977, 961,
1816 466, 978, 0, 1003, 1004, 997, 0, 1005, 0, 1006,
1817 0, 1007, 0, 0, 1008, 0, 0, 0, 0, 0,
1818 1009, 0, 1011, 0, 1012, 0, 1013, 0, 0, 0,
1819 0, 0, 0, 0, 0, 0, 0, 0, 1014, 0,
1820 1015, 1016, 1017, 1018, 1019, 1020
1821 };
1822
1823 static const short int yycheck[] =
1824 {
1825 3, 40, 41, 42, 0, 224, 207, 203, 0, 219,
1826 482, 69, 70, 33, 34, 535, 150, 0, 270, 271,
1827 26, 78, 84, 26, 27, 143, 29, 85, 31, 32,
1828 33, 34, 30, 31, 72, 254, 30, 31, 481, 941,
1829 483, 99, 252, 28, 16, 70, 71, 19, 166, 21,
1830 246, 23, 248, 84, 26, 533, 28, 219, 30, 31,
1831 35, 36, 78, 26, 36, 84, 69, 30, 31, 163,
1832 26, 54, 974, 69, 270, 271, 26, 27, 794, 82,
1833 83, 84, 85, 58, 87, 88, 69, 70, 26, 26,
1834 252, 63, 158, 30, 31, 46, 99, 163, 70, 36,
1835 84, 104, 85, 165, 161, 80, 89, 28, 36, 60,
1836 26, 26, 27, 63, 86, 87, 99, 369, 906, 57,
1837 70, 98, 26, 839, 26, 163, 63, 83, 30, 31,
1838 98, 106, 158, 70, 165, 63, 162, 112, 163, 98,
1839 77, 57, 70, 64, 616, 161, 165, 26, 63, 86,
1840 87, 88, 124, 90, 150, 70, 98, 163, 150, 63,
1841 36, 63, 165, 98, 149, 163, 70, 150, 70, 163,
1842 173, 154, 26, 369, 617, 158, 159, 160, 161, 69,
1843 163, 165, 660, 158, 26, 26, 149, 63, 91, 92,
1844 93, 163, 163, 26, 70, 98, 168, 169, 88, 174,
1845 175, 176, 177, 178, 179, 180, 181, 182, 183, 63,
1846 30, 31, 26, 163, 26, 26, 70, 26, 168, 169,
1847 125, 126, 63, 1011, 1012, 36, 163, 36, 164, 70,
1848 63, 168, 169, 208, 209, 163, 26, 70, 143, 514,
1849 168, 169, 517, 518, 219, 497, 498, 466, 163, 63,
1850 158, 63, 26, 168, 169, 163, 70, 163, 70, 163,
1851 163, 163, 245, 163, 168, 169, 168, 169, 164, 26,
1852 70, 71, 164, 63, 158, 30, 31, 252, 162, 282,
1853 70, 36, 285, 83, 84, 98, 538, 163, 291, 63,
1854 103, 104, 168, 169, 26, 164, 70, 70, 71, 72,
1855 163, 497, 498, 306, 307, 308, 63, 365, 366, 163,
1856 444, 106, 107, 70, 168, 169, 164, 112, 91, 92,
1857 93, 304, 163, 163, 327, 98, 26, 168, 169, 164,
1858 163, 63, 30, 31, 163, 168, 169, 158, 70, 163,
1859 63, 162, 345, 346, 347, 163, 818, 70, 158, 163,
1860 0, 163, 162, 825, 168, 169, 168, 169, 129, 130,
1861 3, 4, 158, 63, 160, 63, 9, 158, 139, 140,
1862 70, 162, 70, 163, 377, 378, 379, 20, 168, 169,
1863 67, 63, 163, 63, 367, 72, 73, 370, 70, 163,
1864 70, 394, 395, 396, 168, 169, 70, 71, 381, 382,
1865 383, 163, 405, 923, 158, 925, 163, 163, 162, 83,
1866 84, 168, 169, 98, 163, 100, 101, 102, 421, 402,
1867 105, 424, 158, 426, 427, 428, 162, 430, 431, 432,
1868 36, 163, 135, 136, 437, 98, 168, 169, 106, 107,
1869 163, 163, 70, 71, 112, 168, 169, 98, 444, 133,
1870 134, 454, 444, 449, 450, 83, 84, 133, 134, 70,
1871 71, 444, 26, 163, 26, 163, 449, 450, 168, 169,
1872 168, 169, 83, 84, 98, 26, 100, 101, 102, 30,
1873 31, 163, 36, 163, 504, 36, 168, 169, 168, 169,
1874 700, 72, 702, 496, 5, 6, 7, 8, 36, 10,
1875 11, 504, 13, 14, 15, 16, 17, 18, 67, 83,
1876 84, 70, 71, 72, 73, 26, 36, 28, 29, 30,
1877 31, 36, 65, 34, 67, 36, 173, 70, 71, 72,
1878 73, 732, 91, 92, 735, 65, 66, 67, 68, 26,
1879 70, 71, 72, 73, 70, 71, 26, 26, 91, 92,
1880 30, 31, 63, 126, 127, 128, 36, 83, 84, 70,
1881 26, 91, 92, 26, 75, 76, 77, 67, 26, 572,
1882 70, 71, 72, 73, 85, 86, 87, 121, 122, 90,
1883 125, 126, 126, 127, 128, 98, 589, 590, 591, 592,
1884 103, 104, 26, 26, 795, 578, 30, 31, 121, 122,
1885 819, 26, 585, 586, 26, 806, 158, 808, 809, 26,
1886 162, 26, 123, 124, 26, 834, 26, 620, 30, 31,
1887 623, 158, 158, 158, 26, 162, 162, 162, 65, 66,
1888 67, 68, 162, 70, 71, 72, 73, 158, 141, 142,
1889 158, 162, 645, 646, 162, 65, 66, 28, 68, 688,
1890 70, 71, 163, 164, 91, 92, 26, 168, 169, 79,
1891 80, 81, 82, 666, 860, 79, 80, 81, 82, 652,
1892 653, 91, 92, 93, 158, 158, 158, 26, 162, 162,
1893 162, 65, 26, 67, 68, 743, 70, 71, 72, 73,
1894 108, 109, 110, 111, 70, 71, 679, 0, 1, 144,
1895 145, 697, 760, 170, 171, 172, 26, 91, 92, 12,
1896 713, 694, 695, 36, 697, 136, 137, 121, 122, 26,
1897 28, 24, 25, 26, 26, 28, 158, 30, 31, 32,
1898 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
1899 28, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1900 53, 160, 163, 56, 57, 58, 59, 60, 163, 71,
1901 63, 26, 163, 163, 163, 89, 163, 70, 163, 163,
1902 94, 95, 163, 776, 98, 99, 163, 163, 163, 103,
1903 104, 26, 26, 26, 787, 26, 164, 164, 26, 71,
1904 163, 163, 163, 96, 97, 163, 163, 163, 163, 163,
1905 26, 98, 36, 786, 36, 164, 158, 98, 811, 162,
1906 113, 114, 115, 116, 71, 162, 174, 120, 71, 158,
1907 123, 124, 158, 158, 162, 158, 158, 158, 158, 158,
1908 158, 98, 26, 816, 26, 162, 26, 36, 159, 165,
1909 143, 158, 158, 146, 147, 148, 829, 150, 151, 152,
1910 153, 154, 155, 156, 157, 165, 126, 136, 159, 159,
1911 163, 164, 26, 166, 167, 168, 169, 26, 26, 26,
1912 26, 36, 26, 912, 26, 26, 26, 26, 26, 163,
1913 883, 26, 26, 886, 159, 163, 163, 890, 891, 892,
1914 893, 159, 35, 159, 26, 159, 26, 71, 12, 162,
1915 903, 904, 905, 26, 26, 132, 158, 26, 26, 26,
1916 24, 25, 26, 138, 28, 898, 30, 31, 32, 33,
1917 34, 35, 36, 37, 38, 39, 40, 41, 42, 26,
1918 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1919 22, 36, 56, 57, 58, 59, 60, 159, 159, 63,
1920 26, 158, 162, 26, 26, 26, 70, 26, 26, 165,
1921 165, 26, 165, 26, 26, 163, 162, 98, 165, 98,
1922 165, 160, 36, 158, 977, 978, 36, 98, 162, 162,
1923 158, 136, 96, 97, 160, 98, 158, 160, 135, 160,
1924 160, 158, 158, 26, 162, 158, 158, 158, 36, 113,
1925 114, 115, 116, 143, 36, 36, 120, 26, 26, 123,
1926 124, 26, 165, 36, 36, 36, 162, 158, 92, 158,
1927 162, 158, 131, 98, 162, 26, 162, 162, 162, 143,
1928 163, 158, 146, 147, 148, 163, 150, 151, 152, 153,
1929 154, 155, 156, 157, 98, 165, 158, 158, 158, 163,
1930 164, 158, 166, 167, 168, 169, 162, 165, 163, 163,
1931 163, 163, 163, 162, 162, 165, 162, 26, 162, 162,
1932 162, 162, 162, 162, 162, 162, 162, 26, 163, 70,
1933 161, 98, 98, 77, 98, 98, 98, 26, 158, 26,
1934 36, 26, 36, 26, 91, 162, 162, 26, 26, 26,
1935 26, 162, 26, 162, 26, 26, 162, 165, 165, 98,
1936 165, 136, 163, 165, 26, 126, 36, 36, 36, 165,
1937 173, 98, 26, 98, 26, 98, 98, 162, 131, 26,
1938 160, 26, 158, 160, 158, 164, 98, 98, 158, 126,
1939 98, 91, 98, 98, 26, 143, 36, 26, 158, 158,
1940 26, 26, 26, 26, 162, 162, 162, 162, 162, 28,
1941 162, 26, 162, 162, 26, 26, 158, 26, 158, 165,
1942 165, 26, 165, 26, 162, 32, 162, 162, 162, 162,
1943 162, 162, 162, 162, 162, 26, 162, 72, 26, 26,
1944 26, 165, 162, 162, 71, 163, 163, 163, 162, 162,
1945 84, 133, 162, 70, 36, 162, 92, 160, 162, 160,
1946 98, 163, 126, 26, 162, 162, 158, 26, 163, 162,
1947 160, 162, 160, 33, 160, 28, 160, 71, 137, 22,
1948 160, 162, 26, 72, 26, 160, 36, 36, 972, 859,
1949 163, -1, 939, 34, 137, 162, 162, 162, 296, 162,
1950 -1, 162, 162, 158, 162, 162, 136, 163, 158, 162,
1951 -1, 162, -1, -1, 163, 163, 137, 163, 160, 163,
1952 315, 160, -1, 137, 137, 162, -1, 137, -1, 137,
1953 -1, 137, -1, -1, 162, -1, -1, -1, -1, -1,
1954 162, -1, 162, -1, 162, -1, 162, -1, -1, -1,
1955 -1, -1, -1, -1, -1, -1, -1, -1, 162, -1,
1956 162, 162, 162, 162, 162, 162
1957 };
1958
1959 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1960 symbol of state STATE-NUM. */
1961 static const unsigned char yystos[] =
1962 {
1963 0, 1, 12, 24, 25, 26, 28, 30, 31, 32,
1964 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
1965 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1966 56, 57, 58, 59, 60, 63, 70, 96, 97, 113,
1967 114, 115, 116, 120, 123, 124, 143, 146, 147, 148,
1968 150, 151, 152, 153, 154, 155, 156, 157, 163, 164,
1969 166, 167, 168, 169, 176, 177, 178, 179, 198, 206,
1970 207, 208, 209, 210, 213, 214, 219, 220, 221, 163,
1971 163, 220, 89, 94, 95, 98, 99, 103, 104, 98,
1972 100, 101, 102, 105, 212, 98, 98, 98, 98, 98,
1973 26, 26, 220, 220, 163, 220, 163, 220, 220, 214,
1974 218, 220, 163, 218, 220, 221, 221, 163, 163, 164,
1975 199, 164, 199, 164, 199, 164, 199, 163, 164, 164,
1976 98, 212, 163, 163, 163, 163, 163, 163, 26, 179,
1977 163, 163, 28, 64, 26, 221, 26, 83, 212, 0,
1978 78, 161, 98, 103, 104, 98, 26, 36, 70, 77,
1979 86, 87, 88, 90, 179, 206, 211, 220, 179, 211,
1980 211, 163, 180, 98, 65, 66, 67, 68, 70, 71,
1981 72, 73, 91, 92, 26, 26, 220, 26, 220, 26,
1982 220, 5, 6, 7, 8, 10, 11, 13, 14, 15,
1983 16, 17, 18, 26, 28, 29, 34, 36, 63, 70,
1984 75, 76, 77, 85, 86, 87, 90, 123, 124, 163,
1985 164, 179, 195, 200, 211, 220, 26, 26, 220, 26,
1986 220, 26, 149, 179, 28, 149, 143, 166, 36, 36,
1987 36, 36, 16, 19, 21, 23, 26, 28, 36, 86,
1988 87, 124, 163, 179, 211, 220, 220, 26, 26, 27,
1989 173, 26, 27, 26, 26, 26, 26, 26, 26, 26,
1990 26, 26, 28, 26, 26, 26, 26, 26, 26, 36,
1991 26, 26, 57, 28, 158, 160, 162, 70, 71, 83,
1992 84, 202, 205, 26, 28, 178, 179, 26, 163, 72,
1993 179, 179, 179, 179, 163, 179, 91, 92, 93, 163,
1994 220, 163, 196, 135, 136, 158, 220, 221, 221, 221,
1995 221, 221, 221, 221, 221, 221, 221, 160, 163, 163,
1996 163, 163, 163, 163, 163, 163, 163, 65, 66, 68,
1997 71, 79, 80, 81, 82, 91, 92, 93, 201, 202,
1998 163, 187, 71, 187, 26, 26, 26, 26, 26, 26,
1999 26, 164, 164, 26, 179, 206, 207, 208, 210, 26,
2000 71, 163, 163, 180, 163, 188, 163, 106, 107, 112,
2001 163, 106, 107, 112, 163, 163, 163, 26, 26, 36,
2002 179, 163, 202, 98, 91, 92, 93, 98, 202, 36,
2003 36, 164, 208, 210, 180, 158, 98, 162, 71, 174,
2004 162, 71, 158, 158, 84, 165, 165, 165, 165, 162,
2005 84, 202, 205, 84, 202, 205, 158, 158, 158, 158,
2006 158, 158, 158, 162, 98, 220, 26, 57, 26, 220,
2007 26, 220, 165, 165, 78, 161, 196, 26, 36, 158,
2008 158, 159, 159, 179, 159, 220, 220, 220, 126, 136,
2009 158, 162, 158, 162, 26, 36, 209, 220, 26, 26,
2010 26, 26, 26, 36, 26, 26, 26, 26, 26, 26,
2011 163, 220, 220, 220, 26, 26, 133, 134, 35, 163,
2012 189, 163, 190, 159, 159, 159, 159, 26, 26, 71,
2013 104, 179, 162, 84, 202, 205, 179, 26, 26, 158,
2014 133, 134, 132, 26, 220, 26, 220, 26, 220, 26,
2015 179, 179, 179, 26, 26, 26, 36, 138, 26, 69,
2016 88, 220, 220, 220, 22, 36, 159, 159, 26, 179,
2017 162, 158, 220, 26, 26, 26, 26, 26, 165, 220,
2018 165, 26, 220, 165, 220, 220, 220, 26, 220, 220,
2019 220, 26, 163, 98, 220, 162, 158, 162, 165, 165,
2020 98, 178, 160, 179, 206, 206, 36, 36, 158, 36,
2021 220, 162, 162, 136, 135, 98, 98, 180, 158, 160,
2022 160, 160, 160, 158, 158, 158, 158, 158, 26, 189,
2023 190, 189, 158, 163, 184, 158, 163, 185, 162, 162,
2024 158, 125, 126, 143, 143, 36, 36, 36, 36, 220,
2025 202, 205, 84, 202, 205, 26, 162, 26, 214, 216,
2026 217, 220, 165, 158, 158, 158, 26, 162, 162, 162,
2027 163, 197, 197, 197, 197, 158, 158, 162, 158, 158,
2028 162, 163, 163, 163, 163, 191, 191, 163, 185, 36,
2029 36, 84, 205, 162, 36, 162, 92, 162, 162, 162,
2030 162, 165, 98, 165, 165, 98, 162, 162, 162, 158,
2031 162, 162, 162, 131, 26, 163, 98, 26, 98, 98,
2032 98, 26, 161, 220, 70, 77, 179, 158, 162, 162,
2033 163, 179, 163, 26, 220, 220, 220, 220, 26, 36,
2034 26, 36, 26, 91, 26, 126, 127, 128, 182, 26,
2035 125, 126, 26, 162, 158, 162, 158, 162, 162, 190,
2036 189, 220, 165, 26, 220, 165, 162, 165, 173, 165,
2037 26, 26, 26, 98, 136, 220, 220, 163, 181, 36,
2038 36, 141, 142, 179, 179, 126, 36, 191, 26, 165,
2039 98, 26, 220, 98, 26, 98, 98, 26, 36, 179,
2040 162, 131, 3, 4, 9, 20, 160, 164, 199, 26,
2041 26, 158, 162, 179, 179, 158, 206, 160, 158, 158,
2042 158, 158, 162, 162, 162, 162, 162, 220, 98, 162,
2043 98, 162, 162, 98, 143, 126, 165, 187, 165, 165,
2044 187, 91, 170, 171, 172, 215, 98, 162, 162, 211,
2045 162, 162, 162, 121, 122, 162, 162, 162, 162, 158,
2046 158, 162, 162, 165, 211, 98, 26, 36, 26, 162,
2047 162, 163, 163, 26, 26, 220, 26, 26, 28, 179,
2048 220, 26, 26, 26, 26, 181, 187, 163, 162, 26,
2049 26, 32, 162, 162, 187, 187, 187, 220, 179, 190,
2050 180, 162, 162, 190, 26, 179, 26, 72, 180, 26,
2051 181, 26, 26, 160, 163, 162, 160, 162, 163, 162,
2052 160, 160, 160, 160, 133, 201, 202, 71, 70, 162,
2053 158, 162, 36, 92, 160, 160, 220, 108, 109, 110,
2054 111, 192, 98, 220, 126, 163, 193, 220, 220, 220,
2055 220, 162, 26, 26, 33, 179, 28, 71, 220, 220,
2056 220, 193, 162, 199, 162, 162, 137, 162, 162, 162,
2057 162, 163, 186, 185, 185, 162, 22, 158, 158, 162,
2058 163, 194, 163, 203, 203, 163, 204, 121, 122, 182,
2059 183, 163, 26, 26, 136, 137, 129, 130, 139, 140,
2060 144, 145, 158, 162, 158, 162, 36, 160, 160, 158,
2061 162, 158, 162, 158, 162, 158, 162, 158, 162, 158,
2062 162, 158, 162, 158, 162, 183, 182, 162, 220, 220,
2063 137, 136, 137, 137, 137, 137, 137, 137, 162, 162,
2064 72, 162, 162, 162, 162, 162, 162, 162, 162, 162,
2065 162, 36, 193, 193
2066 };
2067
2068 #define yyerrok (yyerrstatus = 0)
2069 #define yyclearin (yychar = YYEMPTY)
2070 #define YYEMPTY (-2)
2071 #define YYEOF 0
2072
2073 #define YYACCEPT goto yyacceptlab
2074 #define YYABORT goto yyabortlab
2075 #define YYERROR goto yyerrorlab
2076
2077
2078 /* Like YYERROR except do call yyerror. This remains here temporarily
2079 to ease the transition to the new meaning of YYERROR, for GCC.
2080 Once GCC version 2 has supplanted version 1, this can go. */
2081
2082 #define YYFAIL goto yyerrlab
2083
2084 #define YYRECOVERING() (!!yyerrstatus)
2085
2086 #define YYBACKUP(Token, Value) \
2087 do \
2088 if (yychar == YYEMPTY && yylen == 1) \
2089 { \
2090 yychar = (Token); \
2091 yylval = (Value); \
2092 yytoken = YYTRANSLATE (yychar); \
2093 YYPOPSTACK; \
2094 goto yybackup; \
2095 } \
2096 else \
2097 { \
2098 yyerror (YY_("syntax error: cannot back up")); \
2099 YYERROR; \
2100 } \
2101 while (0)
2102
2103
2104 #define YYTERROR 1
2105 #define YYERRCODE 256
2106
2107
2108 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2109 If N is 0, then set CURRENT to the empty location which ends
2110 the previous symbol: RHS[0] (always defined). */
2111
2112 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2113 #ifndef YYLLOC_DEFAULT
2114 # define YYLLOC_DEFAULT(Current, Rhs, N) \
2115 do \
2116 if (N) \
2117 { \
2118 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2119 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2120 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2121 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2122 } \
2123 else \
2124 { \
2125 (Current).first_line = (Current).last_line = \
2126 YYRHSLOC (Rhs, 0).last_line; \
2127 (Current).first_column = (Current).last_column = \
2128 YYRHSLOC (Rhs, 0).last_column; \
2129 } \
2130 while (0)
2131 #endif
2132
2133
2134 /* YY_LOCATION_PRINT -- Print the location on the stream.
2135 This macro was not mandated originally: define only if we know
2136 we won't break user code: when these are the locations we know. */
2137
2138 #ifndef YY_LOCATION_PRINT
2139 # if YYLTYPE_IS_TRIVIAL
2140 # define YY_LOCATION_PRINT(File, Loc) \
2141 fprintf (File, "%d.%d-%d.%d", \
2142 (Loc).first_line, (Loc).first_column, \
2143 (Loc).last_line, (Loc).last_column)
2144 # else
2145 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2146 # endif
2147 #endif
2148
2149
2150 /* YYLEX -- calling `yylex' with the right arguments. */
2151
2152 #ifdef YYLEX_PARAM
2153 # define YYLEX yylex (YYLEX_PARAM)
2154 #else
2155 # define YYLEX yylex ()
2156 #endif
2157
2158 /* Enable debugging if requested. */
2159 #if YYDEBUG
2160
2161 # ifndef YYFPRINTF
2162 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2163 # define YYFPRINTF fprintf
2164 # endif
2165
2166 # define YYDPRINTF(Args) \
2167 do { \
2168 if (yydebug) \
2169 YYFPRINTF Args; \
2170 } while (0)
2171
2172 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2173 do { \
2174 if (yydebug) \
2175 { \
2176 YYFPRINTF (stderr, "%s ", Title); \
2177 yysymprint (stderr, \
2178 Type, Value); \
2179 YYFPRINTF (stderr, "\n"); \
2180 } \
2181 } while (0)
2182
2183 /*------------------------------------------------------------------.
2184 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
2185 | TOP (included). |
2186 `------------------------------------------------------------------*/
2187
2188 #if defined (__STDC__) || defined (__cplusplus)
2189 static void
yy_stack_print(short int * bottom,short int * top)2190 yy_stack_print (short int *bottom, short int *top)
2191 #else
2192 static void
2193 yy_stack_print (bottom, top)
2194 short int *bottom;
2195 short int *top;
2196 #endif
2197 {
2198 YYFPRINTF (stderr, "Stack now");
2199 for (/* Nothing. */; bottom <= top; ++bottom)
2200 YYFPRINTF (stderr, " %d", *bottom);
2201 YYFPRINTF (stderr, "\n");
2202 }
2203
2204 # define YY_STACK_PRINT(Bottom, Top) \
2205 do { \
2206 if (yydebug) \
2207 yy_stack_print ((Bottom), (Top)); \
2208 } while (0)
2209
2210
2211 /*------------------------------------------------.
2212 | Report that the YYRULE is going to be reduced. |
2213 `------------------------------------------------*/
2214
2215 #if defined (__STDC__) || defined (__cplusplus)
2216 static void
yy_reduce_print(int yyrule)2217 yy_reduce_print (int yyrule)
2218 #else
2219 static void
2220 yy_reduce_print (yyrule)
2221 int yyrule;
2222 #endif
2223 {
2224 int yyi;
2225 unsigned long int yylno = yyrline[yyrule];
2226 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
2227 yyrule - 1, yylno);
2228 /* Print the symbols being reduced, and their result. */
2229 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
2230 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
2231 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
2232 }
2233
2234 # define YY_REDUCE_PRINT(Rule) \
2235 do { \
2236 if (yydebug) \
2237 yy_reduce_print (Rule); \
2238 } while (0)
2239
2240 /* Nonzero means print parse trace. It is left uninitialized so that
2241 multiple parsers can coexist. */
2242 int yydebug;
2243 #else /* !YYDEBUG */
2244 # define YYDPRINTF(Args)
2245 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
2246 # define YY_STACK_PRINT(Bottom, Top)
2247 # define YY_REDUCE_PRINT(Rule)
2248 #endif /* !YYDEBUG */
2249
2250
2251 /* YYINITDEPTH -- initial size of the parser's stacks. */
2252 #ifndef YYINITDEPTH
2253 # define YYINITDEPTH 200
2254 #endif
2255
2256 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
2257 if the built-in stack extension method is used).
2258
2259 Do not make this value too large; the results are undefined if
2260 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
2261 evaluated with infinite-precision integer arithmetic. */
2262
2263 #ifndef YYMAXDEPTH
2264 # define YYMAXDEPTH 10000
2265 #endif
2266
2267
2268
2269 #if YYERROR_VERBOSE
2270
2271 # ifndef yystrlen
2272 # if defined (__GLIBC__) && defined (_STRING_H)
2273 # define yystrlen strlen
2274 # else
2275 /* Return the length of YYSTR. */
2276 static YYSIZE_T
2277 # if defined (__STDC__) || defined (__cplusplus)
yystrlen(const char * yystr)2278 yystrlen (const char *yystr)
2279 # else
2280 yystrlen (yystr)
2281 const char *yystr;
2282 # endif
2283 {
2284 const char *yys = yystr;
2285
2286 while (*yys++ != '\0')
2287 continue;
2288
2289 return yys - yystr - 1;
2290 }
2291 # endif
2292 # endif
2293
2294 # ifndef yystpcpy
2295 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
2296 # define yystpcpy stpcpy
2297 # else
2298 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2299 YYDEST. */
2300 static char *
2301 # if defined (__STDC__) || defined (__cplusplus)
yystpcpy(char * yydest,const char * yysrc)2302 yystpcpy (char *yydest, const char *yysrc)
2303 # else
2304 yystpcpy (yydest, yysrc)
2305 char *yydest;
2306 const char *yysrc;
2307 # endif
2308 {
2309 char *yyd = yydest;
2310 const char *yys = yysrc;
2311
2312 while ((*yyd++ = *yys++) != '\0')
2313 continue;
2314
2315 return yyd - 1;
2316 }
2317 # endif
2318 # endif
2319
2320 # ifndef yytnamerr
2321 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2322 quotes and backslashes, so that it's suitable for yyerror. The
2323 heuristic is that double-quoting is unnecessary unless the string
2324 contains an apostrophe, a comma, or backslash (other than
2325 backslash-backslash). YYSTR is taken from yytname. If YYRES is
2326 null, do not copy; instead, return the length of what the result
2327 would have been. */
2328 static YYSIZE_T
yytnamerr(char * yyres,const char * yystr)2329 yytnamerr (char *yyres, const char *yystr)
2330 {
2331 if (*yystr == '"')
2332 {
2333 size_t yyn = 0;
2334 char const *yyp = yystr;
2335
2336 for (;;)
2337 switch (*++yyp)
2338 {
2339 case '\'':
2340 case ',':
2341 goto do_not_strip_quotes;
2342
2343 case '\\':
2344 if (*++yyp != '\\')
2345 goto do_not_strip_quotes;
2346 /* Fall through. */
2347 default:
2348 if (yyres)
2349 yyres[yyn] = *yyp;
2350 yyn++;
2351 break;
2352
2353 case '"':
2354 if (yyres)
2355 yyres[yyn] = '\0';
2356 return yyn;
2357 }
2358 do_not_strip_quotes: ;
2359 }
2360
2361 if (! yyres)
2362 return yystrlen (yystr);
2363
2364 return yystpcpy (yyres, yystr) - yyres;
2365 }
2366 # endif
2367
2368 #endif /* YYERROR_VERBOSE */
2369
2370
2371
2372 #if YYDEBUG
2373 /*--------------------------------.
2374 | Print this symbol on YYOUTPUT. |
2375 `--------------------------------*/
2376
2377 #if defined (__STDC__) || defined (__cplusplus)
2378 static void
yysymprint(FILE * yyoutput,int yytype,YYSTYPE * yyvaluep)2379 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
2380 #else
2381 static void
2382 yysymprint (yyoutput, yytype, yyvaluep)
2383 FILE *yyoutput;
2384 int yytype;
2385 YYSTYPE *yyvaluep;
2386 #endif
2387 {
2388 /* Pacify ``unused variable'' warnings. */
2389 (void) yyvaluep;
2390
2391 if (yytype < YYNTOKENS)
2392 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2393 else
2394 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2395
2396
2397 # ifdef YYPRINT
2398 if (yytype < YYNTOKENS)
2399 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2400 # endif
2401 switch (yytype)
2402 {
2403 default:
2404 break;
2405 }
2406 YYFPRINTF (yyoutput, ")");
2407 }
2408
2409 #endif /* ! YYDEBUG */
2410 /*-----------------------------------------------.
2411 | Release the memory associated to this symbol. |
2412 `-----------------------------------------------*/
2413
2414 #if defined (__STDC__) || defined (__cplusplus)
2415 static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep)2416 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2417 #else
2418 static void
2419 yydestruct (yymsg, yytype, yyvaluep)
2420 const char *yymsg;
2421 int yytype;
2422 YYSTYPE *yyvaluep;
2423 #endif
2424 {
2425 /* Pacify ``unused variable'' warnings. */
2426 (void) yyvaluep;
2427
2428 if (!yymsg)
2429 yymsg = "Deleting";
2430 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2431
2432 switch (yytype)
2433 {
2434
2435 default:
2436 break;
2437 }
2438 }
2439
2440
2441 /* Prevent warnings from -Wmissing-prototypes. */
2442
2443 #ifdef YYPARSE_PARAM
2444 # if defined (__STDC__) || defined (__cplusplus)
2445 int yyparse (void *YYPARSE_PARAM);
2446 # else
2447 int yyparse ();
2448 # endif
2449 #else /* ! YYPARSE_PARAM */
2450 #if defined (__STDC__) || defined (__cplusplus)
2451 int yyparse (void);
2452 #else
2453 int yyparse ();
2454 #endif
2455 #endif /* ! YYPARSE_PARAM */
2456
2457
2458
2459 /* The look-ahead symbol. */
2460 int yychar;
2461
2462 /* The semantic value of the look-ahead symbol. */
2463 YYSTYPE yylval;
2464
2465 /* Number of syntax errors so far. */
2466 int yynerrs;
2467
2468
2469
2470 /*----------.
2471 | yyparse. |
2472 `----------*/
2473
2474 #ifdef YYPARSE_PARAM
2475 # if defined (__STDC__) || defined (__cplusplus)
yyparse(void * YYPARSE_PARAM)2476 int yyparse (void *YYPARSE_PARAM)
2477 # else
2478 int yyparse (YYPARSE_PARAM)
2479 void *YYPARSE_PARAM;
2480 # endif
2481 #else /* ! YYPARSE_PARAM */
2482 #if defined (__STDC__) || defined (__cplusplus)
2483 int
2484 yyparse (void)
2485 #else
2486 int
2487 yyparse ()
2488 ;
2489 #endif
2490 #endif
2491 {
2492
2493 int yystate;
2494 int yyn;
2495 int yyresult;
2496 /* Number of tokens to shift before error messages enabled. */
2497 int yyerrstatus;
2498 /* Look-ahead token as an internal (translated) token number. */
2499 int yytoken = 0;
2500
2501 /* Three stacks and their tools:
2502 `yyss': related to states,
2503 `yyvs': related to semantic values,
2504 `yyls': related to locations.
2505
2506 Refer to the stacks thru separate pointers, to allow yyoverflow
2507 to reallocate them elsewhere. */
2508
2509 /* The state stack. */
2510 short int yyssa[YYINITDEPTH];
2511 short int *yyss = yyssa;
2512 short int *yyssp;
2513
2514 /* The semantic value stack. */
2515 YYSTYPE yyvsa[YYINITDEPTH];
2516 YYSTYPE *yyvs = yyvsa;
2517 YYSTYPE *yyvsp;
2518
2519
2520
2521 #define YYPOPSTACK (yyvsp--, yyssp--)
2522
2523 YYSIZE_T yystacksize = YYINITDEPTH;
2524
2525 /* The variables used to return semantic value and location from the
2526 action routines. */
2527 YYSTYPE yyval;
2528
2529
2530 /* When reducing, the number of symbols on the RHS of the reduced
2531 rule. */
2532 int yylen;
2533
2534 YYDPRINTF ((stderr, "Starting parse\n"));
2535
2536 yystate = 0;
2537 yyerrstatus = 0;
2538 yynerrs = 0;
2539 yychar = YYEMPTY; /* Cause a token to be read. */
2540
2541 /* Initialize stack pointers.
2542 Waste one element of value and location stack
2543 so that they stay on the same level as the state stack.
2544 The wasted elements are never initialized. */
2545
2546 yyssp = yyss;
2547 yyvsp = yyvs;
2548
2549 goto yysetstate;
2550
2551 /*------------------------------------------------------------.
2552 | yynewstate -- Push a new state, which is found in yystate. |
2553 `------------------------------------------------------------*/
2554 yynewstate:
2555 /* In all cases, when you get here, the value and location stacks
2556 have just been pushed. so pushing a state here evens the stacks.
2557 */
2558 yyssp++;
2559
2560 yysetstate:
2561 *yyssp = yystate;
2562
2563 if (yyss + yystacksize - 1 <= yyssp)
2564 {
2565 /* Get the current used size of the three stacks, in elements. */
2566 YYSIZE_T yysize = yyssp - yyss + 1;
2567
2568 #ifdef yyoverflow
2569 {
2570 /* Give user a chance to reallocate the stack. Use copies of
2571 these so that the &'s don't force the real ones into
2572 memory. */
2573 YYSTYPE *yyvs1 = yyvs;
2574 short int *yyss1 = yyss;
2575
2576
2577 /* Each stack pointer address is followed by the size of the
2578 data in use in that stack, in bytes. This used to be a
2579 conditional around just the two extra args, but that might
2580 be undefined if yyoverflow is a macro. */
2581 yyoverflow (YY_("memory exhausted"),
2582 &yyss1, yysize * sizeof (*yyssp),
2583 &yyvs1, yysize * sizeof (*yyvsp),
2584
2585 &yystacksize);
2586
2587 yyss = yyss1;
2588 yyvs = yyvs1;
2589 }
2590 #else /* no yyoverflow */
2591 # ifndef YYSTACK_RELOCATE
2592 goto yyexhaustedlab;
2593 # else
2594 /* Extend the stack our own way. */
2595 if (YYMAXDEPTH <= yystacksize)
2596 goto yyexhaustedlab;
2597 yystacksize *= 2;
2598 if (YYMAXDEPTH < yystacksize)
2599 yystacksize = YYMAXDEPTH;
2600
2601 {
2602 short int *yyss1 = yyss;
2603 union yyalloc *yyptr =
2604 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2605 if (! yyptr)
2606 goto yyexhaustedlab;
2607 YYSTACK_RELOCATE (yyss);
2608 YYSTACK_RELOCATE (yyvs);
2609
2610 # undef YYSTACK_RELOCATE
2611 if (yyss1 != yyssa)
2612 YYSTACK_FREE (yyss1);
2613 }
2614 # endif
2615 #endif /* no yyoverflow */
2616
2617 yyssp = yyss + yysize - 1;
2618 yyvsp = yyvs + yysize - 1;
2619
2620
2621 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2622 (unsigned long int) yystacksize));
2623
2624 if (yyss + yystacksize - 1 <= yyssp)
2625 YYABORT;
2626 }
2627
2628 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2629
2630 goto yybackup;
2631
2632 /*-----------.
2633 | yybackup. |
2634 `-----------*/
2635 yybackup:
2636
2637 /* Do appropriate processing given the current state. */
2638 /* Read a look-ahead token if we need one and don't already have one. */
2639 /* yyresume: */
2640
2641 /* First try to decide what to do without reference to look-ahead token. */
2642
2643 yyn = yypact[yystate];
2644 if (yyn == YYPACT_NINF)
2645 goto yydefault;
2646
2647 /* Not known => get a look-ahead token if don't already have one. */
2648
2649 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2650 if (yychar == YYEMPTY)
2651 {
2652 YYDPRINTF ((stderr, "Reading a token: "));
2653 yychar = YYLEX;
2654 }
2655
2656 if (yychar <= YYEOF)
2657 {
2658 yychar = yytoken = YYEOF;
2659 YYDPRINTF ((stderr, "Now at end of input.\n"));
2660 }
2661 else
2662 {
2663 yytoken = YYTRANSLATE (yychar);
2664 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2665 }
2666
2667 /* If the proper action on seeing token YYTOKEN is to reduce or to
2668 detect an error, take that action. */
2669 yyn += yytoken;
2670 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2671 goto yydefault;
2672 yyn = yytable[yyn];
2673 if (yyn <= 0)
2674 {
2675 if (yyn == 0 || yyn == YYTABLE_NINF)
2676 goto yyerrlab;
2677 yyn = -yyn;
2678 goto yyreduce;
2679 }
2680
2681 if (yyn == YYFINAL)
2682 YYACCEPT;
2683
2684 /* Shift the look-ahead token. */
2685 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2686
2687 /* Discard the token being shifted unless it is eof. */
2688 if (yychar != YYEOF)
2689 yychar = YYEMPTY;
2690
2691 *++yyvsp = yylval;
2692
2693
2694 /* Count tokens shifted since error; after three, turn off error
2695 status. */
2696 if (yyerrstatus)
2697 yyerrstatus--;
2698
2699 yystate = yyn;
2700 goto yynewstate;
2701
2702
2703 /*-----------------------------------------------------------.
2704 | yydefault -- do the default action for the current state. |
2705 `-----------------------------------------------------------*/
2706 yydefault:
2707 yyn = yydefact[yystate];
2708 if (yyn == 0)
2709 goto yyerrlab;
2710 goto yyreduce;
2711
2712
2713 /*-----------------------------.
2714 | yyreduce -- Do a reduction. |
2715 `-----------------------------*/
2716 yyreduce:
2717 /* yyn is the number of a rule to reduce with. */
2718 yylen = yyr2[yyn];
2719
2720 /* If YYLEN is nonzero, implement the default value of the action:
2721 `$$ = $1'.
2722
2723 Otherwise, the following line sets YYVAL to garbage.
2724 This behavior is undocumented and Bison
2725 users should not rely upon it. Assigning to YYVAL
2726 unconditionally makes the parser a bit smaller, and it avoids a
2727 GCC warning that YYVAL may be used uninitialized. */
2728 yyval = yyvsp[1-yylen];
2729
2730
2731 YY_REDUCE_PRINT (yyn);
2732 switch (yyn)
2733 {
2734 case 3:
2735 #line 569 "bfin-parse.y"
2736 {
2737 insn = (yyvsp[0].instr);
2738 if (insn == (INSTR_T) 0)
2739 return NO_INSN_GENERATED;
2740 else if (insn == (INSTR_T) - 1)
2741 return SEMANTIC_ERROR;
2742 else
2743 return INSN_GENERATED;
2744 }
2745 break;
2746
2747 case 5:
2748 #line 583 "bfin-parse.y"
2749 {
2750 if (((yyvsp[-5].instr)->value & 0xf800) == 0xc000)
2751 {
2752 if (is_group1 ((yyvsp[-3].instr)) && is_group2 ((yyvsp[-1].instr)))
2753 (yyval.instr) = bfin_gen_multi_instr ((yyvsp[-5].instr), (yyvsp[-3].instr), (yyvsp[-1].instr));
2754 else if (is_group2 ((yyvsp[-3].instr)) && is_group1 ((yyvsp[-1].instr)))
2755 (yyval.instr) = bfin_gen_multi_instr ((yyvsp[-5].instr), (yyvsp[-1].instr), (yyvsp[-3].instr));
2756 else
2757 return yyerror ("Wrong 16 bit instructions groups, slot 2 and slot 3 must be 16-bit instrution group");
2758 }
2759 else if (((yyvsp[-3].instr)->value & 0xf800) == 0xc000)
2760 {
2761 if (is_group1 ((yyvsp[-5].instr)) && is_group2 ((yyvsp[-1].instr)))
2762 (yyval.instr) = bfin_gen_multi_instr ((yyvsp[-3].instr), (yyvsp[-5].instr), (yyvsp[-1].instr));
2763 else if (is_group2 ((yyvsp[-5].instr)) && is_group1 ((yyvsp[-1].instr)))
2764 (yyval.instr) = bfin_gen_multi_instr ((yyvsp[-3].instr), (yyvsp[-1].instr), (yyvsp[-5].instr));
2765 else
2766 return yyerror ("Wrong 16 bit instructions groups, slot 1 and slot 3 must be 16-bit instrution group");
2767 }
2768 else if (((yyvsp[-1].instr)->value & 0xf800) == 0xc000)
2769 {
2770 if (is_group1 ((yyvsp[-5].instr)) && is_group2 ((yyvsp[-3].instr)))
2771 (yyval.instr) = bfin_gen_multi_instr ((yyvsp[-1].instr), (yyvsp[-5].instr), (yyvsp[-3].instr));
2772 else if (is_group2 ((yyvsp[-5].instr)) && is_group1 ((yyvsp[-3].instr)))
2773 (yyval.instr) = bfin_gen_multi_instr ((yyvsp[-1].instr), (yyvsp[-3].instr), (yyvsp[-5].instr));
2774 else
2775 return yyerror ("Wrong 16 bit instructions groups, slot 1 and slot 2 must be 16-bit instrution group");
2776 }
2777 else
2778 error ("\nIllegal Multi Issue Construct, at least any one of the slot must be DSP32 instruction group\n");
2779 }
2780 break;
2781
2782 case 6:
2783 #line 616 "bfin-parse.y"
2784 {
2785 if (((yyvsp[-3].instr)->value & 0xf800) == 0xc000)
2786 {
2787 if (is_group1 ((yyvsp[-1].instr)))
2788 (yyval.instr) = bfin_gen_multi_instr ((yyvsp[-3].instr), (yyvsp[-1].instr), 0);
2789 else if (is_group2 ((yyvsp[-1].instr)))
2790 (yyval.instr) = bfin_gen_multi_instr ((yyvsp[-3].instr), 0, (yyvsp[-1].instr));
2791 else
2792 return yyerror ("Wrong 16 bit instructions groups, slot 2 must be the 16-bit instruction group");
2793 }
2794 else if (((yyvsp[-1].instr)->value & 0xf800) == 0xc000)
2795 {
2796 if (is_group1 ((yyvsp[-3].instr)))
2797 (yyval.instr) = bfin_gen_multi_instr ((yyvsp[-1].instr), (yyvsp[-3].instr), 0);
2798 else if (is_group2 ((yyvsp[-3].instr)))
2799 (yyval.instr) = bfin_gen_multi_instr ((yyvsp[-1].instr), 0, (yyvsp[-3].instr));
2800 else
2801 return yyerror ("Wrong 16 bit instructions groups, slot 1 must be the 16-bit instruction group");
2802 }
2803 else if (is_group1 ((yyvsp[-3].instr)) && is_group2 ((yyvsp[-1].instr)))
2804 (yyval.instr) = bfin_gen_multi_instr (0, (yyvsp[-3].instr), (yyvsp[-1].instr));
2805 else if (is_group2 ((yyvsp[-3].instr)) && is_group1 ((yyvsp[-1].instr)))
2806 (yyval.instr) = bfin_gen_multi_instr (0, (yyvsp[-1].instr), (yyvsp[-3].instr));
2807 else
2808 return yyerror ("Wrong 16 bit instructions groups, slot 1 and slot 2 must be the 16-bit instruction group");
2809 }
2810 break;
2811
2812 case 7:
2813 #line 643 "bfin-parse.y"
2814 {
2815 (yyval.instr) = 0;
2816 yyerror ("");
2817 yyerrok;
2818 }
2819 break;
2820
2821 case 8:
2822 #line 654 "bfin-parse.y"
2823 {
2824 (yyval.instr) = DSP32MAC (3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0);
2825 }
2826 break;
2827
2828 case 9:
2829 #line 658 "bfin-parse.y"
2830 {
2831 int op0, op1;
2832 int w0 = 0, w1 = 0;
2833 int h00, h10, h01, h11;
2834
2835 if ((yyvsp[-1].macfunc).n == 0)
2836 {
2837 if ((yyvsp[0].mod).MM)
2838 return yyerror ("(m) not allowed with a0 unit");
2839 op1 = 3;
2840 op0 = (yyvsp[-1].macfunc).op;
2841 w1 = 0;
2842 w0 = (yyvsp[-1].macfunc).w;
2843 h00 = IS_H ((yyvsp[-1].macfunc).s0);
2844 h10 = IS_H ((yyvsp[-1].macfunc).s1);
2845 h01 = h11 = 0;
2846 }
2847 else
2848 {
2849 op1 = (yyvsp[-1].macfunc).op;
2850 op0 = 3;
2851 w1 = (yyvsp[-1].macfunc).w;
2852 w0 = 0;
2853 h00 = h10 = 0;
2854 h01 = IS_H ((yyvsp[-1].macfunc).s0);
2855 h11 = IS_H ((yyvsp[-1].macfunc).s1);
2856 }
2857 (yyval.instr) = DSP32MAC (op1, (yyvsp[0].mod).MM, (yyvsp[0].mod).mod, w1, (yyvsp[-1].macfunc).P, h01, h11, h00, h10,
2858 &(yyvsp[-1].macfunc).dst, op0, &(yyvsp[-1].macfunc).s0, &(yyvsp[-1].macfunc).s1, w0);
2859 }
2860 break;
2861
2862 case 10:
2863 #line 693 "bfin-parse.y"
2864 {
2865 Register *dst;
2866
2867 if (check_macfuncs (&(yyvsp[-4].macfunc), &(yyvsp[-3].mod), &(yyvsp[-1].macfunc), &(yyvsp[0].mod)) < 0)
2868 return -1;
2869 notethat ("assign_macfunc (.), assign_macfunc (.)\n");
2870
2871 if ((yyvsp[-4].macfunc).w)
2872 dst = &(yyvsp[-4].macfunc).dst;
2873 else
2874 dst = &(yyvsp[-1].macfunc).dst;
2875
2876 (yyval.instr) = DSP32MAC ((yyvsp[-4].macfunc).op, (yyvsp[-3].mod).MM, (yyvsp[0].mod).mod, (yyvsp[-4].macfunc).w, (yyvsp[-4].macfunc).P,
2877 IS_H ((yyvsp[-4].macfunc).s0), IS_H ((yyvsp[-4].macfunc).s1), IS_H ((yyvsp[-1].macfunc).s0), IS_H ((yyvsp[-1].macfunc).s1),
2878 dst, (yyvsp[-1].macfunc).op, &(yyvsp[-4].macfunc).s0, &(yyvsp[-4].macfunc).s1, (yyvsp[-1].macfunc).w);
2879 }
2880 break;
2881
2882 case 11:
2883 #line 713 "bfin-parse.y"
2884 {
2885 notethat ("dsp32alu: DISALGNEXCPT\n");
2886 (yyval.instr) = DSP32ALU (18, 0, 0, 0, 0, 0, 0, 0, 3);
2887 }
2888 break;
2889
2890 case 12:
2891 #line 718 "bfin-parse.y"
2892 {
2893 if (IS_DREG ((yyvsp[-5].reg)) && !IS_A1 ((yyvsp[-2].reg)) && IS_A1 ((yyvsp[-1].reg)))
2894 {
2895 notethat ("dsp32alu: dregs = ( A0 += A1 )\n");
2896 (yyval.instr) = DSP32ALU (11, 0, 0, &(yyvsp[-5].reg), 0, 0, 0, 0, 0);
2897 }
2898 else
2899 return yyerror ("Register mismatch");
2900 }
2901 break;
2902
2903 case 13:
2904 #line 728 "bfin-parse.y"
2905 {
2906 if (!IS_A1 ((yyvsp[-2].reg)) && IS_A1 ((yyvsp[-1].reg)))
2907 {
2908 notethat ("dsp32alu: dregs_half = ( A0 += A1 )\n");
2909 (yyval.instr) = DSP32ALU (11, IS_H ((yyvsp[-5].reg)), 0, &(yyvsp[-5].reg), 0, 0, 0, 0, 1);
2910 }
2911 else
2912 return yyerror ("Register mismatch");
2913 }
2914 break;
2915
2916 case 14:
2917 #line 738 "bfin-parse.y"
2918 {
2919 notethat ("dsp32alu: A_ZERO_DOT_H = dregs_hi\n");
2920 (yyval.instr) = DSP32ALU (9, IS_H ((yyvsp[0].reg)), 0, 0, &(yyvsp[0].reg), 0, 0, 0, 0);
2921 }
2922 break;
2923
2924 case 15:
2925 #line 743 "bfin-parse.y"
2926 {
2927 notethat ("dsp32alu: A_ZERO_DOT_H = dregs_hi\n");
2928 (yyval.instr) = DSP32ALU (9, IS_H ((yyvsp[0].reg)), 0, 0, &(yyvsp[0].reg), 0, 0, 0, 2);
2929 }
2930 break;
2931
2932 case 16:
2933 #line 749 "bfin-parse.y"
2934 {
2935 if (!IS_DREG ((yyvsp[-15].reg)) || !IS_DREG ((yyvsp[-13].reg)))
2936 return yyerror ("Dregs expected");
2937 else if (!valid_dreg_pair (&(yyvsp[-8].reg), (yyvsp[-6].expr)))
2938 return yyerror ("Bad dreg pair");
2939 else if (!valid_dreg_pair (&(yyvsp[-4].reg), (yyvsp[-2].expr)))
2940 return yyerror ("Bad dreg pair");
2941 else
2942 {
2943 notethat ("dsp32alu: (dregs , dregs ) = BYTEOP16P (dregs_pair , dregs_pair ) (half)\n");
2944 (yyval.instr) = DSP32ALU (21, 0, &(yyvsp[-15].reg), &(yyvsp[-13].reg), &(yyvsp[-8].reg), &(yyvsp[-4].reg), (yyvsp[0].r0).r0, 0, 0);
2945 }
2946 }
2947 break;
2948
2949 case 17:
2950 #line 765 "bfin-parse.y"
2951 {
2952 if (!IS_DREG ((yyvsp[-15].reg)) || !IS_DREG((yyvsp[-13].reg)))
2953 return yyerror ("Dregs expected");
2954 else if (!valid_dreg_pair (&(yyvsp[-8].reg), (yyvsp[-6].expr)))
2955 return yyerror ("Bad dreg pair");
2956 else if (!valid_dreg_pair (&(yyvsp[-4].reg), (yyvsp[-2].expr)))
2957 return yyerror ("Bad dreg pair");
2958 else
2959 {
2960 notethat ("dsp32alu: (dregs , dregs ) = BYTEOP16M (dregs_pair , dregs_pair ) (aligndir)\n");
2961 (yyval.instr) = DSP32ALU (21, 0, &(yyvsp[-15].reg), &(yyvsp[-13].reg), &(yyvsp[-8].reg), &(yyvsp[-4].reg), (yyvsp[0].r0).r0, 0, 1);
2962 }
2963 }
2964 break;
2965
2966 case 18:
2967 #line 780 "bfin-parse.y"
2968 {
2969 if (!IS_DREG ((yyvsp[-9].reg)) || !IS_DREG ((yyvsp[-7].reg)))
2970 return yyerror ("Dregs expected");
2971 else if (!valid_dreg_pair (&(yyvsp[-3].reg), (yyvsp[-1].expr)))
2972 return yyerror ("Bad dreg pair");
2973 else
2974 {
2975 notethat ("dsp32alu: (dregs , dregs ) = BYTEUNPACK dregs_pair (aligndir)\n");
2976 (yyval.instr) = DSP32ALU (24, 0, &(yyvsp[-9].reg), &(yyvsp[-7].reg), &(yyvsp[-3].reg), 0, (yyvsp[0].r0).r0, 0, 1);
2977 }
2978 }
2979 break;
2980
2981 case 19:
2982 #line 792 "bfin-parse.y"
2983 {
2984 if (IS_DREG ((yyvsp[-9].reg)) && IS_DREG ((yyvsp[-7].reg)) && IS_DREG ((yyvsp[-3].reg)))
2985 {
2986 notethat ("dsp32alu: (dregs , dregs ) = SEARCH dregs (searchmod)\n");
2987 (yyval.instr) = DSP32ALU (13, 0, &(yyvsp[-9].reg), &(yyvsp[-7].reg), &(yyvsp[-3].reg), 0, 0, 0, (yyvsp[-1].r0).r0);
2988 }
2989 else
2990 return yyerror ("Register mismatch");
2991 }
2992 break;
2993
2994 case 20:
2995 #line 803 "bfin-parse.y"
2996 {
2997 if (IS_DREG ((yyvsp[-10].reg)) && IS_DREG ((yyvsp[-4].reg)))
2998 {
2999 notethat ("dsp32alu: dregs = A1.l + A1.h, dregs = A0.l + A0.h \n");
3000 (yyval.instr) = DSP32ALU (12, 0, &(yyvsp[-10].reg), &(yyvsp[-4].reg), 0, 0, 0, 0, 1);
3001 }
3002 else
3003 return yyerror ("Register mismatch");
3004 }
3005 break;
3006
3007 case 21:
3008 #line 815 "bfin-parse.y"
3009 {
3010 if (IS_DREG ((yyvsp[-11].reg)) && IS_DREG ((yyvsp[-5].reg)) && !REG_SAME ((yyvsp[-9].reg), (yyvsp[-7].reg))
3011 && IS_A1 ((yyvsp[-3].reg)) && !IS_A1 ((yyvsp[-1].reg)))
3012 {
3013 notethat ("dsp32alu: dregs = A1 + A0 , dregs = A1 - A0 (amod1)\n");
3014 (yyval.instr) = DSP32ALU (17, 0, &(yyvsp[-11].reg), &(yyvsp[-5].reg), 0, 0, (yyvsp[0].modcodes).s0, (yyvsp[0].modcodes).x0, 0);
3015
3016 }
3017 else if (IS_DREG ((yyvsp[-11].reg)) && IS_DREG ((yyvsp[-5].reg)) && !REG_SAME ((yyvsp[-9].reg), (yyvsp[-7].reg))
3018 && !IS_A1 ((yyvsp[-3].reg)) && IS_A1 ((yyvsp[-1].reg)))
3019 {
3020 notethat ("dsp32alu: dregs = A0 + A1 , dregs = A0 - A1 (amod1)\n");
3021 (yyval.instr) = DSP32ALU (17, 0, &(yyvsp[-11].reg), &(yyvsp[-5].reg), 0, 0, (yyvsp[0].modcodes).s0, (yyvsp[0].modcodes).x0, 1);
3022 }
3023 else
3024 return yyerror ("Register mismatch");
3025 }
3026 break;
3027
3028 case 22:
3029 #line 834 "bfin-parse.y"
3030 {
3031 if ((yyvsp[-8].r0).r0 == (yyvsp[-2].r0).r0)
3032 return yyerror ("Operators must differ");
3033
3034 if (IS_DREG ((yyvsp[-11].reg)) && IS_DREG ((yyvsp[-9].reg)) && IS_DREG ((yyvsp[-7].reg))
3035 && REG_SAME ((yyvsp[-9].reg), (yyvsp[-3].reg)) && REG_SAME ((yyvsp[-7].reg), (yyvsp[-1].reg)))
3036 {
3037 notethat ("dsp32alu: dregs = dregs + dregs,"
3038 "dregs = dregs - dregs (amod1)\n");
3039 (yyval.instr) = DSP32ALU (4, 0, &(yyvsp[-11].reg), &(yyvsp[-5].reg), &(yyvsp[-9].reg), &(yyvsp[-7].reg), (yyvsp[0].modcodes).s0, (yyvsp[0].modcodes).x0, 2);
3040 }
3041 else
3042 return yyerror ("Register mismatch");
3043 }
3044 break;
3045
3046 case 23:
3047 #line 852 "bfin-parse.y"
3048 {
3049 if (!REG_SAME ((yyvsp[-9].reg), (yyvsp[-3].reg)) || !REG_SAME ((yyvsp[-7].reg), (yyvsp[-1].reg)))
3050 return yyerror ("Differing source registers");
3051
3052 if (!IS_DREG ((yyvsp[-11].reg)) || !IS_DREG ((yyvsp[-9].reg)) || !IS_DREG ((yyvsp[-7].reg)) || !IS_DREG ((yyvsp[-5].reg)))
3053 return yyerror ("Dregs expected");
3054
3055
3056 if ((yyvsp[-8].r0).r0 == 1 && (yyvsp[-2].r0).r0 == 2)
3057 {
3058 notethat ("dsp32alu: dregs = dregs .|. dregs , dregs = dregs .|. dregs (amod2)\n");
3059 (yyval.instr) = DSP32ALU (1, 1, &(yyvsp[-11].reg), &(yyvsp[-5].reg), &(yyvsp[-9].reg), &(yyvsp[-7].reg), (yyvsp[0].modcodes).s0, (yyvsp[0].modcodes).x0, (yyvsp[0].modcodes).r0);
3060 }
3061 else if ((yyvsp[-8].r0).r0 == 0 && (yyvsp[-2].r0).r0 == 3)
3062 {
3063 notethat ("dsp32alu: dregs = dregs .|. dregs , dregs = dregs .|. dregs (amod2)\n");
3064 (yyval.instr) = DSP32ALU (1, 0, &(yyvsp[-11].reg), &(yyvsp[-5].reg), &(yyvsp[-9].reg), &(yyvsp[-7].reg), (yyvsp[0].modcodes).s0, (yyvsp[0].modcodes).x0, (yyvsp[0].modcodes).r0);
3065 }
3066 else
3067 return yyerror ("Bar operand mismatch");
3068 }
3069 break;
3070
3071 case 24:
3072 #line 875 "bfin-parse.y"
3073 {
3074 int op;
3075
3076 if (IS_DREG ((yyvsp[-4].reg)) && IS_DREG ((yyvsp[-1].reg)))
3077 {
3078 if ((yyvsp[0].r0).r0)
3079 {
3080 notethat ("dsp32alu: dregs = ABS dregs (v)\n");
3081 op = 6;
3082 }
3083 else
3084 {
3085 /* Vector version of ABS. */
3086 notethat ("dsp32alu: dregs = ABS dregs\n");
3087 op = 7;
3088 }
3089 (yyval.instr) = DSP32ALU (op, 0, 0, &(yyvsp[-4].reg), &(yyvsp[-1].reg), 0, 0, 0, 2);
3090 }
3091 else
3092 return yyerror ("Dregs expected");
3093 }
3094 break;
3095
3096 case 25:
3097 #line 897 "bfin-parse.y"
3098 {
3099 notethat ("dsp32alu: Ax = ABS Ax\n");
3100 (yyval.instr) = DSP32ALU (16, IS_A1 ((yyvsp[-2].reg)), 0, 0, 0, 0, 0, 0, IS_A1 ((yyvsp[0].reg)));
3101 }
3102 break;
3103
3104 case 26:
3105 #line 902 "bfin-parse.y"
3106 {
3107 if (IS_DREG_L ((yyvsp[0].reg)))
3108 {
3109 notethat ("dsp32alu: A0.l = reg_half\n");
3110 (yyval.instr) = DSP32ALU (9, IS_H ((yyvsp[0].reg)), 0, 0, &(yyvsp[0].reg), 0, 0, 0, 0);
3111 }
3112 else
3113 return yyerror ("A0.l = Rx.l expected");
3114 }
3115 break;
3116
3117 case 27:
3118 #line 912 "bfin-parse.y"
3119 {
3120 if (IS_DREG_L ((yyvsp[0].reg)))
3121 {
3122 notethat ("dsp32alu: A1.l = reg_half\n");
3123 (yyval.instr) = DSP32ALU (9, IS_H ((yyvsp[0].reg)), 0, 0, &(yyvsp[0].reg), 0, 0, 0, 2);
3124 }
3125 else
3126 return yyerror ("A1.l = Rx.l expected");
3127 }
3128 break;
3129
3130 case 28:
3131 #line 923 "bfin-parse.y"
3132 {
3133 if (IS_DREG ((yyvsp[-7].reg)) && IS_DREG ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[-1].reg)))
3134 {
3135 notethat ("dsp32shift: dregs = ALIGN8 (dregs , dregs )\n");
3136 (yyval.instr) = DSP32SHIFT (13, &(yyvsp[-7].reg), &(yyvsp[-1].reg), &(yyvsp[-3].reg), (yyvsp[-5].r0).r0, 0);
3137 }
3138 else
3139 return yyerror ("Dregs expected");
3140 }
3141 break;
3142
3143 case 29:
3144 #line 934 "bfin-parse.y"
3145 {
3146 if (!IS_DREG ((yyvsp[-12].reg)))
3147 return yyerror ("Dregs expected");
3148 else if (!valid_dreg_pair (&(yyvsp[-8].reg), (yyvsp[-6].expr)))
3149 return yyerror ("Bad dreg pair");
3150 else if (!valid_dreg_pair (&(yyvsp[-4].reg), (yyvsp[-2].expr)))
3151 return yyerror ("Bad dreg pair");
3152 else
3153 {
3154 notethat ("dsp32alu: dregs = BYTEOP1P (dregs_pair , dregs_pair ) (T)\n");
3155 (yyval.instr) = DSP32ALU (20, 0, 0, &(yyvsp[-12].reg), &(yyvsp[-8].reg), &(yyvsp[-4].reg), (yyvsp[0].modcodes).s0, 0, (yyvsp[0].modcodes).r0);
3156 }
3157 }
3158 break;
3159
3160 case 30:
3161 #line 948 "bfin-parse.y"
3162 {
3163 if (!IS_DREG ((yyvsp[-11].reg)))
3164 return yyerror ("Dregs expected");
3165 else if (!valid_dreg_pair (&(yyvsp[-7].reg), (yyvsp[-5].expr)))
3166 return yyerror ("Bad dreg pair");
3167 else if (!valid_dreg_pair (&(yyvsp[-3].reg), (yyvsp[-1].expr)))
3168 return yyerror ("Bad dreg pair");
3169 else
3170 {
3171 notethat ("dsp32alu: dregs = BYTEOP1P (dregs_pair , dregs_pair ) (T)\n");
3172 (yyval.instr) = DSP32ALU (20, 0, 0, &(yyvsp[-11].reg), &(yyvsp[-7].reg), &(yyvsp[-3].reg), 0, 0, 0);
3173 }
3174 }
3175 break;
3176
3177 case 31:
3178 #line 964 "bfin-parse.y"
3179 {
3180 if (!IS_DREG ((yyvsp[-12].reg)))
3181 return yyerror ("Dregs expected");
3182 else if (!valid_dreg_pair (&(yyvsp[-8].reg), (yyvsp[-6].expr)))
3183 return yyerror ("Bad dreg pair");
3184 else if (!valid_dreg_pair (&(yyvsp[-4].reg), (yyvsp[-2].expr)))
3185 return yyerror ("Bad dreg pair");
3186 else
3187 {
3188 notethat ("dsp32alu: dregs = BYTEOP2P (dregs_pair , dregs_pair ) (rnd_op)\n");
3189 (yyval.instr) = DSP32ALU (22, (yyvsp[0].modcodes).r0, 0, &(yyvsp[-12].reg), &(yyvsp[-8].reg), &(yyvsp[-4].reg), (yyvsp[0].modcodes).s0, (yyvsp[0].modcodes).x0, (yyvsp[0].modcodes).aop);
3190 }
3191 }
3192 break;
3193
3194 case 32:
3195 #line 980 "bfin-parse.y"
3196 {
3197 if (!IS_DREG ((yyvsp[-12].reg)))
3198 return yyerror ("Dregs expected");
3199 else if (!valid_dreg_pair (&(yyvsp[-8].reg), (yyvsp[-6].expr)))
3200 return yyerror ("Bad dreg pair");
3201 else if (!valid_dreg_pair (&(yyvsp[-4].reg), (yyvsp[-2].expr)))
3202 return yyerror ("Bad dreg pair");
3203 else
3204 {
3205 notethat ("dsp32alu: dregs = BYTEOP2P (dregs_pair , dregs_pair ) (rnd_op)\n");
3206 (yyval.instr) = DSP32ALU (22, (yyvsp[0].modcodes).r0, 0, &(yyvsp[-12].reg), &(yyvsp[-8].reg), &(yyvsp[-4].reg), (yyvsp[0].modcodes).s0, 0, (yyvsp[0].modcodes).x0);
3207 }
3208 }
3209 break;
3210
3211 case 33:
3212 #line 996 "bfin-parse.y"
3213 {
3214 if (!IS_DREG ((yyvsp[-12].reg)))
3215 return yyerror ("Dregs expected");
3216 else if (!valid_dreg_pair (&(yyvsp[-8].reg), (yyvsp[-6].expr)))
3217 return yyerror ("Bad dreg pair");
3218 else if (!valid_dreg_pair (&(yyvsp[-4].reg), (yyvsp[-2].expr)))
3219 return yyerror ("Bad dreg pair");
3220 else
3221 {
3222 notethat ("dsp32alu: dregs = BYTEOP3P (dregs_pair , dregs_pair ) (b3_op)\n");
3223 (yyval.instr) = DSP32ALU (23, (yyvsp[0].modcodes).x0, 0, &(yyvsp[-12].reg), &(yyvsp[-8].reg), &(yyvsp[-4].reg), (yyvsp[0].modcodes).s0, 0, 0);
3224 }
3225 }
3226 break;
3227
3228 case 34:
3229 #line 1011 "bfin-parse.y"
3230 {
3231 if (IS_DREG ((yyvsp[-7].reg)) && IS_DREG ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[-1].reg)))
3232 {
3233 notethat ("dsp32alu: dregs = BYTEPACK (dregs , dregs )\n");
3234 (yyval.instr) = DSP32ALU (24, 0, 0, &(yyvsp[-7].reg), &(yyvsp[-3].reg), &(yyvsp[-1].reg), 0, 0, 0);
3235 }
3236 else
3237 return yyerror ("Dregs expected");
3238 }
3239 break;
3240
3241 case 35:
3242 #line 1023 "bfin-parse.y"
3243 {
3244 if (IS_HCOMPL ((yyvsp[-16].reg), (yyvsp[-14].reg)) && IS_HCOMPL ((yyvsp[-10].reg), (yyvsp[-3].reg)) && IS_HCOMPL ((yyvsp[-7].reg), (yyvsp[0].reg)))
3245 {
3246 notethat ("dsp32alu: dregs_hi = dregs_lo ="
3247 "SIGN (dregs_hi) * dregs_hi + "
3248 "SIGN (dregs_lo) * dregs_lo \n");
3249
3250 (yyval.instr) = DSP32ALU (12, 0, 0, &(yyvsp[-16].reg), &(yyvsp[-10].reg), &(yyvsp[-7].reg), 0, 0, 0);
3251 }
3252 else
3253 return yyerror ("Dregs expected");
3254 }
3255 break;
3256
3257 case 36:
3258 #line 1036 "bfin-parse.y"
3259 {
3260 if (IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[-1].reg)))
3261 {
3262 if ((yyvsp[0].modcodes).aop == 0)
3263 {
3264 /* No saturation flag specified, generate the 16 bit variant. */
3265 notethat ("COMP3op: dregs = dregs +- dregs\n");
3266 (yyval.instr) = COMP3OP (&(yyvsp[-5].reg), &(yyvsp[-3].reg), &(yyvsp[-1].reg), (yyvsp[-2].r0).r0);
3267 }
3268 else
3269 {
3270 /* Saturation flag specified, generate the 32 bit variant. */
3271 notethat ("dsp32alu: dregs = dregs +- dregs (amod1)\n");
3272 (yyval.instr) = DSP32ALU (4, 0, 0, &(yyvsp[-5].reg), &(yyvsp[-3].reg), &(yyvsp[-1].reg), (yyvsp[0].modcodes).s0, (yyvsp[0].modcodes).x0, (yyvsp[-2].r0).r0);
3273 }
3274 }
3275 else
3276 if (IS_PREG ((yyvsp[-5].reg)) && IS_PREG ((yyvsp[-3].reg)) && IS_PREG ((yyvsp[-1].reg)) && (yyvsp[-2].r0).r0 == 0)
3277 {
3278 notethat ("COMP3op: pregs = pregs + pregs\n");
3279 (yyval.instr) = COMP3OP (&(yyvsp[-5].reg), &(yyvsp[-3].reg), &(yyvsp[-1].reg), 5);
3280 }
3281 else
3282 return yyerror ("Dregs expected");
3283 }
3284 break;
3285
3286 case 37:
3287 #line 1062 "bfin-parse.y"
3288 {
3289 int op;
3290
3291 if (IS_DREG ((yyvsp[-8].reg)) && IS_DREG ((yyvsp[-4].reg)) && IS_DREG ((yyvsp[-2].reg)))
3292 {
3293 if ((yyvsp[0].r0).r0)
3294 op = 6;
3295 else
3296 op = 7;
3297
3298 notethat ("dsp32alu: dregs = {MIN|MAX} (dregs, dregs)\n");
3299 (yyval.instr) = DSP32ALU (op, 0, 0, &(yyvsp[-8].reg), &(yyvsp[-4].reg), &(yyvsp[-2].reg), 0, 0, (yyvsp[-6].r0).r0);
3300 }
3301 else
3302 return yyerror ("Dregs expected");
3303 }
3304 break;
3305
3306 case 38:
3307 #line 1080 "bfin-parse.y"
3308 {
3309 notethat ("dsp32alu: Ax = - Ax\n");
3310 (yyval.instr) = DSP32ALU (14, IS_A1 ((yyvsp[-2].reg)), 0, 0, 0, 0, 0, 0, IS_A1 ((yyvsp[0].reg)));
3311 }
3312 break;
3313
3314 case 39:
3315 #line 1085 "bfin-parse.y"
3316 {
3317 notethat ("dsp32alu: dregs_lo = dregs_lo +- dregs_lo (amod1)\n");
3318 (yyval.instr) = DSP32ALU (2 | (yyvsp[-2].r0).r0, IS_H ((yyvsp[-5].reg)), 0, &(yyvsp[-5].reg), &(yyvsp[-3].reg), &(yyvsp[-1].reg),
3319 (yyvsp[0].modcodes).s0, (yyvsp[0].modcodes).x0, HL2 ((yyvsp[-3].reg), (yyvsp[-1].reg)));
3320 }
3321 break;
3322
3323 case 40:
3324 #line 1091 "bfin-parse.y"
3325 {
3326 if (EXPR_VALUE ((yyvsp[0].expr)) == 0 && !REG_SAME ((yyvsp[-2].reg), (yyvsp[-1].reg)))
3327 {
3328 notethat ("dsp32alu: A1 = A0 = 0\n");
3329 (yyval.instr) = DSP32ALU (8, 0, 0, 0, 0, 0, 0, 0, 2);
3330 }
3331 else
3332 return yyerror ("Bad value, 0 expected");
3333 }
3334 break;
3335
3336 case 41:
3337 #line 1103 "bfin-parse.y"
3338 {
3339 if (REG_SAME ((yyvsp[-4].reg), (yyvsp[-3].reg)))
3340 {
3341 notethat ("dsp32alu: Ax = Ax (S)\n");
3342 (yyval.instr) = DSP32ALU (8, 0, 0, 0, 0, 0, 1, 0, IS_A1 ((yyvsp[-4].reg)));
3343 }
3344 else
3345 return yyerror ("Registers must be equal");
3346 }
3347 break;
3348
3349 case 42:
3350 #line 1114 "bfin-parse.y"
3351 {
3352 if (IS_DREG ((yyvsp[-3].reg)))
3353 {
3354 notethat ("dsp32alu: dregs_half = dregs (RND)\n");
3355 (yyval.instr) = DSP32ALU (12, IS_H ((yyvsp[-5].reg)), 0, &(yyvsp[-5].reg), &(yyvsp[-3].reg), 0, 0, 0, 3);
3356 }
3357 else
3358 return yyerror ("Dregs expected");
3359 }
3360 break;
3361
3362 case 43:
3363 #line 1125 "bfin-parse.y"
3364 {
3365 if (IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-3].reg)))
3366 {
3367 notethat ("dsp32alu: dregs_half = dregs (+-) dregs (RND12)\n");
3368 (yyval.instr) = DSP32ALU (5, IS_H ((yyvsp[-7].reg)), 0, &(yyvsp[-7].reg), &(yyvsp[-5].reg), &(yyvsp[-3].reg), 0, 0, (yyvsp[-4].r0).r0);
3369 }
3370 else
3371 return yyerror ("Dregs expected");
3372 }
3373 break;
3374
3375 case 44:
3376 #line 1136 "bfin-parse.y"
3377 {
3378 if (IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-3].reg)))
3379 {
3380 notethat ("dsp32alu: dregs_half = dregs -+ dregs (RND20)\n");
3381 (yyval.instr) = DSP32ALU (5, IS_H ((yyvsp[-7].reg)), 0, &(yyvsp[-7].reg), &(yyvsp[-5].reg), &(yyvsp[-3].reg), 0, 1, (yyvsp[-4].r0).r0 | 2);
3382 }
3383 else
3384 return yyerror ("Dregs expected");
3385 }
3386 break;
3387
3388 case 45:
3389 #line 1147 "bfin-parse.y"
3390 {
3391 if (!REG_SAME ((yyvsp[-1].reg), (yyvsp[0].reg)))
3392 {
3393 notethat ("dsp32alu: An = Am\n");
3394 (yyval.instr) = DSP32ALU (8, 0, 0, 0, 0, 0, IS_A1 ((yyvsp[-1].reg)), 0, 3);
3395 }
3396 else
3397 return yyerror ("Accu reg arguments must differ");
3398 }
3399 break;
3400
3401 case 46:
3402 #line 1158 "bfin-parse.y"
3403 {
3404 if (IS_DREG ((yyvsp[0].reg)))
3405 {
3406 notethat ("dsp32alu: An = dregs\n");
3407 (yyval.instr) = DSP32ALU (9, 0, 0, 0, &(yyvsp[0].reg), 0, 1, 0, IS_A1 ((yyvsp[-1].reg)) << 1);
3408 }
3409 else
3410 return yyerror ("Dregs expected");
3411 }
3412 break;
3413
3414 case 47:
3415 #line 1169 "bfin-parse.y"
3416 {
3417 if (!IS_H ((yyvsp[-1].reg)))
3418 {
3419 if ((yyvsp[-3].reg).regno == REG_A0x && IS_DREG ((yyvsp[-1].reg)))
3420 {
3421 notethat ("dsp32alu: A0.x = dregs_lo\n");
3422 (yyval.instr) = DSP32ALU (9, 0, 0, 0, &(yyvsp[-1].reg), 0, 0, 0, 1);
3423 }
3424 else if ((yyvsp[-3].reg).regno == REG_A1x && IS_DREG ((yyvsp[-1].reg)))
3425 {
3426 notethat ("dsp32alu: A1.x = dregs_lo\n");
3427 (yyval.instr) = DSP32ALU (9, 0, 0, 0, &(yyvsp[-1].reg), 0, 0, 0, 3);
3428 }
3429 else if (IS_DREG ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[-1].reg)))
3430 {
3431 notethat ("ALU2op: dregs = dregs_lo\n");
3432 (yyval.instr) = ALU2OP (&(yyvsp[-3].reg), &(yyvsp[-1].reg), 10 | ((yyvsp[0].r0).r0 ? 0: 1));
3433 }
3434 else
3435 return yyerror ("Register mismatch");
3436 }
3437 else
3438 return yyerror ("Low reg expected");
3439 }
3440 break;
3441
3442 case 48:
3443 #line 1195 "bfin-parse.y"
3444 {
3445 notethat ("LDIMMhalf: pregs_half = imm16\n");
3446
3447 if (!IS_DREG ((yyvsp[-2].reg)) && !IS_PREG ((yyvsp[-2].reg)) && !IS_IREG ((yyvsp[-2].reg))
3448 && !IS_MREG ((yyvsp[-2].reg)) && !IS_BREG ((yyvsp[-2].reg)) && !IS_LREG ((yyvsp[-2].reg)))
3449 return yyerror ("Wrong register for load immediate");
3450
3451 if (!IS_IMM ((yyvsp[0].expr), 16) && !IS_UIMM ((yyvsp[0].expr), 16))
3452 return yyerror ("Constant out of range");
3453
3454 (yyval.instr) = LDIMMHALF_R (&(yyvsp[-2].reg), IS_H ((yyvsp[-2].reg)), 0, 0, (yyvsp[0].expr));
3455 }
3456 break;
3457
3458 case 49:
3459 #line 1209 "bfin-parse.y"
3460 {
3461 notethat ("dsp32alu: An = 0\n");
3462
3463 if (imm7 ((yyvsp[0].expr)) != 0)
3464 return yyerror ("0 expected");
3465
3466 (yyval.instr) = DSP32ALU (8, 0, 0, 0, 0, 0, 0, 0, IS_A1 ((yyvsp[-1].reg)));
3467 }
3468 break;
3469
3470 case 50:
3471 #line 1219 "bfin-parse.y"
3472 {
3473 if (!IS_DREG ((yyvsp[-3].reg)) && !IS_PREG ((yyvsp[-3].reg)) && !IS_IREG ((yyvsp[-3].reg))
3474 && !IS_MREG ((yyvsp[-3].reg)) && !IS_BREG ((yyvsp[-3].reg)) && !IS_LREG ((yyvsp[-3].reg)))
3475 return yyerror ("Wrong register for load immediate");
3476
3477 if ((yyvsp[0].r0).r0 == 0)
3478 {
3479 /* 7 bit immediate value if possible.
3480 We will check for that constant value for efficiency
3481 If it goes to reloc, it will be 16 bit. */
3482 if (IS_CONST ((yyvsp[-1].expr)) && IS_IMM ((yyvsp[-1].expr), 7) && IS_DREG ((yyvsp[-3].reg)))
3483 {
3484 notethat ("COMPI2opD: dregs = imm7 (x) \n");
3485 (yyval.instr) = COMPI2OPD (&(yyvsp[-3].reg), imm7 ((yyvsp[-1].expr)), 0);
3486 }
3487 else if (IS_CONST ((yyvsp[-1].expr)) && IS_IMM ((yyvsp[-1].expr), 7) && IS_PREG ((yyvsp[-3].reg)))
3488 {
3489 notethat ("COMPI2opP: pregs = imm7 (x)\n");
3490 (yyval.instr) = COMPI2OPP (&(yyvsp[-3].reg), imm7 ((yyvsp[-1].expr)), 0);
3491 }
3492 else
3493 {
3494 if (IS_CONST ((yyvsp[-1].expr)) && !IS_IMM ((yyvsp[-1].expr), 16))
3495 return yyerror ("Immediate value out of range");
3496
3497 notethat ("LDIMMhalf: regs = luimm16 (x)\n");
3498 /* reg, H, S, Z. */
3499 (yyval.instr) = LDIMMHALF_R5 (&(yyvsp[-3].reg), 0, 1, 0, (yyvsp[-1].expr));
3500 }
3501 }
3502 else
3503 {
3504 /* (z) There is no 7 bit zero extended instruction.
3505 If the expr is a relocation, generate it. */
3506
3507 if (IS_CONST ((yyvsp[-1].expr)) && !IS_UIMM ((yyvsp[-1].expr), 16))
3508 return yyerror ("Immediate value out of range");
3509
3510 notethat ("LDIMMhalf: regs = luimm16 (x)\n");
3511 /* reg, H, S, Z. */
3512 (yyval.instr) = LDIMMHALF_R5 (&(yyvsp[-3].reg), 0, 0, 1, (yyvsp[-1].expr));
3513 }
3514 }
3515 break;
3516
3517 case 51:
3518 #line 1264 "bfin-parse.y"
3519 {
3520 if (IS_H ((yyvsp[-2].reg)))
3521 return yyerror ("Low reg expected");
3522
3523 if (IS_DREG ((yyvsp[-2].reg)) && (yyvsp[0].reg).regno == REG_A0x)
3524 {
3525 notethat ("dsp32alu: dregs_lo = A0.x\n");
3526 (yyval.instr) = DSP32ALU (10, 0, 0, &(yyvsp[-2].reg), 0, 0, 0, 0, 0);
3527 }
3528 else if (IS_DREG ((yyvsp[-2].reg)) && (yyvsp[0].reg).regno == REG_A1x)
3529 {
3530 notethat ("dsp32alu: dregs_lo = A1.x\n");
3531 (yyval.instr) = DSP32ALU (10, 0, 0, &(yyvsp[-2].reg), 0, 0, 0, 0, 1);
3532 }
3533 else
3534 return yyerror ("Register mismatch");
3535 }
3536 break;
3537
3538 case 52:
3539 #line 1283 "bfin-parse.y"
3540 {
3541 if (IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[-1].reg)))
3542 {
3543 notethat ("dsp32alu: dregs = dregs .|. dregs (amod0)\n");
3544 (yyval.instr) = DSP32ALU (0, 0, 0, &(yyvsp[-5].reg), &(yyvsp[-3].reg), &(yyvsp[-1].reg), (yyvsp[0].modcodes).s0, (yyvsp[0].modcodes).x0, (yyvsp[-2].r0).r0);
3545 }
3546 else
3547 return yyerror ("Register mismatch");
3548 }
3549 break;
3550
3551 case 53:
3552 #line 1294 "bfin-parse.y"
3553 {
3554 if (IS_DREG ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[-1].reg)))
3555 {
3556 notethat ("ALU2op: dregs = dregs_byte\n");
3557 (yyval.instr) = ALU2OP (&(yyvsp[-3].reg), &(yyvsp[-1].reg), 12 | ((yyvsp[0].r0).r0 ? 0: 1));
3558 }
3559 else
3560 return yyerror ("Register mismatch");
3561 }
3562 break;
3563
3564 case 54:
3565 #line 1305 "bfin-parse.y"
3566 {
3567 if (REG_SAME ((yyvsp[-6].reg), (yyvsp[-4].reg)) && REG_SAME ((yyvsp[-2].reg), (yyvsp[0].reg)) && !REG_SAME ((yyvsp[-6].reg), (yyvsp[-2].reg)))
3568 {
3569 notethat ("dsp32alu: A1 = ABS A1 , A0 = ABS A0\n");
3570 (yyval.instr) = DSP32ALU (16, 0, 0, 0, 0, 0, 0, 0, 3);
3571 }
3572 else
3573 return yyerror ("Register mismatch");
3574 }
3575 break;
3576
3577 case 55:
3578 #line 1316 "bfin-parse.y"
3579 {
3580 if (REG_SAME ((yyvsp[-6].reg), (yyvsp[-4].reg)) && REG_SAME ((yyvsp[-2].reg), (yyvsp[0].reg)) && !REG_SAME ((yyvsp[-6].reg), (yyvsp[-2].reg)))
3581 {
3582 notethat ("dsp32alu: A1 = - A1 , A0 = - A0\n");
3583 (yyval.instr) = DSP32ALU (14, 0, 0, 0, 0, 0, 0, 0, 3);
3584 }
3585 else
3586 return yyerror ("Register mismatch");
3587 }
3588 break;
3589
3590 case 56:
3591 #line 1327 "bfin-parse.y"
3592 {
3593 if (!IS_A1 ((yyvsp[-2].reg)) && IS_A1 ((yyvsp[-1].reg)))
3594 {
3595 notethat ("dsp32alu: A0 -= A1\n");
3596 (yyval.instr) = DSP32ALU (11, 0, 0, 0, 0, 0, (yyvsp[0].r0).r0, 0, 3);
3597 }
3598 else
3599 return yyerror ("Register mismatch");
3600 }
3601 break;
3602
3603 case 57:
3604 #line 1338 "bfin-parse.y"
3605 {
3606 if (IS_IREG ((yyvsp[-2].reg)) && EXPR_VALUE ((yyvsp[0].expr)) == 4)
3607 {
3608 notethat ("dagMODik: iregs -= 4\n");
3609 (yyval.instr) = DAGMODIK (&(yyvsp[-2].reg), 3);
3610 }
3611 else if (IS_IREG ((yyvsp[-2].reg)) && EXPR_VALUE ((yyvsp[0].expr)) == 2)
3612 {
3613 notethat ("dagMODik: iregs -= 2\n");
3614 (yyval.instr) = DAGMODIK (&(yyvsp[-2].reg), 1);
3615 }
3616 else
3617 return yyerror ("Register or value mismatch");
3618 }
3619 break;
3620
3621 case 58:
3622 #line 1354 "bfin-parse.y"
3623 {
3624 if (IS_IREG ((yyvsp[-5].reg)) && IS_MREG ((yyvsp[-3].reg)))
3625 {
3626 notethat ("dagMODim: iregs += mregs (opt_brev)\n");
3627 /* i, m, op, br. */
3628 (yyval.instr) = DAGMODIM (&(yyvsp[-5].reg), &(yyvsp[-3].reg), 0, 1);
3629 }
3630 else if (IS_PREG ((yyvsp[-5].reg)) && IS_PREG ((yyvsp[-3].reg)))
3631 {
3632 notethat ("PTR2op: pregs += pregs (BREV )\n");
3633 (yyval.instr) = PTR2OP (&(yyvsp[-5].reg), &(yyvsp[-3].reg), 5);
3634 }
3635 else
3636 return yyerror ("Register mismatch");
3637 }
3638 break;
3639
3640 case 59:
3641 #line 1371 "bfin-parse.y"
3642 {
3643 if (IS_IREG ((yyvsp[-2].reg)) && IS_MREG ((yyvsp[0].reg)))
3644 {
3645 notethat ("dagMODim: iregs -= mregs\n");
3646 (yyval.instr) = DAGMODIM (&(yyvsp[-2].reg), &(yyvsp[0].reg), 1, 0);
3647 }
3648 else if (IS_PREG ((yyvsp[-2].reg)) && IS_PREG ((yyvsp[0].reg)))
3649 {
3650 notethat ("PTR2op: pregs -= pregs\n");
3651 (yyval.instr) = PTR2OP (&(yyvsp[-2].reg), &(yyvsp[0].reg), 0);
3652 }
3653 else
3654 return yyerror ("Register mismatch");
3655 }
3656 break;
3657
3658 case 60:
3659 #line 1387 "bfin-parse.y"
3660 {
3661 if (!IS_A1 ((yyvsp[-3].reg)) && IS_A1 ((yyvsp[-1].reg)))
3662 {
3663 notethat ("dsp32alu: A0 += A1 (W32)\n");
3664 (yyval.instr) = DSP32ALU (11, 0, 0, 0, 0, 0, (yyvsp[0].r0).r0, 0, 2);
3665 }
3666 else
3667 return yyerror ("Register mismatch");
3668 }
3669 break;
3670
3671 case 61:
3672 #line 1398 "bfin-parse.y"
3673 {
3674 if (IS_IREG ((yyvsp[-2].reg)) && IS_MREG ((yyvsp[0].reg)))
3675 {
3676 notethat ("dagMODim: iregs += mregs\n");
3677 (yyval.instr) = DAGMODIM (&(yyvsp[-2].reg), &(yyvsp[0].reg), 0, 0);
3678 }
3679 else
3680 return yyerror ("iregs += mregs expected");
3681 }
3682 break;
3683
3684 case 62:
3685 #line 1409 "bfin-parse.y"
3686 {
3687 if (IS_IREG ((yyvsp[-2].reg)))
3688 {
3689 if (EXPR_VALUE ((yyvsp[0].expr)) == 4)
3690 {
3691 notethat ("dagMODik: iregs += 4\n");
3692 (yyval.instr) = DAGMODIK (&(yyvsp[-2].reg), 2);
3693 }
3694 else if (EXPR_VALUE ((yyvsp[0].expr)) == 2)
3695 {
3696 notethat ("dagMODik: iregs += 2\n");
3697 (yyval.instr) = DAGMODIK (&(yyvsp[-2].reg), 0);
3698 }
3699 else
3700 return yyerror ("iregs += [ 2 | 4 ");
3701 }
3702 else if (IS_PREG ((yyvsp[-2].reg)) && IS_IMM ((yyvsp[0].expr), 7))
3703 {
3704 notethat ("COMPI2opP: pregs += imm7\n");
3705 (yyval.instr) = COMPI2OPP (&(yyvsp[-2].reg), imm7 ((yyvsp[0].expr)), 1);
3706 }
3707 else if (IS_DREG ((yyvsp[-2].reg)) && IS_IMM ((yyvsp[0].expr), 7))
3708 {
3709 notethat ("COMPI2opD: dregs += imm7\n");
3710 (yyval.instr) = COMPI2OPD (&(yyvsp[-2].reg), imm7 ((yyvsp[0].expr)), 1);
3711 }
3712 else
3713 return yyerror ("Register mismatch");
3714 }
3715 break;
3716
3717 case 63:
3718 #line 1440 "bfin-parse.y"
3719 {
3720 if (IS_DREG ((yyvsp[-2].reg)) && IS_DREG ((yyvsp[0].reg)))
3721 {
3722 notethat ("ALU2op: dregs *= dregs\n");
3723 (yyval.instr) = ALU2OP (&(yyvsp[-2].reg), &(yyvsp[0].reg), 3);
3724 }
3725 else
3726 return yyerror ("Register mismatch");
3727 }
3728 break;
3729
3730 case 64:
3731 #line 1451 "bfin-parse.y"
3732 {
3733 if (!valid_dreg_pair (&(yyvsp[-8].reg), (yyvsp[-6].expr)))
3734 return yyerror ("Bad dreg pair");
3735 else if (!valid_dreg_pair (&(yyvsp[-4].reg), (yyvsp[-2].expr)))
3736 return yyerror ("Bad dreg pair");
3737 else
3738 {
3739 notethat ("dsp32alu: SAA (dregs_pair , dregs_pair ) (aligndir)\n");
3740 (yyval.instr) = DSP32ALU (18, 0, 0, 0, &(yyvsp[-8].reg), &(yyvsp[-4].reg), (yyvsp[0].r0).r0, 0, 0);
3741 }
3742 }
3743 break;
3744
3745 case 65:
3746 #line 1464 "bfin-parse.y"
3747 {
3748 if (REG_SAME ((yyvsp[-10].reg), (yyvsp[-9].reg)) && REG_SAME ((yyvsp[-4].reg), (yyvsp[-3].reg)) && !REG_SAME ((yyvsp[-10].reg), (yyvsp[-4].reg)))
3749 {
3750 notethat ("dsp32alu: A1 = A1 (S) , A0 = A0 (S)\n");
3751 (yyval.instr) = DSP32ALU (8, 0, 0, 0, 0, 0, 1, 0, 2);
3752 }
3753 else
3754 return yyerror ("Register mismatch");
3755 }
3756 break;
3757
3758 case 66:
3759 #line 1475 "bfin-parse.y"
3760 {
3761 if (IS_DREG ((yyvsp[-8].reg)) && IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-3].reg))
3762 && REG_SAME ((yyvsp[-8].reg), (yyvsp[-5].reg)))
3763 {
3764 if (EXPR_VALUE ((yyvsp[0].expr)) == 1)
3765 {
3766 notethat ("ALU2op: dregs = (dregs + dregs) << 1\n");
3767 (yyval.instr) = ALU2OP (&(yyvsp[-8].reg), &(yyvsp[-3].reg), 4);
3768 }
3769 else if (EXPR_VALUE ((yyvsp[0].expr)) == 2)
3770 {
3771 notethat ("ALU2op: dregs = (dregs + dregs) << 2\n");
3772 (yyval.instr) = ALU2OP (&(yyvsp[-8].reg), &(yyvsp[-3].reg), 5);
3773 }
3774 else
3775 return yyerror ("Bad shift value");
3776 }
3777 else if (IS_PREG ((yyvsp[-8].reg)) && IS_PREG ((yyvsp[-5].reg)) && IS_PREG ((yyvsp[-3].reg))
3778 && REG_SAME ((yyvsp[-8].reg), (yyvsp[-5].reg)))
3779 {
3780 if (EXPR_VALUE ((yyvsp[0].expr)) == 1)
3781 {
3782 notethat ("PTR2op: pregs = (pregs + pregs) << 1\n");
3783 (yyval.instr) = PTR2OP (&(yyvsp[-8].reg), &(yyvsp[-3].reg), 6);
3784 }
3785 else if (EXPR_VALUE ((yyvsp[0].expr)) == 2)
3786 {
3787 notethat ("PTR2op: pregs = (pregs + pregs) << 2\n");
3788 (yyval.instr) = PTR2OP (&(yyvsp[-8].reg), &(yyvsp[-3].reg), 7);
3789 }
3790 else
3791 return yyerror ("Bad shift value");
3792 }
3793 else
3794 return yyerror ("Register mismatch");
3795 }
3796 break;
3797
3798 case 67:
3799 #line 1514 "bfin-parse.y"
3800 {
3801 if (IS_DREG ((yyvsp[-4].reg)) && IS_DREG ((yyvsp[-2].reg)) && IS_DREG ((yyvsp[0].reg)))
3802 {
3803 notethat ("COMP3op: dregs = dregs | dregs\n");
3804 (yyval.instr) = COMP3OP (&(yyvsp[-4].reg), &(yyvsp[-2].reg), &(yyvsp[0].reg), 3);
3805 }
3806 else
3807 return yyerror ("Dregs expected");
3808 }
3809 break;
3810
3811 case 68:
3812 #line 1524 "bfin-parse.y"
3813 {
3814 if (IS_DREG ((yyvsp[-4].reg)) && IS_DREG ((yyvsp[-2].reg)) && IS_DREG ((yyvsp[0].reg)))
3815 {
3816 notethat ("COMP3op: dregs = dregs ^ dregs\n");
3817 (yyval.instr) = COMP3OP (&(yyvsp[-4].reg), &(yyvsp[-2].reg), &(yyvsp[0].reg), 4);
3818 }
3819 else
3820 return yyerror ("Dregs expected");
3821 }
3822 break;
3823
3824 case 69:
3825 #line 1534 "bfin-parse.y"
3826 {
3827 if (IS_PREG ((yyvsp[-8].reg)) && IS_PREG ((yyvsp[-6].reg)) && IS_PREG ((yyvsp[-3].reg)))
3828 {
3829 if (EXPR_VALUE ((yyvsp[-1].expr)) == 1)
3830 {
3831 notethat ("COMP3op: pregs = pregs + (pregs << 1)\n");
3832 (yyval.instr) = COMP3OP (&(yyvsp[-8].reg), &(yyvsp[-6].reg), &(yyvsp[-3].reg), 6);
3833 }
3834 else if (EXPR_VALUE ((yyvsp[-1].expr)) == 2)
3835 {
3836 notethat ("COMP3op: pregs = pregs + (pregs << 2)\n");
3837 (yyval.instr) = COMP3OP (&(yyvsp[-8].reg), &(yyvsp[-6].reg), &(yyvsp[-3].reg), 7);
3838 }
3839 else
3840 return yyerror ("Bad shift value");
3841 }
3842 else
3843 return yyerror ("Dregs expected");
3844 }
3845 break;
3846
3847 case 70:
3848 #line 1554 "bfin-parse.y"
3849 {
3850 if (!REG_SAME ((yyvsp[-2].reg), (yyvsp[0].reg)))
3851 {
3852 notethat ("CCflag: CC = A0 == A1\n");
3853 (yyval.instr) = CCFLAG (0, 0, 5, 0, 0);
3854 }
3855 else
3856 return yyerror ("CC register expected");
3857 }
3858 break;
3859
3860 case 71:
3861 #line 1564 "bfin-parse.y"
3862 {
3863 if (!REG_SAME ((yyvsp[-2].reg), (yyvsp[0].reg)))
3864 {
3865 notethat ("CCflag: CC = A0 < A1\n");
3866 (yyval.instr) = CCFLAG (0, 0, 6, 0, 0);
3867 }
3868 else
3869 return yyerror ("Register mismatch");
3870 }
3871 break;
3872
3873 case 72:
3874 #line 1574 "bfin-parse.y"
3875 {
3876 if (REG_CLASS((yyvsp[-3].reg)) == REG_CLASS((yyvsp[-1].reg)))
3877 {
3878 notethat ("CCflag: CC = dpregs < dpregs\n");
3879 (yyval.instr) = CCFLAG (&(yyvsp[-3].reg), (yyvsp[-1].reg).regno & CODE_MASK, (yyvsp[0].r0).r0, 0, IS_PREG ((yyvsp[-3].reg)) ? 1 : 0);
3880 }
3881 else
3882 return yyerror ("Compare only of same register class");
3883 }
3884 break;
3885
3886 case 73:
3887 #line 1584 "bfin-parse.y"
3888 {
3889 if (((yyvsp[0].r0).r0 == 1 && IS_IMM ((yyvsp[-1].expr), 3))
3890 || ((yyvsp[0].r0).r0 == 3 && IS_UIMM ((yyvsp[-1].expr), 3)))
3891 {
3892 notethat ("CCflag: CC = dpregs < (u)imm3\n");
3893 (yyval.instr) = CCFLAG (&(yyvsp[-3].reg), imm3 ((yyvsp[-1].expr)), (yyvsp[0].r0).r0, 1, IS_PREG ((yyvsp[-3].reg)) ? 1 : 0);
3894 }
3895 else
3896 return yyerror ("Bad constant value");
3897 }
3898 break;
3899
3900 case 74:
3901 #line 1595 "bfin-parse.y"
3902 {
3903 if (REG_CLASS((yyvsp[-2].reg)) == REG_CLASS((yyvsp[0].reg)))
3904 {
3905 notethat ("CCflag: CC = dpregs == dpregs\n");
3906 (yyval.instr) = CCFLAG (&(yyvsp[-2].reg), (yyvsp[0].reg).regno & CODE_MASK, 0, 0, IS_PREG ((yyvsp[-2].reg)) ? 1 : 0);
3907 }
3908 }
3909 break;
3910
3911 case 75:
3912 #line 1603 "bfin-parse.y"
3913 {
3914 if (IS_IMM ((yyvsp[0].expr), 3))
3915 {
3916 notethat ("CCflag: CC = dpregs == imm3\n");
3917 (yyval.instr) = CCFLAG (&(yyvsp[-2].reg), imm3 ((yyvsp[0].expr)), 0, 1, IS_PREG ((yyvsp[-2].reg)) ? 1 : 0);
3918 }
3919 else
3920 return yyerror ("Bad constant range");
3921 }
3922 break;
3923
3924 case 76:
3925 #line 1613 "bfin-parse.y"
3926 {
3927 if (!REG_SAME ((yyvsp[-2].reg), (yyvsp[0].reg)))
3928 {
3929 notethat ("CCflag: CC = A0 <= A1\n");
3930 (yyval.instr) = CCFLAG (0, 0, 7, 0, 0);
3931 }
3932 else
3933 return yyerror ("CC register expected");
3934 }
3935 break;
3936
3937 case 77:
3938 #line 1623 "bfin-parse.y"
3939 {
3940 if (REG_CLASS((yyvsp[-3].reg)) == REG_CLASS((yyvsp[-1].reg)))
3941 {
3942 notethat ("CCflag: CC = pregs <= pregs (..)\n");
3943 (yyval.instr) = CCFLAG (&(yyvsp[-3].reg), (yyvsp[-1].reg).regno & CODE_MASK,
3944 1 + (yyvsp[0].r0).r0, 0, IS_PREG ((yyvsp[-3].reg)) ? 1 : 0);
3945 }
3946 else
3947 return yyerror ("Compare only of same register class");
3948 }
3949 break;
3950
3951 case 78:
3952 #line 1634 "bfin-parse.y"
3953 {
3954 if (((yyvsp[0].r0).r0 == 1 && IS_IMM ((yyvsp[-1].expr), 3))
3955 || ((yyvsp[0].r0).r0 == 3 && IS_UIMM ((yyvsp[-1].expr), 3)))
3956 {
3957 if (IS_DREG ((yyvsp[-3].reg)))
3958 {
3959 notethat ("CCflag: CC = dregs <= (u)imm3\n");
3960 /* x y opc I G */
3961 (yyval.instr) = CCFLAG (&(yyvsp[-3].reg), imm3 ((yyvsp[-1].expr)), 1 + (yyvsp[0].r0).r0, 1, 0);
3962 }
3963 else if (IS_PREG ((yyvsp[-3].reg)))
3964 {
3965 notethat ("CCflag: CC = pregs <= (u)imm3\n");
3966 /* x y opc I G */
3967 (yyval.instr) = CCFLAG (&(yyvsp[-3].reg), imm3 ((yyvsp[-1].expr)), 1 + (yyvsp[0].r0).r0, 1, 1);
3968 }
3969 else
3970 return yyerror ("Dreg or Preg expected");
3971 }
3972 else
3973 return yyerror ("Bad constant value");
3974 }
3975 break;
3976
3977 case 79:
3978 #line 1658 "bfin-parse.y"
3979 {
3980 if (IS_DREG ((yyvsp[-4].reg)) && IS_DREG ((yyvsp[-2].reg)) && IS_DREG ((yyvsp[0].reg)))
3981 {
3982 notethat ("COMP3op: dregs = dregs & dregs\n");
3983 (yyval.instr) = COMP3OP (&(yyvsp[-4].reg), &(yyvsp[-2].reg), &(yyvsp[0].reg), 2);
3984 }
3985 else
3986 return yyerror ("Dregs expected");
3987 }
3988 break;
3989
3990 case 80:
3991 #line 1669 "bfin-parse.y"
3992 {
3993 notethat ("CC2stat operation\n");
3994 (yyval.instr) = bfin_gen_cc2stat ((yyvsp[0].modcodes).r0, (yyvsp[0].modcodes).x0, (yyvsp[0].modcodes).s0);
3995 }
3996 break;
3997
3998 case 81:
3999 #line 1675 "bfin-parse.y"
4000 {
4001 if (IS_ALLREG ((yyvsp[-2].reg)) && IS_ALLREG ((yyvsp[0].reg)))
4002 {
4003 notethat ("REGMV: allregs = allregs\n");
4004 (yyval.instr) = bfin_gen_regmv (&(yyvsp[0].reg), &(yyvsp[-2].reg));
4005 }
4006 else
4007 return yyerror ("Register mismatch");
4008 }
4009 break;
4010
4011 case 82:
4012 #line 1686 "bfin-parse.y"
4013 {
4014 if (IS_DREG ((yyvsp[0].reg)))
4015 {
4016 notethat ("CC2dreg: CC = dregs\n");
4017 (yyval.instr) = bfin_gen_cc2dreg (1, &(yyvsp[0].reg));
4018 }
4019 else
4020 return yyerror ("Register mismatch");
4021 }
4022 break;
4023
4024 case 83:
4025 #line 1697 "bfin-parse.y"
4026 {
4027 if (IS_DREG ((yyvsp[-2].reg)))
4028 {
4029 notethat ("CC2dreg: dregs = CC\n");
4030 (yyval.instr) = bfin_gen_cc2dreg (0, &(yyvsp[-2].reg));
4031 }
4032 else
4033 return yyerror ("Register mismatch");
4034 }
4035 break;
4036
4037 case 84:
4038 #line 1708 "bfin-parse.y"
4039 {
4040 notethat ("CC2dreg: CC =! CC\n");
4041 (yyval.instr) = bfin_gen_cc2dreg (3, 0);
4042 }
4043 break;
4044
4045 case 85:
4046 #line 1716 "bfin-parse.y"
4047 {
4048 notethat ("dsp32mult: dregs_half = multiply_halfregs (opt_mode)\n");
4049
4050 if (!IS_H ((yyvsp[-3].reg)) && (yyvsp[0].mod).MM)
4051 return yyerror ("(M) not allowed with MAC0");
4052
4053 if (IS_H ((yyvsp[-3].reg)))
4054 {
4055 (yyval.instr) = DSP32MULT (0, (yyvsp[0].mod).MM, (yyvsp[0].mod).mod, 1, 0,
4056 IS_H ((yyvsp[-1].macfunc).s0), IS_H ((yyvsp[-1].macfunc).s1), 0, 0,
4057 &(yyvsp[-3].reg), 0, &(yyvsp[-1].macfunc).s0, &(yyvsp[-1].macfunc).s1, 0);
4058 }
4059 else
4060 {
4061 (yyval.instr) = DSP32MULT (0, 0, (yyvsp[0].mod).mod, 0, 0,
4062 0, 0, IS_H ((yyvsp[-1].macfunc).s0), IS_H ((yyvsp[-1].macfunc).s1),
4063 &(yyvsp[-3].reg), 0, &(yyvsp[-1].macfunc).s0, &(yyvsp[-1].macfunc).s1, 1);
4064 }
4065 }
4066 break;
4067
4068 case 86:
4069 #line 1737 "bfin-parse.y"
4070 {
4071 /* Odd registers can use (M). */
4072 if (!IS_DREG ((yyvsp[-3].reg)))
4073 return yyerror ("Dreg expected");
4074
4075 if (!IS_EVEN ((yyvsp[-3].reg)))
4076 {
4077 notethat ("dsp32mult: dregs = multiply_halfregs (opt_mode)\n");
4078
4079 (yyval.instr) = DSP32MULT (0, (yyvsp[0].mod).MM, (yyvsp[0].mod).mod, 1, 1,
4080 IS_H ((yyvsp[-1].macfunc).s0), IS_H ((yyvsp[-1].macfunc).s1), 0, 0,
4081 &(yyvsp[-3].reg), 0, &(yyvsp[-1].macfunc).s0, &(yyvsp[-1].macfunc).s1, 0);
4082 }
4083 else if ((yyvsp[0].mod).MM == 0)
4084 {
4085 notethat ("dsp32mult: dregs = multiply_halfregs opt_mode\n");
4086 (yyval.instr) = DSP32MULT (0, 0, (yyvsp[0].mod).mod, 0, 1,
4087 0, 0, IS_H ((yyvsp[-1].macfunc).s0), IS_H ((yyvsp[-1].macfunc).s1),
4088 &(yyvsp[-3].reg), 0, &(yyvsp[-1].macfunc).s0, &(yyvsp[-1].macfunc).s1, 1);
4089 }
4090 else
4091 return yyerror ("Register or mode mismatch");
4092 }
4093 break;
4094
4095 case 87:
4096 #line 1763 "bfin-parse.y"
4097 {
4098 if (!IS_DREG ((yyvsp[-8].reg)) || !IS_DREG ((yyvsp[-3].reg)))
4099 return yyerror ("Dregs expected");
4100
4101 if (check_multiply_halfregs (&(yyvsp[-6].macfunc), &(yyvsp[-1].macfunc)) < 0)
4102 return -1;
4103
4104 if (IS_H ((yyvsp[-8].reg)) && !IS_H ((yyvsp[-3].reg)))
4105 {
4106 notethat ("dsp32mult: dregs_hi = multiply_halfregs mxd_mod, "
4107 "dregs_lo = multiply_halfregs opt_mode\n");
4108 (yyval.instr) = DSP32MULT (0, (yyvsp[-5].mod).MM, (yyvsp[0].mod).mod, 1, 0,
4109 IS_H ((yyvsp[-6].macfunc).s0), IS_H ((yyvsp[-6].macfunc).s1), IS_H ((yyvsp[-1].macfunc).s0), IS_H ((yyvsp[-1].macfunc).s1),
4110 &(yyvsp[-8].reg), 0, &(yyvsp[-6].macfunc).s0, &(yyvsp[-6].macfunc).s1, 1);
4111 }
4112 else if (!IS_H ((yyvsp[-8].reg)) && IS_H ((yyvsp[-3].reg)) && (yyvsp[-5].mod).MM == 0)
4113 {
4114 (yyval.instr) = DSP32MULT (0, (yyvsp[0].mod).MM, (yyvsp[0].mod).mod, 1, 0,
4115 IS_H ((yyvsp[-1].macfunc).s0), IS_H ((yyvsp[-1].macfunc).s1), IS_H ((yyvsp[-6].macfunc).s0), IS_H ((yyvsp[-6].macfunc).s1),
4116 &(yyvsp[-8].reg), 0, &(yyvsp[-6].macfunc).s0, &(yyvsp[-6].macfunc).s1, 1);
4117 }
4118 else
4119 return yyerror ("Multfunc Register or mode mismatch");
4120 }
4121 break;
4122
4123 case 88:
4124 #line 1789 "bfin-parse.y"
4125 {
4126 if (!IS_DREG ((yyvsp[-8].reg)) || !IS_DREG ((yyvsp[-3].reg)))
4127 return yyerror ("Dregs expected");
4128
4129 if (check_multiply_halfregs (&(yyvsp[-6].macfunc), &(yyvsp[-1].macfunc)) < 0)
4130 return -1;
4131
4132 notethat ("dsp32mult: dregs = multiply_halfregs mxd_mod, "
4133 "dregs = multiply_halfregs opt_mode\n");
4134 if (IS_EVEN ((yyvsp[-8].reg)))
4135 {
4136 if ((yyvsp[-3].reg).regno - (yyvsp[-8].reg).regno != 1 || (yyvsp[-5].mod).MM != 0)
4137 return yyerror ("Dest registers or mode mismatch");
4138
4139 /* op1 MM mmod */
4140 (yyval.instr) = DSP32MULT (0, 0, (yyvsp[0].mod).mod, 1, 1,
4141 IS_H ((yyvsp[-1].macfunc).s0), IS_H ((yyvsp[-1].macfunc).s1), IS_H ((yyvsp[-6].macfunc).s0), IS_H ((yyvsp[-6].macfunc).s1),
4142 &(yyvsp[-8].reg), 0, &(yyvsp[-6].macfunc).s0, &(yyvsp[-6].macfunc).s1, 1);
4143
4144 }
4145 else
4146 {
4147 if ((yyvsp[-8].reg).regno - (yyvsp[-3].reg).regno != 1)
4148 return yyerror ("Dest registers mismatch");
4149
4150 (yyval.instr) = DSP32MULT (0, (yyvsp[0].mod).MM, (yyvsp[0].mod).mod, 1, 1,
4151 IS_H ((yyvsp[-6].macfunc).s0), IS_H ((yyvsp[-6].macfunc).s1), IS_H ((yyvsp[-1].macfunc).s0), IS_H ((yyvsp[-1].macfunc).s1),
4152 &(yyvsp[-8].reg), 0, &(yyvsp[-6].macfunc).s0, &(yyvsp[-6].macfunc).s1, 1);
4153 }
4154 }
4155 break;
4156
4157 case 89:
4158 #line 1823 "bfin-parse.y"
4159 {
4160 if (!REG_SAME ((yyvsp[-4].reg), (yyvsp[-2].reg)))
4161 return yyerror ("Aregs must be same");
4162
4163 if (IS_DREG ((yyvsp[0].reg)) && !IS_H ((yyvsp[0].reg)))
4164 {
4165 notethat ("dsp32shift: A0 = ASHIFT A0 BY dregs_lo\n");
4166 (yyval.instr) = DSP32SHIFT (3, 0, &(yyvsp[0].reg), 0, 0, IS_A1 ((yyvsp[-4].reg)));
4167 }
4168 else
4169 return yyerror ("Dregs expected");
4170 }
4171 break;
4172
4173 case 90:
4174 #line 1837 "bfin-parse.y"
4175 {
4176 if (IS_DREG ((yyvsp[-1].reg)) && !IS_H ((yyvsp[-1].reg)))
4177 {
4178 notethat ("dsp32shift: dregs_half = ASHIFT dregs_half BY dregs_lo\n");
4179 (yyval.instr) = DSP32SHIFT (0, &(yyvsp[-6].reg), &(yyvsp[-1].reg), &(yyvsp[-3].reg), (yyvsp[0].modcodes).s0, HL2 ((yyvsp[-6].reg), (yyvsp[-3].reg)));
4180 }
4181 else
4182 return yyerror ("Dregs expected");
4183 }
4184 break;
4185
4186 case 91:
4187 #line 1848 "bfin-parse.y"
4188 {
4189 if (!REG_SAME ((yyvsp[-3].reg), (yyvsp[-2].reg)))
4190 return yyerror ("Aregs must be same");
4191
4192 if (IS_UIMM ((yyvsp[0].expr), 5))
4193 {
4194 notethat ("dsp32shiftimm: A0 = A0 << uimm5\n");
4195 (yyval.instr) = DSP32SHIFTIMM (3, 0, imm5 ((yyvsp[0].expr)), 0, 0, IS_A1 ((yyvsp[-3].reg)));
4196 }
4197 else
4198 return yyerror ("Bad shift value");
4199 }
4200 break;
4201
4202 case 92:
4203 #line 1862 "bfin-parse.y"
4204 {
4205 if (IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-3].reg)) && IS_UIMM ((yyvsp[-1].expr), 5))
4206 {
4207 if ((yyvsp[0].modcodes).r0)
4208 {
4209 /* Vector? */
4210 notethat ("dsp32shiftimm: dregs = dregs << expr (V, .)\n");
4211 (yyval.instr) = DSP32SHIFTIMM (1, &(yyvsp[-5].reg), imm4 ((yyvsp[-1].expr)), &(yyvsp[-3].reg), (yyvsp[0].modcodes).s0 ? 1 : 2, 0);
4212 }
4213 else
4214 {
4215 notethat ("dsp32shiftimm: dregs = dregs << uimm5 (.)\n");
4216 (yyval.instr) = DSP32SHIFTIMM (2, &(yyvsp[-5].reg), imm6 ((yyvsp[-1].expr)), &(yyvsp[-3].reg), (yyvsp[0].modcodes).s0 ? 1 : 2, 0);
4217 }
4218 }
4219 else if ((yyvsp[0].modcodes).s0 == 0 && IS_PREG ((yyvsp[-5].reg)) && IS_PREG ((yyvsp[-3].reg)))
4220 {
4221 if (EXPR_VALUE ((yyvsp[-1].expr)) == 2)
4222 {
4223 notethat ("PTR2op: pregs = pregs << 2\n");
4224 (yyval.instr) = PTR2OP (&(yyvsp[-5].reg), &(yyvsp[-3].reg), 1);
4225 }
4226 else if (EXPR_VALUE ((yyvsp[-1].expr)) == 1)
4227 {
4228 notethat ("COMP3op: pregs = pregs << 1\n");
4229 (yyval.instr) = COMP3OP (&(yyvsp[-5].reg), &(yyvsp[-3].reg), &(yyvsp[-3].reg), 5);
4230 }
4231 else
4232 return yyerror ("Bad shift value");
4233 }
4234 else
4235 return yyerror ("Bad shift value or register");
4236 }
4237 break;
4238
4239 case 93:
4240 #line 1896 "bfin-parse.y"
4241 {
4242 if (IS_UIMM ((yyvsp[0].expr), 4))
4243 {
4244 notethat ("dsp32shiftimm: dregs_half = dregs_half << uimm4\n");
4245 (yyval.instr) = DSP32SHIFTIMM (0x0, &(yyvsp[-4].reg), imm5 ((yyvsp[0].expr)), &(yyvsp[-2].reg), 2, HL2 ((yyvsp[-4].reg), (yyvsp[-2].reg)));
4246 }
4247 else
4248 return yyerror ("Bad shift value");
4249 }
4250 break;
4251
4252 case 94:
4253 #line 1906 "bfin-parse.y"
4254 {
4255 if (IS_UIMM ((yyvsp[-1].expr), 4))
4256 {
4257 notethat ("dsp32shiftimm: dregs_half = dregs_half << uimm4\n");
4258 (yyval.instr) = DSP32SHIFTIMM (0x0, &(yyvsp[-5].reg), imm5 ((yyvsp[-1].expr)), &(yyvsp[-3].reg), (yyvsp[0].modcodes).s0, HL2 ((yyvsp[-5].reg), (yyvsp[-3].reg)));
4259 }
4260 else
4261 return yyerror ("Bad shift value");
4262 }
4263 break;
4264
4265 case 95:
4266 #line 1916 "bfin-parse.y"
4267 {
4268 int op;
4269
4270 if (IS_DREG ((yyvsp[-6].reg)) && IS_DREG ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[-1].reg)) && !IS_H ((yyvsp[-1].reg)))
4271 {
4272 if ((yyvsp[0].modcodes).r0)
4273 {
4274 op = 1;
4275 notethat ("dsp32shift: dregs = ASHIFT dregs BY "
4276 "dregs_lo (V, .)\n");
4277 }
4278 else
4279 {
4280
4281 op = 2;
4282 notethat ("dsp32shift: dregs = ASHIFT dregs BY dregs_lo (.)\n");
4283 }
4284 (yyval.instr) = DSP32SHIFT (op, &(yyvsp[-6].reg), &(yyvsp[-1].reg), &(yyvsp[-3].reg), (yyvsp[0].modcodes).s0, 0);
4285 }
4286 else
4287 return yyerror ("Dregs expected");
4288 }
4289 break;
4290
4291 case 96:
4292 #line 1941 "bfin-parse.y"
4293 {
4294 if (IS_DREG_L ((yyvsp[-8].reg)) && IS_DREG_L ((yyvsp[-4].reg)) && IS_DREG_L ((yyvsp[-2].reg)))
4295 {
4296 notethat ("dsp32shift: dregs_lo = EXPADJ (dregs , dregs_lo )\n");
4297 (yyval.instr) = DSP32SHIFT (7, &(yyvsp[-8].reg), &(yyvsp[-2].reg), &(yyvsp[-4].reg), (yyvsp[0].r0).r0, 0);
4298 }
4299 else
4300 return yyerror ("Bad shift value or register");
4301 }
4302 break;
4303
4304 case 97:
4305 #line 1953 "bfin-parse.y"
4306 {
4307 if (IS_DREG_L ((yyvsp[-7].reg)) && IS_DREG_L ((yyvsp[-3].reg)) && IS_DREG_L ((yyvsp[-1].reg)))
4308 {
4309 notethat ("dsp32shift: dregs_lo = EXPADJ (dregs_lo, dregs_lo)\n");
4310 (yyval.instr) = DSP32SHIFT (7, &(yyvsp[-7].reg), &(yyvsp[-1].reg), &(yyvsp[-3].reg), 2, 0);
4311 }
4312 else if (IS_DREG_L ((yyvsp[-7].reg)) && IS_DREG_H ((yyvsp[-3].reg)) && IS_DREG_L ((yyvsp[-1].reg)))
4313 {
4314 notethat ("dsp32shift: dregs_lo = EXPADJ (dregs_hi, dregs_lo)\n");
4315 (yyval.instr) = DSP32SHIFT (7, &(yyvsp[-7].reg), &(yyvsp[-1].reg), &(yyvsp[-3].reg), 3, 0);
4316 }
4317 else
4318 return yyerror ("Bad shift value or register");
4319 }
4320 break;
4321
4322 case 98:
4323 #line 1971 "bfin-parse.y"
4324 {
4325 if (IS_DREG ((yyvsp[-7].reg)) && IS_DREG ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[-1].reg)))
4326 {
4327 notethat ("dsp32shift: dregs = DEPOSIT (dregs , dregs )\n");
4328 (yyval.instr) = DSP32SHIFT (10, &(yyvsp[-7].reg), &(yyvsp[-1].reg), &(yyvsp[-3].reg), 2, 0);
4329 }
4330 else
4331 return yyerror ("Register mismatch");
4332 }
4333 break;
4334
4335 case 99:
4336 #line 1982 "bfin-parse.y"
4337 {
4338 if (IS_DREG ((yyvsp[-10].reg)) && IS_DREG ((yyvsp[-6].reg)) && IS_DREG ((yyvsp[-4].reg)))
4339 {
4340 notethat ("dsp32shift: dregs = DEPOSIT (dregs , dregs ) (X)\n");
4341 (yyval.instr) = DSP32SHIFT (10, &(yyvsp[-10].reg), &(yyvsp[-4].reg), &(yyvsp[-6].reg), 3, 0);
4342 }
4343 else
4344 return yyerror ("Register mismatch");
4345 }
4346 break;
4347
4348 case 100:
4349 #line 1993 "bfin-parse.y"
4350 {
4351 if (IS_DREG ((yyvsp[-8].reg)) && IS_DREG ((yyvsp[-4].reg)) && IS_DREG_L ((yyvsp[-2].reg)))
4352 {
4353 notethat ("dsp32shift: dregs = EXTRACT (dregs, dregs_lo ) (.)\n");
4354 (yyval.instr) = DSP32SHIFT (10, &(yyvsp[-8].reg), &(yyvsp[-2].reg), &(yyvsp[-4].reg), (yyvsp[0].r0).r0, 0);
4355 }
4356 else
4357 return yyerror ("Register mismatch");
4358 }
4359 break;
4360
4361 case 101:
4362 #line 2004 "bfin-parse.y"
4363 {
4364 if (!REG_SAME ((yyvsp[-3].reg), (yyvsp[-2].reg)))
4365 return yyerror ("Aregs must be same");
4366
4367 if (IS_UIMM ((yyvsp[0].expr), 5))
4368 {
4369 notethat ("dsp32shiftimm: Ax = Ax >>> uimm5\n");
4370 (yyval.instr) = DSP32SHIFTIMM (3, 0, -imm6 ((yyvsp[0].expr)), 0, 0, IS_A1 ((yyvsp[-3].reg)));
4371 }
4372 else
4373 return yyerror ("Shift value range error");
4374 }
4375 break;
4376
4377 case 102:
4378 #line 2017 "bfin-parse.y"
4379 {
4380 if (REG_SAME ((yyvsp[-4].reg), (yyvsp[-2].reg)) && IS_DREG_L ((yyvsp[0].reg)))
4381 {
4382 notethat ("dsp32shift: Ax = LSHIFT Ax BY dregs_lo\n");
4383 (yyval.instr) = DSP32SHIFT (3, 0, &(yyvsp[0].reg), 0, 1, IS_A1 ((yyvsp[-4].reg)));
4384 }
4385 else
4386 return yyerror ("Register mismatch");
4387 }
4388 break;
4389
4390 case 103:
4391 #line 2028 "bfin-parse.y"
4392 {
4393 if (IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-2].reg)) && IS_DREG_L ((yyvsp[0].reg)))
4394 {
4395 notethat ("dsp32shift: dregs_lo = LSHIFT dregs_hi BY dregs_lo\n");
4396 (yyval.instr) = DSP32SHIFT (0, &(yyvsp[-5].reg), &(yyvsp[0].reg), &(yyvsp[-2].reg), 2, HL2 ((yyvsp[-5].reg), (yyvsp[-2].reg)));
4397 }
4398 else
4399 return yyerror ("Register mismatch");
4400 }
4401 break;
4402
4403 case 104:
4404 #line 2039 "bfin-parse.y"
4405 {
4406 if (IS_DREG ((yyvsp[-6].reg)) && IS_DREG ((yyvsp[-3].reg)) && IS_DREG_L ((yyvsp[-1].reg)))
4407 {
4408 notethat ("dsp32shift: dregs = LSHIFT dregs BY dregs_lo (V )\n");
4409 (yyval.instr) = DSP32SHIFT ((yyvsp[0].r0).r0 ? 1: 2, &(yyvsp[-6].reg), &(yyvsp[-1].reg), &(yyvsp[-3].reg), 2, 0);
4410 }
4411 else
4412 return yyerror ("Register mismatch");
4413 }
4414 break;
4415
4416 case 105:
4417 #line 2050 "bfin-parse.y"
4418 {
4419 if (IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-2].reg)) && IS_DREG_L ((yyvsp[0].reg)))
4420 {
4421 notethat ("dsp32shift: dregs = SHIFT dregs BY dregs_lo\n");
4422 (yyval.instr) = DSP32SHIFT (2, &(yyvsp[-5].reg), &(yyvsp[0].reg), &(yyvsp[-2].reg), 2, 0);
4423 }
4424 else
4425 return yyerror ("Register mismatch");
4426 }
4427 break;
4428
4429 case 106:
4430 #line 2061 "bfin-parse.y"
4431 {
4432 if (REG_SAME ((yyvsp[-3].reg), (yyvsp[-2].reg)) && IS_IMM ((yyvsp[0].expr), 6) >= 0)
4433 {
4434 notethat ("dsp32shiftimm: Ax = Ax >> imm6\n");
4435 (yyval.instr) = DSP32SHIFTIMM (3, 0, -imm6 ((yyvsp[0].expr)), 0, 1, IS_A1 ((yyvsp[-3].reg)));
4436 }
4437 else
4438 return yyerror ("Accu register expected");
4439 }
4440 break;
4441
4442 case 107:
4443 #line 2072 "bfin-parse.y"
4444 {
4445 if ((yyvsp[0].r0).r0 == 1)
4446 {
4447 if (IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-3].reg)) && IS_UIMM ((yyvsp[-1].expr), 5))
4448 {
4449 notethat ("dsp32shiftimm: dregs = dregs >> uimm5 (V)\n");
4450 (yyval.instr) = DSP32SHIFTIMM (1, &(yyvsp[-5].reg), -uimm5 ((yyvsp[-1].expr)), &(yyvsp[-3].reg), 2, 0);
4451 }
4452 else
4453 return yyerror ("Register mismatch");
4454 }
4455 else
4456 {
4457 if (IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-3].reg)) && IS_UIMM ((yyvsp[-1].expr), 5))
4458 {
4459 notethat ("dsp32shiftimm: dregs = dregs >> uimm5\n");
4460 (yyval.instr) = DSP32SHIFTIMM (2, &(yyvsp[-5].reg), -imm6 ((yyvsp[-1].expr)), &(yyvsp[-3].reg), 2, 0);
4461 }
4462 else if (IS_PREG ((yyvsp[-5].reg)) && IS_PREG ((yyvsp[-3].reg)) && EXPR_VALUE ((yyvsp[-1].expr)) == 2)
4463 {
4464 notethat ("PTR2op: pregs = pregs >> 2\n");
4465 (yyval.instr) = PTR2OP (&(yyvsp[-5].reg), &(yyvsp[-3].reg), 3);
4466 }
4467 else if (IS_PREG ((yyvsp[-5].reg)) && IS_PREG ((yyvsp[-3].reg)) && EXPR_VALUE ((yyvsp[-1].expr)) == 1)
4468 {
4469 notethat ("PTR2op: pregs = pregs >> 1\n");
4470 (yyval.instr) = PTR2OP (&(yyvsp[-5].reg), &(yyvsp[-3].reg), 4);
4471 }
4472 else
4473 return yyerror ("Register mismatch");
4474 }
4475 }
4476 break;
4477
4478 case 108:
4479 #line 2105 "bfin-parse.y"
4480 {
4481 if (IS_UIMM ((yyvsp[0].expr), 5))
4482 {
4483 notethat ("dsp32shiftimm: dregs_half = dregs_half >> uimm5\n");
4484 (yyval.instr) = DSP32SHIFTIMM (0, &(yyvsp[-4].reg), -uimm5 ((yyvsp[0].expr)), &(yyvsp[-2].reg), 2, HL2 ((yyvsp[-4].reg), (yyvsp[-2].reg)));
4485 }
4486 else
4487 return yyerror ("Register mismatch");
4488 }
4489 break;
4490
4491 case 109:
4492 #line 2115 "bfin-parse.y"
4493 {
4494 if (IS_UIMM ((yyvsp[-1].expr), 5))
4495 {
4496 notethat ("dsp32shiftimm: dregs_half = dregs_half >>> uimm5\n");
4497 (yyval.instr) = DSP32SHIFTIMM (0, &(yyvsp[-5].reg), -uimm5 ((yyvsp[-1].expr)), &(yyvsp[-3].reg),
4498 (yyvsp[0].modcodes).s0, HL2 ((yyvsp[-5].reg), (yyvsp[-3].reg)));
4499 }
4500 else
4501 return yyerror ("Register or modifier mismatch");
4502 }
4503 break;
4504
4505 case 110:
4506 #line 2128 "bfin-parse.y"
4507 {
4508 if (IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-3].reg)) && IS_UIMM ((yyvsp[-1].expr), 5))
4509 {
4510 if ((yyvsp[0].modcodes).r0)
4511 {
4512 /* Vector? */
4513 notethat ("dsp32shiftimm: dregs = dregs >>> uimm5 (V, .)\n");
4514 (yyval.instr) = DSP32SHIFTIMM (1, &(yyvsp[-5].reg), -uimm5 ((yyvsp[-1].expr)), &(yyvsp[-3].reg), (yyvsp[0].modcodes).s0, 0);
4515 }
4516 else
4517 {
4518 notethat ("dsp32shiftimm: dregs = dregs >>> uimm5 (.)\n");
4519 (yyval.instr) = DSP32SHIFTIMM (2, &(yyvsp[-5].reg), -uimm5 ((yyvsp[-1].expr)), &(yyvsp[-3].reg), (yyvsp[0].modcodes).s0, 0);
4520 }
4521 }
4522 else
4523 return yyerror ("Register mismatch");
4524 }
4525 break;
4526
4527 case 111:
4528 #line 2148 "bfin-parse.y"
4529 {
4530 if (IS_DREG_L ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[0].reg)))
4531 {
4532 notethat ("dsp32shift: dregs_lo = ONES dregs\n");
4533 (yyval.instr) = DSP32SHIFT (6, &(yyvsp[-3].reg), 0, &(yyvsp[0].reg), 3, 0);
4534 }
4535 else
4536 return yyerror ("Register mismatch");
4537 }
4538 break;
4539
4540 case 112:
4541 #line 2159 "bfin-parse.y"
4542 {
4543 if (IS_DREG ((yyvsp[-7].reg)) && IS_DREG ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[-1].reg)))
4544 {
4545 notethat ("dsp32shift: dregs = PACK (dregs_hi , dregs_hi )\n");
4546 (yyval.instr) = DSP32SHIFT (4, &(yyvsp[-7].reg), &(yyvsp[-1].reg), &(yyvsp[-3].reg), HL2 ((yyvsp[-3].reg), (yyvsp[-1].reg)), 0);
4547 }
4548 else
4549 return yyerror ("Register mismatch");
4550 }
4551 break;
4552
4553 case 113:
4554 #line 2170 "bfin-parse.y"
4555 {
4556 if (IS_DREG ((yyvsp[-9].reg))
4557 && (yyvsp[-3].reg).regno == REG_A0
4558 && IS_DREG ((yyvsp[-1].reg)) && !IS_H ((yyvsp[-9].reg)) && !IS_A1 ((yyvsp[-3].reg)))
4559 {
4560 notethat ("dsp32shift: dregs_lo = CC = BXORSHIFT (A0 , dregs )\n");
4561 (yyval.instr) = DSP32SHIFT (11, &(yyvsp[-9].reg), &(yyvsp[-1].reg), 0, 0, 0);
4562 }
4563 else
4564 return yyerror ("Register mismatch");
4565 }
4566 break;
4567
4568 case 114:
4569 #line 2183 "bfin-parse.y"
4570 {
4571 if (IS_DREG ((yyvsp[-9].reg))
4572 && (yyvsp[-3].reg).regno == REG_A0
4573 && IS_DREG ((yyvsp[-1].reg)) && !IS_H ((yyvsp[-9].reg)) && !IS_A1 ((yyvsp[-3].reg)))
4574 {
4575 notethat ("dsp32shift: dregs_lo = CC = BXOR (A0 , dregs)\n");
4576 (yyval.instr) = DSP32SHIFT (11, &(yyvsp[-9].reg), &(yyvsp[-1].reg), 0, 1, 0);
4577 }
4578 else
4579 return yyerror ("Register mismatch");
4580 }
4581 break;
4582
4583 case 115:
4584 #line 2196 "bfin-parse.y"
4585 {
4586 if (IS_DREG ((yyvsp[-11].reg)) && !IS_H ((yyvsp[-11].reg)) && !REG_SAME ((yyvsp[-5].reg), (yyvsp[-3].reg)))
4587 {
4588 notethat ("dsp32shift: dregs_lo = CC = BXOR (A0 , A1 , CC)\n");
4589 (yyval.instr) = DSP32SHIFT (12, &(yyvsp[-11].reg), 0, 0, 1, 0);
4590 }
4591 else
4592 return yyerror ("Register mismatch");
4593 }
4594 break;
4595
4596 case 116:
4597 #line 2207 "bfin-parse.y"
4598 {
4599 if (REG_SAME ((yyvsp[-4].reg), (yyvsp[-2].reg)) && IS_DREG_L ((yyvsp[0].reg)))
4600 {
4601 notethat ("dsp32shift: Ax = ROT Ax BY dregs_lo\n");
4602 (yyval.instr) = DSP32SHIFT (3, 0, &(yyvsp[0].reg), 0, 2, IS_A1 ((yyvsp[-4].reg)));
4603 }
4604 else
4605 return yyerror ("Register mismatch");
4606 }
4607 break;
4608
4609 case 117:
4610 #line 2218 "bfin-parse.y"
4611 {
4612 if (IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-2].reg)) && IS_DREG_L ((yyvsp[0].reg)))
4613 {
4614 notethat ("dsp32shift: dregs = ROT dregs BY dregs_lo\n");
4615 (yyval.instr) = DSP32SHIFT (2, &(yyvsp[-5].reg), &(yyvsp[0].reg), &(yyvsp[-2].reg), 3, 0);
4616 }
4617 else
4618 return yyerror ("Register mismatch");
4619 }
4620 break;
4621
4622 case 118:
4623 #line 2229 "bfin-parse.y"
4624 {
4625 if (IS_IMM ((yyvsp[0].expr), 6))
4626 {
4627 notethat ("dsp32shiftimm: An = ROT An BY imm6\n");
4628 (yyval.instr) = DSP32SHIFTIMM (3, 0, imm6 ((yyvsp[0].expr)), 0, 2, IS_A1 ((yyvsp[-4].reg)));
4629 }
4630 else
4631 return yyerror ("Register mismatch");
4632 }
4633 break;
4634
4635 case 119:
4636 #line 2240 "bfin-parse.y"
4637 {
4638 if (IS_DREG ((yyvsp[-5].reg)) && IS_DREG ((yyvsp[-2].reg)) && IS_IMM ((yyvsp[0].expr), 6))
4639 {
4640 (yyval.instr) = DSP32SHIFTIMM (2, &(yyvsp[-5].reg), imm6 ((yyvsp[0].expr)), &(yyvsp[-2].reg), 3, IS_A1 ((yyvsp[-5].reg)));
4641 }
4642 else
4643 return yyerror ("Register mismatch");
4644 }
4645 break;
4646
4647 case 120:
4648 #line 2250 "bfin-parse.y"
4649 {
4650 if (IS_DREG_L ((yyvsp[-3].reg)))
4651 {
4652 notethat ("dsp32shift: dregs_lo = SIGNBITS An\n");
4653 (yyval.instr) = DSP32SHIFT (6, &(yyvsp[-3].reg), 0, 0, IS_A1 ((yyvsp[0].reg)), 0);
4654 }
4655 else
4656 return yyerror ("Register mismatch");
4657 }
4658 break;
4659
4660 case 121:
4661 #line 2261 "bfin-parse.y"
4662 {
4663 if (IS_DREG_L ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[0].reg)))
4664 {
4665 notethat ("dsp32shift: dregs_lo = SIGNBITS dregs\n");
4666 (yyval.instr) = DSP32SHIFT (5, &(yyvsp[-3].reg), 0, &(yyvsp[0].reg), 0, 0);
4667 }
4668 else
4669 return yyerror ("Register mismatch");
4670 }
4671 break;
4672
4673 case 122:
4674 #line 2272 "bfin-parse.y"
4675 {
4676 if (IS_DREG_L ((yyvsp[-3].reg)))
4677 {
4678 notethat ("dsp32shift: dregs_lo = SIGNBITS dregs_lo\n");
4679 (yyval.instr) = DSP32SHIFT (5, &(yyvsp[-3].reg), 0, &(yyvsp[0].reg), 1 + IS_H ((yyvsp[0].reg)), 0);
4680 }
4681 else
4682 return yyerror ("Register mismatch");
4683 }
4684 break;
4685
4686 case 123:
4687 #line 2284 "bfin-parse.y"
4688 {
4689 if (IS_DREG_L ((yyvsp[-6].reg)) && IS_DREG ((yyvsp[-2].reg)))
4690 {
4691 notethat ("dsp32shift: dregs_lo = VIT_MAX (dregs) (..)\n");
4692 (yyval.instr) = DSP32SHIFT (9, &(yyvsp[-6].reg), 0, &(yyvsp[-2].reg), ((yyvsp[0].r0).r0 ? 0 : 1), 0);
4693 }
4694 else
4695 return yyerror ("Register mismatch");
4696 }
4697 break;
4698
4699 case 124:
4700 #line 2295 "bfin-parse.y"
4701 {
4702 if (IS_DREG ((yyvsp[-8].reg)) && IS_DREG ((yyvsp[-4].reg)) && IS_DREG ((yyvsp[-2].reg)))
4703 {
4704 notethat ("dsp32shift: dregs = VIT_MAX (dregs, dregs) (ASR)\n");
4705 (yyval.instr) = DSP32SHIFT (9, &(yyvsp[-8].reg), &(yyvsp[-2].reg), &(yyvsp[-4].reg), 2 | ((yyvsp[0].r0).r0 ? 0 : 1), 0);
4706 }
4707 else
4708 return yyerror ("Register mismatch");
4709 }
4710 break;
4711
4712 case 125:
4713 #line 2306 "bfin-parse.y"
4714 {
4715 if (IS_DREG ((yyvsp[-6].reg)) && IS_DREG ((yyvsp[-4].reg)) && !IS_A1 ((yyvsp[-2].reg)))
4716 {
4717 notethat ("dsp32shift: BITMUX (dregs , dregs , A0) (ASR)\n");
4718 (yyval.instr) = DSP32SHIFT (8, 0, &(yyvsp[-6].reg), &(yyvsp[-4].reg), (yyvsp[0].r0).r0, 0);
4719 }
4720 else
4721 return yyerror ("Register mismatch");
4722 }
4723 break;
4724
4725 case 126:
4726 #line 2317 "bfin-parse.y"
4727 {
4728 if (!IS_A1 ((yyvsp[-8].reg)) && !IS_A1 ((yyvsp[-5].reg)) && IS_A1 ((yyvsp[-3].reg)))
4729 {
4730 notethat ("dsp32shift: A0 = BXORSHIFT (A0 , A1 , CC )\n");
4731 (yyval.instr) = DSP32SHIFT (12, 0, 0, 0, 0, 0);
4732 }
4733 else
4734 return yyerror ("Dregs expected");
4735 }
4736 break;
4737
4738 case 127:
4739 #line 2330 "bfin-parse.y"
4740 {
4741 if (IS_DREG ((yyvsp[-3].reg)) && IS_UIMM ((yyvsp[-1].expr), 5))
4742 {
4743 notethat ("LOGI2op: BITCLR (dregs , uimm5 )\n");
4744 (yyval.instr) = LOGI2OP ((yyvsp[-3].reg), uimm5 ((yyvsp[-1].expr)), 4);
4745 }
4746 else
4747 return yyerror ("Register mismatch");
4748 }
4749 break;
4750
4751 case 128:
4752 #line 2342 "bfin-parse.y"
4753 {
4754 if (IS_DREG ((yyvsp[-3].reg)) && IS_UIMM ((yyvsp[-1].expr), 5))
4755 {
4756 notethat ("LOGI2op: BITCLR (dregs , uimm5 )\n");
4757 (yyval.instr) = LOGI2OP ((yyvsp[-3].reg), uimm5 ((yyvsp[-1].expr)), 2);
4758 }
4759 else
4760 return yyerror ("Register mismatch");
4761 }
4762 break;
4763
4764 case 129:
4765 #line 2354 "bfin-parse.y"
4766 {
4767 if (IS_DREG ((yyvsp[-3].reg)) && IS_UIMM ((yyvsp[-1].expr), 5))
4768 {
4769 notethat ("LOGI2op: BITCLR (dregs , uimm5 )\n");
4770 (yyval.instr) = LOGI2OP ((yyvsp[-3].reg), uimm5 ((yyvsp[-1].expr)), 3);
4771 }
4772 else
4773 return yyerror ("Register mismatch");
4774 }
4775 break;
4776
4777 case 130:
4778 #line 2365 "bfin-parse.y"
4779 {
4780 if (IS_DREG ((yyvsp[-3].reg)) && IS_UIMM ((yyvsp[-1].expr), 5))
4781 {
4782 notethat ("LOGI2op: CC =! BITTST (dregs , uimm5 )\n");
4783 (yyval.instr) = LOGI2OP ((yyvsp[-3].reg), uimm5 ((yyvsp[-1].expr)), 0);
4784 }
4785 else
4786 return yyerror ("Register mismatch or value error");
4787 }
4788 break;
4789
4790 case 131:
4791 #line 2376 "bfin-parse.y"
4792 {
4793 if (IS_DREG ((yyvsp[-3].reg)) && IS_UIMM ((yyvsp[-1].expr), 5))
4794 {
4795 notethat ("LOGI2op: CC = BITTST (dregs , uimm5 )\n");
4796 (yyval.instr) = LOGI2OP ((yyvsp[-3].reg), uimm5 ((yyvsp[-1].expr)), 1);
4797 }
4798 else
4799 return yyerror ("Register mismatch or value error");
4800 }
4801 break;
4802
4803 case 132:
4804 #line 2387 "bfin-parse.y"
4805 {
4806 if ((IS_DREG ((yyvsp[-2].reg)) || IS_PREG ((yyvsp[-2].reg)))
4807 && (IS_DREG ((yyvsp[0].reg)) || IS_PREG ((yyvsp[0].reg))))
4808 {
4809 notethat ("ccMV: IF ! CC gregs = gregs\n");
4810 (yyval.instr) = CCMV (&(yyvsp[0].reg), &(yyvsp[-2].reg), 0);
4811 }
4812 else
4813 return yyerror ("Register mismatch");
4814 }
4815 break;
4816
4817 case 133:
4818 #line 2399 "bfin-parse.y"
4819 {
4820 if ((IS_DREG ((yyvsp[0].reg)) || IS_PREG ((yyvsp[0].reg)))
4821 && (IS_DREG ((yyvsp[-2].reg)) || IS_PREG ((yyvsp[-2].reg))))
4822 {
4823 notethat ("ccMV: IF CC gregs = gregs\n");
4824 (yyval.instr) = CCMV (&(yyvsp[0].reg), &(yyvsp[-2].reg), 1);
4825 }
4826 else
4827 return yyerror ("Register mismatch");
4828 }
4829 break;
4830
4831 case 134:
4832 #line 2411 "bfin-parse.y"
4833 {
4834 if (IS_PCREL10 ((yyvsp[0].expr)))
4835 {
4836 notethat ("BRCC: IF !CC JUMP pcrel11m2\n");
4837 (yyval.instr) = BRCC (0, 0, (yyvsp[0].expr));
4838 }
4839 else
4840 return yyerror ("Bad jump offset");
4841 }
4842 break;
4843
4844 case 135:
4845 #line 2422 "bfin-parse.y"
4846 {
4847 if (IS_PCREL10 ((yyvsp[-3].expr)))
4848 {
4849 notethat ("BRCC: IF !CC JUMP pcrel11m2\n");
4850 (yyval.instr) = BRCC (0, 1, (yyvsp[-3].expr));
4851 }
4852 else
4853 return yyerror ("Bad jump offset");
4854 }
4855 break;
4856
4857 case 136:
4858 #line 2433 "bfin-parse.y"
4859 {
4860 if (IS_PCREL10 ((yyvsp[0].expr)))
4861 {
4862 notethat ("BRCC: IF CC JUMP pcrel11m2\n");
4863 (yyval.instr) = BRCC (1, 0, (yyvsp[0].expr));
4864 }
4865 else
4866 return yyerror ("Bad jump offset");
4867 }
4868 break;
4869
4870 case 137:
4871 #line 2444 "bfin-parse.y"
4872 {
4873 if (IS_PCREL10 ((yyvsp[-3].expr)))
4874 {
4875 notethat ("BRCC: IF !CC JUMP pcrel11m2\n");
4876 (yyval.instr) = BRCC (1, 1, (yyvsp[-3].expr));
4877 }
4878 else
4879 return yyerror ("Bad jump offset");
4880 }
4881 break;
4882
4883 case 138:
4884 #line 2454 "bfin-parse.y"
4885 {
4886 notethat ("ProgCtrl: NOP\n");
4887 (yyval.instr) = PROGCTRL (0, 0);
4888 }
4889 break;
4890
4891 case 139:
4892 #line 2460 "bfin-parse.y"
4893 {
4894 notethat ("ProgCtrl: RTS\n");
4895 (yyval.instr) = PROGCTRL (1, 0);
4896 }
4897 break;
4898
4899 case 140:
4900 #line 2466 "bfin-parse.y"
4901 {
4902 notethat ("ProgCtrl: RTI\n");
4903 (yyval.instr) = PROGCTRL (1, 1);
4904 }
4905 break;
4906
4907 case 141:
4908 #line 2472 "bfin-parse.y"
4909 {
4910 notethat ("ProgCtrl: RTX\n");
4911 (yyval.instr) = PROGCTRL (1, 2);
4912 }
4913 break;
4914
4915 case 142:
4916 #line 2478 "bfin-parse.y"
4917 {
4918 notethat ("ProgCtrl: RTN\n");
4919 (yyval.instr) = PROGCTRL (1, 3);
4920 }
4921 break;
4922
4923 case 143:
4924 #line 2484 "bfin-parse.y"
4925 {
4926 notethat ("ProgCtrl: RTE\n");
4927 (yyval.instr) = PROGCTRL (1, 4);
4928 }
4929 break;
4930
4931 case 144:
4932 #line 2490 "bfin-parse.y"
4933 {
4934 notethat ("ProgCtrl: IDLE\n");
4935 (yyval.instr) = PROGCTRL (2, 0);
4936 }
4937 break;
4938
4939 case 145:
4940 #line 2496 "bfin-parse.y"
4941 {
4942 notethat ("ProgCtrl: CSYNC\n");
4943 (yyval.instr) = PROGCTRL (2, 3);
4944 }
4945 break;
4946
4947 case 146:
4948 #line 2502 "bfin-parse.y"
4949 {
4950 notethat ("ProgCtrl: SSYNC\n");
4951 (yyval.instr) = PROGCTRL (2, 4);
4952 }
4953 break;
4954
4955 case 147:
4956 #line 2508 "bfin-parse.y"
4957 {
4958 notethat ("ProgCtrl: EMUEXCPT\n");
4959 (yyval.instr) = PROGCTRL (2, 5);
4960 }
4961 break;
4962
4963 case 148:
4964 #line 2514 "bfin-parse.y"
4965 {
4966 if (IS_DREG ((yyvsp[0].reg)))
4967 {
4968 notethat ("ProgCtrl: CLI dregs\n");
4969 (yyval.instr) = PROGCTRL (3, (yyvsp[0].reg).regno & CODE_MASK);
4970 }
4971 else
4972 return yyerror ("Dreg expected for CLI");
4973 }
4974 break;
4975
4976 case 149:
4977 #line 2525 "bfin-parse.y"
4978 {
4979 if (IS_DREG ((yyvsp[0].reg)))
4980 {
4981 notethat ("ProgCtrl: STI dregs\n");
4982 (yyval.instr) = PROGCTRL (4, (yyvsp[0].reg).regno & CODE_MASK);
4983 }
4984 else
4985 return yyerror ("Dreg expected for STI");
4986 }
4987 break;
4988
4989 case 150:
4990 #line 2536 "bfin-parse.y"
4991 {
4992 if (IS_PREG ((yyvsp[-1].reg)))
4993 {
4994 notethat ("ProgCtrl: JUMP (pregs )\n");
4995 (yyval.instr) = PROGCTRL (5, (yyvsp[-1].reg).regno & CODE_MASK);
4996 }
4997 else
4998 return yyerror ("Bad register for indirect jump");
4999 }
5000 break;
5001
5002 case 151:
5003 #line 2547 "bfin-parse.y"
5004 {
5005 if (IS_PREG ((yyvsp[-1].reg)))
5006 {
5007 notethat ("ProgCtrl: CALL (pregs )\n");
5008 (yyval.instr) = PROGCTRL (6, (yyvsp[-1].reg).regno & CODE_MASK);
5009 }
5010 else
5011 return yyerror ("Bad register for indirect call");
5012 }
5013 break;
5014
5015 case 152:
5016 #line 2558 "bfin-parse.y"
5017 {
5018 if (IS_PREG ((yyvsp[-1].reg)))
5019 {
5020 notethat ("ProgCtrl: CALL (PC + pregs )\n");
5021 (yyval.instr) = PROGCTRL (7, (yyvsp[-1].reg).regno & CODE_MASK);
5022 }
5023 else
5024 return yyerror ("Bad register for indirect call");
5025 }
5026 break;
5027
5028 case 153:
5029 #line 2569 "bfin-parse.y"
5030 {
5031 if (IS_PREG ((yyvsp[-1].reg)))
5032 {
5033 notethat ("ProgCtrl: JUMP (PC + pregs )\n");
5034 (yyval.instr) = PROGCTRL (8, (yyvsp[-1].reg).regno & CODE_MASK);
5035 }
5036 else
5037 return yyerror ("Bad register for indirect jump");
5038 }
5039 break;
5040
5041 case 154:
5042 #line 2580 "bfin-parse.y"
5043 {
5044 if (IS_UIMM ((yyvsp[0].expr), 4))
5045 {
5046 notethat ("ProgCtrl: RAISE uimm4\n");
5047 (yyval.instr) = PROGCTRL (9, uimm4 ((yyvsp[0].expr)));
5048 }
5049 else
5050 return yyerror ("Bad value for RAISE");
5051 }
5052 break;
5053
5054 case 155:
5055 #line 2591 "bfin-parse.y"
5056 {
5057 notethat ("ProgCtrl: EMUEXCPT\n");
5058 (yyval.instr) = PROGCTRL (10, uimm4 ((yyvsp[0].expr)));
5059 }
5060 break;
5061
5062 case 156:
5063 #line 2597 "bfin-parse.y"
5064 {
5065 if (IS_PREG ((yyvsp[-1].reg)))
5066 {
5067 notethat ("ProgCtrl: TESTSET (pregs )\n");
5068 (yyval.instr) = PROGCTRL (11, (yyvsp[-1].reg).regno & CODE_MASK);
5069 }
5070 else
5071 return yyerror ("Preg expected");
5072 }
5073 break;
5074
5075 case 157:
5076 #line 2608 "bfin-parse.y"
5077 {
5078 if (IS_PCREL12 ((yyvsp[0].expr)))
5079 {
5080 notethat ("UJUMP: JUMP pcrel12\n");
5081 (yyval.instr) = UJUMP ((yyvsp[0].expr));
5082 }
5083 else
5084 return yyerror ("Bad value for relative jump");
5085 }
5086 break;
5087
5088 case 158:
5089 #line 2619 "bfin-parse.y"
5090 {
5091 if (IS_PCREL12 ((yyvsp[0].expr)))
5092 {
5093 notethat ("UJUMP: JUMP_DOT_S pcrel12\n");
5094 (yyval.instr) = UJUMP((yyvsp[0].expr));
5095 }
5096 else
5097 return yyerror ("Bad value for relative jump");
5098 }
5099 break;
5100
5101 case 159:
5102 #line 2630 "bfin-parse.y"
5103 {
5104 if (IS_PCREL24 ((yyvsp[0].expr)))
5105 {
5106 notethat ("CALLa: jump.l pcrel24\n");
5107 (yyval.instr) = CALLA ((yyvsp[0].expr), 0);
5108 }
5109 else
5110 return yyerror ("Bad value for long jump");
5111 }
5112 break;
5113
5114 case 160:
5115 #line 2641 "bfin-parse.y"
5116 {
5117 if (IS_PCREL24 ((yyvsp[0].expr)))
5118 {
5119 notethat ("CALLa: jump.l pcrel24\n");
5120 (yyval.instr) = CALLA ((yyvsp[0].expr), 2);
5121 }
5122 else
5123 return yyerror ("Bad value for long jump");
5124 }
5125 break;
5126
5127 case 161:
5128 #line 2652 "bfin-parse.y"
5129 {
5130 if (IS_PCREL24 ((yyvsp[0].expr)))
5131 {
5132 notethat ("CALLa: CALL pcrel25m2\n");
5133 (yyval.instr) = CALLA ((yyvsp[0].expr), 1);
5134 }
5135 else
5136 return yyerror ("Bad call address");
5137 }
5138 break;
5139
5140 case 162:
5141 #line 2662 "bfin-parse.y"
5142 {
5143 if (IS_PCREL24 ((yyvsp[0].expr)))
5144 {
5145 notethat ("CALLa: CALL pcrel25m2\n");
5146 (yyval.instr) = CALLA ((yyvsp[0].expr), 2);
5147 }
5148 else
5149 return yyerror ("Bad call address");
5150 }
5151 break;
5152
5153 case 163:
5154 #line 2675 "bfin-parse.y"
5155 {
5156 if (IS_DREG ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[-1].reg)))
5157 (yyval.instr) = ALU2OP (&(yyvsp[-3].reg), &(yyvsp[-1].reg), 8);
5158 else
5159 return yyerror ("Bad registers for DIVQ");
5160 }
5161 break;
5162
5163 case 164:
5164 #line 2683 "bfin-parse.y"
5165 {
5166 if (IS_DREG ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[-1].reg)))
5167 (yyval.instr) = ALU2OP (&(yyvsp[-3].reg), &(yyvsp[-1].reg), 9);
5168 else
5169 return yyerror ("Bad registers for DIVS");
5170 }
5171 break;
5172
5173 case 165:
5174 #line 2691 "bfin-parse.y"
5175 {
5176 if (IS_DREG ((yyvsp[-4].reg)) && IS_DREG ((yyvsp[-1].reg)))
5177 {
5178 if ((yyvsp[0].modcodes).r0 == 0 && (yyvsp[0].modcodes).s0 == 0 && (yyvsp[0].modcodes).aop == 0)
5179 {
5180 notethat ("ALU2op: dregs = - dregs\n");
5181 (yyval.instr) = ALU2OP (&(yyvsp[-4].reg), &(yyvsp[-1].reg), 14);
5182 }
5183 else if ((yyvsp[0].modcodes).r0 == 1 && (yyvsp[0].modcodes).s0 == 0 && (yyvsp[0].modcodes).aop == 3)
5184 {
5185 notethat ("dsp32alu: dregs = - dregs (.)\n");
5186 (yyval.instr) = DSP32ALU (15, 0, 0, &(yyvsp[-4].reg), &(yyvsp[-1].reg), 0, (yyvsp[0].modcodes).s0, 0, 3);
5187 }
5188 else
5189 {
5190 notethat ("dsp32alu: dregs = - dregs (.)\n");
5191 (yyval.instr) = DSP32ALU (7, 0, 0, &(yyvsp[-4].reg), &(yyvsp[-1].reg), 0, (yyvsp[0].modcodes).s0, 0, 3);
5192 }
5193 }
5194 else
5195 return yyerror ("Dregs expected");
5196 }
5197 break;
5198
5199 case 166:
5200 #line 2715 "bfin-parse.y"
5201 {
5202 if (IS_DREG ((yyvsp[-3].reg)) && IS_DREG ((yyvsp[0].reg)))
5203 {
5204 notethat ("ALU2op: dregs = ~dregs\n");
5205 (yyval.instr) = ALU2OP (&(yyvsp[-3].reg), &(yyvsp[0].reg), 15);
5206 }
5207 else
5208 return yyerror ("Dregs expected");
5209 }
5210 break;
5211
5212 case 167:
5213 #line 2726 "bfin-parse.y"
5214 {
5215 if (IS_DREG ((yyvsp[-2].reg)) && IS_DREG ((yyvsp[0].reg)))
5216 {
5217 notethat ("ALU2op: dregs >>= dregs\n");
5218 (yyval.instr) = ALU2OP (&(yyvsp[-2].reg), &(yyvsp[0].reg), 1);
5219 }
5220 else
5221 return yyerror ("Dregs expected");
5222 }
5223 break;
5224
5225 case 168:
5226 #line 2737 "bfin-parse.y"
5227 {
5228 if (IS_DREG ((yyvsp[-2].reg)) && IS_UIMM ((yyvsp[0].expr), 5))
5229 {
5230 notethat ("LOGI2op: dregs >>= uimm5\n");
5231 (yyval.instr) = LOGI2OP ((yyvsp[-2].reg), uimm5 ((yyvsp[0].expr)), 6);
5232 }
5233 else
5234 return yyerror ("Dregs expected or value error");
5235 }
5236 break;
5237
5238 case 169:
5239 #line 2748 "bfin-parse.y"
5240 {
5241 if (IS_DREG ((yyvsp[-2].reg)) && IS_DREG ((yyvsp[0].reg)))
5242 {
5243 notethat ("ALU2op: dregs >>>= dregs\n");
5244 (yyval.instr) = ALU2OP (&(yyvsp[-2].reg), &(yyvsp[0].reg), 0);
5245 }
5246 else
5247 return yyerror ("Dregs expected");
5248 }
5249 break;
5250
5251 case 170:
5252 #line 2759 "bfin-parse.y"
5253 {
5254 if (IS_DREG ((yyvsp[-2].reg)) && IS_DREG ((yyvsp[0].reg)))
5255 {
5256 notethat ("ALU2op: dregs <<= dregs\n");
5257 (yyval.instr) = ALU2OP (&(yyvsp[-2].reg), &(yyvsp[0].reg), 2);
5258 }
5259 else
5260 return yyerror ("Dregs expected");
5261 }
5262 break;
5263
5264 case 171:
5265 #line 2770 "bfin-parse.y"
5266 {
5267 if (IS_DREG ((yyvsp[-2].reg)) && IS_UIMM ((yyvsp[0].expr), 5))
5268 {
5269 notethat ("LOGI2op: dregs <<= uimm5\n");
5270 (yyval.instr) = LOGI2OP ((yyvsp[-2].reg), uimm5 ((yyvsp[0].expr)), 7);
5271 }
5272 else
5273 return yyerror ("Dregs expected or const value error");
5274 }
5275 break;
5276
5277 case 172:
5278 #line 2782 "bfin-parse.y"
5279 {
5280 if (IS_DREG ((yyvsp[-2].reg)) && IS_UIMM ((yyvsp[0].expr), 5))
5281 {
5282 notethat ("LOGI2op: dregs >>>= uimm5\n");
5283 (yyval.instr) = LOGI2OP ((yyvsp[-2].reg), uimm5 ((yyvsp[0].expr)), 5);
5284 }
5285 else
5286 return yyerror ("Dregs expected");
5287 }
5288 break;
5289
5290 case 173:
5291 #line 2795 "bfin-parse.y"
5292 {
5293 notethat ("CaCTRL: FLUSH [ pregs ]\n");
5294 if (IS_PREG ((yyvsp[-1].reg)))
5295 (yyval.instr) = CACTRL (&(yyvsp[-1].reg), 0, 2);
5296 else
5297 return yyerror ("Bad register(s) for FLUSH");
5298 }
5299 break;
5300
5301 case 174:
5302 #line 2804 "bfin-parse.y"
5303 {
5304 if (IS_PREG ((yyvsp[0].reg)))
5305 {
5306 notethat ("CaCTRL: FLUSH [ pregs ++ ]\n");
5307 (yyval.instr) = CACTRL (&(yyvsp[0].reg), 1, 2);
5308 }
5309 else
5310 return yyerror ("Bad register(s) for FLUSH");
5311 }
5312 break;
5313
5314 case 175:
5315 #line 2815 "bfin-parse.y"
5316 {
5317 if (IS_PREG ((yyvsp[-1].reg)))
5318 {
5319 notethat ("CaCTRL: FLUSHINV [ pregs ]\n");
5320 (yyval.instr) = CACTRL (&(yyvsp[-1].reg), 0, 1);
5321 }
5322 else
5323 return yyerror ("Bad register(s) for FLUSH");
5324 }
5325 break;
5326
5327 case 176:
5328 #line 2826 "bfin-parse.y"
5329 {
5330 if (IS_PREG ((yyvsp[0].reg)))
5331 {
5332 notethat ("CaCTRL: FLUSHINV [ pregs ++ ]\n");
5333 (yyval.instr) = CACTRL (&(yyvsp[0].reg), 1, 1);
5334 }
5335 else
5336 return yyerror ("Bad register(s) for FLUSH");
5337 }
5338 break;
5339
5340 case 177:
5341 #line 2838 "bfin-parse.y"
5342 {
5343 if (IS_PREG ((yyvsp[-1].reg)))
5344 {
5345 notethat ("CaCTRL: IFLUSH [ pregs ]\n");
5346 (yyval.instr) = CACTRL (&(yyvsp[-1].reg), 0, 3);
5347 }
5348 else
5349 return yyerror ("Bad register(s) for FLUSH");
5350 }
5351 break;
5352
5353 case 178:
5354 #line 2849 "bfin-parse.y"
5355 {
5356 if (IS_PREG ((yyvsp[0].reg)))
5357 {
5358 notethat ("CaCTRL: IFLUSH [ pregs ++ ]\n");
5359 (yyval.instr) = CACTRL (&(yyvsp[0].reg), 1, 3);
5360 }
5361 else
5362 return yyerror ("Bad register(s) for FLUSH");
5363 }
5364 break;
5365
5366 case 179:
5367 #line 2860 "bfin-parse.y"
5368 {
5369 if (IS_PREG ((yyvsp[-1].reg)))
5370 {
5371 notethat ("CaCTRL: PREFETCH [ pregs ]\n");
5372 (yyval.instr) = CACTRL (&(yyvsp[-1].reg), 0, 0);
5373 }
5374 else
5375 return yyerror ("Bad register(s) for PREFETCH");
5376 }
5377 break;
5378
5379 case 180:
5380 #line 2871 "bfin-parse.y"
5381 {
5382 if (IS_PREG ((yyvsp[0].reg)))
5383 {
5384 notethat ("CaCTRL: PREFETCH [ pregs ++ ]\n");
5385 (yyval.instr) = CACTRL (&(yyvsp[0].reg), 1, 0);
5386 }
5387 else
5388 return yyerror ("Bad register(s) for PREFETCH");
5389 }
5390 break;
5391
5392 case 181:
5393 #line 2885 "bfin-parse.y"
5394 {
5395 if (IS_PREG ((yyvsp[-4].reg)) && IS_DREG ((yyvsp[0].reg)))
5396 {
5397 notethat ("LDST: B [ pregs <post_op> ] = dregs\n");
5398 (yyval.instr) = LDST (&(yyvsp[-4].reg), &(yyvsp[0].reg), (yyvsp[-3].modcodes).x0, 2, 0, 1);
5399 }
5400 else
5401 return yyerror ("Register mismatch");
5402 }
5403 break;
5404
5405 case 182:
5406 #line 2897 "bfin-parse.y"
5407 {
5408 if (IS_PREG ((yyvsp[-5].reg)) && IS_RANGE(16, (yyvsp[-3].expr), (yyvsp[-4].r0).r0, 1) && IS_DREG ((yyvsp[0].reg)))
5409 {
5410 notethat ("LDST: B [ pregs + imm16 ] = dregs\n");
5411 if ((yyvsp[-4].r0).r0)
5412 neg_value ((yyvsp[-3].expr));
5413 (yyval.instr) = LDSTIDXI (&(yyvsp[-5].reg), &(yyvsp[0].reg), 1, 2, 0, (yyvsp[-3].expr));
5414 }
5415 else
5416 return yyerror ("Register mismatch or const size wrong");
5417 }
5418 break;
5419
5420 case 183:
5421 #line 2912 "bfin-parse.y"
5422 {
5423 if (IS_PREG ((yyvsp[-5].reg)) && IS_URANGE (4, (yyvsp[-3].expr), (yyvsp[-4].r0).r0, 2) && IS_DREG ((yyvsp[0].reg)))
5424 {
5425 notethat ("LDSTii: W [ pregs +- uimm5m2 ] = dregs\n");
5426 (yyval.instr) = LDSTII (&(yyvsp[-5].reg), &(yyvsp[0].reg), (yyvsp[-3].expr), 1, 1);
5427 }
5428 else if (IS_PREG ((yyvsp[-5].reg)) && IS_RANGE(16, (yyvsp[-3].expr), (yyvsp[-4].r0).r0, 2) && IS_DREG ((yyvsp[0].reg)))
5429 {
5430 notethat ("LDSTidxI: W [ pregs + imm17m2 ] = dregs\n");
5431 if ((yyvsp[-4].r0).r0)
5432 neg_value ((yyvsp[-3].expr));
5433 (yyval.instr) = LDSTIDXI (&(yyvsp[-5].reg), &(yyvsp[0].reg), 1, 1, 0, (yyvsp[-3].expr));
5434 }
5435 else
5436 return yyerror ("Bad register(s) or wrong constant size");
5437 }
5438 break;
5439
5440 case 184:
5441 #line 2931 "bfin-parse.y"
5442 {
5443 if (IS_PREG ((yyvsp[-4].reg)) && IS_DREG ((yyvsp[0].reg)))
5444 {
5445 notethat ("LDST: W [ pregs <post_op> ] = dregs\n");
5446 (yyval.instr) = LDST (&(yyvsp[-4].reg), &(yyvsp[0].reg), (yyvsp[-3].modcodes).x0, 1, 0, 1);
5447 }
5448 else
5449 return yyerror ("Bad register(s) for STORE");
5450 }
5451 break;
5452
5453 case 185:
5454 #line 2942 "bfin-parse.y"
5455 {
5456 if (IS_IREG ((yyvsp[-4].reg)))
5457 {
5458 notethat ("dspLDST: W [ iregs <post_op> ] = dregs_half\n");
5459 (yyval.instr) = DSPLDST (&(yyvsp[-4].reg), 1 + IS_H ((yyvsp[0].reg)), &(yyvsp[0].reg), (yyvsp[-3].modcodes).x0, 1);
5460 }
5461 else if ((yyvsp[-3].modcodes).x0 == 2 && IS_PREG ((yyvsp[-4].reg)) && IS_DREG ((yyvsp[0].reg)))
5462 {
5463 notethat ("LDSTpmod: W [ pregs <post_op>] = dregs_half\n");
5464 (yyval.instr) = LDSTPMOD (&(yyvsp[-4].reg), &(yyvsp[0].reg), &(yyvsp[-4].reg), 1 + IS_H ((yyvsp[0].reg)), 1);
5465
5466 }
5467 else
5468 return yyerror ("Bad register(s) for STORE");
5469 }
5470 break;
5471
5472 case 186:
5473 #line 2960 "bfin-parse.y"
5474 {
5475 Expr_Node *tmp = (yyvsp[-3].expr);
5476 int ispreg = IS_PREG ((yyvsp[0].reg));
5477
5478 if (!IS_PREG ((yyvsp[-5].reg)))
5479 return yyerror ("Preg expected for indirect");
5480
5481 if (!IS_DREG ((yyvsp[0].reg)) && !ispreg)
5482 return yyerror ("Bad source register for STORE");
5483
5484 if ((yyvsp[-4].r0).r0)
5485 tmp = unary (Expr_Op_Type_NEG, tmp);
5486
5487 if (in_range_p (tmp, 0, 63, 3))
5488 {
5489 notethat ("LDSTii: dpregs = [ pregs + uimm6m4 ]\n");
5490 (yyval.instr) = LDSTII (&(yyvsp[-5].reg), &(yyvsp[0].reg), tmp, 1, ispreg ? 3 : 0);
5491 }
5492 else if ((yyvsp[-5].reg).regno == REG_FP && in_range_p (tmp, -128, 0, 3))
5493 {
5494 notethat ("LDSTiiFP: dpregs = [ FP - uimm7m4 ]\n");
5495 tmp = unary (Expr_Op_Type_NEG, tmp);
5496 (yyval.instr) = LDSTIIFP (tmp, &(yyvsp[0].reg), 1);
5497 }
5498 else if (in_range_p (tmp, -131072, 131071, 3))
5499 {
5500 notethat ("LDSTidxI: [ pregs + imm18m4 ] = dpregs\n");
5501 (yyval.instr) = LDSTIDXI (&(yyvsp[-5].reg), &(yyvsp[0].reg), 1, 0, ispreg ? 1: 0, tmp);
5502 }
5503 else
5504 return yyerror ("Displacement out of range for store");
5505 }
5506 break;
5507
5508 case 187:
5509 #line 2994 "bfin-parse.y"
5510 {
5511 if (IS_DREG ((yyvsp[-8].reg)) && IS_PREG ((yyvsp[-4].reg)) && IS_URANGE (4, (yyvsp[-2].expr), (yyvsp[-3].r0).r0, 2))
5512 {
5513 notethat ("LDSTii: dregs = W [ pregs + uimm4s2 ] (.)\n");
5514 (yyval.instr) = LDSTII (&(yyvsp[-4].reg), &(yyvsp[-8].reg), (yyvsp[-2].expr), 0, 1 << (yyvsp[0].r0).r0);
5515 }
5516 else if (IS_DREG ((yyvsp[-8].reg)) && IS_PREG ((yyvsp[-4].reg)) && IS_RANGE(16, (yyvsp[-2].expr), (yyvsp[-3].r0).r0, 2))
5517 {
5518 notethat ("LDSTidxI: dregs = W [ pregs + imm17m2 ] (.)\n");
5519 if ((yyvsp[-3].r0).r0)
5520 neg_value ((yyvsp[-2].expr));
5521 (yyval.instr) = LDSTIDXI (&(yyvsp[-4].reg), &(yyvsp[-8].reg), 0, 1, (yyvsp[0].r0).r0, (yyvsp[-2].expr));
5522 }
5523 else
5524 return yyerror ("Bad register or constant for LOAD");
5525 }
5526 break;
5527
5528 case 188:
5529 #line 3012 "bfin-parse.y"
5530 {
5531 if (IS_IREG ((yyvsp[-2].reg)))
5532 {
5533 notethat ("dspLDST: dregs_half = W [ iregs ]\n");
5534 (yyval.instr) = DSPLDST(&(yyvsp[-2].reg), 1 + IS_H ((yyvsp[-6].reg)), &(yyvsp[-6].reg), (yyvsp[-1].modcodes).x0, 0);
5535 }
5536 else if ((yyvsp[-1].modcodes).x0 == 2 && IS_DREG ((yyvsp[-6].reg)) && IS_PREG ((yyvsp[-2].reg)))
5537 {
5538 notethat ("LDSTpmod: dregs_half = W [ pregs ]\n");
5539 (yyval.instr) = LDSTPMOD (&(yyvsp[-2].reg), &(yyvsp[-6].reg), &(yyvsp[-2].reg), 1 + IS_H ((yyvsp[-6].reg)), 0);
5540 }
5541 else
5542 return yyerror ("Bad register or post_op for LOAD");
5543 }
5544 break;
5545
5546 case 189:
5547 #line 3029 "bfin-parse.y"
5548 {
5549 if (IS_DREG ((yyvsp[-7].reg)) && IS_PREG ((yyvsp[-3].reg)))
5550 {
5551 notethat ("LDST: dregs = W [ pregs <post_op> ] (.)\n");
5552 (yyval.instr) = LDST (&(yyvsp[-3].reg), &(yyvsp[-7].reg), (yyvsp[-2].modcodes).x0, 1, (yyvsp[0].r0).r0, 0);
5553 }
5554 else
5555 return yyerror ("Bad register for LOAD");
5556 }
5557 break;
5558
5559 case 190:
5560 #line 3040 "bfin-parse.y"
5561 {
5562 if (IS_DREG ((yyvsp[-8].reg)) && IS_PREG ((yyvsp[-4].reg)) && IS_PREG ((yyvsp[-2].reg)))
5563 {
5564 notethat ("LDSTpmod: dregs = W [ pregs ++ pregs ] (.)\n");
5565 (yyval.instr) = LDSTPMOD (&(yyvsp[-4].reg), &(yyvsp[-8].reg), &(yyvsp[-2].reg), 3, (yyvsp[0].r0).r0);
5566 }
5567 else
5568 return yyerror ("Bad register for LOAD");
5569 }
5570 break;
5571
5572 case 191:
5573 #line 3051 "bfin-parse.y"
5574 {
5575 if (IS_DREG ((yyvsp[-7].reg)) && IS_PREG ((yyvsp[-3].reg)) && IS_PREG ((yyvsp[-1].reg)))
5576 {
5577 notethat ("LDSTpmod: dregs_half = W [ pregs ++ pregs ]\n");
5578 (yyval.instr) = LDSTPMOD (&(yyvsp[-3].reg), &(yyvsp[-7].reg), &(yyvsp[-1].reg), 1 + IS_H ((yyvsp[-7].reg)), 0);
5579 }
5580 else
5581 return yyerror ("Bad register for LOAD");
5582 }
5583 break;
5584
5585 case 192:
5586 #line 3062 "bfin-parse.y"
5587 {
5588 if (IS_IREG ((yyvsp[-4].reg)) && IS_DREG ((yyvsp[0].reg)))
5589 {
5590 notethat ("dspLDST: [ iregs <post_op> ] = dregs\n");
5591 (yyval.instr) = DSPLDST(&(yyvsp[-4].reg), 0, &(yyvsp[0].reg), (yyvsp[-3].modcodes).x0, 1);
5592 }
5593 else if (IS_PREG ((yyvsp[-4].reg)) && IS_DREG ((yyvsp[0].reg)))
5594 {
5595 notethat ("LDST: [ pregs <post_op> ] = dregs\n");
5596 (yyval.instr) = LDST (&(yyvsp[-4].reg), &(yyvsp[0].reg), (yyvsp[-3].modcodes).x0, 0, 0, 1);
5597 }
5598 else if (IS_PREG ((yyvsp[-4].reg)) && IS_PREG ((yyvsp[0].reg)))
5599 {
5600 notethat ("LDST: [ pregs <post_op> ] = pregs\n");
5601 (yyval.instr) = LDST (&(yyvsp[-4].reg), &(yyvsp[0].reg), (yyvsp[-3].modcodes).x0, 0, 1, 1);
5602 }
5603 else
5604 return yyerror ("Bad register for STORE");
5605 }
5606 break;
5607
5608 case 193:
5609 #line 3083 "bfin-parse.y"
5610 {
5611 if (! IS_DREG ((yyvsp[0].reg)))
5612 return yyerror ("Expected Dreg for last argument");
5613
5614 if (IS_IREG ((yyvsp[-5].reg)) && IS_MREG ((yyvsp[-3].reg)))
5615 {
5616 notethat ("dspLDST: [ iregs ++ mregs ] = dregs\n");
5617 (yyval.instr) = DSPLDST(&(yyvsp[-5].reg), (yyvsp[-3].reg).regno & CODE_MASK, &(yyvsp[0].reg), 3, 1);
5618 }
5619 else if (IS_PREG ((yyvsp[-5].reg)) && IS_PREG ((yyvsp[-3].reg)))
5620 {
5621 notethat ("LDSTpmod: [ pregs ++ pregs ] = dregs\n");
5622 (yyval.instr) = LDSTPMOD (&(yyvsp[-5].reg), &(yyvsp[0].reg), &(yyvsp[-3].reg), 0, 1);
5623 }
5624 else
5625 return yyerror ("Bad register for STORE");
5626 }
5627 break;
5628
5629 case 194:
5630 #line 3102 "bfin-parse.y"
5631 {
5632 if (!IS_DREG ((yyvsp[0].reg)))
5633 return yyerror ("Expect Dreg as last argument");
5634 if (IS_PREG ((yyvsp[-5].reg)) && IS_PREG ((yyvsp[-3].reg)))
5635 {
5636 notethat ("LDSTpmod: W [ pregs ++ pregs ] = dregs_half\n");
5637 (yyval.instr) = LDSTPMOD (&(yyvsp[-5].reg), &(yyvsp[0].reg), &(yyvsp[-3].reg), 1 + IS_H ((yyvsp[0].reg)), 1);
5638 }
5639 else
5640 return yyerror ("Bad register for STORE");
5641 }
5642 break;
5643
5644 case 195:
5645 #line 3115 "bfin-parse.y"
5646 {
5647 if (IS_DREG ((yyvsp[-8].reg)) && IS_PREG ((yyvsp[-4].reg)) && IS_RANGE(16, (yyvsp[-2].expr), (yyvsp[-3].r0).r0, 1))
5648 {
5649 notethat ("LDSTidxI: dregs = B [ pregs + imm16 ] (%c)\n",
5650 (yyvsp[0].r0).r0 ? 'X' : 'Z');
5651 if ((yyvsp[-3].r0).r0)
5652 neg_value ((yyvsp[-2].expr));
5653 (yyval.instr) = LDSTIDXI (&(yyvsp[-4].reg), &(yyvsp[-8].reg), 0, 2, (yyvsp[0].r0).r0, (yyvsp[-2].expr));
5654 }
5655 else
5656 return yyerror ("Bad register or value for LOAD");
5657 }
5658 break;
5659
5660 case 196:
5661 #line 3129 "bfin-parse.y"
5662 {
5663 if (IS_DREG ((yyvsp[-7].reg)) && IS_PREG ((yyvsp[-3].reg)))
5664 {
5665 notethat ("LDST: dregs = B [ pregs <post_op> ] (%c)\n",
5666 (yyvsp[0].r0).r0 ? 'X' : 'Z');
5667 (yyval.instr) = LDST (&(yyvsp[-3].reg), &(yyvsp[-7].reg), (yyvsp[-2].modcodes).x0, 2, (yyvsp[0].r0).r0, 0);
5668 }
5669 else
5670 return yyerror ("Bad register for LOAD");
5671 }
5672 break;
5673
5674 case 197:
5675 #line 3141 "bfin-parse.y"
5676 {
5677 if (IS_DREG ((yyvsp[-6].reg)) && IS_IREG ((yyvsp[-3].reg)) && IS_MREG ((yyvsp[-1].reg)))
5678 {
5679 notethat ("dspLDST: dregs = [ iregs ++ mregs ]\n");
5680 (yyval.instr) = DSPLDST(&(yyvsp[-3].reg), (yyvsp[-1].reg).regno & CODE_MASK, &(yyvsp[-6].reg), 3, 0);
5681 }
5682 else if (IS_DREG ((yyvsp[-6].reg)) && IS_PREG ((yyvsp[-3].reg)) && IS_PREG ((yyvsp[-1].reg)))
5683 {
5684 notethat ("LDSTpmod: dregs = [ pregs ++ pregs ]\n");
5685 (yyval.instr) = LDSTPMOD (&(yyvsp[-3].reg), &(yyvsp[-6].reg), &(yyvsp[-1].reg), 0, 0);
5686 }
5687 else
5688 return yyerror ("Bad register for LOAD");
5689 }
5690 break;
5691
5692 case 198:
5693 #line 3157 "bfin-parse.y"
5694 {
5695 Expr_Node *tmp = (yyvsp[-1].expr);
5696 int ispreg = IS_PREG ((yyvsp[-6].reg));
5697 int isgot = IS_RELOC((yyvsp[-1].expr));
5698
5699 if (!IS_PREG ((yyvsp[-3].reg)))
5700 return yyerror ("Preg expected for indirect");
5701
5702 if (!IS_DREG ((yyvsp[-6].reg)) && !ispreg)
5703 return yyerror ("Bad destination register for LOAD");
5704
5705 if ((yyvsp[-2].r0).r0)
5706 tmp = unary (Expr_Op_Type_NEG, tmp);
5707
5708 if(isgot){
5709 notethat ("LDSTidxI: dpregs = [ pregs + sym@got ]\n");
5710 (yyval.instr) = LDSTIDXI (&(yyvsp[-3].reg), &(yyvsp[-6].reg), 0, 0, ispreg ? 1: 0, tmp);
5711 }
5712 else if (in_range_p (tmp, 0, 63, 3))
5713 {
5714 notethat ("LDSTii: dpregs = [ pregs + uimm7m4 ]\n");
5715 (yyval.instr) = LDSTII (&(yyvsp[-3].reg), &(yyvsp[-6].reg), tmp, 0, ispreg ? 3 : 0);
5716 }
5717 else if ((yyvsp[-3].reg).regno == REG_FP && in_range_p (tmp, -128, 0, 3))
5718 {
5719 notethat ("LDSTiiFP: dpregs = [ FP - uimm7m4 ]\n");
5720 tmp = unary (Expr_Op_Type_NEG, tmp);
5721 (yyval.instr) = LDSTIIFP (tmp, &(yyvsp[-6].reg), 0);
5722 }
5723 else if (in_range_p (tmp, -131072, 131071, 3))
5724 {
5725 notethat ("LDSTidxI: dpregs = [ pregs + imm18m4 ]\n");
5726 (yyval.instr) = LDSTIDXI (&(yyvsp[-3].reg), &(yyvsp[-6].reg), 0, 0, ispreg ? 1: 0, tmp);
5727
5728 }
5729 else
5730 return yyerror ("Displacement out of range for load");
5731 }
5732 break;
5733
5734 case 199:
5735 #line 3197 "bfin-parse.y"
5736 {
5737 if (IS_DREG ((yyvsp[-5].reg)) && IS_IREG ((yyvsp[-2].reg)))
5738 {
5739 notethat ("dspLDST: dregs = [ iregs <post_op> ]\n");
5740 (yyval.instr) = DSPLDST (&(yyvsp[-2].reg), 0, &(yyvsp[-5].reg), (yyvsp[-1].modcodes).x0, 0);
5741 }
5742 else if (IS_DREG ((yyvsp[-5].reg)) && IS_PREG ((yyvsp[-2].reg)))
5743 {
5744 notethat ("LDST: dregs = [ pregs <post_op> ]\n");
5745 (yyval.instr) = LDST (&(yyvsp[-2].reg), &(yyvsp[-5].reg), (yyvsp[-1].modcodes).x0, 0, 0, 0);
5746 }
5747 else if (IS_PREG ((yyvsp[-5].reg)) && IS_PREG ((yyvsp[-2].reg)))
5748 {
5749 if (REG_SAME ((yyvsp[-5].reg), (yyvsp[-2].reg)) && (yyvsp[-1].modcodes).x0 != 2)
5750 return yyerror ("Pregs can't be same");
5751
5752 notethat ("LDST: pregs = [ pregs <post_op> ]\n");
5753 (yyval.instr) = LDST (&(yyvsp[-2].reg), &(yyvsp[-5].reg), (yyvsp[-1].modcodes).x0, 0, 1, 0);
5754 }
5755 else if ((yyvsp[-2].reg).regno == REG_SP && IS_ALLREG ((yyvsp[-5].reg)) && (yyvsp[-1].modcodes).x0 == 0)
5756 {
5757 notethat ("PushPopReg: allregs = [ SP ++ ]\n");
5758 (yyval.instr) = PUSHPOPREG (&(yyvsp[-5].reg), 0);
5759 }
5760 else
5761 return yyerror ("Bad register or value");
5762 }
5763 break;
5764
5765 case 200:
5766 #line 3230 "bfin-parse.y"
5767 {
5768 bfin_equals ((yyvsp[-2].expr));
5769 (yyval.instr) = 0;
5770 }
5771 break;
5772
5773 case 201:
5774 #line 3238 "bfin-parse.y"
5775 {
5776 if ((yyvsp[-10].reg).regno != REG_SP)
5777 yyerror ("Stack Pointer expected");
5778 if ((yyvsp[-7].reg).regno == REG_R7
5779 && IN_RANGE ((yyvsp[-5].expr), 0, 7)
5780 && (yyvsp[-3].reg).regno == REG_P5
5781 && IN_RANGE ((yyvsp[-1].expr), 0, 5))
5782 {
5783 notethat ("PushPopMultiple: [ -- SP ] = (R7 : reglim , P5 : reglim )\n");
5784 (yyval.instr) = PUSHPOPMULTIPLE (imm5 ((yyvsp[-5].expr)), imm5 ((yyvsp[-1].expr)), 1, 1, 1);
5785 }
5786 else
5787 return yyerror ("Bad register for PushPopMultiple");
5788 }
5789 break;
5790
5791 case 202:
5792 #line 3254 "bfin-parse.y"
5793 {
5794 if ((yyvsp[-6].reg).regno != REG_SP)
5795 yyerror ("Stack Pointer expected");
5796
5797 if ((yyvsp[-3].reg).regno == REG_R7 && IN_RANGE ((yyvsp[-1].expr), 0, 7))
5798 {
5799 notethat ("PushPopMultiple: [ -- SP ] = (R7 : reglim )\n");
5800 (yyval.instr) = PUSHPOPMULTIPLE (imm5 ((yyvsp[-1].expr)), 0, 1, 0, 1);
5801 }
5802 else if ((yyvsp[-3].reg).regno == REG_P5 && IN_RANGE ((yyvsp[-1].expr), 0, 6))
5803 {
5804 notethat ("PushPopMultiple: [ -- SP ] = (P5 : reglim )\n");
5805 (yyval.instr) = PUSHPOPMULTIPLE (0, imm5 ((yyvsp[-1].expr)), 0, 1, 1);
5806 }
5807 else
5808 return yyerror ("Bad register for PushPopMultiple");
5809 }
5810 break;
5811
5812 case 203:
5813 #line 3273 "bfin-parse.y"
5814 {
5815 if ((yyvsp[0].reg).regno != REG_SP)
5816 yyerror ("Stack Pointer expected");
5817 if ((yyvsp[-9].reg).regno == REG_R7 && (IN_RANGE ((yyvsp[-7].expr), 0, 7))
5818 && (yyvsp[-5].reg).regno == REG_P5 && (IN_RANGE ((yyvsp[-3].expr), 0, 6)))
5819 {
5820 notethat ("PushPopMultiple: (R7 : reglim , P5 : reglim ) = [ SP ++ ]\n");
5821 (yyval.instr) = PUSHPOPMULTIPLE (imm5 ((yyvsp[-7].expr)), imm5 ((yyvsp[-3].expr)), 1, 1, 0);
5822 }
5823 else
5824 return yyerror ("Bad register range for PushPopMultiple");
5825 }
5826 break;
5827
5828 case 204:
5829 #line 3287 "bfin-parse.y"
5830 {
5831 if ((yyvsp[0].reg).regno != REG_SP)
5832 yyerror ("Stack Pointer expected");
5833
5834 if ((yyvsp[-5].reg).regno == REG_R7 && IN_RANGE ((yyvsp[-3].expr), 0, 7))
5835 {
5836 notethat ("PushPopMultiple: (R7 : reglim ) = [ SP ++ ]\n");
5837 (yyval.instr) = PUSHPOPMULTIPLE (imm5 ((yyvsp[-3].expr)), 0, 1, 0, 0);
5838 }
5839 else if ((yyvsp[-5].reg).regno == REG_P5 && IN_RANGE ((yyvsp[-3].expr), 0, 6))
5840 {
5841 notethat ("PushPopMultiple: (P5 : reglim ) = [ SP ++ ]\n");
5842 (yyval.instr) = PUSHPOPMULTIPLE (0, imm5 ((yyvsp[-3].expr)), 0, 1, 0);
5843 }
5844 else
5845 return yyerror ("Bad register range for PushPopMultiple");
5846 }
5847 break;
5848
5849 case 205:
5850 #line 3306 "bfin-parse.y"
5851 {
5852 if ((yyvsp[-2].reg).regno != REG_SP)
5853 yyerror ("Stack Pointer expected");
5854
5855 if (IS_ALLREG ((yyvsp[0].reg)))
5856 {
5857 notethat ("PushPopReg: [ -- SP ] = allregs\n");
5858 (yyval.instr) = PUSHPOPREG (&(yyvsp[0].reg), 1);
5859 }
5860 else
5861 return yyerror ("Bad register for PushPopReg");
5862 }
5863 break;
5864
5865 case 206:
5866 #line 3322 "bfin-parse.y"
5867 {
5868 if (IS_URANGE (16, (yyvsp[0].expr), 0, 4))
5869 (yyval.instr) = LINKAGE (0, uimm16s4 ((yyvsp[0].expr)));
5870 else
5871 return yyerror ("Bad constant for LINK");
5872 }
5873 break;
5874
5875 case 207:
5876 #line 3330 "bfin-parse.y"
5877 {
5878 notethat ("linkage: UNLINK\n");
5879 (yyval.instr) = LINKAGE (1, 0);
5880 }
5881 break;
5882
5883 case 208:
5884 #line 3339 "bfin-parse.y"
5885 {
5886 if (IS_PCREL4 ((yyvsp[-4].expr)) && IS_LPPCREL10 ((yyvsp[-2].expr)) && IS_CREG ((yyvsp[0].reg)))
5887 {
5888 notethat ("LoopSetup: LSETUP (pcrel4 , lppcrel10 ) counters\n");
5889 (yyval.instr) = LOOPSETUP ((yyvsp[-4].expr), &(yyvsp[0].reg), 0, (yyvsp[-2].expr), 0);
5890 }
5891 else
5892 return yyerror ("Bad register or values for LSETUP");
5893
5894 }
5895 break;
5896
5897 case 209:
5898 #line 3350 "bfin-parse.y"
5899 {
5900 if (IS_PCREL4 ((yyvsp[-6].expr)) && IS_LPPCREL10 ((yyvsp[-4].expr))
5901 && IS_PREG ((yyvsp[0].reg)) && IS_CREG ((yyvsp[-2].reg)))
5902 {
5903 notethat ("LoopSetup: LSETUP (pcrel4 , lppcrel10 ) counters = pregs\n");
5904 (yyval.instr) = LOOPSETUP ((yyvsp[-6].expr), &(yyvsp[-2].reg), 1, (yyvsp[-4].expr), &(yyvsp[0].reg));
5905 }
5906 else
5907 return yyerror ("Bad register or values for LSETUP");
5908 }
5909 break;
5910
5911 case 210:
5912 #line 3362 "bfin-parse.y"
5913 {
5914 if (IS_PCREL4 ((yyvsp[-8].expr)) && IS_LPPCREL10 ((yyvsp[-6].expr))
5915 && IS_PREG ((yyvsp[-2].reg)) && IS_CREG ((yyvsp[-4].reg))
5916 && EXPR_VALUE ((yyvsp[0].expr)) == 1)
5917 {
5918 notethat ("LoopSetup: LSETUP (pcrel4 , lppcrel10 ) counters = pregs >> 1\n");
5919 (yyval.instr) = LOOPSETUP ((yyvsp[-8].expr), &(yyvsp[-4].reg), 3, (yyvsp[-6].expr), &(yyvsp[-2].reg));
5920 }
5921 else
5922 return yyerror ("Bad register or values for LSETUP");
5923 }
5924 break;
5925
5926 case 211:
5927 #line 3376 "bfin-parse.y"
5928 {
5929 if (!IS_RELOC ((yyvsp[-1].expr)))
5930 return yyerror ("Invalid expression in loop statement");
5931 if (!IS_CREG ((yyvsp[0].reg)))
5932 return yyerror ("Invalid loop counter register");
5933 (yyval.instr) = bfin_gen_loop ((yyvsp[-1].expr), &(yyvsp[0].reg), 0, 0);
5934 }
5935 break;
5936
5937 case 212:
5938 #line 3384 "bfin-parse.y"
5939 {
5940 if (IS_RELOC ((yyvsp[-3].expr)) && IS_PREG ((yyvsp[0].reg)) && IS_CREG ((yyvsp[-2].reg)))
5941 {
5942 notethat ("Loop: LOOP expr counters = pregs\n");
5943 (yyval.instr) = bfin_gen_loop ((yyvsp[-3].expr), &(yyvsp[-2].reg), 1, &(yyvsp[0].reg));
5944 }
5945 else
5946 return yyerror ("Bad register or values for LOOP");
5947 }
5948 break;
5949
5950 case 213:
5951 #line 3394 "bfin-parse.y"
5952 {
5953 if (IS_RELOC ((yyvsp[-5].expr)) && IS_PREG ((yyvsp[-2].reg)) && IS_CREG ((yyvsp[-4].reg)) && EXPR_VALUE ((yyvsp[0].expr)) == 1)
5954 {
5955 notethat ("Loop: LOOP expr counters = pregs >> 1\n");
5956 (yyval.instr) = bfin_gen_loop ((yyvsp[-5].expr), &(yyvsp[-4].reg), 3, &(yyvsp[-2].reg));
5957 }
5958 else
5959 return yyerror ("Bad register or values for LOOP");
5960 }
5961 break;
5962
5963 case 214:
5964 #line 3406 "bfin-parse.y"
5965 {
5966 notethat ("pseudoDEBUG: DBG\n");
5967 (yyval.instr) = bfin_gen_pseudodbg (3, 7, 0);
5968 }
5969 break;
5970
5971 case 215:
5972 #line 3411 "bfin-parse.y"
5973 {
5974 notethat ("pseudoDEBUG: DBG REG_A\n");
5975 (yyval.instr) = bfin_gen_pseudodbg (3, IS_A1 ((yyvsp[0].reg)), 0);
5976 }
5977 break;
5978
5979 case 216:
5980 #line 3416 "bfin-parse.y"
5981 {
5982 notethat ("pseudoDEBUG: DBG allregs\n");
5983 (yyval.instr) = bfin_gen_pseudodbg (0, (yyvsp[0].reg).regno & CODE_MASK, (yyvsp[0].reg).regno & CLASS_MASK);
5984 }
5985 break;
5986
5987 case 217:
5988 #line 3422 "bfin-parse.y"
5989 {
5990 if (!IS_DREG ((yyvsp[-1].reg)))
5991 return yyerror ("Dregs expected");
5992 notethat ("pseudoDEBUG: DBGCMPLX (dregs )\n");
5993 (yyval.instr) = bfin_gen_pseudodbg (3, 6, (yyvsp[-1].reg).regno & CODE_MASK);
5994 }
5995 break;
5996
5997 case 218:
5998 #line 3430 "bfin-parse.y"
5999 {
6000 notethat ("psedoDEBUG: DBGHALT\n");
6001 (yyval.instr) = bfin_gen_pseudodbg (3, 5, 0);
6002 }
6003 break;
6004
6005 case 219:
6006 #line 3436 "bfin-parse.y"
6007 {
6008 notethat ("pseudodbg_assert: DBGA (dregs_lo , uimm16 )\n");
6009 (yyval.instr) = bfin_gen_pseudodbg_assert (IS_H ((yyvsp[-3].reg)), &(yyvsp[-3].reg), uimm16 ((yyvsp[-1].expr)));
6010 }
6011 break;
6012
6013 case 220:
6014 #line 3442 "bfin-parse.y"
6015 {
6016 notethat ("pseudodbg_assert: DBGAH (dregs , uimm16 )\n");
6017 (yyval.instr) = bfin_gen_pseudodbg_assert (3, &(yyvsp[-3].reg), uimm16 ((yyvsp[-1].expr)));
6018 }
6019 break;
6020
6021 case 221:
6022 #line 3448 "bfin-parse.y"
6023 {
6024 notethat ("psedodbg_assert: DBGAL (dregs , uimm16 )\n");
6025 (yyval.instr) = bfin_gen_pseudodbg_assert (2, &(yyvsp[-3].reg), uimm16 ((yyvsp[-1].expr)));
6026 }
6027 break;
6028
6029 case 222:
6030 #line 3461 "bfin-parse.y"
6031 {
6032 (yyval.reg) = (yyvsp[0].reg);
6033 }
6034 break;
6035
6036 case 223:
6037 #line 3465 "bfin-parse.y"
6038 {
6039 (yyval.reg) = (yyvsp[0].reg);
6040 }
6041 break;
6042
6043 case 224:
6044 #line 3474 "bfin-parse.y"
6045 {
6046 (yyval.mod).MM = 0;
6047 (yyval.mod).mod = 0;
6048 }
6049 break;
6050
6051 case 225:
6052 #line 3479 "bfin-parse.y"
6053 {
6054 (yyval.mod).MM = 1;
6055 (yyval.mod).mod = (yyvsp[-1].value);
6056 }
6057 break;
6058
6059 case 226:
6060 #line 3484 "bfin-parse.y"
6061 {
6062 (yyval.mod).MM = 1;
6063 (yyval.mod).mod = (yyvsp[-3].value);
6064 }
6065 break;
6066
6067 case 227:
6068 #line 3489 "bfin-parse.y"
6069 {
6070 (yyval.mod).MM = 0;
6071 (yyval.mod).mod = (yyvsp[-1].value);
6072 }
6073 break;
6074
6075 case 228:
6076 #line 3494 "bfin-parse.y"
6077 {
6078 (yyval.mod).MM = 1;
6079 (yyval.mod).mod = 0;
6080 }
6081 break;
6082
6083 case 229:
6084 #line 3501 "bfin-parse.y"
6085 {
6086 (yyval.r0).r0 = 1;
6087 }
6088 break;
6089
6090 case 230:
6091 #line 3505 "bfin-parse.y"
6092 {
6093 (yyval.r0).r0 = 0;
6094 }
6095 break;
6096
6097 case 231:
6098 #line 3511 "bfin-parse.y"
6099 {
6100 (yyval.modcodes).s0 = 0;
6101 (yyval.modcodes).x0 = 0;
6102 }
6103 break;
6104
6105 case 232:
6106 #line 3516 "bfin-parse.y"
6107 {
6108 (yyval.modcodes).s0 = 1;
6109 (yyval.modcodes).x0 = 0;
6110 }
6111 break;
6112
6113 case 233:
6114 #line 3521 "bfin-parse.y"
6115 {
6116 (yyval.modcodes).s0 = 0;
6117 (yyval.modcodes).x0 = 1;
6118 }
6119 break;
6120
6121 case 234:
6122 #line 3526 "bfin-parse.y"
6123 {
6124 (yyval.modcodes).s0 = 1;
6125 (yyval.modcodes).x0 = 1;
6126 }
6127 break;
6128
6129 case 235:
6130 #line 3534 "bfin-parse.y"
6131 {
6132 (yyval.r0).r0 = 1;
6133 }
6134 break;
6135
6136 case 236:
6137 #line 3538 "bfin-parse.y"
6138 {
6139 (yyval.r0).r0 = 0;
6140 }
6141 break;
6142
6143 case 237:
6144 #line 3544 "bfin-parse.y"
6145 {
6146 (yyval.modcodes).s0 = 0;
6147 (yyval.modcodes).x0 = 0;
6148 }
6149 break;
6150
6151 case 238:
6152 #line 3549 "bfin-parse.y"
6153 {
6154 (yyval.modcodes).s0 = (yyvsp[-1].modcodes).s0;
6155 (yyval.modcodes).x0 = (yyvsp[-1].modcodes).x0;
6156 }
6157 break;
6158
6159 case 239:
6160 #line 3556 "bfin-parse.y"
6161 {
6162 (yyval.modcodes).s0 = 0;
6163 (yyval.modcodes).x0 = 0;
6164 (yyval.modcodes).aop = 0;
6165 }
6166 break;
6167
6168 case 240:
6169 #line 3562 "bfin-parse.y"
6170 {
6171 (yyval.modcodes).s0 = 0;
6172 (yyval.modcodes).x0 = 0;
6173 (yyval.modcodes).aop = 1;
6174 }
6175 break;
6176
6177 case 241:
6178 #line 3568 "bfin-parse.y"
6179 {
6180 (yyval.modcodes).s0 = 1;
6181 (yyval.modcodes).x0 = 0;
6182 (yyval.modcodes).aop = 1;
6183 }
6184 break;
6185
6186 case 242:
6187 #line 3576 "bfin-parse.y"
6188 {
6189 (yyval.modcodes).r0 = 0;
6190 (yyval.modcodes).s0 = 0;
6191 (yyval.modcodes).x0 = 0;
6192 }
6193 break;
6194
6195 case 243:
6196 #line 3582 "bfin-parse.y"
6197 {
6198 (yyval.modcodes).r0 = 2 + (yyvsp[-1].r0).r0;
6199 (yyval.modcodes).s0 = 0;
6200 (yyval.modcodes).x0 = 0;
6201 }
6202 break;
6203
6204 case 244:
6205 #line 3588 "bfin-parse.y"
6206 {
6207 (yyval.modcodes).r0 = 0;
6208 (yyval.modcodes).s0 = (yyvsp[-1].modcodes).s0;
6209 (yyval.modcodes).x0 = (yyvsp[-1].modcodes).x0;
6210 }
6211 break;
6212
6213 case 245:
6214 #line 3594 "bfin-parse.y"
6215 {
6216 (yyval.modcodes).r0 = 2 + (yyvsp[-3].r0).r0;
6217 (yyval.modcodes).s0 = (yyvsp[-1].modcodes).s0;
6218 (yyval.modcodes).x0 = (yyvsp[-1].modcodes).x0;
6219 }
6220 break;
6221
6222 case 246:
6223 #line 3600 "bfin-parse.y"
6224 {
6225 (yyval.modcodes).r0 = 2 + (yyvsp[-1].r0).r0;
6226 (yyval.modcodes).s0 = (yyvsp[-3].modcodes).s0;
6227 (yyval.modcodes).x0 = (yyvsp[-3].modcodes).x0;
6228 }
6229 break;
6230
6231 case 247:
6232 #line 3608 "bfin-parse.y"
6233 {
6234 (yyval.r0).r0 = 0;
6235 }
6236 break;
6237
6238 case 248:
6239 #line 3612 "bfin-parse.y"
6240 {
6241 (yyval.r0).r0 = 0;
6242 }
6243 break;
6244
6245 case 249:
6246 #line 3616 "bfin-parse.y"
6247 {
6248 (yyval.r0).r0 = 1;
6249 }
6250 break;
6251
6252 case 250:
6253 #line 3622 "bfin-parse.y"
6254 {
6255 (yyval.r0).r0 = 0;
6256 }
6257 break;
6258
6259 case 251:
6260 #line 3626 "bfin-parse.y"
6261 {
6262 (yyval.r0).r0 = 0;
6263 }
6264 break;
6265
6266 case 252:
6267 #line 3630 "bfin-parse.y"
6268 {
6269 (yyval.r0).r0 = 1;
6270 }
6271 break;
6272
6273 case 253:
6274 #line 3636 "bfin-parse.y"
6275 {
6276 (yyval.modcodes).r0 = 0;
6277 (yyval.modcodes).s0 = 0;
6278 (yyval.modcodes).aop = 0;
6279 }
6280 break;
6281
6282 case 254:
6283 #line 3642 "bfin-parse.y"
6284 {
6285 (yyval.modcodes).r0 = 0;
6286 (yyval.modcodes).s0 = 0;
6287 (yyval.modcodes).aop = 3;
6288 }
6289 break;
6290
6291 case 255:
6292 #line 3648 "bfin-parse.y"
6293 {
6294 (yyval.modcodes).r0 = 0;
6295 (yyval.modcodes).s0 = 1;
6296 (yyval.modcodes).aop = 3;
6297 }
6298 break;
6299
6300 case 256:
6301 #line 3654 "bfin-parse.y"
6302 {
6303 (yyval.modcodes).r0 = 1;
6304 (yyval.modcodes).s0 = 0;
6305 (yyval.modcodes).aop = 3;
6306 }
6307 break;
6308
6309 case 257:
6310 #line 3660 "bfin-parse.y"
6311 {
6312 (yyval.modcodes).r0 = 1;
6313 (yyval.modcodes).s0 = 1;
6314 }
6315 break;
6316
6317 case 258:
6318 #line 3665 "bfin-parse.y"
6319 {
6320 (yyval.modcodes).r0 = 1;
6321 (yyval.modcodes).s0 = 1;
6322 }
6323 break;
6324
6325 case 259:
6326 #line 3672 "bfin-parse.y"
6327 {
6328 (yyval.r0).r0 = 0;
6329 }
6330 break;
6331
6332 case 260:
6333 #line 3676 "bfin-parse.y"
6334 {
6335 (yyval.r0).r0 = 1;
6336 }
6337 break;
6338
6339 case 261:
6340 #line 3682 "bfin-parse.y"
6341 {
6342 (yyval.modcodes).s0 = 0;
6343 }
6344 break;
6345
6346 case 262:
6347 #line 3686 "bfin-parse.y"
6348 {
6349 (yyval.modcodes).s0 = 1;
6350 }
6351 break;
6352
6353 case 263:
6354 #line 3693 "bfin-parse.y"
6355 {
6356 (yyval.r0).r0 = 1;
6357 }
6358 break;
6359
6360 case 264:
6361 #line 3697 "bfin-parse.y"
6362 {
6363 (yyval.r0).r0 = 0;
6364 }
6365 break;
6366
6367 case 265:
6368 #line 3701 "bfin-parse.y"
6369 {
6370 (yyval.r0).r0 = 3;
6371 }
6372 break;
6373
6374 case 266:
6375 #line 3705 "bfin-parse.y"
6376 {
6377 (yyval.r0).r0 = 2;
6378 }
6379 break;
6380
6381 case 267:
6382 #line 3711 "bfin-parse.y"
6383 {
6384 (yyval.r0).r0 = 0;
6385 }
6386 break;
6387
6388 case 268:
6389 #line 3715 "bfin-parse.y"
6390 {
6391 (yyval.r0).r0 = 1;
6392 }
6393 break;
6394
6395 case 269:
6396 #line 3722 "bfin-parse.y"
6397 {
6398 (yyval.modcodes).r0 = 0;
6399 (yyval.modcodes).s0 = 1;
6400 }
6401 break;
6402
6403 case 270:
6404 #line 3727 "bfin-parse.y"
6405 {
6406 if ((yyvsp[-1].value) != M_T)
6407 return yyerror ("Bad modifier");
6408 (yyval.modcodes).r0 = 1;
6409 (yyval.modcodes).s0 = 0;
6410 }
6411 break;
6412
6413 case 271:
6414 #line 3734 "bfin-parse.y"
6415 {
6416 if ((yyvsp[-3].value) != M_T)
6417 return yyerror ("Bad modifier");
6418 (yyval.modcodes).r0 = 1;
6419 (yyval.modcodes).s0 = 1;
6420 }
6421 break;
6422
6423 case 272:
6424 #line 3741 "bfin-parse.y"
6425 {
6426 if ((yyvsp[-1].value) != M_T)
6427 return yyerror ("Bad modifier");
6428 (yyval.modcodes).r0 = 1;
6429 (yyval.modcodes).s0 = 1;
6430 }
6431 break;
6432
6433 case 273:
6434 #line 3753 "bfin-parse.y"
6435 {
6436 (yyval.r0).r0 = 0;
6437 }
6438 break;
6439
6440 case 274:
6441 #line 3757 "bfin-parse.y"
6442 {
6443 (yyval.r0).r0 = 1;
6444 }
6445 break;
6446
6447 case 275:
6448 #line 3761 "bfin-parse.y"
6449 {
6450 (yyval.r0).r0 = 2;
6451 }
6452 break;
6453
6454 case 276:
6455 #line 3767 "bfin-parse.y"
6456 {
6457 (yyval.r0).r0 = 0;
6458 }
6459 break;
6460
6461 case 277:
6462 #line 3771 "bfin-parse.y"
6463 {
6464 if ((yyvsp[-1].value) == M_W32)
6465 (yyval.r0).r0 = 1;
6466 else
6467 return yyerror ("Only (W32) allowed");
6468 }
6469 break;
6470
6471 case 278:
6472 #line 3780 "bfin-parse.y"
6473 {
6474 (yyval.r0).r0 = 1;
6475 }
6476 break;
6477
6478 case 279:
6479 #line 3784 "bfin-parse.y"
6480 {
6481 if ((yyvsp[-1].value) == M_IU)
6482 (yyval.r0).r0 = 3;
6483 else
6484 return yyerror ("(IU) expected");
6485 }
6486 break;
6487
6488 case 280:
6489 #line 3793 "bfin-parse.y"
6490 {
6491 (yyval.reg) = (yyvsp[-1].reg);
6492 }
6493 break;
6494
6495 case 281:
6496 #line 3799 "bfin-parse.y"
6497 {
6498 (yyval.reg) = (yyvsp[-2].reg);
6499 }
6500 break;
6501
6502 case 282:
6503 #line 3808 "bfin-parse.y"
6504 {
6505 (yyval.r0).r0 = 1;
6506 }
6507 break;
6508
6509 case 283:
6510 #line 3812 "bfin-parse.y"
6511 {
6512 (yyval.r0).r0 = 0;
6513 }
6514 break;
6515
6516 case 284:
6517 #line 3819 "bfin-parse.y"
6518 {
6519 (yyval.r0).r0 = 0;
6520 }
6521 break;
6522
6523 case 285:
6524 #line 3823 "bfin-parse.y"
6525 {
6526 (yyval.r0).r0 = 1;
6527 }
6528 break;
6529
6530 case 286:
6531 #line 3827 "bfin-parse.y"
6532 {
6533 (yyval.r0).r0 = 2;
6534 }
6535 break;
6536
6537 case 287:
6538 #line 3831 "bfin-parse.y"
6539 {
6540 (yyval.r0).r0 = 3;
6541 }
6542 break;
6543
6544 case 288:
6545 #line 3838 "bfin-parse.y"
6546 {
6547 (yyval.r0).r0 = 0;
6548 }
6549 break;
6550
6551 case 289:
6552 #line 3842 "bfin-parse.y"
6553 {
6554 (yyval.r0).r0 = 1;
6555 }
6556 break;
6557
6558 case 290:
6559 #line 3849 "bfin-parse.y"
6560 {
6561 (yyval.modcodes).r0 = 1; /* HL. */
6562 (yyval.modcodes).s0 = 0; /* s. */
6563 (yyval.modcodes).x0 = 0; /* x. */
6564 (yyval.modcodes).aop = 0; /* aop. */
6565 }
6566 break;
6567
6568 case 291:
6569 #line 3857 "bfin-parse.y"
6570 {
6571 (yyval.modcodes).r0 = 1; /* HL. */
6572 (yyval.modcodes).s0 = 0; /* s. */
6573 (yyval.modcodes).x0 = 0; /* x. */
6574 (yyval.modcodes).aop = 1; /* aop. */
6575 }
6576 break;
6577
6578 case 292:
6579 #line 3865 "bfin-parse.y"
6580 {
6581 (yyval.modcodes).r0 = 0; /* HL. */
6582 (yyval.modcodes).s0 = 0; /* s. */
6583 (yyval.modcodes).x0 = 0; /* x. */
6584 (yyval.modcodes).aop = 0; /* aop. */
6585 }
6586 break;
6587
6588 case 293:
6589 #line 3873 "bfin-parse.y"
6590 {
6591 (yyval.modcodes).r0 = 0; /* HL. */
6592 (yyval.modcodes).s0 = 0; /* s. */
6593 (yyval.modcodes).x0 = 0; /* x. */
6594 (yyval.modcodes).aop = 1;
6595 }
6596 break;
6597
6598 case 294:
6599 #line 3881 "bfin-parse.y"
6600 {
6601 (yyval.modcodes).r0 = 1; /* HL. */
6602 (yyval.modcodes).s0 = 1; /* s. */
6603 (yyval.modcodes).x0 = 0; /* x. */
6604 (yyval.modcodes).aop = 0; /* aop. */
6605 }
6606 break;
6607
6608 case 295:
6609 #line 3888 "bfin-parse.y"
6610 {
6611 (yyval.modcodes).r0 = 1; /* HL. */
6612 (yyval.modcodes).s0 = 1; /* s. */
6613 (yyval.modcodes).x0 = 0; /* x. */
6614 (yyval.modcodes).aop = 1; /* aop. */
6615 }
6616 break;
6617
6618 case 296:
6619 #line 3895 "bfin-parse.y"
6620 {
6621 (yyval.modcodes).r0 = 0; /* HL. */
6622 (yyval.modcodes).s0 = 1; /* s. */
6623 (yyval.modcodes).x0 = 0; /* x. */
6624 (yyval.modcodes).aop = 0; /* aop. */
6625 }
6626 break;
6627
6628 case 297:
6629 #line 3903 "bfin-parse.y"
6630 {
6631 (yyval.modcodes).r0 = 0; /* HL. */
6632 (yyval.modcodes).s0 = 1; /* s. */
6633 (yyval.modcodes).x0 = 0; /* x. */
6634 (yyval.modcodes).aop = 1; /* aop. */
6635 }
6636 break;
6637
6638 case 298:
6639 #line 3913 "bfin-parse.y"
6640 {
6641 (yyval.modcodes).s0 = 0; /* s. */
6642 (yyval.modcodes).x0 = 0; /* HL. */
6643 }
6644 break;
6645
6646 case 299:
6647 #line 3918 "bfin-parse.y"
6648 {
6649 (yyval.modcodes).s0 = 0; /* s. */
6650 (yyval.modcodes).x0 = 1; /* HL. */
6651 }
6652 break;
6653
6654 case 300:
6655 #line 3923 "bfin-parse.y"
6656 {
6657 (yyval.modcodes).s0 = 1; /* s. */
6658 (yyval.modcodes).x0 = 0; /* HL. */
6659 }
6660 break;
6661
6662 case 301:
6663 #line 3928 "bfin-parse.y"
6664 {
6665 (yyval.modcodes).s0 = 1; /* s. */
6666 (yyval.modcodes).x0 = 1; /* HL. */
6667 }
6668 break;
6669
6670 case 302:
6671 #line 3935 "bfin-parse.y"
6672 {
6673 (yyval.modcodes).x0 = 2;
6674 }
6675 break;
6676
6677 case 303:
6678 #line 3939 "bfin-parse.y"
6679 {
6680 (yyval.modcodes).x0 = 0;
6681 }
6682 break;
6683
6684 case 304:
6685 #line 3943 "bfin-parse.y"
6686 {
6687 (yyval.modcodes).x0 = 1;
6688 }
6689 break;
6690
6691 case 305:
6692 #line 3952 "bfin-parse.y"
6693 {
6694 (yyval.reg) = (yyvsp[-1].reg);
6695 }
6696 break;
6697
6698 case 306:
6699 #line 3959 "bfin-parse.y"
6700 {
6701 (yyval.reg) = (yyvsp[-1].reg);
6702 }
6703 break;
6704
6705 case 307:
6706 #line 3966 "bfin-parse.y"
6707 {
6708 (yyval.reg) = (yyvsp[-1].reg);
6709 }
6710 break;
6711
6712 case 308:
6713 #line 3973 "bfin-parse.y"
6714 {
6715 (yyval.macfunc).w = 1;
6716 (yyval.macfunc).P = 1;
6717 (yyval.macfunc).n = IS_A1 ((yyvsp[0].reg));
6718 (yyval.macfunc).op = 3;
6719 (yyval.macfunc).dst = (yyvsp[-2].reg);
6720 (yyval.macfunc).s0.regno = 0;
6721 (yyval.macfunc).s1.regno = 0;
6722
6723 if (IS_A1 ((yyvsp[0].reg)) && IS_EVEN ((yyvsp[-2].reg)))
6724 return yyerror ("Cannot move A1 to even register");
6725 else if (!IS_A1 ((yyvsp[0].reg)) && !IS_EVEN ((yyvsp[-2].reg)))
6726 return yyerror ("Cannot move A0 to odd register");
6727 }
6728 break;
6729
6730 case 309:
6731 #line 3988 "bfin-parse.y"
6732 {
6733 (yyval.macfunc) = (yyvsp[0].macfunc);
6734 (yyval.macfunc).w = 0; (yyval.macfunc).P = 0;
6735 (yyval.macfunc).dst.regno = 0;
6736 }
6737 break;
6738
6739 case 310:
6740 #line 3994 "bfin-parse.y"
6741 {
6742 (yyval.macfunc) = (yyvsp[-1].macfunc);
6743 (yyval.macfunc).w = 1;
6744 (yyval.macfunc).P = 1;
6745 (yyval.macfunc).dst = (yyvsp[-4].reg);
6746 }
6747 break;
6748
6749 case 311:
6750 #line 4002 "bfin-parse.y"
6751 {
6752 (yyval.macfunc) = (yyvsp[-1].macfunc);
6753 (yyval.macfunc).w = 1;
6754 (yyval.macfunc).P = 0;
6755 (yyval.macfunc).dst = (yyvsp[-4].reg);
6756 }
6757 break;
6758
6759 case 312:
6760 #line 4010 "bfin-parse.y"
6761 {
6762 (yyval.macfunc).w = 1;
6763 (yyval.macfunc).P = 0;
6764 (yyval.macfunc).n = IS_A1 ((yyvsp[0].reg));
6765 (yyval.macfunc).op = 3;
6766 (yyval.macfunc).dst = (yyvsp[-2].reg);
6767 (yyval.macfunc).s0.regno = 0;
6768 (yyval.macfunc).s1.regno = 0;
6769
6770 if (IS_A1 ((yyvsp[0].reg)) && !IS_H ((yyvsp[-2].reg)))
6771 return yyerror ("Cannot move A1 to low half of register");
6772 else if (!IS_A1 ((yyvsp[0].reg)) && IS_H ((yyvsp[-2].reg)))
6773 return yyerror ("Cannot move A0 to high half of register");
6774 }
6775 break;
6776
6777 case 313:
6778 #line 4028 "bfin-parse.y"
6779 {
6780 (yyval.macfunc).n = IS_A1 ((yyvsp[-1].reg));
6781 (yyval.macfunc).op = 0;
6782 (yyval.macfunc).s0 = (yyvsp[0].macfunc).s0;
6783 (yyval.macfunc).s1 = (yyvsp[0].macfunc).s1;
6784 }
6785 break;
6786
6787 case 314:
6788 #line 4035 "bfin-parse.y"
6789 {
6790 (yyval.macfunc).n = IS_A1 ((yyvsp[-1].reg));
6791 (yyval.macfunc).op = 1;
6792 (yyval.macfunc).s0 = (yyvsp[0].macfunc).s0;
6793 (yyval.macfunc).s1 = (yyvsp[0].macfunc).s1;
6794 }
6795 break;
6796
6797 case 315:
6798 #line 4042 "bfin-parse.y"
6799 {
6800 (yyval.macfunc).n = IS_A1 ((yyvsp[-1].reg));
6801 (yyval.macfunc).op = 2;
6802 (yyval.macfunc).s0 = (yyvsp[0].macfunc).s0;
6803 (yyval.macfunc).s1 = (yyvsp[0].macfunc).s1;
6804 }
6805 break;
6806
6807 case 316:
6808 #line 4052 "bfin-parse.y"
6809 {
6810 if (IS_DREG ((yyvsp[-2].reg)) && IS_DREG ((yyvsp[0].reg)))
6811 {
6812 (yyval.macfunc).s0 = (yyvsp[-2].reg);
6813 (yyval.macfunc).s1 = (yyvsp[0].reg);
6814 }
6815 else
6816 return yyerror ("Dregs expected");
6817 }
6818 break;
6819
6820 case 317:
6821 #line 4065 "bfin-parse.y"
6822 {
6823 (yyval.r0).r0 = 0;
6824 }
6825 break;
6826
6827 case 318:
6828 #line 4069 "bfin-parse.y"
6829 {
6830 (yyval.r0).r0 = 1;
6831 }
6832 break;
6833
6834 case 319:
6835 #line 4073 "bfin-parse.y"
6836 {
6837 (yyval.r0).r0 = 2;
6838 }
6839 break;
6840
6841 case 320:
6842 #line 4077 "bfin-parse.y"
6843 {
6844 (yyval.r0).r0 = 3;
6845 }
6846 break;
6847
6848 case 321:
6849 #line 4084 "bfin-parse.y"
6850 {
6851 (yyval.modcodes).r0 = (yyvsp[0].reg).regno;
6852 (yyval.modcodes).x0 = (yyvsp[-1].r0).r0;
6853 (yyval.modcodes).s0 = 0;
6854 }
6855 break;
6856
6857 case 322:
6858 #line 4090 "bfin-parse.y"
6859 {
6860 (yyval.modcodes).r0 = 0x18;
6861 (yyval.modcodes).x0 = (yyvsp[-1].r0).r0;
6862 (yyval.modcodes).s0 = 0;
6863 }
6864 break;
6865
6866 case 323:
6867 #line 4096 "bfin-parse.y"
6868 {
6869 (yyval.modcodes).r0 = (yyvsp[-2].reg).regno;
6870 (yyval.modcodes).x0 = (yyvsp[-1].r0).r0;
6871 (yyval.modcodes).s0 = 1;
6872 }
6873 break;
6874
6875 case 324:
6876 #line 4102 "bfin-parse.y"
6877 {
6878 (yyval.modcodes).r0 = 0x18;
6879 (yyval.modcodes).x0 = (yyvsp[-1].r0).r0;
6880 (yyval.modcodes).s0 = 1;
6881 }
6882 break;
6883
6884 case 325:
6885 #line 4112 "bfin-parse.y"
6886 {
6887 Expr_Node_Value val;
6888 val.s_value = S_GET_NAME((yyvsp[0].symbol));
6889 (yyval.expr) = Expr_Node_Create (Expr_Node_Reloc, val, NULL, NULL);
6890 }
6891 break;
6892
6893 case 326:
6894 #line 4121 "bfin-parse.y"
6895 { (yyval.value) = BFD_RELOC_BFIN_GOT; }
6896 break;
6897
6898 case 327:
6899 #line 4123 "bfin-parse.y"
6900 { (yyval.value) = BFD_RELOC_BFIN_GOT17M4; }
6901 break;
6902
6903 case 328:
6904 #line 4125 "bfin-parse.y"
6905 { (yyval.value) = BFD_RELOC_BFIN_FUNCDESC_GOT17M4; }
6906 break;
6907
6908 case 329:
6909 #line 4129 "bfin-parse.y"
6910 {
6911 Expr_Node_Value val;
6912 val.i_value = (yyvsp[0].value);
6913 (yyval.expr) = Expr_Node_Create (Expr_Node_GOT_Reloc, val, (yyvsp[-2].expr), NULL);
6914 }
6915 break;
6916
6917 case 330:
6918 #line 4137 "bfin-parse.y"
6919 {
6920 (yyval.expr) = (yyvsp[0].expr);
6921 }
6922 break;
6923
6924 case 331:
6925 #line 4141 "bfin-parse.y"
6926 {
6927 (yyval.expr) = (yyvsp[0].expr);
6928 }
6929 break;
6930
6931 case 332:
6932 #line 4148 "bfin-parse.y"
6933 {
6934 (yyval.expr) = (yyvsp[-2].expr);
6935 }
6936 break;
6937
6938 case 333:
6939 #line 4154 "bfin-parse.y"
6940 {
6941 Expr_Node_Value val;
6942 val.i_value = (yyvsp[0].value);
6943 (yyval.expr) = Expr_Node_Create (Expr_Node_Constant, val, NULL, NULL);
6944 }
6945 break;
6946
6947 case 334:
6948 #line 4160 "bfin-parse.y"
6949 {
6950 (yyval.expr) = (yyvsp[0].expr);
6951 }
6952 break;
6953
6954 case 335:
6955 #line 4164 "bfin-parse.y"
6956 {
6957 (yyval.expr) = (yyvsp[-1].expr);
6958 }
6959 break;
6960
6961 case 336:
6962 #line 4168 "bfin-parse.y"
6963 {
6964 (yyval.expr) = unary (Expr_Op_Type_COMP, (yyvsp[0].expr));
6965 }
6966 break;
6967
6968 case 337:
6969 #line 4172 "bfin-parse.y"
6970 {
6971 (yyval.expr) = unary (Expr_Op_Type_NEG, (yyvsp[0].expr));
6972 }
6973 break;
6974
6975 case 338:
6976 #line 4178 "bfin-parse.y"
6977 {
6978 (yyval.expr) = (yyvsp[0].expr);
6979 }
6980 break;
6981
6982 case 339:
6983 #line 4184 "bfin-parse.y"
6984 {
6985 (yyval.expr) = binary (Expr_Op_Type_Mult, (yyvsp[-2].expr), (yyvsp[0].expr));
6986 }
6987 break;
6988
6989 case 340:
6990 #line 4188 "bfin-parse.y"
6991 {
6992 (yyval.expr) = binary (Expr_Op_Type_Div, (yyvsp[-2].expr), (yyvsp[0].expr));
6993 }
6994 break;
6995
6996 case 341:
6997 #line 4192 "bfin-parse.y"
6998 {
6999 (yyval.expr) = binary (Expr_Op_Type_Mod, (yyvsp[-2].expr), (yyvsp[0].expr));
7000 }
7001 break;
7002
7003 case 342:
7004 #line 4196 "bfin-parse.y"
7005 {
7006 (yyval.expr) = binary (Expr_Op_Type_Add, (yyvsp[-2].expr), (yyvsp[0].expr));
7007 }
7008 break;
7009
7010 case 343:
7011 #line 4200 "bfin-parse.y"
7012 {
7013 (yyval.expr) = binary (Expr_Op_Type_Sub, (yyvsp[-2].expr), (yyvsp[0].expr));
7014 }
7015 break;
7016
7017 case 344:
7018 #line 4204 "bfin-parse.y"
7019 {
7020 (yyval.expr) = binary (Expr_Op_Type_Lshift, (yyvsp[-2].expr), (yyvsp[0].expr));
7021 }
7022 break;
7023
7024 case 345:
7025 #line 4208 "bfin-parse.y"
7026 {
7027 (yyval.expr) = binary (Expr_Op_Type_Rshift, (yyvsp[-2].expr), (yyvsp[0].expr));
7028 }
7029 break;
7030
7031 case 346:
7032 #line 4212 "bfin-parse.y"
7033 {
7034 (yyval.expr) = binary (Expr_Op_Type_BAND, (yyvsp[-2].expr), (yyvsp[0].expr));
7035 }
7036 break;
7037
7038 case 347:
7039 #line 4216 "bfin-parse.y"
7040 {
7041 (yyval.expr) = binary (Expr_Op_Type_LOR, (yyvsp[-2].expr), (yyvsp[0].expr));
7042 }
7043 break;
7044
7045 case 348:
7046 #line 4220 "bfin-parse.y"
7047 {
7048 (yyval.expr) = binary (Expr_Op_Type_BOR, (yyvsp[-2].expr), (yyvsp[0].expr));
7049 }
7050 break;
7051
7052 case 349:
7053 #line 4224 "bfin-parse.y"
7054 {
7055 (yyval.expr) = (yyvsp[0].expr);
7056 }
7057 break;
7058
7059
7060 default: break;
7061 }
7062
7063 /* Line 1126 of yacc.c. */
7064 #line 7065 "bfin-parse.c"
7065
7066 yyvsp -= yylen;
7067 yyssp -= yylen;
7068
7069
7070 YY_STACK_PRINT (yyss, yyssp);
7071
7072 *++yyvsp = yyval;
7073
7074
7075 /* Now `shift' the result of the reduction. Determine what state
7076 that goes to, based on the state we popped back to and the rule
7077 number reduced by. */
7078
7079 yyn = yyr1[yyn];
7080
7081 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7082 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7083 yystate = yytable[yystate];
7084 else
7085 yystate = yydefgoto[yyn - YYNTOKENS];
7086
7087 goto yynewstate;
7088
7089
7090 /*------------------------------------.
7091 | yyerrlab -- here on detecting error |
7092 `------------------------------------*/
7093 yyerrlab:
7094 /* If not already recovering from an error, report this error. */
7095 if (!yyerrstatus)
7096 {
7097 ++yynerrs;
7098 #if YYERROR_VERBOSE
7099 yyn = yypact[yystate];
7100
7101 if (YYPACT_NINF < yyn && yyn < YYLAST)
7102 {
7103 int yytype = YYTRANSLATE (yychar);
7104 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
7105 YYSIZE_T yysize = yysize0;
7106 YYSIZE_T yysize1;
7107 int yysize_overflow = 0;
7108 char *yymsg = 0;
7109 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
7110 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
7111 int yyx;
7112
7113 #if 0
7114 /* This is so xgettext sees the translatable formats that are
7115 constructed on the fly. */
7116 YY_("syntax error, unexpected %s");
7117 YY_("syntax error, unexpected %s, expecting %s");
7118 YY_("syntax error, unexpected %s, expecting %s or %s");
7119 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
7120 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
7121 #endif
7122 char *yyfmt;
7123 char const *yyf;
7124 static char const yyunexpected[] = "syntax error, unexpected %s";
7125 static char const yyexpecting[] = ", expecting %s";
7126 static char const yyor[] = " or %s";
7127 char yyformat[sizeof yyunexpected
7128 + sizeof yyexpecting - 1
7129 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
7130 * (sizeof yyor - 1))];
7131 char const *yyprefix = yyexpecting;
7132
7133 /* Start YYX at -YYN if negative to avoid negative indexes in
7134 YYCHECK. */
7135 int yyxbegin = yyn < 0 ? -yyn : 0;
7136
7137 /* Stay within bounds of both yycheck and yytname. */
7138 int yychecklim = YYLAST - yyn;
7139 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
7140 int yycount = 1;
7141
7142 yyarg[0] = yytname[yytype];
7143 yyfmt = yystpcpy (yyformat, yyunexpected);
7144
7145 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
7146 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
7147 {
7148 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
7149 {
7150 yycount = 1;
7151 yysize = yysize0;
7152 yyformat[sizeof yyunexpected - 1] = '\0';
7153 break;
7154 }
7155 yyarg[yycount++] = yytname[yyx];
7156 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
7157 yysize_overflow |= yysize1 < yysize;
7158 yysize = yysize1;
7159 yyfmt = yystpcpy (yyfmt, yyprefix);
7160 yyprefix = yyor;
7161 }
7162
7163 yyf = YY_(yyformat);
7164 yysize1 = yysize + yystrlen (yyf);
7165 yysize_overflow |= yysize1 < yysize;
7166 yysize = yysize1;
7167
7168 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
7169 yymsg = (char *) YYSTACK_ALLOC (yysize);
7170 if (yymsg)
7171 {
7172 /* Avoid sprintf, as that infringes on the user's name space.
7173 Don't have undefined behavior even if the translation
7174 produced a string with the wrong number of "%s"s. */
7175 char *yyp = yymsg;
7176 int yyi = 0;
7177 while ((*yyp = *yyf))
7178 {
7179 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
7180 {
7181 yyp += yytnamerr (yyp, yyarg[yyi++]);
7182 yyf += 2;
7183 }
7184 else
7185 {
7186 yyp++;
7187 yyf++;
7188 }
7189 }
7190 yyerror (yymsg);
7191 YYSTACK_FREE (yymsg);
7192 }
7193 else
7194 {
7195 yyerror (YY_("syntax error"));
7196 goto yyexhaustedlab;
7197 }
7198 }
7199 else
7200 #endif /* YYERROR_VERBOSE */
7201 yyerror (YY_("syntax error"));
7202 }
7203
7204
7205
7206 if (yyerrstatus == 3)
7207 {
7208 /* If just tried and failed to reuse look-ahead token after an
7209 error, discard it. */
7210
7211 if (yychar <= YYEOF)
7212 {
7213 /* Return failure if at end of input. */
7214 if (yychar == YYEOF)
7215 YYABORT;
7216 }
7217 else
7218 {
7219 yydestruct ("Error: discarding", yytoken, &yylval);
7220 yychar = YYEMPTY;
7221 }
7222 }
7223
7224 /* Else will try to reuse look-ahead token after shifting the error
7225 token. */
7226 goto yyerrlab1;
7227
7228
7229 /*---------------------------------------------------.
7230 | yyerrorlab -- error raised explicitly by YYERROR. |
7231 `---------------------------------------------------*/
7232 yyerrorlab:
7233
7234 /* Pacify compilers like GCC when the user code never invokes
7235 YYERROR and the label yyerrorlab therefore never appears in user
7236 code. */
7237 if (0)
7238 goto yyerrorlab;
7239
7240 yyvsp -= yylen;
7241 yyssp -= yylen;
7242 yystate = *yyssp;
7243 goto yyerrlab1;
7244
7245
7246 /*-------------------------------------------------------------.
7247 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7248 `-------------------------------------------------------------*/
7249 yyerrlab1:
7250 yyerrstatus = 3; /* Each real token shifted decrements this. */
7251
7252 for (;;)
7253 {
7254 yyn = yypact[yystate];
7255 if (yyn != YYPACT_NINF)
7256 {
7257 yyn += YYTERROR;
7258 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7259 {
7260 yyn = yytable[yyn];
7261 if (0 < yyn)
7262 break;
7263 }
7264 }
7265
7266 /* Pop the current state because it cannot handle the error token. */
7267 if (yyssp == yyss)
7268 YYABORT;
7269
7270
7271 yydestruct ("Error: popping", yystos[yystate], yyvsp);
7272 YYPOPSTACK;
7273 yystate = *yyssp;
7274 YY_STACK_PRINT (yyss, yyssp);
7275 }
7276
7277 if (yyn == YYFINAL)
7278 YYACCEPT;
7279
7280 *++yyvsp = yylval;
7281
7282
7283 /* Shift the error token. */
7284 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7285
7286 yystate = yyn;
7287 goto yynewstate;
7288
7289
7290 /*-------------------------------------.
7291 | yyacceptlab -- YYACCEPT comes here. |
7292 `-------------------------------------*/
7293 yyacceptlab:
7294 yyresult = 0;
7295 goto yyreturn;
7296
7297 /*-----------------------------------.
7298 | yyabortlab -- YYABORT comes here. |
7299 `-----------------------------------*/
7300 yyabortlab:
7301 yyresult = 1;
7302 goto yyreturn;
7303
7304 #ifndef yyoverflow
7305 /*-------------------------------------------------.
7306 | yyexhaustedlab -- memory exhaustion comes here. |
7307 `-------------------------------------------------*/
7308 yyexhaustedlab:
7309 yyerror (YY_("memory exhausted"));
7310 yyresult = 2;
7311 /* Fall through. */
7312 #endif
7313
7314 yyreturn:
7315 if (yychar != YYEOF && yychar != YYEMPTY)
7316 yydestruct ("Cleanup: discarding lookahead",
7317 yytoken, &yylval);
7318 while (yyssp != yyss)
7319 {
7320 yydestruct ("Cleanup: popping",
7321 yystos[*yyssp], yyvsp);
7322 YYPOPSTACK;
7323 }
7324 #ifndef yyoverflow
7325 if (yyss != yyssa)
7326 YYSTACK_FREE (yyss);
7327 #endif
7328 return yyresult;
7329 }
7330
7331
7332 #line 4230 "bfin-parse.y"
7333
7334
7335 EXPR_T
mkexpr(int x,SYMBOL_T s)7336 mkexpr (int x, SYMBOL_T s)
7337 {
7338 EXPR_T e = (EXPR_T) ALLOCATE (sizeof (struct expression_cell));
7339 e->value = x;
7340 EXPR_SYMBOL(e) = s;
7341 return e;
7342 }
7343
7344 static int
value_match(Expr_Node * expr,int sz,int sign,int mul,int issigned)7345 value_match (Expr_Node *expr, int sz, int sign, int mul, int issigned)
7346 {
7347 long umax = (1L << sz) - 1;
7348 long min = -1L << (sz - 1);
7349 long max = (1L << (sz - 1)) - 1;
7350
7351 long v = EXPR_VALUE (expr);
7352
7353 if ((v % mul) != 0)
7354 {
7355 error ("%s:%d: Value Error -- Must align to %d\n", __FILE__, __LINE__, mul);
7356 return 0;
7357 }
7358
7359 v /= mul;
7360
7361 if (sign)
7362 v = -v;
7363
7364 if (issigned)
7365 {
7366 if (v >= min && v <= max) return 1;
7367
7368 #ifdef DEBUG
7369 fprintf(stderr, "signed value %lx out of range\n", v * mul);
7370 #endif
7371 return 0;
7372 }
7373 if (v <= umax && v >= 0)
7374 return 1;
7375 #ifdef DEBUG
7376 fprintf(stderr, "unsigned value %lx out of range\n", v * mul);
7377 #endif
7378 return 0;
7379 }
7380
7381 /* Return the expression structure that allows symbol operations.
7382 If the left and right children are constants, do the operation. */
7383 static Expr_Node *
binary(Expr_Op_Type op,Expr_Node * x,Expr_Node * y)7384 binary (Expr_Op_Type op, Expr_Node *x, Expr_Node *y)
7385 {
7386 if (x->type == Expr_Node_Constant && y->type == Expr_Node_Constant)
7387 {
7388 switch (op)
7389 {
7390 case Expr_Op_Type_Add:
7391 x->value.i_value += y->value.i_value;
7392 break;
7393 case Expr_Op_Type_Sub:
7394 x->value.i_value -= y->value.i_value;
7395 break;
7396 case Expr_Op_Type_Mult:
7397 x->value.i_value *= y->value.i_value;
7398 break;
7399 case Expr_Op_Type_Div:
7400 if (y->value.i_value == 0)
7401 error ("Illegal Expression: Division by zero.");
7402 else
7403 x->value.i_value /= y->value.i_value;
7404 break;
7405 case Expr_Op_Type_Mod:
7406 x->value.i_value %= y->value.i_value;
7407 break;
7408 case Expr_Op_Type_Lshift:
7409 x->value.i_value <<= y->value.i_value;
7410 break;
7411 case Expr_Op_Type_Rshift:
7412 x->value.i_value >>= y->value.i_value;
7413 break;
7414 case Expr_Op_Type_BAND:
7415 x->value.i_value &= y->value.i_value;
7416 break;
7417 case Expr_Op_Type_BOR:
7418 x->value.i_value |= y->value.i_value;
7419 break;
7420 case Expr_Op_Type_BXOR:
7421 x->value.i_value ^= y->value.i_value;
7422 break;
7423 case Expr_Op_Type_LAND:
7424 x->value.i_value = x->value.i_value && y->value.i_value;
7425 break;
7426 case Expr_Op_Type_LOR:
7427 x->value.i_value = x->value.i_value || y->value.i_value;
7428 break;
7429
7430 default:
7431 error ("%s:%d: Internal compiler error\n", __FILE__, __LINE__);
7432 }
7433 return x;
7434 }
7435 else
7436 {
7437 /* Create a new expression structure. */
7438 Expr_Node_Value val;
7439 val.op_value = op;
7440 return Expr_Node_Create (Expr_Node_Binop, val, x, y);
7441 }
7442 }
7443
7444 static Expr_Node *
unary(Expr_Op_Type op,Expr_Node * x)7445 unary (Expr_Op_Type op, Expr_Node *x)
7446 {
7447 if (x->type == Expr_Node_Constant)
7448 {
7449 switch (op)
7450 {
7451 case Expr_Op_Type_NEG:
7452 x->value.i_value = -x->value.i_value;
7453 break;
7454 case Expr_Op_Type_COMP:
7455 x->value.i_value = ~x->value.i_value;
7456 break;
7457 default:
7458 error ("%s:%d: Internal compiler error\n", __FILE__, __LINE__);
7459 }
7460 return x;
7461 }
7462 else
7463 {
7464 /* Create a new expression structure. */
7465 Expr_Node_Value val;
7466 val.op_value = op;
7467 return Expr_Node_Create (Expr_Node_Unop, val, x, NULL);
7468 }
7469 }
7470
7471 int debug_codeselection = 0;
7472 static void
notethat(char * format,...)7473 notethat (char *format, ...)
7474 {
7475 va_list ap;
7476 va_start (ap, format);
7477 if (debug_codeselection)
7478 {
7479 vfprintf (errorf, format, ap);
7480 }
7481 va_end (ap);
7482 }
7483
7484 #ifdef TEST
main(int argc,char ** argv)7485 main (int argc, char **argv)
7486 {
7487 yyparse();
7488 }
7489 #endif
7490
7491
7492