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