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