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