1 /* A Bison parser, made by GNU Bison 2.1. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
40 #define YYBISON_VERSION "2.1"
43 #define YYSKELETON_NAME "yacc.c"
48 /* Using locations. */
49 #define YYLSP_NEEDED 0
56 /* Put the tokens into the symbol table, so that GDB and other debuggers
86 REG_A_DOUBLE_ZERO
= 285,
87 REG_A_DOUBLE_ONE
= 286,
135 _PLUS_BAR_PLUS
= 334,
136 _PLUS_BAR_MINUS
= 335,
137 _MINUS_BAR_PLUS
= 336,
138 _MINUS_BAR_MINUS
= 337,
145 _GREATER_GREATER_GREATER_THAN_ASSIGN
= 344,
148 GREATER_GREATER
= 347,
149 _GREATER_GREATER_GREATER
= 348,
150 _LESS_LESS_ASSIGN
= 349,
151 _GREATER_GREATER_ASSIGN
= 350,
158 _AMPERSAND_ASSIGN
= 357,
162 _LESS_THAN_ASSIGN
= 361,
163 _ASSIGN_ASSIGN
= 362,
228 FUNCDESC_GOT17M4
= 427,
234 #define BYTEOP16P 258
235 #define BYTEOP16M 259
240 #define BYTEUNPACK 264
260 #define BYTE_DREG 284
261 #define REG_A_DOUBLE_ZERO 285
262 #define REG_A_DOUBLE_ONE 286
263 #define A_ZERO_DOT_L 287
264 #define A_ZERO_DOT_H 288
265 #define A_ONE_DOT_L 289
266 #define A_ONE_DOT_H 290
285 #define LOOP_BEGIN 309
287 #define DISALGNEXCPT 311
289 #define JUMP_DOT_S 313
290 #define JUMP_DOT_L 314
296 #define AMPERSAND 320
309 #define DOUBLE_BAR 333
310 #define _PLUS_BAR_PLUS 334
311 #define _PLUS_BAR_MINUS 335
312 #define _MINUS_BAR_PLUS 336
313 #define _MINUS_BAR_MINUS 337
314 #define _MINUS_MINUS 338
315 #define _PLUS_PLUS 339
319 #define BXORSHIFT 343
320 #define _GREATER_GREATER_GREATER_THAN_ASSIGN 344
322 #define LESS_LESS 346
323 #define GREATER_GREATER 347
324 #define _GREATER_GREATER_GREATER 348
325 #define _LESS_LESS_ASSIGN 349
326 #define _GREATER_GREATER_ASSIGN 350
330 #define _STAR_ASSIGN 354
331 #define _BAR_ASSIGN 355
332 #define _CARET_ASSIGN 356
333 #define _AMPERSAND_ASSIGN 357
334 #define _MINUS_ASSIGN 358
335 #define _PLUS_ASSIGN 359
336 #define _ASSIGN_BANG 360
337 #define _LESS_THAN_ASSIGN 361
338 #define _ASSIGN_ASSIGN 362
343 #define LESS_THAN 367
392 #define SEMICOLON 416
397 #define STATUS_REG 421
403 #define FUNCDESC_GOT17M4 427
410 /* Copy the first part of user declarations. */
411 #line 21 "bfin-parse.y"
417 #include "bfin-aux.h" // opcode generating auxiliaries
419 #include "elf/common.h"
420 #include "elf/bfin.h"
422 #define DSP32ALU(aopcde, HL, dst1, dst0, src0, src1, s, x, aop) \
423 bfin_gen_dsp32alu (HL, aopcde, aop, s, x, dst0, dst1, src0, src1)
425 #define DSP32MAC(op1, MM, mmod, w1, P, h01, h11, h00, h10, dst, op0, src0, src1, w0) \
426 bfin_gen_dsp32mac (op1, MM, mmod, w1, P, h01, h11, h00, h10, op0, \
429 #define DSP32MULT(op1, MM, mmod, w1, P, h01, h11, h00, h10, dst, op0, src0, src1, w0) \
430 bfin_gen_dsp32mult (op1, MM, mmod, w1, P, h01, h11, h00, h10, op0, \
433 #define DSP32SHIFT(sopcde, dst0, src0, src1, sop, hls) \
434 bfin_gen_dsp32shift (sopcde, dst0, src0, src1, sop, hls)
436 #define DSP32SHIFTIMM(sopcde, dst0, immag, src1, sop, hls) \
437 bfin_gen_dsp32shiftimm (sopcde, dst0, immag, src1, sop, hls)
439 #define LDIMMHALF_R(reg, h, s, z, hword) \
440 bfin_gen_ldimmhalf (reg, h, s, z, hword, 1)
442 #define LDIMMHALF_R5(reg, h, s, z, hword) \
443 bfin_gen_ldimmhalf (reg, h, s, z, hword, 2)
445 #define LDSTIDXI(ptr, reg, w, sz, z, offset) \
446 bfin_gen_ldstidxi (ptr, reg, w, sz, z, offset)
448 #define LDST(ptr, reg, aop, sz, z, w) \
449 bfin_gen_ldst (ptr, reg, aop, sz, z, w)
451 #define LDSTII(ptr, reg, offset, w, op) \
452 bfin_gen_ldstii (ptr, reg, offset, w, op)
454 #define DSPLDST(i, m, reg, aop, w) \
455 bfin_gen_dspldst (i, reg, aop, w, m)
457 #define LDSTPMOD(ptr, reg, idx, aop, w) \
458 bfin_gen_ldstpmod (ptr, reg, aop, w, idx)
460 #define LDSTIIFP(offset, reg, w) \
461 bfin_gen_ldstiifp (reg, offset, w)
463 #define LOGI2OP(dst, src, opc) \
464 bfin_gen_logi2op (opc, src, dst.regno & CODE_MASK)
466 #define ALU2OP(dst, src, opc) \
467 bfin_gen_alu2op (dst, src, opc)
469 #define BRCC(t, b, offset) \
470 bfin_gen_brcc (t, b, offset)
472 #define UJUMP(offset) \
473 bfin_gen_ujump (offset)
475 #define PROGCTRL(prgfunc, poprnd) \
476 bfin_gen_progctrl (prgfunc, poprnd)
478 #define PUSHPOPMULTIPLE(dr, pr, d, p, w) \
479 bfin_gen_pushpopmultiple (dr, pr, d, p, w)
481 #define PUSHPOPREG(reg, w) \
482 bfin_gen_pushpopreg (reg, w)
484 #define CALLA(addr, s) \
485 bfin_gen_calla (addr, s)
487 #define LINKAGE(r, framesize) \
488 bfin_gen_linkage (r, framesize)
490 #define COMPI2OPD(dst, src, op) \
491 bfin_gen_compi2opd (dst, src, op)
493 #define COMPI2OPP(dst, src, op) \
494 bfin_gen_compi2opp (dst, src, op)
496 #define DAGMODIK(i, op) \
497 bfin_gen_dagmodik (i, op)
499 #define DAGMODIM(i, m, op, br) \
500 bfin_gen_dagmodim (i, m, op, br)
502 #define COMP3OP(dst, src0, src1, opc) \
503 bfin_gen_comp3op (src0, src1, dst, opc)
505 #define PTR2OP(dst, src, opc) \
506 bfin_gen_ptr2op (dst, src, opc)
508 #define CCFLAG(x, y, opc, i, g) \
509 bfin_gen_ccflag (x, y, opc, i, g)
511 #define CCMV(src, dst, t) \
512 bfin_gen_ccmv (src, dst, t)
514 #define CACTRL(reg, a, op) \
515 bfin_gen_cactrl (reg, a, op)
517 #define LOOPSETUP(soffset, c, rop, eoffset, reg) \
518 bfin_gen_loopsetup (soffset, c, rop, eoffset, reg)
520 #define HL2(r1, r0) (IS_H (r1) << 1 | IS_H (r0))
521 #define IS_RANGE(bits, expr, sign, mul) \
522 value_match(expr, bits, sign, mul, 1)
523 #define IS_URANGE(bits, expr, sign, mul) \
524 value_match(expr, bits, sign, mul, 0)
525 #define IS_CONST(expr) (expr->type == Expr_Node_Constant)
526 #define IS_RELOC(expr) (expr->type != Expr_Node_Constant)
527 #define IS_IMM(expr, bits) value_match (expr, bits, 0, 1, 1)
528 #define IS_UIMM(expr, bits) value_match (expr, bits, 0, 1, 0)
530 #define IS_PCREL4(expr) \
531 (value_match (expr, 4, 0, 2, 0))
533 #define IS_LPPCREL10(expr) \
534 (value_match (expr, 10, 0, 2, 0))
536 #define IS_PCREL10(expr) \
537 (value_match (expr, 10, 0, 2, 1))
539 #define IS_PCREL12(expr) \
540 (value_match (expr, 12, 0, 2, 1))
542 #define IS_PCREL24(expr) \
543 (value_match (expr, 24, 0, 2, 1))
546 static int value_match (Expr_Node
*expr
, int sz
, int sign
, int mul
, int issigned
);
551 static Expr_Node
*binary (Expr_Op_Type
, Expr_Node
*, Expr_Node
*);
552 static Expr_Node
*unary (Expr_Op_Type
, Expr_Node
*);
554 static void notethat (char *format
, ...);
556 char *current_inputline
;
558 int yyerror (char *msg
);
560 void error (char *format
, ...)
565 va_start (ap
, format
);
566 vsprintf (buffer
, format
, ap
);
578 else if (yytext
[0] != ';')
579 error ("%s. Input text was %s.", msg
, yytext
);
587 in_range_p (Expr_Node
*expr
, int from
, int to
, unsigned int mask
)
589 int val
= EXPR_VALUE (expr
);
590 if (expr
->type
!= Expr_Node_Constant
)
592 if (val
< from
|| val
> to
)
594 return (val
& mask
) == 0;
597 extern int yylex (void);
599 #define imm3(x) EXPR_VALUE (x)
600 #define imm4(x) EXPR_VALUE (x)
601 #define uimm4(x) EXPR_VALUE (x)
602 #define imm5(x) EXPR_VALUE (x)
603 #define uimm5(x) EXPR_VALUE (x)
604 #define imm6(x) EXPR_VALUE (x)
605 #define imm7(x) EXPR_VALUE (x)
606 #define imm16(x) EXPR_VALUE (x)
607 #define uimm16s4(x) ((EXPR_VALUE (x)) >> 2)
608 #define uimm16(x) EXPR_VALUE (x)
610 /* Return true if a value is inside a range. */
611 #define IN_RANGE(x, low, high) \
612 (((EXPR_VALUE(x)) >= (low)) && (EXPR_VALUE(x)) <= ((high)))
614 /* Auxiliary functions. */
617 neg_value (Expr_Node
*expr
)
619 expr
->value
.i_value
= -expr
->value
.i_value
;
623 valid_dreg_pair (Register
*reg1
, Expr_Node
*reg2
)
625 if (!IS_DREG (*reg1
))
627 yyerror ("Dregs expected");
631 if (reg1
->regno
!= 1 && reg1
->regno
!= 3)
633 yyerror ("Bad register pair");
637 if (imm7 (reg2
) != reg1
->regno
- 1)
639 yyerror ("Bad register pair");
648 check_multiply_halfregs (Macfunc
*aa
, Macfunc
*ab
)
650 if ((!REG_EQUAL (aa
->s0
, ab
->s0
) && !REG_EQUAL (aa
->s0
, ab
->s1
))
651 || (!REG_EQUAL (aa
->s1
, ab
->s1
) && !REG_EQUAL (aa
->s1
, ab
->s0
)))
652 return yyerror ("Source multiplication register mismatch");
658 /* Check mac option. */
661 check_macfunc_option (Macfunc
*a
, Opt_mode
*opt
)
663 /* Default option is always valid. */
667 if ((a
->w
== 1 && a
->P
== 1
668 && opt
->mod
!= M_FU
&& opt
->mod
!= M_IS
&& opt
->mod
!= M_IU
669 && opt
->mod
!= M_S2RND
&& opt
->mod
!= M_ISS2
)
670 || (a
->w
== 1 && a
->P
== 0
671 && opt
->mod
!= M_FU
&& opt
->mod
!= M_IS
&& opt
->mod
!= M_IU
672 && opt
->mod
!= M_T
&& opt
->mod
!= M_TFU
&& opt
->mod
!= M_S2RND
673 && opt
->mod
!= M_ISS2
&& opt
->mod
!= M_IH
)
674 || (a
->w
== 0 && a
->P
== 0
675 && opt
->mod
!= M_FU
&& opt
->mod
!= M_IS
&& opt
->mod
!= M_W32
))
681 /* Check (vector) mac funcs and ops. */
684 check_macfuncs (Macfunc
*aa
, Opt_mode
*opa
,
685 Macfunc
*ab
, Opt_mode
*opb
)
687 /* Variables for swapping. */
691 /* The option mode should be put at the end of the second instruction
692 of the vector except M, which should follow MAC1 instruction. */
694 return yyerror ("Bad opt mode");
696 /* If a0macfunc comes before a1macfunc, swap them. */
700 /* (M) is not allowed here. */
702 return yyerror ("(M) not allowed with A0MAC");
704 return yyerror ("Vector AxMACs can't be same");
706 mtmp
= *aa
; *aa
= *ab
; *ab
= mtmp
;
707 otmp
= *opa
; *opa
= *opb
; *opb
= otmp
;
712 return yyerror ("(M) not allowed with A0MAC");
714 return yyerror ("Vector AxMACs can't be same");
717 /* If both ops are one of 0, 1, or 2, we have multiply_halfregs in both
718 assignment_or_macfuncs. */
719 if ((aa
->op
== 0 || aa
->op
== 1 || aa
->op
== 2)
720 && (ab
->op
== 0 || ab
->op
== 1 || ab
->op
== 2))
722 if (check_multiply_halfregs (aa
, ab
) < 0)
727 /* Only one of the assign_macfuncs has a half reg multiply
728 Evil trick: Just 'OR' their source register codes:
729 We can do that, because we know they were initialized to 0
730 in the rules that don't use multiply_halfregs. */
731 aa
->s0
.regno
|= (ab
->s0
.regno
& CODE_MASK
);
732 aa
->s1
.regno
|= (ab
->s1
.regno
& CODE_MASK
);
735 if (aa
->w
== ab
->w
&& aa
->P
!= ab
->P
)
737 return yyerror ("macfuncs must differ");
738 if (aa
->w
&& (aa
->dst
.regno
- ab
->dst
.regno
!= 1))
739 return yyerror ("Destination Dregs must differ by one");
742 /* Make sure mod flags get ORed, too. */
743 opb
->mod
|= opa
->mod
;
746 if (check_macfunc_option (aa
, opb
) < 0
747 && check_macfunc_option (ab
, opb
) < 0)
748 return yyerror ("bad option");
750 /* Make sure first macfunc has got both P flags ORed. */
758 is_group1 (INSTR_T x
)
760 /* Group1 is dpsLDST, LDSTpmod, LDST, LDSTiiFP, LDSTii. */
761 if ((x
->value
& 0xc000) == 0x8000 || (x
->value
== 0x0000))
768 is_group2 (INSTR_T x
)
770 if ((((x
->value
& 0xfc00) == 0x9c00) /* dspLDST. */
771 && !((x
->value
& 0xfde0) == 0x9c60) /* dagMODim. */
772 && !((x
->value
& 0xfde0) == 0x9ce0) /* dagMODim with bit rev. */
773 && !((x
->value
& 0xfde0) == 0x9d60)) /* pick dagMODik. */
774 || (x
->value
== 0x0000))
781 /* Enabling traces. */
786 /* Enabling verbose error messages. */
787 #ifdef YYERROR_VERBOSE
788 # undef YYERROR_VERBOSE
789 # define YYERROR_VERBOSE 1
791 # define YYERROR_VERBOSE 0
794 /* Enabling the token table. */
795 #ifndef YYTOKEN_TABLE
796 # define YYTOKEN_TABLE 0
799 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
800 #line 390 "bfin-parse.y"
801 typedef union YYSTYPE
{
808 struct { int r0
; int s0
; int x0
; int aop
; } modcodes
;
809 struct { int r0
; } r0
;
812 /* Line 196 of yacc.c. */
813 #line 814 "bfin-parse.c"
814 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
815 # define YYSTYPE_IS_DECLARED 1
816 # define YYSTYPE_IS_TRIVIAL 1
821 /* Copy the second part of user declarations. */
824 /* Line 219 of yacc.c. */
825 #line 826 "bfin-parse.c"
827 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
828 # define YYSIZE_T __SIZE_TYPE__
830 #if ! defined (YYSIZE_T) && defined (size_t)
831 # define YYSIZE_T size_t
833 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
834 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
835 # define YYSIZE_T size_t
837 #if ! defined (YYSIZE_T)
838 # define YYSIZE_T unsigned int
844 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
845 # define YY_(msgid) dgettext ("bison-runtime", msgid)
849 # define YY_(msgid) msgid
853 #if ! defined (yyoverflow) || YYERROR_VERBOSE
855 /* The parser invokes alloca or malloc; define the necessary symbols. */
857 # ifdef YYSTACK_USE_ALLOCA
858 # if YYSTACK_USE_ALLOCA
860 # define YYSTACK_ALLOC __builtin_alloca
862 # define YYSTACK_ALLOC alloca
863 # if defined (__STDC__) || defined (__cplusplus)
864 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
865 # define YYINCLUDED_STDLIB_H
871 # ifdef YYSTACK_ALLOC
872 /* Pacify GCC's `empty if-body' warning. */
873 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
874 # ifndef YYSTACK_ALLOC_MAXIMUM
875 /* The OS might guarantee only one guard page at the bottom of the stack,
876 and a page size can be as small as 4096 bytes. So we cannot safely
877 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
878 to allow for a few compiler-allocated temporary stack slots. */
879 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
882 # define YYSTACK_ALLOC YYMALLOC
883 # define YYSTACK_FREE YYFREE
884 # ifndef YYSTACK_ALLOC_MAXIMUM
885 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
891 # define YYMALLOC malloc
892 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
893 && (defined (__STDC__) || defined (__cplusplus)))
894 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
899 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
900 && (defined (__STDC__) || defined (__cplusplus)))
901 void free (void *); /* INFRINGES ON USER NAME SPACE */
908 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
911 #if (! defined (yyoverflow) \
912 && (! defined (__cplusplus) \
913 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
915 /* A type that is properly aligned for any stack member. */
922 /* The size of the maximum gap between one aligned stack and the next. */
923 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
925 /* The size of an array large to enough to hold all stacks, each with
927 # define YYSTACK_BYTES(N) \
928 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
929 + YYSTACK_GAP_MAXIMUM)
931 /* Copy COUNT objects from FROM to TO. The source and destination do
934 # if defined (__GNUC__) && 1 < __GNUC__
935 # define YYCOPY(To, From, Count) \
936 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
938 # define YYCOPY(To, From, Count) \
942 for (yyi = 0; yyi < (Count); yyi++) \
943 (To)[yyi] = (From)[yyi]; \
949 /* Relocate STACK from its old location to the new one. The
950 local variables YYSIZE and YYSTACKSIZE give the old and new number of
951 elements in the stack, and YYPTR gives the new location of the
952 stack. Advance YYPTR to a properly aligned location for the next
954 # define YYSTACK_RELOCATE(Stack) \
957 YYSIZE_T yynewbytes; \
958 YYCOPY (&yyptr->Stack, Stack, yysize); \
959 Stack = &yyptr->Stack; \
960 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
961 yyptr += yynewbytes / sizeof (*yyptr); \
967 #if defined (__STDC__) || defined (__cplusplus)
968 typedef signed char yysigned_char
;
970 typedef short int yysigned_char
;
973 /* YYFINAL -- State number of the termination state. */
975 /* YYLAST -- Last index in YYTABLE. */
978 /* YYNTOKENS -- Number of terminals. */
979 #define YYNTOKENS 175
980 /* YYNNTS -- Number of nonterminals. */
982 /* YYNRULES -- Number of rules. */
984 /* YYNRULES -- Number of states. */
985 #define YYNSTATES 1021
987 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
989 #define YYMAXUTOK 429
991 #define YYTRANSLATE(YYX) \
992 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
994 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
995 static const unsigned char yytranslate
[] =
997 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
998 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
999 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1000 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1001 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1002 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1003 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1004 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1005 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1006 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1007 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1008 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1009 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1010 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1011 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1012 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1013 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1014 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1015 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1016 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1017 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1018 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1019 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1020 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1021 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1022 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1023 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1024 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1025 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1026 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1027 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1028 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1029 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1030 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1031 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1032 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1033 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1034 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
1035 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
1036 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
1037 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
1038 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
1039 165, 166, 167, 168, 169, 170, 171, 172, 173, 174
1043 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1045 static const unsigned short int yyprhs
[] =
1047 0, 0, 3, 4, 6, 9, 16, 21, 23, 25,
1048 28, 34, 36, 43, 50, 54, 58, 76, 94, 106,
1049 118, 130, 143, 156, 169, 175, 179, 183, 187, 196,
1050 210, 223, 237, 251, 265, 274, 292, 299, 309, 313,
1051 320, 324, 330, 337, 346, 355, 358, 361, 366, 370,
1052 373, 378, 382, 389, 394, 402, 410, 414, 418, 425,
1053 429, 434, 438, 442, 446, 458, 470, 480, 486, 492,
1054 502, 508, 514, 521, 528, 534, 540, 546, 553, 560,
1055 566, 568, 572, 576, 580, 584, 589, 594, 604, 614,
1056 620, 628, 633, 640, 646, 653, 661, 671, 680, 689,
1057 701, 711, 716, 722, 729, 737, 744, 749, 756, 762,
1058 769, 776, 781, 790, 801, 812, 825, 831, 838, 844,
1059 851, 856, 861, 866, 874, 884, 894, 904, 911, 918,
1060 925, 934, 943, 950, 956, 962, 971, 976, 984, 986,
1061 988, 990, 992, 994, 996, 998, 1000, 1002, 1004, 1007,
1062 1010, 1015, 1020, 1027, 1034, 1037, 1040, 1045, 1048, 1051,
1063 1054, 1057, 1060, 1063, 1070, 1077, 1083, 1088, 1092, 1096,
1064 1100, 1104, 1108, 1112, 1117, 1120, 1125, 1128, 1133, 1136,
1065 1141, 1144, 1152, 1161, 1170, 1178, 1186, 1194, 1204, 1212,
1066 1221, 1231, 1240, 1247, 1255, 1264, 1274, 1283, 1291, 1299,
1067 1306, 1318, 1326, 1338, 1346, 1350, 1353, 1355, 1363, 1373,
1068 1385, 1389, 1395, 1403, 1405, 1408, 1411, 1416, 1418, 1425,
1069 1432, 1439, 1441, 1443, 1444, 1450, 1456, 1460, 1464, 1468,
1070 1472, 1473, 1475, 1477, 1479, 1481, 1483, 1484, 1488, 1489,
1071 1493, 1497, 1498, 1502, 1506, 1512, 1518, 1519, 1523, 1527,
1072 1528, 1532, 1536, 1537, 1541, 1545, 1549, 1555, 1561, 1562,
1073 1566, 1567, 1571, 1573, 1575, 1577, 1579, 1580, 1584, 1588,
1074 1592, 1598, 1604, 1606, 1608, 1610, 1611, 1615, 1616, 1620,
1075 1625, 1630, 1632, 1634, 1636, 1638, 1640, 1642, 1644, 1646,
1076 1650, 1654, 1658, 1662, 1668, 1674, 1680, 1686, 1690, 1694,
1077 1700, 1706, 1707, 1709, 1711, 1714, 1717, 1720, 1724, 1726,
1078 1732, 1738, 1742, 1745, 1748, 1751, 1755, 1757, 1759, 1761,
1079 1763, 1767, 1771, 1775, 1779, 1781, 1783, 1785, 1787, 1791,
1080 1793, 1795, 1799, 1801, 1803, 1807, 1810, 1813, 1815, 1819,
1081 1823, 1827, 1831, 1835, 1839, 1843, 1847, 1851, 1855
1084 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1085 static const short int yyrhs
[] =
1087 176, 0, -1, -1, 177, -1, 178, 161, -1, 178,
1088 78, 178, 78, 178, 161, -1, 178, 78, 178, 161,
1089 -1, 1, -1, 167, -1, 209, 180, -1, 209, 180,
1090 158, 209, 180, -1, 56, -1, 26, 98, 163, 208,
1091 179, 162, -1, 36, 98, 163, 208, 179, 162, -1,
1092 33, 98, 36, -1, 35, 98, 36, -1, 163, 26,
1093 158, 26, 162, 98, 3, 163, 26, 160, 220, 158,
1094 26, 160, 220, 162, 193, -1, 163, 26, 158, 26,
1095 162, 98, 4, 163, 26, 160, 220, 158, 26, 160,
1096 220, 162, 193, -1, 163, 26, 158, 26, 162, 98,
1097 9, 26, 160, 220, 193, -1, 163, 26, 158, 26,
1098 162, 98, 20, 26, 163, 192, 162, -1, 26, 98,
1099 34, 71, 35, 158, 26, 98, 32, 71, 33, -1,
1100 26, 98, 179, 71, 179, 158, 26, 98, 179, 70,
1101 179, 185, -1, 26, 98, 26, 202, 26, 158, 26,
1102 98, 26, 202, 26, 185, -1, 26, 98, 26, 201,
1103 26, 158, 26, 98, 26, 201, 26, 186, -1, 26,
1104 98, 77, 26, 190, -1, 206, 77, 179, -1, 32,
1105 98, 36, -1, 34, 98, 36, -1, 26, 98, 195,
1106 163, 26, 158, 26, 162, -1, 26, 98, 5, 163,
1107 26, 160, 220, 158, 26, 160, 220, 162, 194, -1,
1108 26, 98, 5, 163, 26, 160, 220, 158, 26, 160,
1109 220, 162, -1, 26, 98, 6, 163, 26, 160, 220,
1110 158, 26, 160, 220, 162, 203, -1, 26, 98, 7,
1111 163, 26, 160, 220, 158, 26, 160, 220, 162, 203,
1112 -1, 26, 98, 8, 163, 26, 160, 220, 158, 26,
1113 160, 220, 162, 204, -1, 26, 98, 10, 163, 26,
1114 158, 26, 162, -1, 36, 98, 36, 98, 22, 163,
1115 36, 162, 72, 36, 71, 22, 163, 36, 162, 72,
1116 36, -1, 26, 98, 26, 202, 26, 185, -1, 26,
1117 98, 200, 163, 26, 158, 26, 162, 190, -1, 206,
1118 70, 179, -1, 36, 98, 36, 202, 36, 185, -1,
1119 206, 206, 220, -1, 206, 179, 163, 126, 162, -1,
1120 36, 98, 26, 163, 138, 162, -1, 36, 98, 26,
1121 202, 26, 163, 141, 162, -1, 36, 98, 26, 202,
1122 26, 163, 142, 162, -1, 206, 179, -1, 206, 26,
1123 -1, 26, 98, 36, 187, -1, 36, 98, 220, -1,
1124 206, 220, -1, 26, 98, 220, 188, -1, 36, 98,
1125 26, -1, 26, 98, 26, 201, 26, 184, -1, 26,
1126 98, 29, 187, -1, 206, 77, 179, 158, 206, 77,
1127 179, -1, 206, 70, 179, 158, 206, 70, 179, -1,
1128 207, 179, 196, -1, 26, 103, 220, -1, 26, 104,
1129 26, 163, 132, 162, -1, 26, 103, 26, -1, 179,
1130 104, 179, 196, -1, 26, 104, 26, -1, 26, 104,
1131 220, -1, 26, 99, 26, -1, 12, 163, 26, 160,
1132 220, 158, 26, 160, 220, 162, 193, -1, 206, 179,
1133 163, 126, 162, 158, 206, 179, 163, 126, 162, -1,
1134 26, 98, 163, 26, 71, 26, 162, 91, 220, -1,
1135 26, 98, 26, 66, 26, -1, 26, 98, 26, 68,
1136 26, -1, 26, 98, 26, 71, 163, 26, 91, 220,
1137 162, -1, 28, 98, 179, 107, 179, -1, 28, 98,
1138 179, 112, 179, -1, 28, 98, 26, 112, 26, 197,
1139 -1, 28, 98, 26, 112, 220, 197, -1, 28, 98,
1140 26, 107, 26, -1, 28, 98, 26, 107, 220, -1,
1141 28, 98, 179, 106, 179, -1, 28, 98, 26, 106,
1142 26, 197, -1, 28, 98, 26, 106, 220, 197, -1,
1143 26, 98, 26, 65, 26, -1, 213, -1, 26, 98,
1144 26, -1, 28, 98, 26, -1, 26, 98, 28, -1,
1145 28, 105, 28, -1, 36, 98, 211, 180, -1, 26,
1146 98, 211, 180, -1, 36, 98, 211, 180, 158, 36,
1147 98, 211, 180, -1, 26, 98, 211, 180, 158, 26,
1148 98, 211, 180, -1, 206, 87, 179, 159, 36, -1,
1149 36, 98, 87, 36, 159, 36, 191, -1, 206, 179,
1150 91, 220, -1, 26, 98, 26, 91, 220, 189, -1,
1151 36, 98, 36, 91, 220, -1, 36, 98, 36, 91,
1152 220, 191, -1, 26, 98, 87, 26, 159, 36, 189,
1153 -1, 36, 98, 19, 163, 26, 158, 36, 162, 190,
1154 -1, 36, 98, 19, 163, 36, 158, 36, 162, -1,
1155 26, 98, 18, 163, 26, 158, 26, 162, -1, 26,
1156 98, 18, 163, 26, 158, 26, 162, 163, 133, 162,
1157 -1, 26, 98, 17, 163, 26, 158, 36, 162, 187,
1158 -1, 206, 179, 93, 220, -1, 206, 86, 179, 159,
1159 36, -1, 36, 98, 86, 36, 159, 36, -1, 26,
1160 98, 86, 26, 159, 36, 190, -1, 26, 98, 85,
1161 26, 159, 36, -1, 206, 179, 92, 220, -1, 26,
1162 98, 26, 92, 220, 190, -1, 36, 98, 36, 92,
1163 220, -1, 36, 98, 36, 93, 220, 191, -1, 26,
1164 98, 26, 93, 220, 189, -1, 36, 98, 21, 26,
1165 -1, 26, 98, 11, 163, 36, 158, 36, 162, -1,
1166 36, 98, 28, 98, 88, 163, 179, 158, 26, 162,
1167 -1, 36, 98, 28, 98, 69, 163, 179, 158, 26,
1168 162, -1, 36, 98, 28, 98, 69, 163, 179, 158,
1169 179, 158, 28, 162, -1, 206, 90, 179, 159, 36,
1170 -1, 26, 98, 90, 26, 159, 36, -1, 206, 90,
1171 179, 159, 220, -1, 26, 98, 90, 26, 159, 220,
1172 -1, 36, 98, 23, 179, -1, 36, 98, 23, 26,
1173 -1, 36, 98, 23, 36, -1, 36, 98, 16, 163,
1174 26, 162, 181, -1, 26, 98, 16, 163, 26, 158,
1175 26, 162, 181, -1, 150, 163, 26, 158, 26, 158,
1176 179, 162, 181, -1, 206, 88, 163, 179, 158, 179,
1177 158, 28, 162, -1, 147, 163, 26, 158, 220, 162,
1178 -1, 148, 163, 26, 158, 220, 162, -1, 146, 163,
1179 26, 158, 220, 162, -1, 28, 105, 149, 163, 26,
1180 158, 220, 162, -1, 28, 98, 149, 163, 26, 158,
1181 220, 162, -1, 157, 64, 28, 26, 98, 26, -1,
1182 157, 28, 26, 98, 26, -1, 157, 64, 28, 57,
1183 220, -1, 157, 64, 28, 57, 220, 163, 131, 162,
1184 -1, 157, 28, 57, 220, -1, 157, 28, 57, 220,
1185 163, 131, 162, -1, 37, -1, 39, -1, 38, -1,
1186 40, -1, 41, -1, 42, -1, 44, -1, 47, -1,
1187 48, -1, 49, -1, 46, 26, -1, 45, 26, -1,
1188 57, 163, 26, 162, -1, 60, 163, 26, 162, -1,
1189 60, 163, 27, 71, 26, 162, -1, 57, 163, 27,
1190 71, 26, 162, -1, 50, 220, -1, 51, 220, -1,
1191 120, 163, 26, 162, -1, 57, 220, -1, 58, 220,
1192 -1, 59, 220, -1, 59, 218, -1, 60, 220, -1,
1193 60, 218, -1, 97, 163, 26, 158, 26, 162, -1,
1194 96, 163, 26, 158, 26, 162, -1, 26, 98, 70,
1195 26, 189, -1, 26, 98, 63, 26, -1, 26, 95,
1196 26, -1, 26, 95, 220, -1, 26, 89, 26, -1,
1197 26, 94, 26, -1, 26, 94, 220, -1, 26, 89,
1198 220, -1, 114, 164, 26, 165, -1, 114, 199, -1,
1199 113, 164, 26, 165, -1, 113, 199, -1, 115, 164,
1200 26, 165, -1, 115, 199, -1, 116, 164, 26, 165,
1201 -1, 116, 199, -1, 123, 164, 26, 205, 165, 98,
1202 26, -1, 123, 164, 26, 202, 220, 165, 98, 26,
1203 -1, 124, 164, 26, 202, 220, 165, 98, 26, -1,
1204 124, 164, 26, 205, 165, 98, 26, -1, 124, 164,
1205 26, 205, 165, 98, 36, -1, 164, 26, 202, 220,
1206 165, 98, 26, -1, 26, 98, 124, 164, 26, 202,
1207 220, 165, 187, -1, 36, 98, 124, 164, 26, 205,
1208 165, -1, 26, 98, 124, 164, 26, 205, 165, 187,
1209 -1, 26, 98, 124, 164, 26, 84, 26, 165, 187,
1210 -1, 36, 98, 124, 164, 26, 84, 26, 165, -1,
1211 164, 26, 205, 165, 98, 26, -1, 164, 26, 84,
1212 26, 165, 98, 26, -1, 124, 164, 26, 84, 26,
1213 165, 98, 36, -1, 26, 98, 123, 164, 26, 202,
1214 220, 165, 187, -1, 26, 98, 123, 164, 26, 205,
1215 165, 187, -1, 26, 98, 164, 26, 84, 26, 165,
1216 -1, 26, 98, 164, 26, 202, 217, 165, -1, 26,
1217 98, 164, 26, 205, 165, -1, 198, 98, 163, 26,
1218 160, 220, 158, 26, 160, 220, 162, -1, 198, 98,
1219 163, 26, 160, 220, 162, -1, 163, 26, 160, 220,
1220 158, 26, 160, 220, 162, 98, 199, -1, 163, 26,
1221 160, 220, 162, 98, 199, -1, 198, 98, 26, -1,
1222 24, 220, -1, 25, -1, 52, 163, 220, 158, 220,
1223 162, 26, -1, 52, 163, 220, 158, 220, 162, 26,
1224 98, 26, -1, 52, 163, 220, 158, 220, 162, 26,
1225 98, 26, 92, 220, -1, 53, 220, 26, -1, 53,
1226 220, 26, 98, 26, -1, 53, 220, 26, 98, 26,
1227 92, 220, -1, 154, -1, 154, 179, -1, 154, 26,
1228 -1, 156, 163, 26, 162, -1, 153, -1, 155, 163,
1229 36, 158, 220, 162, -1, 152, 163, 26, 158, 220,
1230 162, -1, 151, 163, 26, 158, 220, 162, -1, 30,
1231 -1, 31, -1, -1, 163, 135, 158, 136, 162, -1,
1232 163, 136, 158, 135, 162, -1, 163, 136, 162, -1,
1233 163, 135, 162, -1, 163, 121, 162, -1, 163, 122,
1234 162, -1, -1, 126, -1, 127, -1, 128, -1, 121,
1235 -1, 122, -1, -1, 163, 182, 162, -1, -1, 163,
1236 125, 162, -1, 163, 126, 162, -1, -1, 163, 183,
1237 162, -1, 163, 182, 162, -1, 163, 183, 158, 182,
1238 162, -1, 163, 182, 158, 183, 162, -1, -1, 163,
1239 134, 162, -1, 163, 133, 162, -1, -1, 163, 133,
1240 162, -1, 163, 134, 162, -1, -1, 163, 125, 162,
1241 -1, 163, 126, 162, -1, 163, 143, 162, -1, 163,
1242 143, 158, 126, 162, -1, 163, 126, 158, 143, 162,
1243 -1, -1, 163, 143, 162, -1, -1, 163, 126, 162,
1244 -1, 108, -1, 111, -1, 110, -1, 109, -1, -1,
1245 163, 137, 162, -1, 163, 137, 162, -1, 163, 136,
1246 162, -1, 163, 136, 158, 137, 162, -1, 163, 137,
1247 158, 136, 162, -1, 13, -1, 14, -1, 15, -1,
1248 -1, 163, 136, 162, -1, -1, 163, 136, 162, -1,
1249 164, 83, 26, 165, -1, 164, 26, 84, 165, -1,
1250 75, -1, 76, -1, 79, -1, 80, -1, 81, -1,
1251 82, -1, 71, -1, 70, -1, 163, 140, 162, -1,
1252 163, 129, 162, -1, 163, 139, 162, -1, 163, 130,
1253 162, -1, 163, 140, 158, 137, 162, -1, 163, 129,
1254 158, 137, 162, -1, 163, 139, 158, 137, 162, -1,
1255 163, 130, 158, 137, 162, -1, 163, 144, 162, -1,
1256 163, 145, 162, -1, 163, 144, 158, 137, 162, -1,
1257 163, 145, 158, 137, 162, -1, -1, 84, -1, 83,
1258 -1, 179, 98, -1, 179, 103, -1, 179, 104, -1,
1259 26, 98, 179, -1, 210, -1, 26, 98, 163, 210,
1260 162, -1, 36, 98, 163, 210, 162, -1, 36, 98,
1261 179, -1, 206, 211, -1, 208, 211, -1, 207, 211,
1262 -1, 36, 72, 36, -1, 98, -1, 100, -1, 102,
1263 -1, 101, -1, 28, 212, 166, -1, 28, 212, 143,
1264 -1, 166, 212, 28, -1, 143, 212, 28, -1, 168,
1265 -1, 170, -1, 171, -1, 172, -1, 214, 173, 215,
1266 -1, 216, -1, 220, -1, 214, 173, 174, -1, 169,
1267 -1, 214, -1, 163, 221, 162, -1, 63, 221, -1,
1268 70, 221, -1, 221, -1, 221, 72, 221, -1, 221,
1269 73, 221, -1, 221, 67, 221, -1, 221, 71, 221,
1270 -1, 221, 70, 221, -1, 221, 91, 221, -1, 221,
1271 92, 221, -1, 221, 65, 221, -1, 221, 68, 221,
1272 -1, 221, 66, 221, -1, 219, -1
1275 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1276 static const unsigned short int yyrline
[] =
1278 0, 591, 591, 592, 604, 606, 639, 666, 677, 681,
1279 719, 739, 744, 754, 764, 769, 774, 790, 806, 818,
1280 828, 841, 860, 878, 901, 923, 928, 938, 949, 960,
1281 974, 989, 1005, 1021, 1037, 1048, 1062, 1088, 1106, 1111,
1282 1117, 1129, 1140, 1151, 1162, 1173, 1184, 1195, 1221, 1235,
1283 1245, 1290, 1309, 1320, 1331, 1342, 1353, 1364, 1380, 1397,
1284 1413, 1424, 1435, 1468, 1479, 1492, 1503, 1542, 1552, 1562,
1285 1582, 1592, 1602, 1612, 1623, 1633, 1643, 1653, 1664, 1688,
1286 1699, 1705, 1716, 1727, 1738, 1746, 1772, 1802, 1831, 1862,
1287 1876, 1887, 1901, 1935, 1945, 1955, 1980, 1992, 2010, 2021,
1288 2032, 2043, 2056, 2067, 2078, 2089, 2100, 2111, 2144, 2154,
1289 2167, 2187, 2198, 2209, 2222, 2235, 2246, 2257, 2268, 2279,
1290 2289, 2300, 2311, 2323, 2334, 2345, 2356, 2369, 2381, 2393,
1291 2404, 2415, 2426, 2438, 2450, 2461, 2472, 2483, 2493, 2499,
1292 2505, 2511, 2517, 2523, 2529, 2535, 2541, 2547, 2553, 2564,
1293 2575, 2586, 2597, 2608, 2619, 2630, 2636, 2647, 2658, 2669,
1294 2680, 2691, 2701, 2714, 2722, 2730, 2754, 2765, 2776, 2787,
1295 2798, 2809, 2821, 2834, 2843, 2854, 2865, 2877, 2888, 2899,
1296 2910, 2924, 2936, 2951, 2970, 2981, 2999, 3033, 3051, 3068,
1297 3079, 3090, 3101, 3122, 3141, 3154, 3168, 3180, 3196, 3241,
1298 3272, 3288, 3307, 3321, 3340, 3356, 3364, 3373, 3384, 3396,
1299 3410, 3418, 3428, 3440, 3445, 3450, 3456, 3464, 3470, 3476,
1300 3482, 3495, 3499, 3509, 3513, 3518, 3523, 3528, 3535, 3539,
1301 3546, 3550, 3555, 3560, 3568, 3572, 3579, 3583, 3591, 3596,
1302 3602, 3611, 3616, 3622, 3628, 3634, 3643, 3646, 3650, 3657,
1303 3660, 3664, 3671, 3676, 3682, 3688, 3694, 3699, 3707, 3710,
1304 3717, 3720, 3727, 3731, 3735, 3739, 3746, 3749, 3756, 3761,
1305 3768, 3775, 3787, 3791, 3795, 3802, 3805, 3815, 3818, 3827,
1306 3833, 3842, 3846, 3853, 3857, 3861, 3865, 3872, 3876, 3883,
1307 3891, 3899, 3907, 3915, 3922, 3929, 3937, 3947, 3952, 3957,
1308 3962, 3970, 3973, 3977, 3986, 3993, 4000, 4007, 4022, 4028,
1309 4041, 4054, 4072, 4079, 4086, 4096, 4109, 4113, 4117, 4121,
1310 4128, 4134, 4140, 4146, 4156, 4165, 4167, 4169, 4173, 4181,
1311 4185, 4192, 4198, 4204, 4208, 4212, 4216, 4222, 4228, 4232,
1312 4236, 4240, 4244, 4248, 4252, 4256, 4260, 4264, 4268
1316 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1317 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1318 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1319 static const char *const yytname
[] =
1321 "$end", "error", "$undefined", "BYTEOP16P", "BYTEOP16M", "BYTEOP1P",
1322 "BYTEOP2P", "BYTEOP2M", "BYTEOP3P", "BYTEUNPACK", "BYTEPACK", "PACK",
1323 "SAA", "ALIGN8", "ALIGN16", "ALIGN24", "VIT_MAX", "EXTRACT", "DEPOSIT",
1324 "EXPADJ", "SEARCH", "ONES", "SIGN", "SIGNBITS", "LINK", "UNLINK", "REG",
1325 "PC", "CCREG", "BYTE_DREG", "REG_A_DOUBLE_ZERO", "REG_A_DOUBLE_ONE",
1326 "A_ZERO_DOT_L", "A_ZERO_DOT_H", "A_ONE_DOT_L", "A_ONE_DOT_H", "HALF_REG",
1327 "NOP", "RTI", "RTS", "RTX", "RTN", "RTE", "HLT", "IDLE", "STI", "CLI",
1328 "CSYNC", "SSYNC", "EMUEXCPT", "RAISE", "EXCPT", "LSETUP", "LOOP",
1329 "LOOP_BEGIN", "LOOP_END", "DISALGNEXCPT", "JUMP", "JUMP_DOT_S",
1330 "JUMP_DOT_L", "CALL", "ABORT", "NOT", "TILDA", "BANG", "AMPERSAND",
1331 "BAR", "PERCENT", "CARET", "BXOR", "MINUS", "PLUS", "STAR", "SLASH",
1332 "NEG", "MIN", "MAX", "ABS", "DOUBLE_BAR", "_PLUS_BAR_PLUS",
1333 "_PLUS_BAR_MINUS", "_MINUS_BAR_PLUS", "_MINUS_BAR_MINUS", "_MINUS_MINUS",
1334 "_PLUS_PLUS", "SHIFT", "LSHIFT", "ASHIFT", "BXORSHIFT",
1335 "_GREATER_GREATER_GREATER_THAN_ASSIGN", "ROT", "LESS_LESS",
1336 "GREATER_GREATER", "_GREATER_GREATER_GREATER", "_LESS_LESS_ASSIGN",
1337 "_GREATER_GREATER_ASSIGN", "DIVS", "DIVQ", "ASSIGN", "_STAR_ASSIGN",
1338 "_BAR_ASSIGN", "_CARET_ASSIGN", "_AMPERSAND_ASSIGN", "_MINUS_ASSIGN",
1339 "_PLUS_ASSIGN", "_ASSIGN_BANG", "_LESS_THAN_ASSIGN", "_ASSIGN_ASSIGN",
1340 "GE", "LT", "LE", "GT", "LESS_THAN", "FLUSHINV", "FLUSH", "IFLUSH",
1341 "PREFETCH", "PRNT", "OUTC", "WHATREG", "TESTSET", "ASL", "ASR", "B", "W",
1342 "NS", "S", "CO", "SCO", "TH", "TL", "BP", "BREV", "X", "Z", "M", "MMOD",
1343 "R", "RND", "RNDL", "RNDH", "RND12", "RND20", "V", "LO", "HI", "BITTGL",
1344 "BITCLR", "BITSET", "BITTST", "BITMUX", "DBGAL", "DBGAH", "DBGHALT",
1345 "DBG", "DBGA", "DBGCMPLX", "IF", "COMMA", "BY", "COLON", "SEMICOLON",
1346 "RPAREN", "LPAREN", "LBRACK", "RBRACK", "STATUS_REG", "MNOP", "SYMBOL",
1347 "NUMBER", "GOT", "GOT17M4", "FUNCDESC_GOT17M4", "AT", "PLTPC", "$accept",
1348 "statement", "asm", "asm_1", "REG_A", "opt_mode", "asr_asl", "sco",
1349 "asr_asl_0", "amod0", "amod1", "amod2", "xpmod", "xpmod1", "vsmod",
1350 "vmod", "smod", "searchmod", "aligndir", "byteop_mod", "c_align",
1351 "w32_or_nothing", "iu_or_nothing", "reg_with_predec", "reg_with_postinc",
1352 "min_max", "op_bar_op", "plus_minus", "rnd_op", "b3_op", "post_op",
1353 "a_assign", "a_minusassign", "a_plusassign", "assign_macfunc",
1354 "a_macfunc", "multiply_halfregs", "cc_op", "ccstat", "symbol",
1355 "any_gotrel", "got", "got_or_expr", "pltpc", "eterm", "expr", "expr_1", 0
1360 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1362 static const unsigned short int yytoknum
[] =
1364 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1365 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1366 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1367 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1368 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1369 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1370 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1371 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1372 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1373 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1374 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1375 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1376 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1377 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1378 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1379 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
1380 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1381 425, 426, 427, 428, 429
1385 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1386 static const unsigned char yyr1
[] =
1388 0, 175, 176, 176, 177, 177, 177, 177, 178, 178,
1389 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1390 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1391 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1392 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1393 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1394 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1395 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1396 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1397 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1398 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1399 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1400 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1401 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1402 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1403 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1404 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1405 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1406 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1407 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1408 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1409 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1410 178, 179, 179, 180, 180, 180, 180, 180, 181, 181,
1411 182, 182, 182, 182, 183, 183, 184, 184, 185, 185,
1412 185, 186, 186, 186, 186, 186, 187, 187, 187, 188,
1413 188, 188, 189, 189, 189, 189, 189, 189, 190, 190,
1414 191, 191, 192, 192, 192, 192, 193, 193, 194, 194,
1415 194, 194, 195, 195, 195, 196, 196, 197, 197, 198,
1416 199, 200, 200, 201, 201, 201, 201, 202, 202, 203,
1417 203, 203, 203, 203, 203, 203, 203, 204, 204, 204,
1418 204, 205, 205, 205, 206, 207, 208, 209, 209, 209,
1419 209, 209, 210, 210, 210, 211, 212, 212, 212, 212,
1420 213, 213, 213, 213, 214, 215, 215, 215, 216, 217,
1421 217, 218, 219, 219, 219, 219, 219, 220, 221, 221,
1422 221, 221, 221, 221, 221, 221, 221, 221, 221
1425 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1426 static const unsigned char yyr2
[] =
1428 0, 2, 0, 1, 2, 6, 4, 1, 1, 2,
1429 5, 1, 6, 6, 3, 3, 17, 17, 11, 11,
1430 11, 12, 12, 12, 5, 3, 3, 3, 8, 13,
1431 12, 13, 13, 13, 8, 17, 6, 9, 3, 6,
1432 3, 5, 6, 8, 8, 2, 2, 4, 3, 2,
1433 4, 3, 6, 4, 7, 7, 3, 3, 6, 3,
1434 4, 3, 3, 3, 11, 11, 9, 5, 5, 9,
1435 5, 5, 6, 6, 5, 5, 5, 6, 6, 5,
1436 1, 3, 3, 3, 3, 4, 4, 9, 9, 5,
1437 7, 4, 6, 5, 6, 7, 9, 8, 8, 11,
1438 9, 4, 5, 6, 7, 6, 4, 6, 5, 6,
1439 6, 4, 8, 10, 10, 12, 5, 6, 5, 6,
1440 4, 4, 4, 7, 9, 9, 9, 6, 6, 6,
1441 8, 8, 6, 5, 5, 8, 4, 7, 1, 1,
1442 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1443 4, 4, 6, 6, 2, 2, 4, 2, 2, 2,
1444 2, 2, 2, 6, 6, 5, 4, 3, 3, 3,
1445 3, 3, 3, 4, 2, 4, 2, 4, 2, 4,
1446 2, 7, 8, 8, 7, 7, 7, 9, 7, 8,
1447 9, 8, 6, 7, 8, 9, 8, 7, 7, 6,
1448 11, 7, 11, 7, 3, 2, 1, 7, 9, 11,
1449 3, 5, 7, 1, 2, 2, 4, 1, 6, 6,
1450 6, 1, 1, 0, 5, 5, 3, 3, 3, 3,
1451 0, 1, 1, 1, 1, 1, 0, 3, 0, 3,
1452 3, 0, 3, 3, 5, 5, 0, 3, 3, 0,
1453 3, 3, 0, 3, 3, 3, 5, 5, 0, 3,
1454 0, 3, 1, 1, 1, 1, 0, 3, 3, 3,
1455 5, 5, 1, 1, 1, 0, 3, 0, 3, 4,
1456 4, 1, 1, 1, 1, 1, 1, 1, 1, 3,
1457 3, 3, 3, 5, 5, 5, 5, 3, 3, 5,
1458 5, 0, 1, 1, 2, 2, 2, 3, 1, 5,
1459 5, 3, 2, 2, 2, 3, 1, 1, 1, 1,
1460 3, 3, 3, 3, 1, 1, 1, 1, 3, 1,
1461 1, 3, 1, 1, 3, 2, 2, 1, 3, 3,
1462 3, 3, 3, 3, 3, 3, 3, 3, 1
1465 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1466 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1467 means the default is an error. */
1468 static const unsigned short int yydefact
[] =
1470 0, 7, 0, 0, 206, 0, 0, 221, 222, 0,
1471 0, 0, 0, 0, 138, 140, 139, 141, 142, 143,
1472 144, 0, 0, 145, 146, 147, 0, 0, 0, 0,
1473 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1474 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1475 0, 217, 213, 0, 0, 0, 0, 0, 0, 8,
1476 0, 3, 0, 0, 0, 0, 0, 0, 223, 308,
1477 80, 0, 0, 0, 0, 324, 332, 333, 348, 205,
1478 337, 0, 0, 0, 0, 0, 0, 0, 316, 317,
1479 319, 318, 0, 0, 0, 0, 0, 0, 0, 149,
1480 148, 154, 155, 0, 0, 0, 157, 158, 333, 160,
1481 159, 0, 162, 161, 0, 0, 0, 176, 0, 174,
1482 0, 178, 0, 180, 0, 0, 0, 316, 0, 0,
1483 0, 0, 0, 0, 0, 215, 214, 0, 0, 0,
1484 0, 0, 301, 0, 0, 1, 0, 4, 304, 305,
1485 306, 0, 46, 0, 0, 0, 0, 0, 0, 0,
1486 45, 0, 312, 49, 275, 314, 313, 0, 9, 0,
1487 335, 336, 0, 0, 0, 0, 0, 0, 0, 0,
1488 0, 0, 0, 169, 172, 170, 171, 167, 168, 0,
1489 0, 0, 0, 0, 0, 272, 273, 274, 0, 0,
1490 0, 81, 83, 246, 0, 246, 0, 0, 281, 282,
1491 0, 0, 0, 0, 0, 0, 0, 0, 0, 307,
1492 0, 0, 223, 249, 63, 59, 57, 61, 62, 82,
1493 0, 0, 84, 0, 321, 320, 26, 14, 27, 15,
1494 0, 0, 0, 0, 51, 0, 0, 0, 0, 0,
1495 0, 311, 223, 48, 0, 210, 0, 0, 0, 0,
1496 0, 0, 0, 0, 0, 0, 0, 0, 301, 301,
1497 323, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1498 0, 0, 0, 0, 288, 287, 303, 302, 0, 0,
1499 0, 322, 0, 275, 204, 0, 0, 38, 25, 0,
1500 0, 0, 0, 0, 0, 0, 0, 40, 0, 56,
1501 0, 0, 0, 0, 334, 345, 347, 340, 346, 342,
1502 341, 338, 339, 343, 344, 0, 0, 0, 0, 0,
1503 0, 0, 0, 0, 0, 0, 0, 287, 283, 284,
1504 285, 286, 0, 0, 0, 0, 0, 0, 53, 0,
1505 47, 166, 252, 258, 0, 0, 0, 0, 0, 0,
1506 0, 0, 0, 0, 0, 0, 301, 0, 0, 0,
1507 86, 0, 50, 0, 0, 0, 0, 0, 0, 0,
1508 0, 0, 0, 0, 111, 121, 122, 120, 0, 0,
1509 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1510 0, 85, 0, 0, 150, 0, 331, 151, 0, 0,
1511 0, 0, 175, 173, 177, 179, 156, 302, 0, 0,
1512 302, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1513 216, 0, 136, 0, 0, 0, 0, 0, 0, 0,
1514 279, 0, 6, 60, 0, 315, 0, 0, 0, 0,
1515 0, 0, 91, 106, 101, 0, 0, 0, 227, 0,
1516 226, 0, 0, 223, 0, 0, 0, 0, 0, 0,
1517 0, 0, 0, 0, 79, 67, 68, 0, 252, 258,
1518 252, 236, 238, 0, 0, 0, 0, 165, 0, 24,
1519 0, 0, 0, 0, 301, 301, 0, 306, 0, 309,
1520 302, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1521 277, 277, 74, 75, 277, 277, 0, 76, 70, 71,
1522 0, 0, 0, 0, 0, 0, 0, 0, 93, 108,
1523 260, 0, 238, 0, 0, 301, 0, 310, 0, 0,
1524 211, 0, 0, 0, 0, 280, 0, 0, 0, 0,
1525 0, 0, 0, 0, 0, 0, 0, 0, 133, 0,
1526 0, 134, 0, 0, 0, 0, 0, 0, 0, 0,
1527 0, 0, 0, 102, 89, 0, 116, 118, 41, 276,
1528 0, 0, 0, 0, 10, 0, 0, 0, 0, 0,
1529 0, 0, 0, 0, 0, 0, 92, 107, 110, 0,
1530 230, 52, 0, 0, 36, 248, 247, 0, 0, 0,
1531 0, 0, 105, 258, 252, 117, 119, 0, 0, 302,
1532 0, 0, 0, 12, 0, 333, 329, 0, 330, 199,
1533 0, 0, 0, 0, 250, 251, 58, 0, 77, 78,
1534 72, 73, 0, 0, 0, 0, 0, 42, 0, 0,
1535 0, 0, 94, 109, 0, 39, 103, 260, 302, 0,
1536 13, 0, 0, 0, 153, 152, 164, 163, 0, 0,
1537 0, 0, 0, 129, 127, 128, 0, 220, 219, 218,
1538 0, 132, 0, 0, 0, 0, 0, 0, 192, 5,
1539 0, 0, 0, 0, 0, 224, 225, 0, 307, 0,
1540 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1541 0, 0, 231, 232, 233, 0, 0, 0, 0, 0,
1542 253, 0, 254, 0, 255, 259, 104, 95, 0, 246,
1543 0, 0, 246, 0, 197, 0, 198, 0, 0, 0,
1544 0, 0, 0, 0, 0, 123, 0, 0, 0, 0,
1545 0, 0, 0, 0, 90, 0, 188, 0, 207, 212,
1546 0, 181, 0, 0, 184, 185, 0, 137, 0, 0,
1547 0, 0, 0, 0, 0, 203, 193, 186, 0, 201,
1548 55, 54, 0, 0, 0, 0, 0, 0, 0, 34,
1549 112, 0, 246, 98, 0, 0, 237, 0, 239, 240,
1550 0, 0, 0, 246, 196, 246, 246, 189, 0, 325,
1551 326, 327, 328, 0, 28, 258, 223, 278, 131, 130,
1552 0, 0, 258, 97, 43, 44, 0, 0, 261, 0,
1553 191, 223, 0, 182, 194, 183, 0, 135, 0, 0,
1554 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1555 0, 0, 124, 100, 0, 69, 0, 0, 0, 257,
1556 256, 195, 190, 187, 66, 0, 37, 88, 228, 229,
1557 96, 0, 0, 0, 0, 87, 208, 125, 0, 0,
1558 0, 0, 0, 0, 126, 0, 266, 0, 0, 0,
1559 0, 0, 0, 0, 0, 0, 114, 0, 113, 0,
1560 0, 0, 0, 266, 262, 265, 264, 263, 0, 0,
1561 0, 0, 0, 64, 0, 0, 0, 0, 99, 241,
1562 238, 20, 238, 0, 0, 209, 0, 0, 18, 19,
1563 202, 200, 65, 0, 30, 0, 0, 0, 230, 23,
1564 22, 21, 115, 0, 0, 0, 267, 0, 29, 0,
1565 31, 32, 0, 33, 234, 235, 0, 0, 0, 0,
1566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1567 243, 230, 242, 0, 0, 0, 0, 269, 0, 268,
1568 0, 290, 0, 292, 0, 291, 0, 289, 0, 297,
1569 0, 298, 0, 0, 0, 0, 0, 0, 0, 0,
1570 0, 0, 0, 0, 0, 245, 244, 0, 266, 266,
1571 270, 271, 294, 296, 295, 293, 299, 300, 35, 16,
1575 /* YYDEFGOTO[NTERM-NUM]. */
1576 static const short int yydefgoto
[] =
1578 -1, 60, 61, 62, 361, 168, 745, 715, 957, 601,
1579 604, 939, 348, 372, 487, 489, 652, 908, 913, 948,
1580 220, 309, 638, 64, 117, 221, 345, 288, 950, 953,
1581 289, 362, 363, 67, 68, 69, 166, 93, 70, 77,
1582 812, 626, 627, 109, 78, 79, 80
1585 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1587 #define YYPACT_NINF -907
1588 static const short int yypact
[] =
1590 878, -907, -120, 291, -907, 614, 439, -907, -907, -35,
1591 -11, 31, 61, 81, -907, -907, -907, -907, -907, -907,
1592 -907, 183, 202, -907, -907, -907, 291, 291, -56, 291,
1593 -907, 351, 291, 291, 354, 96, 111, 86, 160, 162,
1594 168, 122, 170, 172, 318, 134, 146, 196, 200, 217,
1595 228, -907, 230, 233, 252, 46, 207, 26, 318, -907,
1596 412, -907, -48, 195, 324, 270, 274, 394, 271, -907,
1597 -907, 418, 291, 291, 291, -907, -907, -907, -907, -907,
1598 561, 55, 69, 71, 482, 421, 80, 107, 70, -907,
1599 -907, -907, 5, -107, 414, 419, 422, 440, 121, -907,
1600 -907, -907, -907, 291, 465, 42, -907, -907, 321, -907,
1601 -907, 52, -907, -907, 479, 489, 495, -907, 502, -907,
1602 520, -907, 558, -907, 560, 569, 593, -907, 594, 599,
1603 604, 609, 630, 640, 643, -907, -907, 638, 650, 27,
1604 657, -22, 237, 663, 667, -907, 1024, -907, -907, -907,
1605 186, 9, -907, 568, 272, 186, 186, 186, 547, 186,
1606 174, 291, -907, -907, 548, -907, -907, 147, 556, 555,
1607 -907, -907, 459, 291, 291, 291, 291, 291, 291, 291,
1608 291, 291, 291, -907, -907, -907, -907, -907, -907, 562,
1609 563, 564, 565, 567, 570, -907, -907, -907, 572, 573,
1610 574, 508, -907, 575, 645, -52, 159, 201, -907, -907,
1611 697, 698, 703, 705, 706, 576, 577, 20, 708, 668,
1612 579, 580, 271, 581, -907, -907, -907, 582, -907, 239,
1613 583, 320, -907, 585, -907, -907, -907, -907, -907, -907,
1614 586, 587, 725, 145, 15, 654, 411, 717, 718, 591,
1615 272, -907, 271, -907, 598, 659, 597, 689, 588, 601,
1616 690, 606, 607, -46, -39, -37, -4, 605, 301, 323,
1617 -907, 610, 613, 615, 616, 617, 618, 619, 621, 671,
1618 291, 47, 740, 291, -907, -907, -907, 744, 291, 620,
1619 622, -907, -47, 548, -907, 746, 742, 623, 626, 627,
1620 629, 186, 631, 291, 291, 291, 653, -907, 644, -907,
1621 -42, -31, 374, 291, -907, 608, 571, -907, 600, 397,
1622 397, -907, -907, 510, 510, 763, 765, 766, 768, 769,
1623 760, 771, 772, 773, 774, 775, 776, 641, -907, -907,
1624 -907, -907, 291, 291, 291, 777, 779, 219, -907, 778,
1625 -907, -907, 646, 647, 648, 649, 652, 655, 780, 786,
1626 745, 403, 394, 394, 274, 656, 382, 186, 789, 791,
1627 661, 249, -907, 688, 218, 260, 268, 795, 186, 186,
1628 186, 796, 798, 154, -907, -907, -907, -907, 687, 800,
1629 33, 291, 291, 291, 805, 792, 670, 672, 804, 274,
1630 673, 674, 291, 807, -907, 808, -907, -907, 811, 812,
1631 813, 675, -907, -907, -907, -907, -907, -907, 291, 676,
1632 816, 291, 678, 291, 291, 291, 818, 291, 291, 291,
1633 -907, 819, 683, 749, 291, 686, 0, 684, 685, 753,
1634 -907, 1024, -907, -907, 692, -907, 186, 186, 817, 820,
1635 700, 210, -907, -907, -907, 693, 704, 723, -907, 730,
1636 -907, 762, 770, 271, 709, 710, 711, 712, 713, 719,
1637 722, 726, 727, 728, -907, -907, -907, 843, 646, 647,
1638 646, 24, 105, 721, 729, 731, 87, -907, 738, -907,
1639 851, 852, 856, 305, 301, 464, 867, -907, 732, -907,
1640 869, 291, 733, 739, 741, 743, 870, 759, 781, 782,
1641 737, 737, -907, -907, 737, 737, 783, -907, -907, -907,
1642 784, 785, 787, 788, 790, 793, 794, 797, 799, -907,
1643 799, 801, 802, 871, 896, 481, 806, -907, 897, 809,
1644 847, 810, 814, 815, 821, -907, 822, 842, 823, 824,
1645 853, 828, 833, 834, 803, 835, 837, 838, -907, 827,
1646 924, 840, 855, 928, 857, 861, 865, 940, 825, 291,
1647 872, 899, 890, -907, -907, 186, -907, -907, 826, -907,
1648 844, 845, 11, 40, -907, 947, 291, 291, 291, 291,
1649 952, 943, 954, 945, 956, 894, -907, -907, -907, 978,
1650 428, -907, 979, 487, -907, -907, -907, 982, 848, 44,
1651 73, 849, -907, 647, 646, -907, -907, 291, 850, 983,
1652 291, 854, 858, -907, 862, 839, -907, 873, -907, -907,
1653 987, 988, 990, 919, -907, -907, -907, 882, -907, -907,
1654 -907, -907, 291, 291, 859, 1001, 1003, -907, 513, 186,
1655 186, 914, -907, -907, 1007, -907, -907, 799, 997, 881,
1656 -907, 949, 1025, 291, -907, -907, -907, -907, 955, 1041,
1657 980, 981, 178, -907, -907, -907, 186, -907, -907, -907,
1658 923, -907, 957, 238, 926, 925, 1061, 1064, -907, -907,
1659 133, 186, 186, 933, 186, -907, -907, 186, -907, 186,
1660 932, 935, 936, 937, 938, 939, 941, 942, 944, 946,
1661 291, 999, -907, -907, -907, 948, 1000, 950, 951, 1002,
1662 -907, 959, -907, 973, -907, -907, -907, -907, 953, 575,
1663 958, 960, 575, 1014, -907, 477, -907, 1009, 962, 964,
1664 394, 965, 966, 967, 566, -907, 968, 969, 970, 971,
1665 961, 976, 974, 984, -907, 977, -907, 394, 1011, -907,
1666 1085, -907, 1078, 1089, -907, -907, 989, -907, 991, 972,
1667 986, 1090, 1091, 291, 1096, -907, -907, -907, 1115, -907,
1668 -907, -907, 1117, 186, 291, 1124, 1126, 1128, 1129, -907,
1669 -907, 859, 575, 993, 995, 1132, -907, 1133, -907, -907,
1670 1111, 998, 1004, 575, -907, 575, 575, -907, 291, -907,
1671 -907, -907, -907, 186, -907, 647, 271, -907, -907, -907,
1672 1006, 1020, 647, -907, -907, -907, 313, 1135, -907, 1092,
1673 -907, 271, 1136, -907, -907, -907, 859, -907, 1137, 1139,
1674 1013, 1021, 1023, 1099, 1026, 1027, 1029, 1031, 1034, 1035,
1675 1036, 1037, -907, -907, 1065, -907, 398, 612, 1098, -907,
1676 -907, -907, -907, -907, -907, 1130, -907, -907, -907, -907,
1677 -907, 1039, 1044, 1042, 1163, -907, 1113, -907, 1043, 1046,
1678 291, 611, 1109, 291, -907, 1082, 1047, 291, 291, 291,
1679 291, 1049, 1183, 1186, 1180, 186, -907, 1187, -907, 1143,
1680 291, 291, 291, 1047, -907, -907, -907, -907, 1054, 925,
1681 1055, 1056, 1083, -907, 1057, 1059, 1060, 1062, -907, 1063,
1682 802, -907, 802, 1066, 1201, -907, 1067, 1069, -907, -907,
1683 -907, -907, -907, 1068, 1070, 1071, 1071, 1072, 476, -907,
1684 -907, -907, -907, 1073, 1203, 1205, -907, 557, -907, 332,
1685 -907, -907, 553, -907, -907, -907, 167, 380, 1196, 1077,
1686 1079, 391, 408, 413, 453, 456, 462, 499, 506, 584,
1687 -907, 428, -907, 1076, 291, 291, 1103, -907, 1105, -907,
1688 1106, -907, 1107, -907, 1108, -907, 1110, -907, 1112, -907,
1689 1114, -907, 1080, 1084, 1176, 1088, 1093, 1094, 1095, 1097,
1690 1100, 1101, 1102, 1104, 1116, -907, -907, 1216, 1047, 1047,
1691 -907, -907, -907, -907, -907, -907, -907, -907, -907, -907,
1695 /* YYPGOTO[NTERM-NUM]. */
1696 static const short int yypgoto
[] =
1698 -907, -907, -907, -122, 10, -208, -737, -906, 284, -907,
1699 -509, -907, -196, -907, -451, -460, -502, -907, -863, -907,
1700 -907, 975, -69, -907, -27, -907, 402, -180, 325, -907,
1701 -243, 2, 22, -168, 963, -213, -50, 59, -907, -16,
1702 -907, -907, -907, 1220, -907, -26, 19
1705 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1706 positive, shift that token. If negative, reduce the rule which
1707 number is the opposite. If zero, do what YYDEFACT says.
1708 If YYTABLE_NINF, syntax error. */
1709 #define YYTABLE_NINF -3
1710 static const short int yytable
[] =
1712 101, 102, 65, 104, 365, 106, 107, 110, 113, 350,
1713 63, 119, 121, 123, 370, 162, 165, 108, 108, 597,
1714 296, 346, 66, 655, 292, 419, 422, 596, 653, 598,
1715 146, 441, 956, 232, 222, 294, 234, 400, 411, 163,
1716 928, 7, 8, 71, 401, 411, 360, 411, 252, 364,
1717 7, 8, 142, 279, 852, 184, 186, 188, 223, 235,
1718 226, 228, 136, 94, 389, 993, 395, 161, 256, 257,
1719 7, 8, 253, 433, 139, 160, 164, 254, 259, 260,
1720 411, 183, 399, 72, 280, 284, 285, 95, 418, 421,
1721 73, 170, 171, 172, 219, 185, 229, 187, 231, 877,
1722 7, 8, 526, 128, 434, 72, 225, 103, 251, 143,
1723 140, 347, 73, 147, 442, 72, 457, 144, 72, 412,
1724 458, 527, 73, 502, 172, 73, 413, 459, 414, 96,
1725 172, 460, 72, 227, 72, 307, 282, 240, 283, 73,
1726 241, 73, 242, 72, 243, 1019, 1020, 244, 65, 245,
1727 73, 7, 8, 726, 233, 754, 63, 246, 563, 97,
1728 293, 415, 564, 727, 297, 298, 299, 300, 66, 302,
1729 72, 385, 295, 171, 697, 7, 8, 73, 388, 98,
1730 522, 386, 599, 74, 72, 351, 501, 600, 75, 76,
1731 523, 73, 315, 316, 317, 318, 319, 320, 321, 322,
1732 323, 324, 721, 699, 764, 74, 722, 247, 248, 99,
1733 75, 76, 608, 609, 765, 74, 7, 8, 74, 230,
1734 75, 76, 72, 75, 76, 170, 171, 352, 100, 73,
1735 610, 723, 74, 141, 74, 724, 172, 75, 76, 75,
1736 76, 769, 770, 74, 510, 249, 576, 771, 75, 76,
1737 116, 618, 621, 387, 432, 584, 135, 436, 772, 114,
1738 7, 8, 438, 602, 72, 303, 304, 305, 603, 172,
1739 74, 73, 148, 72, 115, 75, 76, 452, 453, 454,
1740 73, 72, 310, 311, 250, 124, 512, 464, 73, 75,
1741 76, 778, 659, 148, 514, 779, 152, 129, 149, 150,
1742 7, 8, 7, 8, 7, 8, 153, 284, 285, 130,
1743 153, 450, 162, 165, 617, 620, 478, 479, 480, 568,
1744 286, 287, 74, 72, 118, 969, 120, 75, 76, 970,
1745 73, 72, 122, 72, 125, 72, 126, 306, 73, 871,
1746 154, 615, 73, 7, 8, 374, 375, 155, 511, 513,
1747 515, 376, 483, 484, 72, 866, 156, 157, 158, 131,
1748 159, 73, 870, 132, 74, 528, 529, 530, 72, 75,
1749 76, 284, 285, 74, 498, 73, 539, 503, 75, 76,
1750 133, 74, 507, 508, 286, 417, 75, 76, 517, 518,
1751 519, 134, 546, 284, 285, 549, 137, 551, 552, 553,
1752 461, 555, 556, 557, 7, 8, 286, 420, 561, 536,
1753 462, 940, 145, 941, 72, 138, 127, 72, 89, 90,
1754 91, 73, 151, 74, 73, 577, 378, 379, 75, 76,
1755 153, 74, 380, 74, 167, 74, 75, 76, 75, 76,
1756 75, 76, 639, 65, 169, 640, 641, 224, 571, 572,
1757 236, 63, 284, 285, 74, 237, 570, 570, 238, 75,
1758 76, 963, 964, 66, 175, 286, 500, 616, 74, 179,
1759 180, 965, 966, 75, 76, 628, 239, 338, 339, 340,
1760 341, 284, 285, 296, 365, 625, 400, 189, 190, 191,
1761 192, 255, 193, 194, 258, 195, 196, 197, 198, 199,
1762 200, 148, 391, 392, 393, 261, 149, 497, 201, 394,
1763 202, 203, 7, 8, 105, 262, 204, 111, 205, 75,
1764 76, 263, 75, 76, 173, 174, 175, 176, 264, 177,
1765 178, 179, 180, 804, 284, 285, 807, 88, 971, 89,
1766 90, 91, 972, 690, 92, 206, 265, 286, 619, 976,
1767 181, 182, 207, 977, 712, 713, 714, 208, 209, 210,
1768 701, 702, 703, 704, 286, 658, 978, 211, 212, 213,
1769 979, 980, 214, 334, 335, 981, 336, 175, 284, 337,
1770 177, 178, 179, 180, 266, 693, 267, 338, 339, 340,
1771 341, 728, 698, 251, 731, 268, 853, 954, 955, 342,
1772 343, 344, 712, 713, 714, 215, 216, 861, 867, 862,
1773 863, 982, 717, 718, 984, 983, 742, 743, 985, 269,
1774 986, 314, 270, 875, 987, 271, 173, 174, 175, 176,
1775 272, 177, 178, 179, 180, 273, 173, 759, 175, 176,
1776 296, 177, 178, 179, 180, 217, 218, 809, 810, 811,
1777 75, 76, 181, 182, 748, 749, 274, 988, 775, 750,
1778 751, 989, 181, 182, 990, 173, 275, 175, 991, 276,
1779 177, 178, 179, 180, 277, 175, 278, 893, 177, 178,
1780 179, 180, 284, 285, 794, 281, 766, 820, 821, 290,
1781 816, 181, 182, 961, 962, 291, 783, 967, 968, 181,
1782 182, 780, 781, 81, 570, 954, 955, 831, 82, 83,
1783 301, 308, 84, 85, 312, 313, 349, 86, 87, 904,
1784 905, 906, 907, 353, 354, 325, 326, 327, 328, 355,
1785 329, 356, 357, 330, 366, 331, 332, 333, 347, 367,
1786 358, 359, 368, 369, 371, 373, 377, 842, 381, 382,
1787 383, 384, 390, 396, 397, 398, 402, 403, 847, 404,
1788 405, 408, 406, 407, 409, 410, 435, 416, 423, 431,
1789 437, 424, 444, 425, 426, 427, 428, 429, 445, 455,
1790 456, 446, 864, 430, 447, 439, 448, 440, 449, 465,
1791 451, 466, 467, 846, 468, 469, 470, 471, 472, 473,
1792 474, 475, 476, 481, 477, 482, 494, 490, 491, 486,
1793 488, 492, 495, 485, 493, 504, 496, 505, 499, 506,
1794 509, 516, 520, 865, 521, 524, 525, 531, 532, 533,
1795 535, 534, 538, 540, 541, 537, 872, 542, 543, 544,
1796 545, 547, 548, 550, 554, 558, 559, 560, 562, 565,
1797 566, 567, 569, 573, 903, 578, 574, 910, 575, 580,
1798 582, 914, 915, 916, 917, 581, 579, 585, 583, 595,
1799 586, 587, 588, 589, 925, 926, 927, 590, -2, 1,
1800 591, 611, 930, 605, 592, 593, 594, 612, 613, 607,
1801 2, 606, 614, 622, 623, 624, 633, 630, 629, 631,
1802 637, 632, 3, 4, 5, 922, 6, 656, 7, 8,
1803 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
1804 19, 634, 20, 21, 22, 23, 24, 25, 26, 27,
1805 28, 29, 657, 661, 30, 31, 32, 33, 34, 663,
1806 669, 642, 643, 635, 636, 645, 646, 644, 995, 996,
1807 681, 672, 647, 683, 684, 685, 648, 649, 680, 686,
1808 650, 676, 651, 687, 654, 603, 688, 692, 660, 691,
1809 148, 662, 664, 700, 35, 36, 665, 666, 705, 706,
1810 707, 708, 709, 667, 694, 710, 689, 668, 670, 671,
1811 673, 37, 38, 39, 40, 674, 675, 677, 41, 678,
1812 679, 42, 43, 682, 711, 716, 695, 696, 719, 730,
1813 720, 725, 735, 737, 738, 729, 739, 740, 741, 732,
1814 733, 44, 744, 755, 45, 46, 47, 734, 48, 49,
1815 50, 51, 52, 53, 54, 55, 2, 746, 736, 747,
1816 752, 56, 57, 753, 58, 59, 756, 757, 3, 4,
1817 5, 758, 6, 760, 7, 8, 9, 10, 11, 12,
1818 13, 14, 15, 16, 17, 18, 19, 761, 20, 21,
1819 22, 23, 24, 25, 26, 27, 28, 29, 762, 763,
1820 30, 31, 32, 33, 34, 767, 773, 776, 768, 774,
1821 777, 782, 784, 785, 786, 787, 788, 795, 797, 802,
1822 800, 789, 801, 790, 791, 808, 792, 813, 793, 832,
1823 796, 833, 798, 799, 834, 835, 840, 841, 803, 826,
1824 35, 36, 843, 805, 814, 806, 815, 817, 818, 819,
1825 822, 823, 824, 825, 827, 838, 828, 37, 38, 39,
1826 40, 844, 830, 858, 41, 845, 829, 42, 43, 839,
1827 848, 836, 849, 837, 850, 851, 854, 855, 856, 857,
1828 859, 873, 876, 878, 874, 879, 860, 44, 868, 894,
1829 45, 46, 47, 880, 48, 49, 50, 51, 52, 53,
1830 54, 55, 869, 411, 881, 882, 883, 56, 57, 884,
1831 58, 59, 885, 886, 887, 888, 889, 890, 891, 899,
1832 895, 896, 897, 901, 898, 900, 902, 909, 911, 919,
1833 912, 918, 920, 921, 924, 923, 929, 931, 932, 934,
1834 933, 935, 936, 943, 937, 944, 938, 945, 942, 959,
1835 946, 960, 973, 947, 949, 952, 958, 974, 994, 975,
1836 997, 998, 1005, 999, 1000, 1001, 1006, 1002, 1007, 1003,
1837 1008, 1004, 1018, 992, 112, 1009, 1010, 1011, 892, 1012,
1838 0, 951, 1013, 1014, 1015, 0, 1016, 0, 443, 0,
1839 0, 0, 0, 0, 0, 463, 0, 0, 1017
1842 static const short int yycheck
[] =
1844 26, 27, 0, 29, 217, 31, 32, 33, 34, 205,
1845 0, 38, 39, 40, 222, 65, 66, 33, 34, 479,
1846 72, 201, 0, 532, 146, 268, 269, 478, 530, 480,
1847 78, 78, 938, 28, 84, 26, 143, 250, 84, 65,
1848 903, 30, 31, 163, 252, 84, 26, 84, 98, 217,
1849 30, 31, 26, 26, 791, 81, 82, 83, 84, 166,
1850 86, 87, 52, 98, 244, 971, 246, 65, 26, 27,
1851 30, 31, 98, 26, 28, 65, 66, 103, 26, 27,
1852 84, 26, 250, 63, 57, 70, 71, 98, 268, 269,
1853 70, 72, 73, 74, 84, 26, 26, 26, 88, 836,
1854 30, 31, 69, 44, 57, 63, 26, 163, 98, 83,
1855 64, 163, 70, 161, 161, 63, 158, 58, 63, 165,
1856 162, 88, 70, 366, 105, 70, 165, 158, 165, 98,
1857 111, 162, 63, 26, 63, 161, 158, 16, 160, 70,
1858 19, 70, 21, 63, 23, 1008, 1009, 26, 146, 28,
1859 70, 30, 31, 613, 149, 657, 146, 36, 158, 98,
1860 150, 165, 162, 614, 154, 155, 156, 157, 146, 159,
1861 63, 26, 163, 154, 163, 30, 31, 70, 163, 98,
1862 26, 36, 158, 163, 63, 26, 366, 163, 168, 169,
1863 36, 70, 173, 174, 175, 176, 177, 178, 179, 180,
1864 181, 182, 158, 163, 26, 163, 162, 86, 87, 26,
1865 168, 169, 125, 126, 36, 163, 30, 31, 163, 149,
1866 168, 169, 63, 168, 169, 206, 207, 26, 26, 70,
1867 143, 158, 163, 26, 163, 162, 217, 168, 169, 168,
1868 169, 3, 4, 163, 26, 124, 36, 9, 168, 169,
1869 164, 494, 495, 243, 280, 463, 26, 283, 20, 163,
1870 30, 31, 288, 158, 63, 91, 92, 93, 163, 250,
1871 163, 70, 98, 63, 163, 168, 169, 303, 304, 305,
1872 70, 63, 135, 136, 163, 163, 26, 313, 70, 168,
1873 169, 158, 535, 98, 26, 162, 26, 163, 103, 104,
1874 30, 31, 30, 31, 30, 31, 36, 70, 71, 163,
1875 36, 301, 362, 363, 494, 495, 342, 343, 344, 441,
1876 83, 84, 163, 63, 164, 158, 164, 168, 169, 162,
1877 70, 63, 164, 63, 164, 63, 164, 163, 70, 26,
1878 70, 36, 70, 30, 31, 106, 107, 77, 374, 375,
1879 376, 112, 133, 134, 63, 815, 86, 87, 88, 163,
1880 90, 70, 822, 163, 163, 391, 392, 393, 63, 168,
1881 169, 70, 71, 163, 364, 70, 402, 367, 168, 169,
1882 163, 163, 133, 134, 83, 84, 168, 169, 378, 379,
1883 380, 163, 418, 70, 71, 421, 163, 423, 424, 425,
1884 26, 427, 428, 429, 30, 31, 83, 84, 434, 399,
1885 36, 920, 0, 922, 63, 163, 98, 63, 100, 101,
1886 102, 70, 98, 163, 70, 451, 106, 107, 168, 169,
1887 36, 163, 112, 163, 163, 163, 168, 169, 168, 169,
1888 168, 169, 511, 441, 26, 514, 515, 26, 446, 447,
1889 36, 441, 70, 71, 163, 36, 446, 447, 36, 168,
1890 169, 129, 130, 441, 67, 83, 84, 493, 163, 72,
1891 73, 139, 140, 168, 169, 501, 36, 79, 80, 81,
1892 82, 70, 71, 72, 697, 501, 699, 5, 6, 7,
1893 8, 26, 10, 11, 173, 13, 14, 15, 16, 17,
1894 18, 98, 91, 92, 93, 26, 103, 104, 26, 98,
1895 28, 29, 30, 31, 163, 26, 34, 163, 36, 168,
1896 169, 26, 168, 169, 65, 66, 67, 68, 26, 70,
1897 71, 72, 73, 729, 70, 71, 732, 98, 158, 100,
1898 101, 102, 162, 569, 105, 63, 26, 83, 84, 158,
1899 91, 92, 70, 162, 126, 127, 128, 75, 76, 77,
1900 586, 587, 588, 589, 83, 84, 158, 85, 86, 87,
1901 162, 158, 90, 65, 66, 162, 68, 67, 70, 71,
1902 70, 71, 72, 73, 26, 575, 26, 79, 80, 81,
1903 82, 617, 582, 583, 620, 26, 792, 121, 122, 91,
1904 92, 93, 126, 127, 128, 123, 124, 803, 816, 805,
1905 806, 158, 125, 126, 158, 162, 642, 643, 162, 26,
1906 158, 162, 28, 831, 162, 26, 65, 66, 67, 68,
1907 26, 70, 71, 72, 73, 26, 65, 663, 67, 68,
1908 72, 70, 71, 72, 73, 163, 164, 170, 171, 172,
1909 168, 169, 91, 92, 141, 142, 26, 158, 685, 649,
1910 650, 162, 91, 92, 158, 65, 26, 67, 162, 26,
1911 70, 71, 72, 73, 36, 67, 26, 857, 70, 71,
1912 72, 73, 70, 71, 710, 28, 676, 121, 122, 26,
1913 740, 91, 92, 136, 137, 28, 694, 144, 145, 91,
1914 92, 691, 692, 89, 694, 121, 122, 757, 94, 95,
1915 163, 163, 98, 99, 158, 160, 71, 103, 104, 108,
1916 109, 110, 111, 26, 26, 163, 163, 163, 163, 26,
1917 163, 26, 26, 163, 26, 163, 163, 163, 163, 71,
1918 164, 164, 163, 163, 163, 163, 163, 773, 163, 163,
1919 163, 26, 98, 36, 36, 164, 158, 98, 784, 162,
1920 71, 71, 174, 162, 158, 158, 26, 162, 158, 98,
1921 26, 158, 26, 158, 158, 158, 158, 158, 36, 126,
1922 136, 158, 808, 162, 158, 165, 159, 165, 159, 26,
1923 159, 26, 26, 783, 26, 26, 36, 26, 26, 26,
1924 26, 26, 26, 26, 163, 26, 26, 159, 159, 163,
1925 163, 159, 26, 35, 159, 26, 71, 26, 162, 158,
1926 132, 26, 26, 813, 26, 138, 26, 22, 36, 159,
1927 26, 159, 158, 26, 26, 162, 826, 26, 26, 26,
1928 165, 165, 26, 165, 26, 26, 163, 98, 162, 165,
1929 165, 98, 160, 36, 880, 162, 36, 883, 158, 136,
1930 98, 887, 888, 889, 890, 135, 162, 158, 98, 26,
1931 160, 160, 160, 160, 900, 901, 902, 158, 0, 1,
1932 158, 143, 909, 162, 158, 158, 158, 36, 36, 158,
1933 12, 162, 36, 26, 162, 26, 26, 158, 165, 158,
1934 163, 158, 24, 25, 26, 895, 28, 36, 30, 31,
1935 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1936 42, 162, 44, 45, 46, 47, 48, 49, 50, 51,
1937 52, 53, 36, 36, 56, 57, 58, 59, 60, 92,
1938 98, 158, 158, 162, 162, 158, 158, 162, 974, 975,
1939 26, 98, 162, 98, 26, 98, 163, 163, 131, 98,
1940 163, 158, 163, 98, 163, 163, 26, 77, 162, 70,
1941 98, 162, 162, 26, 96, 97, 162, 162, 26, 36,
1942 26, 36, 26, 162, 158, 91, 161, 165, 165, 165,
1943 162, 113, 114, 115, 116, 162, 162, 162, 120, 162,
1944 162, 123, 124, 163, 26, 26, 162, 162, 26, 26,
1945 162, 162, 173, 26, 26, 165, 26, 98, 136, 165,
1946 162, 143, 163, 26, 146, 147, 148, 165, 150, 151,
1947 152, 153, 154, 155, 156, 157, 12, 36, 165, 36,
1948 126, 163, 164, 36, 166, 167, 165, 98, 24, 25,
1949 26, 26, 28, 98, 30, 31, 32, 33, 34, 35,
1950 36, 37, 38, 39, 40, 41, 42, 26, 44, 45,
1951 46, 47, 48, 49, 50, 51, 52, 53, 98, 98,
1952 56, 57, 58, 59, 60, 162, 160, 26, 131, 164,
1953 26, 158, 160, 158, 158, 158, 158, 98, 98, 126,
1954 98, 162, 143, 162, 162, 91, 162, 98, 162, 98,
1955 162, 26, 162, 162, 36, 26, 26, 26, 165, 158,
1956 96, 97, 26, 165, 162, 165, 162, 162, 162, 162,
1957 162, 162, 162, 162, 158, 163, 162, 113, 114, 115,
1958 116, 26, 165, 32, 120, 28, 162, 123, 124, 163,
1959 26, 162, 26, 162, 26, 26, 163, 162, 26, 26,
1960 162, 26, 26, 26, 72, 26, 162, 143, 162, 71,
1961 146, 147, 148, 160, 150, 151, 152, 153, 154, 155,
1962 156, 157, 162, 84, 163, 162, 160, 163, 164, 162,
1963 166, 167, 163, 162, 160, 160, 160, 160, 133, 36,
1964 70, 162, 158, 160, 162, 92, 160, 98, 126, 26,
1965 163, 162, 26, 33, 71, 28, 162, 162, 162, 162,
1966 137, 162, 162, 22, 162, 158, 163, 158, 162, 26,
1967 162, 26, 36, 163, 163, 163, 163, 160, 162, 160,
1968 137, 136, 162, 137, 137, 137, 162, 137, 72, 137,
1969 162, 137, 36, 969, 34, 162, 162, 162, 856, 162,
1970 -1, 936, 162, 162, 162, -1, 162, -1, 293, -1,
1971 -1, -1, -1, -1, -1, 312, -1, -1, 162
1974 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1975 symbol of state STATE-NUM. */
1976 static const unsigned char yystos
[] =
1978 0, 1, 12, 24, 25, 26, 28, 30, 31, 32,
1979 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
1980 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1981 56, 57, 58, 59, 60, 96, 97, 113, 114, 115,
1982 116, 120, 123, 124, 143, 146, 147, 148, 150, 151,
1983 152, 153, 154, 155, 156, 157, 163, 164, 166, 167,
1984 176, 177, 178, 179, 198, 206, 207, 208, 209, 210,
1985 213, 163, 63, 70, 163, 168, 169, 214, 219, 220,
1986 221, 89, 94, 95, 98, 99, 103, 104, 98, 100,
1987 101, 102, 105, 212, 98, 98, 98, 98, 98, 26,
1988 26, 220, 220, 163, 220, 163, 220, 220, 214, 218,
1989 220, 163, 218, 220, 163, 163, 164, 199, 164, 199,
1990 164, 199, 164, 199, 163, 164, 164, 98, 212, 163,
1991 163, 163, 163, 163, 163, 26, 179, 163, 163, 28,
1992 64, 26, 26, 83, 212, 0, 78, 161, 98, 103,
1993 104, 98, 26, 36, 70, 77, 86, 87, 88, 90,
1994 179, 206, 211, 220, 179, 211, 211, 163, 180, 26,
1995 221, 221, 221, 65, 66, 67, 68, 70, 71, 72,
1996 73, 91, 92, 26, 220, 26, 220, 26, 220, 5,
1997 6, 7, 8, 10, 11, 13, 14, 15, 16, 17,
1998 18, 26, 28, 29, 34, 36, 63, 70, 75, 76,
1999 77, 85, 86, 87, 90, 123, 124, 163, 164, 179,
2000 195, 200, 211, 220, 26, 26, 220, 26, 220, 26,
2001 149, 179, 28, 149, 143, 166, 36, 36, 36, 36,
2002 16, 19, 21, 23, 26, 28, 36, 86, 87, 124,
2003 163, 179, 211, 220, 220, 26, 26, 27, 173, 26,
2004 27, 26, 26, 26, 26, 26, 26, 26, 26, 26,
2005 28, 26, 26, 26, 26, 26, 26, 36, 26, 26,
2006 57, 28, 158, 160, 70, 71, 83, 84, 202, 205,
2007 26, 28, 178, 179, 26, 163, 72, 179, 179, 179,
2008 179, 163, 179, 91, 92, 93, 163, 220, 163, 196,
2009 135, 136, 158, 160, 162, 221, 221, 221, 221, 221,
2010 221, 221, 221, 221, 221, 163, 163, 163, 163, 163,
2011 163, 163, 163, 163, 65, 66, 68, 71, 79, 80,
2012 81, 82, 91, 92, 93, 201, 202, 163, 187, 71,
2013 187, 26, 26, 26, 26, 26, 26, 26, 164, 164,
2014 26, 179, 206, 207, 208, 210, 26, 71, 163, 163,
2015 180, 163, 188, 163, 106, 107, 112, 163, 106, 107,
2016 112, 163, 163, 163, 26, 26, 36, 179, 163, 202,
2017 98, 91, 92, 93, 98, 202, 36, 36, 164, 208,
2018 210, 180, 158, 98, 162, 71, 174, 162, 71, 158,
2019 158, 84, 165, 165, 165, 165, 162, 84, 202, 205,
2020 84, 202, 205, 158, 158, 158, 158, 158, 158, 158,
2021 162, 98, 220, 26, 57, 26, 220, 26, 220, 165,
2022 165, 78, 161, 196, 26, 36, 158, 158, 159, 159,
2023 179, 159, 220, 220, 220, 126, 136, 158, 162, 158,
2024 162, 26, 36, 209, 220, 26, 26, 26, 26, 26,
2025 36, 26, 26, 26, 26, 26, 26, 163, 220, 220,
2026 220, 26, 26, 133, 134, 35, 163, 189, 163, 190,
2027 159, 159, 159, 159, 26, 26, 71, 104, 179, 162,
2028 84, 202, 205, 179, 26, 26, 158, 133, 134, 132,
2029 26, 220, 26, 220, 26, 220, 26, 179, 179, 179,
2030 26, 26, 26, 36, 138, 26, 69, 88, 220, 220,
2031 220, 22, 36, 159, 159, 26, 179, 162, 158, 220,
2032 26, 26, 26, 26, 26, 165, 220, 165, 26, 220,
2033 165, 220, 220, 220, 26, 220, 220, 220, 26, 163,
2034 98, 220, 162, 158, 162, 165, 165, 98, 178, 160,
2035 179, 206, 206, 36, 36, 158, 36, 220, 162, 162,
2036 136, 135, 98, 98, 180, 158, 160, 160, 160, 160,
2037 158, 158, 158, 158, 158, 26, 189, 190, 189, 158,
2038 163, 184, 158, 163, 185, 162, 162, 158, 125, 126,
2039 143, 143, 36, 36, 36, 36, 220, 202, 205, 84,
2040 202, 205, 26, 162, 26, 214, 216, 217, 220, 165,
2041 158, 158, 158, 26, 162, 162, 162, 163, 197, 197,
2042 197, 197, 158, 158, 162, 158, 158, 162, 163, 163,
2043 163, 163, 191, 191, 163, 185, 36, 36, 84, 205,
2044 162, 36, 162, 92, 162, 162, 162, 162, 165, 98,
2045 165, 165, 98, 162, 162, 162, 158, 162, 162, 162,
2046 131, 26, 163, 98, 26, 98, 98, 98, 26, 161,
2047 220, 70, 77, 179, 158, 162, 162, 163, 179, 163,
2048 26, 220, 220, 220, 220, 26, 36, 26, 36, 26,
2049 91, 26, 126, 127, 128, 182, 26, 125, 126, 26,
2050 162, 158, 162, 158, 162, 162, 190, 189, 220, 165,
2051 26, 220, 165, 162, 165, 173, 165, 26, 26, 26,
2052 98, 136, 220, 220, 163, 181, 36, 36, 141, 142,
2053 179, 179, 126, 36, 191, 26, 165, 98, 26, 220,
2054 98, 26, 98, 98, 26, 36, 179, 162, 131, 3,
2055 4, 9, 20, 160, 164, 199, 26, 26, 158, 162,
2056 179, 179, 158, 206, 160, 158, 158, 158, 158, 162,
2057 162, 162, 162, 162, 220, 98, 162, 98, 162, 162,
2058 98, 143, 126, 165, 187, 165, 165, 187, 91, 170,
2059 171, 172, 215, 98, 162, 162, 211, 162, 162, 162,
2060 121, 122, 162, 162, 162, 162, 158, 158, 162, 162,
2061 165, 211, 98, 26, 36, 26, 162, 162, 163, 163,
2062 26, 26, 220, 26, 26, 28, 179, 220, 26, 26,
2063 26, 26, 181, 187, 163, 162, 26, 26, 32, 162,
2064 162, 187, 187, 187, 220, 179, 190, 180, 162, 162,
2065 190, 26, 179, 26, 72, 180, 26, 181, 26, 26,
2066 160, 163, 162, 160, 162, 163, 162, 160, 160, 160,
2067 160, 133, 201, 202, 71, 70, 162, 158, 162, 36,
2068 92, 160, 160, 220, 108, 109, 110, 111, 192, 98,
2069 220, 126, 163, 193, 220, 220, 220, 220, 162, 26,
2070 26, 33, 179, 28, 71, 220, 220, 220, 193, 162,
2071 199, 162, 162, 137, 162, 162, 162, 162, 163, 186,
2072 185, 185, 162, 22, 158, 158, 162, 163, 194, 163,
2073 203, 203, 163, 204, 121, 122, 182, 183, 163, 26,
2074 26, 136, 137, 129, 130, 139, 140, 144, 145, 158,
2075 162, 158, 162, 36, 160, 160, 158, 162, 158, 162,
2076 158, 162, 158, 162, 158, 162, 158, 162, 158, 162,
2077 158, 162, 183, 182, 162, 220, 220, 137, 136, 137,
2078 137, 137, 137, 137, 137, 162, 162, 72, 162, 162,
2079 162, 162, 162, 162, 162, 162, 162, 162, 36, 193,
2083 #define yyerrok (yyerrstatus = 0)
2084 #define yyclearin (yychar = YYEMPTY)
2085 #define YYEMPTY (-2)
2088 #define YYACCEPT goto yyacceptlab
2089 #define YYABORT goto yyabortlab
2090 #define YYERROR goto yyerrorlab
2093 /* Like YYERROR except do call yyerror. This remains here temporarily
2094 to ease the transition to the new meaning of YYERROR, for GCC.
2095 Once GCC version 2 has supplanted version 1, this can go. */
2097 #define YYFAIL goto yyerrlab
2099 #define YYRECOVERING() (!!yyerrstatus)
2101 #define YYBACKUP(Token, Value) \
2103 if (yychar == YYEMPTY && yylen == 1) \
2107 yytoken = YYTRANSLATE (yychar); \
2113 yyerror (YY_("syntax error: cannot back up")); \
2120 #define YYERRCODE 256
2123 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2124 If N is 0, then set CURRENT to the empty location which ends
2125 the previous symbol: RHS[0] (always defined). */
2127 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2128 #ifndef YYLLOC_DEFAULT
2129 # define YYLLOC_DEFAULT(Current, Rhs, N) \
2133 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2134 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2135 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2136 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2140 (Current).first_line = (Current).last_line = \
2141 YYRHSLOC (Rhs, 0).last_line; \
2142 (Current).first_column = (Current).last_column = \
2143 YYRHSLOC (Rhs, 0).last_column; \
2149 /* YY_LOCATION_PRINT -- Print the location on the stream.
2150 This macro was not mandated originally: define only if we know
2151 we won't break user code: when these are the locations we know. */
2153 #ifndef YY_LOCATION_PRINT
2154 # if YYLTYPE_IS_TRIVIAL
2155 # define YY_LOCATION_PRINT(File, Loc) \
2156 fprintf (File, "%d.%d-%d.%d", \
2157 (Loc).first_line, (Loc).first_column, \
2158 (Loc).last_line, (Loc).last_column)
2160 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2165 /* YYLEX -- calling `yylex' with the right arguments. */
2168 # define YYLEX yylex (YYLEX_PARAM)
2170 # define YYLEX yylex ()
2173 /* Enable debugging if requested. */
2177 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2178 # define YYFPRINTF fprintf
2181 # define YYDPRINTF(Args) \
2187 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2191 YYFPRINTF (stderr, "%s ", Title); \
2192 yysymprint (stderr, \
2194 YYFPRINTF (stderr, "\n"); \
2198 /*------------------------------------------------------------------.
2199 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
2201 `------------------------------------------------------------------*/
2203 #if defined (__STDC__) || defined (__cplusplus)
2205 yy_stack_print (short int *bottom
, short int *top
)
2208 yy_stack_print (bottom
, top
)
2213 YYFPRINTF (stderr
, "Stack now");
2214 for (/* Nothing. */; bottom
<= top
; ++bottom
)
2215 YYFPRINTF (stderr
, " %d", *bottom
);
2216 YYFPRINTF (stderr
, "\n");
2219 # define YY_STACK_PRINT(Bottom, Top) \
2222 yy_stack_print ((Bottom), (Top)); \
2226 /*------------------------------------------------.
2227 | Report that the YYRULE is going to be reduced. |
2228 `------------------------------------------------*/
2230 #if defined (__STDC__) || defined (__cplusplus)
2232 yy_reduce_print (int yyrule
)
2235 yy_reduce_print (yyrule
)
2240 unsigned long int yylno
= yyrline
[yyrule
];
2241 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu), ",
2243 /* Print the symbols being reduced, and their result. */
2244 for (yyi
= yyprhs
[yyrule
]; 0 <= yyrhs
[yyi
]; yyi
++)
2245 YYFPRINTF (stderr
, "%s ", yytname
[yyrhs
[yyi
]]);
2246 YYFPRINTF (stderr
, "-> %s\n", yytname
[yyr1
[yyrule
]]);
2249 # define YY_REDUCE_PRINT(Rule) \
2252 yy_reduce_print (Rule); \
2255 /* Nonzero means print parse trace. It is left uninitialized so that
2256 multiple parsers can coexist. */
2258 #else /* !YYDEBUG */
2259 # define YYDPRINTF(Args)
2260 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
2261 # define YY_STACK_PRINT(Bottom, Top)
2262 # define YY_REDUCE_PRINT(Rule)
2263 #endif /* !YYDEBUG */
2266 /* YYINITDEPTH -- initial size of the parser's stacks. */
2268 # define YYINITDEPTH 200
2271 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
2272 if the built-in stack extension method is used).
2274 Do not make this value too large; the results are undefined if
2275 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
2276 evaluated with infinite-precision integer arithmetic. */
2279 # define YYMAXDEPTH 10000
2287 # if defined (__GLIBC__) && defined (_STRING_H)
2288 # define yystrlen strlen
2290 /* Return the length of YYSTR. */
2292 # if defined (__STDC__) || defined (__cplusplus)
2293 yystrlen (const char *yystr
)
2299 const char *yys
= yystr
;
2301 while (*yys
++ != '\0')
2304 return yys
- yystr
- 1;
2310 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
2311 # define yystpcpy stpcpy
2313 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2316 # if defined (__STDC__) || defined (__cplusplus)
2317 yystpcpy (char *yydest
, const char *yysrc
)
2319 yystpcpy (yydest
, yysrc
)
2325 const char *yys
= yysrc
;
2327 while ((*yyd
++ = *yys
++) != '\0')
2336 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2337 quotes and backslashes, so that it's suitable for yyerror. The
2338 heuristic is that double-quoting is unnecessary unless the string
2339 contains an apostrophe, a comma, or backslash (other than
2340 backslash-backslash). YYSTR is taken from yytname. If YYRES is
2341 null, do not copy; instead, return the length of what the result
2344 yytnamerr (char *yyres
, const char *yystr
)
2349 char const *yyp
= yystr
;
2356 goto do_not_strip_quotes
;
2360 goto do_not_strip_quotes
;
2373 do_not_strip_quotes
: ;
2377 return yystrlen (yystr
);
2379 return yystpcpy (yyres
, yystr
) - yyres
;
2383 #endif /* YYERROR_VERBOSE */
2388 /*--------------------------------.
2389 | Print this symbol on YYOUTPUT. |
2390 `--------------------------------*/
2392 #if defined (__STDC__) || defined (__cplusplus)
2394 yysymprint (FILE *yyoutput
, int yytype
, YYSTYPE
*yyvaluep
)
2397 yysymprint (yyoutput
, yytype
, yyvaluep
)
2403 /* Pacify ``unused variable'' warnings. */
2406 if (yytype
< YYNTOKENS
)
2407 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
2409 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
2413 if (yytype
< YYNTOKENS
)
2414 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
2421 YYFPRINTF (yyoutput
, ")");
2424 #endif /* ! YYDEBUG */
2425 /*-----------------------------------------------.
2426 | Release the memory associated to this symbol. |
2427 `-----------------------------------------------*/
2429 #if defined (__STDC__) || defined (__cplusplus)
2431 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
2434 yydestruct (yymsg
, yytype
, yyvaluep
)
2440 /* Pacify ``unused variable'' warnings. */
2445 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
2456 /* Prevent warnings from -Wmissing-prototypes. */
2458 #ifdef YYPARSE_PARAM
2459 # if defined (__STDC__) || defined (__cplusplus)
2460 int yyparse (void *YYPARSE_PARAM
);
2464 #else /* ! YYPARSE_PARAM */
2465 #if defined (__STDC__) || defined (__cplusplus)
2470 #endif /* ! YYPARSE_PARAM */
2474 /* The look-ahead symbol. */
2477 /* The semantic value of the look-ahead symbol. */
2480 /* Number of syntax errors so far. */
2489 #ifdef YYPARSE_PARAM
2490 # if defined (__STDC__) || defined (__cplusplus)
2491 int yyparse (void *YYPARSE_PARAM
)
2493 int yyparse (YYPARSE_PARAM
)
2494 void *YYPARSE_PARAM
;
2496 #else /* ! YYPARSE_PARAM */
2497 #if defined (__STDC__) || defined (__cplusplus)
2511 /* Number of tokens to shift before error messages enabled. */
2513 /* Look-ahead token as an internal (translated) token number. */
2516 /* Three stacks and their tools:
2517 `yyss': related to states,
2518 `yyvs': related to semantic values,
2519 `yyls': related to locations.
2521 Refer to the stacks thru separate pointers, to allow yyoverflow
2522 to reallocate them elsewhere. */
2524 /* The state stack. */
2525 short int yyssa
[YYINITDEPTH
];
2526 short int *yyss
= yyssa
;
2529 /* The semantic value stack. */
2530 YYSTYPE yyvsa
[YYINITDEPTH
];
2531 YYSTYPE
*yyvs
= yyvsa
;
2536 #define YYPOPSTACK (yyvsp--, yyssp--)
2538 YYSIZE_T yystacksize
= YYINITDEPTH
;
2540 /* The variables used to return semantic value and location from the
2545 /* When reducing, the number of symbols on the RHS of the reduced
2549 YYDPRINTF ((stderr
, "Starting parse\n"));
2554 yychar
= YYEMPTY
; /* Cause a token to be read. */
2556 /* Initialize stack pointers.
2557 Waste one element of value and location stack
2558 so that they stay on the same level as the state stack.
2559 The wasted elements are never initialized. */
2566 /*------------------------------------------------------------.
2567 | yynewstate -- Push a new state, which is found in yystate. |
2568 `------------------------------------------------------------*/
2570 /* In all cases, when you get here, the value and location stacks
2571 have just been pushed. so pushing a state here evens the stacks.
2578 if (yyss
+ yystacksize
- 1 <= yyssp
)
2580 /* Get the current used size of the three stacks, in elements. */
2581 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
2585 /* Give user a chance to reallocate the stack. Use copies of
2586 these so that the &'s don't force the real ones into
2588 YYSTYPE
*yyvs1
= yyvs
;
2589 short int *yyss1
= yyss
;
2592 /* Each stack pointer address is followed by the size of the
2593 data in use in that stack, in bytes. This used to be a
2594 conditional around just the two extra args, but that might
2595 be undefined if yyoverflow is a macro. */
2596 yyoverflow (YY_("memory exhausted"),
2597 &yyss1
, yysize
* sizeof (*yyssp
),
2598 &yyvs1
, yysize
* sizeof (*yyvsp
),
2605 #else /* no yyoverflow */
2606 # ifndef YYSTACK_RELOCATE
2607 goto yyexhaustedlab
;
2609 /* Extend the stack our own way. */
2610 if (YYMAXDEPTH
<= yystacksize
)
2611 goto yyexhaustedlab
;
2613 if (YYMAXDEPTH
< yystacksize
)
2614 yystacksize
= YYMAXDEPTH
;
2617 short int *yyss1
= yyss
;
2618 union yyalloc
*yyptr
=
2619 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
2621 goto yyexhaustedlab
;
2622 YYSTACK_RELOCATE (yyss
);
2623 YYSTACK_RELOCATE (yyvs
);
2625 # undef YYSTACK_RELOCATE
2627 YYSTACK_FREE (yyss1
);
2630 #endif /* no yyoverflow */
2632 yyssp
= yyss
+ yysize
- 1;
2633 yyvsp
= yyvs
+ yysize
- 1;
2636 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
2637 (unsigned long int) yystacksize
));
2639 if (yyss
+ yystacksize
- 1 <= yyssp
)
2643 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
2652 /* Do appropriate processing given the current state. */
2653 /* Read a look-ahead token if we need one and don't already have one. */
2656 /* First try to decide what to do without reference to look-ahead token. */
2658 yyn
= yypact
[yystate
];
2659 if (yyn
== YYPACT_NINF
)
2662 /* Not known => get a look-ahead token if don't already have one. */
2664 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2665 if (yychar
== YYEMPTY
)
2667 YYDPRINTF ((stderr
, "Reading a token: "));
2671 if (yychar
<= YYEOF
)
2673 yychar
= yytoken
= YYEOF
;
2674 YYDPRINTF ((stderr
, "Now at end of input.\n"));
2678 yytoken
= YYTRANSLATE (yychar
);
2679 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
2682 /* If the proper action on seeing token YYTOKEN is to reduce or to
2683 detect an error, take that action. */
2685 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
2690 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
2699 /* Shift the look-ahead token. */
2700 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
2702 /* Discard the token being shifted unless it is eof. */
2703 if (yychar
!= YYEOF
)
2709 /* Count tokens shifted since error; after three, turn off error
2718 /*-----------------------------------------------------------.
2719 | yydefault -- do the default action for the current state. |
2720 `-----------------------------------------------------------*/
2722 yyn
= yydefact
[yystate
];
2728 /*-----------------------------.
2729 | yyreduce -- Do a reduction. |
2730 `-----------------------------*/
2732 /* yyn is the number of a rule to reduce with. */
2735 /* If YYLEN is nonzero, implement the default value of the action:
2738 Otherwise, the following line sets YYVAL to garbage.
2739 This behavior is undocumented and Bison
2740 users should not rely upon it. Assigning to YYVAL
2741 unconditionally makes the parser a bit smaller, and it avoids a
2742 GCC warning that YYVAL may be used uninitialized. */
2743 yyval
= yyvsp
[1-yylen
];
2746 YY_REDUCE_PRINT (yyn
);
2750 #line 593 "bfin-parse.y"
2752 insn
= (yyvsp
[0].instr
);
2753 if (insn
== (INSTR_T
) 0)
2754 return NO_INSN_GENERATED
;
2755 else if (insn
== (INSTR_T
) - 1)
2756 return SEMANTIC_ERROR
;
2758 return INSN_GENERATED
;
2763 #line 607 "bfin-parse.y"
2765 if (((yyvsp
[-5].instr
)->value
& 0xf800) == 0xc000)
2767 if (is_group1 ((yyvsp
[-3].instr
)) && is_group2 ((yyvsp
[-1].instr
)))
2768 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[-5].instr
), (yyvsp
[-3].instr
), (yyvsp
[-1].instr
));
2769 else if (is_group2 ((yyvsp
[-3].instr
)) && is_group1 ((yyvsp
[-1].instr
)))
2770 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[-5].instr
), (yyvsp
[-1].instr
), (yyvsp
[-3].instr
));
2772 return yyerror ("Wrong 16 bit instructions groups, slot 2 and slot 3 must be 16-bit instrution group");
2774 else if (((yyvsp
[-3].instr
)->value
& 0xf800) == 0xc000)
2776 if (is_group1 ((yyvsp
[-5].instr
)) && is_group2 ((yyvsp
[-1].instr
)))
2777 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[-3].instr
), (yyvsp
[-5].instr
), (yyvsp
[-1].instr
));
2778 else if (is_group2 ((yyvsp
[-5].instr
)) && is_group1 ((yyvsp
[-1].instr
)))
2779 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[-3].instr
), (yyvsp
[-1].instr
), (yyvsp
[-5].instr
));
2781 return yyerror ("Wrong 16 bit instructions groups, slot 1 and slot 3 must be 16-bit instrution group");
2783 else if (((yyvsp
[-1].instr
)->value
& 0xf800) == 0xc000)
2785 if (is_group1 ((yyvsp
[-5].instr
)) && is_group2 ((yyvsp
[-3].instr
)))
2786 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[-1].instr
), (yyvsp
[-5].instr
), (yyvsp
[-3].instr
));
2787 else if (is_group2 ((yyvsp
[-5].instr
)) && is_group1 ((yyvsp
[-3].instr
)))
2788 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[-1].instr
), (yyvsp
[-3].instr
), (yyvsp
[-5].instr
));
2790 return yyerror ("Wrong 16 bit instructions groups, slot 1 and slot 2 must be 16-bit instrution group");
2793 error ("\nIllegal Multi Issue Construct, at least any one of the slot must be DSP32 instruction group\n");
2798 #line 640 "bfin-parse.y"
2800 if (((yyvsp
[-3].instr
)->value
& 0xf800) == 0xc000)
2802 if (is_group1 ((yyvsp
[-1].instr
)))
2803 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[-3].instr
), (yyvsp
[-1].instr
), 0);
2804 else if (is_group2 ((yyvsp
[-1].instr
)))
2805 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[-3].instr
), 0, (yyvsp
[-1].instr
));
2807 return yyerror ("Wrong 16 bit instructions groups, slot 2 must be the 16-bit instruction group");
2809 else if (((yyvsp
[-1].instr
)->value
& 0xf800) == 0xc000)
2811 if (is_group1 ((yyvsp
[-3].instr
)))
2812 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[-1].instr
), (yyvsp
[-3].instr
), 0);
2813 else if (is_group2 ((yyvsp
[-3].instr
)))
2814 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[-1].instr
), 0, (yyvsp
[-3].instr
));
2816 return yyerror ("Wrong 16 bit instructions groups, slot 1 must be the 16-bit instruction group");
2818 else if (is_group1 ((yyvsp
[-3].instr
)) && is_group2 ((yyvsp
[-1].instr
)))
2819 (yyval
.instr
) = bfin_gen_multi_instr (0, (yyvsp
[-3].instr
), (yyvsp
[-1].instr
));
2820 else if (is_group2 ((yyvsp
[-3].instr
)) && is_group1 ((yyvsp
[-1].instr
)))
2821 (yyval
.instr
) = bfin_gen_multi_instr (0, (yyvsp
[-1].instr
), (yyvsp
[-3].instr
));
2823 return yyerror ("Wrong 16 bit instructions groups, slot 1 and slot 2 must be the 16-bit instruction group");
2828 #line 667 "bfin-parse.y"
2837 #line 678 "bfin-parse.y"
2839 (yyval
.instr
) = DSP32MAC (3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0);
2844 #line 682 "bfin-parse.y"
2848 int h00
, h10
, h01
, h11
;
2850 if (check_macfunc_option (&(yyvsp
[-1].macfunc
), &(yyvsp
[0].mod
)) < 0)
2851 return yyerror ("bad option");
2853 if ((yyvsp
[-1].macfunc
).n
== 0)
2855 if ((yyvsp
[0].mod
).MM
)
2856 return yyerror ("(m) not allowed with a0 unit");
2858 op0
= (yyvsp
[-1].macfunc
).op
;
2860 w0
= (yyvsp
[-1].macfunc
).w
;
2861 h00
= IS_H ((yyvsp
[-1].macfunc
).s0
);
2862 h10
= IS_H ((yyvsp
[-1].macfunc
).s1
);
2867 op1
= (yyvsp
[-1].macfunc
).op
;
2869 w1
= (yyvsp
[-1].macfunc
).w
;
2872 h01
= IS_H ((yyvsp
[-1].macfunc
).s0
);
2873 h11
= IS_H ((yyvsp
[-1].macfunc
).s1
);
2875 (yyval
.instr
) = DSP32MAC (op1
, (yyvsp
[0].mod
).MM
, (yyvsp
[0].mod
).mod
, w1
, (yyvsp
[-1].macfunc
).P
, h01
, h11
, h00
, h10
,
2876 &(yyvsp
[-1].macfunc
).dst
, op0
, &(yyvsp
[-1].macfunc
).s0
, &(yyvsp
[-1].macfunc
).s1
, w0
);
2881 #line 720 "bfin-parse.y"
2885 if (check_macfuncs (&(yyvsp
[-4].macfunc
), &(yyvsp
[-3].mod
), &(yyvsp
[-1].macfunc
), &(yyvsp
[0].mod
)) < 0)
2887 notethat ("assign_macfunc (.), assign_macfunc (.)\n");
2889 if ((yyvsp
[-4].macfunc
).w
)
2890 dst
= &(yyvsp
[-4].macfunc
).dst
;
2892 dst
= &(yyvsp
[-1].macfunc
).dst
;
2894 (yyval
.instr
) = DSP32MAC ((yyvsp
[-4].macfunc
).op
, (yyvsp
[-3].mod
).MM
, (yyvsp
[0].mod
).mod
, (yyvsp
[-4].macfunc
).w
, (yyvsp
[-4].macfunc
).P
,
2895 IS_H ((yyvsp
[-4].macfunc
).s0
), IS_H ((yyvsp
[-4].macfunc
).s1
), IS_H ((yyvsp
[-1].macfunc
).s0
), IS_H ((yyvsp
[-1].macfunc
).s1
),
2896 dst
, (yyvsp
[-1].macfunc
).op
, &(yyvsp
[-4].macfunc
).s0
, &(yyvsp
[-4].macfunc
).s1
, (yyvsp
[-1].macfunc
).w
);
2901 #line 740 "bfin-parse.y"
2903 notethat ("dsp32alu: DISALGNEXCPT\n");
2904 (yyval
.instr
) = DSP32ALU (18, 0, 0, 0, 0, 0, 0, 0, 3);
2909 #line 745 "bfin-parse.y"
2911 if (IS_DREG ((yyvsp
[-5].reg
)) && !IS_A1 ((yyvsp
[-2].reg
)) && IS_A1 ((yyvsp
[-1].reg
)))
2913 notethat ("dsp32alu: dregs = ( A0 += A1 )\n");
2914 (yyval
.instr
) = DSP32ALU (11, 0, 0, &(yyvsp
[-5].reg
), 0, 0, 0, 0, 0);
2917 return yyerror ("Register mismatch");
2922 #line 755 "bfin-parse.y"
2924 if (!IS_A1 ((yyvsp
[-2].reg
)) && IS_A1 ((yyvsp
[-1].reg
)))
2926 notethat ("dsp32alu: dregs_half = ( A0 += A1 )\n");
2927 (yyval
.instr
) = DSP32ALU (11, IS_H ((yyvsp
[-5].reg
)), 0, &(yyvsp
[-5].reg
), 0, 0, 0, 0, 1);
2930 return yyerror ("Register mismatch");
2935 #line 765 "bfin-parse.y"
2937 notethat ("dsp32alu: A_ZERO_DOT_H = dregs_hi\n");
2938 (yyval
.instr
) = DSP32ALU (9, IS_H ((yyvsp
[0].reg
)), 0, 0, &(yyvsp
[0].reg
), 0, 0, 0, 0);
2943 #line 770 "bfin-parse.y"
2945 notethat ("dsp32alu: A_ZERO_DOT_H = dregs_hi\n");
2946 (yyval
.instr
) = DSP32ALU (9, IS_H ((yyvsp
[0].reg
)), 0, 0, &(yyvsp
[0].reg
), 0, 0, 0, 2);
2951 #line 776 "bfin-parse.y"
2953 if (!IS_DREG ((yyvsp
[-15].reg
)) || !IS_DREG ((yyvsp
[-13].reg
)))
2954 return yyerror ("Dregs expected");
2955 else if (!valid_dreg_pair (&(yyvsp
[-8].reg
), (yyvsp
[-6].expr
)))
2956 return yyerror ("Bad dreg pair");
2957 else if (!valid_dreg_pair (&(yyvsp
[-4].reg
), (yyvsp
[-2].expr
)))
2958 return yyerror ("Bad dreg pair");
2961 notethat ("dsp32alu: (dregs , dregs ) = BYTEOP16P (dregs_pair , dregs_pair ) (half)\n");
2962 (yyval
.instr
) = DSP32ALU (21, 0, &(yyvsp
[-15].reg
), &(yyvsp
[-13].reg
), &(yyvsp
[-8].reg
), &(yyvsp
[-4].reg
), (yyvsp
[0].r0
).r0
, 0, 0);
2968 #line 792 "bfin-parse.y"
2970 if (!IS_DREG ((yyvsp
[-15].reg
)) || !IS_DREG((yyvsp
[-13].reg
)))
2971 return yyerror ("Dregs expected");
2972 else if (!valid_dreg_pair (&(yyvsp
[-8].reg
), (yyvsp
[-6].expr
)))
2973 return yyerror ("Bad dreg pair");
2974 else if (!valid_dreg_pair (&(yyvsp
[-4].reg
), (yyvsp
[-2].expr
)))
2975 return yyerror ("Bad dreg pair");
2978 notethat ("dsp32alu: (dregs , dregs ) = BYTEOP16M (dregs_pair , dregs_pair ) (aligndir)\n");
2979 (yyval
.instr
) = DSP32ALU (21, 0, &(yyvsp
[-15].reg
), &(yyvsp
[-13].reg
), &(yyvsp
[-8].reg
), &(yyvsp
[-4].reg
), (yyvsp
[0].r0
).r0
, 0, 1);
2985 #line 807 "bfin-parse.y"
2987 if (!IS_DREG ((yyvsp
[-9].reg
)) || !IS_DREG ((yyvsp
[-7].reg
)))
2988 return yyerror ("Dregs expected");
2989 else if (!valid_dreg_pair (&(yyvsp
[-3].reg
), (yyvsp
[-1].expr
)))
2990 return yyerror ("Bad dreg pair");
2993 notethat ("dsp32alu: (dregs , dregs ) = BYTEUNPACK dregs_pair (aligndir)\n");
2994 (yyval
.instr
) = DSP32ALU (24, 0, &(yyvsp
[-9].reg
), &(yyvsp
[-7].reg
), &(yyvsp
[-3].reg
), 0, (yyvsp
[0].r0
).r0
, 0, 1);
3000 #line 819 "bfin-parse.y"
3002 if (IS_DREG ((yyvsp
[-9].reg
)) && IS_DREG ((yyvsp
[-7].reg
)) && IS_DREG ((yyvsp
[-3].reg
)))
3004 notethat ("dsp32alu: (dregs , dregs ) = SEARCH dregs (searchmod)\n");
3005 (yyval
.instr
) = DSP32ALU (13, 0, &(yyvsp
[-9].reg
), &(yyvsp
[-7].reg
), &(yyvsp
[-3].reg
), 0, 0, 0, (yyvsp
[-1].r0
).r0
);
3008 return yyerror ("Register mismatch");
3013 #line 830 "bfin-parse.y"
3015 if (IS_DREG ((yyvsp
[-10].reg
)) && IS_DREG ((yyvsp
[-4].reg
)))
3017 notethat ("dsp32alu: dregs = A1.l + A1.h, dregs = A0.l + A0.h \n");
3018 (yyval
.instr
) = DSP32ALU (12, 0, &(yyvsp
[-10].reg
), &(yyvsp
[-4].reg
), 0, 0, 0, 0, 1);
3021 return yyerror ("Register mismatch");
3026 #line 842 "bfin-parse.y"
3028 if (IS_DREG ((yyvsp
[-11].reg
)) && IS_DREG ((yyvsp
[-5].reg
)) && !REG_SAME ((yyvsp
[-9].reg
), (yyvsp
[-7].reg
))
3029 && IS_A1 ((yyvsp
[-3].reg
)) && !IS_A1 ((yyvsp
[-1].reg
)))
3031 notethat ("dsp32alu: dregs = A1 + A0 , dregs = A1 - A0 (amod1)\n");
3032 (yyval
.instr
) = DSP32ALU (17, 0, &(yyvsp
[-11].reg
), &(yyvsp
[-5].reg
), 0, 0, (yyvsp
[0].modcodes
).s0
, (yyvsp
[0].modcodes
).x0
, 0);
3035 else if (IS_DREG ((yyvsp
[-11].reg
)) && IS_DREG ((yyvsp
[-5].reg
)) && !REG_SAME ((yyvsp
[-9].reg
), (yyvsp
[-7].reg
))
3036 && !IS_A1 ((yyvsp
[-3].reg
)) && IS_A1 ((yyvsp
[-1].reg
)))
3038 notethat ("dsp32alu: dregs = A0 + A1 , dregs = A0 - A1 (amod1)\n");
3039 (yyval
.instr
) = DSP32ALU (17, 0, &(yyvsp
[-11].reg
), &(yyvsp
[-5].reg
), 0, 0, (yyvsp
[0].modcodes
).s0
, (yyvsp
[0].modcodes
).x0
, 1);
3042 return yyerror ("Register mismatch");
3047 #line 861 "bfin-parse.y"
3049 if ((yyvsp
[-8].r0
).r0
== (yyvsp
[-2].r0
).r0
)
3050 return yyerror ("Operators must differ");
3052 if (IS_DREG ((yyvsp
[-11].reg
)) && IS_DREG ((yyvsp
[-9].reg
)) && IS_DREG ((yyvsp
[-7].reg
))
3053 && REG_SAME ((yyvsp
[-9].reg
), (yyvsp
[-3].reg
)) && REG_SAME ((yyvsp
[-7].reg
), (yyvsp
[-1].reg
)))
3055 notethat ("dsp32alu: dregs = dregs + dregs,"
3056 "dregs = dregs - dregs (amod1)\n");
3057 (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);
3060 return yyerror ("Register mismatch");
3065 #line 879 "bfin-parse.y"
3067 if (!REG_SAME ((yyvsp
[-9].reg
), (yyvsp
[-3].reg
)) || !REG_SAME ((yyvsp
[-7].reg
), (yyvsp
[-1].reg
)))
3068 return yyerror ("Differing source registers");
3070 if (!IS_DREG ((yyvsp
[-11].reg
)) || !IS_DREG ((yyvsp
[-9].reg
)) || !IS_DREG ((yyvsp
[-7].reg
)) || !IS_DREG ((yyvsp
[-5].reg
)))
3071 return yyerror ("Dregs expected");
3074 if ((yyvsp
[-8].r0
).r0
== 1 && (yyvsp
[-2].r0
).r0
== 2)
3076 notethat ("dsp32alu: dregs = dregs .|. dregs , dregs = dregs .|. dregs (amod2)\n");
3077 (yyval
.instr
) = DSP32ALU (1, 1, &(yyvsp
[-11].reg
), &(yyvsp
[-5].reg
), &(yyvsp
[-9].reg
), &(yyvsp
[-7].reg
), (yyvsp
[0].modcodes
).s0
, (yyvsp
[0].modcodes
).x0
, (yyvsp
[0].modcodes
).r0
);
3079 else if ((yyvsp
[-8].r0
).r0
== 0 && (yyvsp
[-2].r0
).r0
== 3)
3081 notethat ("dsp32alu: dregs = dregs .|. dregs , dregs = dregs .|. dregs (amod2)\n");
3082 (yyval
.instr
) = DSP32ALU (1, 0, &(yyvsp
[-11].reg
), &(yyvsp
[-5].reg
), &(yyvsp
[-9].reg
), &(yyvsp
[-7].reg
), (yyvsp
[0].modcodes
).s0
, (yyvsp
[0].modcodes
).x0
, (yyvsp
[0].modcodes
).r0
);
3085 return yyerror ("Bar operand mismatch");
3090 #line 902 "bfin-parse.y"
3094 if (IS_DREG ((yyvsp
[-4].reg
)) && IS_DREG ((yyvsp
[-1].reg
)))
3096 if ((yyvsp
[0].r0
).r0
)
3098 notethat ("dsp32alu: dregs = ABS dregs (v)\n");
3103 /* Vector version of ABS. */
3104 notethat ("dsp32alu: dregs = ABS dregs\n");
3107 (yyval
.instr
) = DSP32ALU (op
, 0, 0, &(yyvsp
[-4].reg
), &(yyvsp
[-1].reg
), 0, 0, 0, 2);
3110 return yyerror ("Dregs expected");
3115 #line 924 "bfin-parse.y"
3117 notethat ("dsp32alu: Ax = ABS Ax\n");
3118 (yyval
.instr
) = DSP32ALU (16, IS_A1 ((yyvsp
[-2].reg
)), 0, 0, 0, 0, 0, 0, IS_A1 ((yyvsp
[0].reg
)));
3123 #line 929 "bfin-parse.y"
3125 if (IS_DREG_L ((yyvsp
[0].reg
)))
3127 notethat ("dsp32alu: A0.l = reg_half\n");
3128 (yyval
.instr
) = DSP32ALU (9, IS_H ((yyvsp
[0].reg
)), 0, 0, &(yyvsp
[0].reg
), 0, 0, 0, 0);
3131 return yyerror ("A0.l = Rx.l expected");
3136 #line 939 "bfin-parse.y"
3138 if (IS_DREG_L ((yyvsp
[0].reg
)))
3140 notethat ("dsp32alu: A1.l = reg_half\n");
3141 (yyval
.instr
) = DSP32ALU (9, IS_H ((yyvsp
[0].reg
)), 0, 0, &(yyvsp
[0].reg
), 0, 0, 0, 2);
3144 return yyerror ("A1.l = Rx.l expected");
3149 #line 950 "bfin-parse.y"
3151 if (IS_DREG ((yyvsp
[-7].reg
)) && IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[-1].reg
)))
3153 notethat ("dsp32shift: dregs = ALIGN8 (dregs , dregs )\n");
3154 (yyval
.instr
) = DSP32SHIFT (13, &(yyvsp
[-7].reg
), &(yyvsp
[-1].reg
), &(yyvsp
[-3].reg
), (yyvsp
[-5].r0
).r0
, 0);
3157 return yyerror ("Dregs expected");
3162 #line 961 "bfin-parse.y"
3164 if (!IS_DREG ((yyvsp
[-12].reg
)))
3165 return yyerror ("Dregs expected");
3166 else if (!valid_dreg_pair (&(yyvsp
[-8].reg
), (yyvsp
[-6].expr
)))
3167 return yyerror ("Bad dreg pair");
3168 else if (!valid_dreg_pair (&(yyvsp
[-4].reg
), (yyvsp
[-2].expr
)))
3169 return yyerror ("Bad dreg pair");
3172 notethat ("dsp32alu: dregs = BYTEOP1P (dregs_pair , dregs_pair ) (T)\n");
3173 (yyval
.instr
) = DSP32ALU (20, 0, 0, &(yyvsp
[-12].reg
), &(yyvsp
[-8].reg
), &(yyvsp
[-4].reg
), (yyvsp
[0].modcodes
).s0
, 0, (yyvsp
[0].modcodes
).r0
);
3179 #line 975 "bfin-parse.y"
3181 if (!IS_DREG ((yyvsp
[-11].reg
)))
3182 return yyerror ("Dregs expected");
3183 else if (!valid_dreg_pair (&(yyvsp
[-7].reg
), (yyvsp
[-5].expr
)))
3184 return yyerror ("Bad dreg pair");
3185 else if (!valid_dreg_pair (&(yyvsp
[-3].reg
), (yyvsp
[-1].expr
)))
3186 return yyerror ("Bad dreg pair");
3189 notethat ("dsp32alu: dregs = BYTEOP1P (dregs_pair , dregs_pair ) (T)\n");
3190 (yyval
.instr
) = DSP32ALU (20, 0, 0, &(yyvsp
[-11].reg
), &(yyvsp
[-7].reg
), &(yyvsp
[-3].reg
), 0, 0, 0);
3196 #line 991 "bfin-parse.y"
3198 if (!IS_DREG ((yyvsp
[-12].reg
)))
3199 return yyerror ("Dregs expected");
3200 else if (!valid_dreg_pair (&(yyvsp
[-8].reg
), (yyvsp
[-6].expr
)))
3201 return yyerror ("Bad dreg pair");
3202 else if (!valid_dreg_pair (&(yyvsp
[-4].reg
), (yyvsp
[-2].expr
)))
3203 return yyerror ("Bad dreg pair");
3206 notethat ("dsp32alu: dregs = BYTEOP2P (dregs_pair , dregs_pair ) (rnd_op)\n");
3207 (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
);
3213 #line 1007 "bfin-parse.y"
3215 if (!IS_DREG ((yyvsp
[-12].reg
)))
3216 return yyerror ("Dregs expected");
3217 else if (!valid_dreg_pair (&(yyvsp
[-8].reg
), (yyvsp
[-6].expr
)))
3218 return yyerror ("Bad dreg pair");
3219 else if (!valid_dreg_pair (&(yyvsp
[-4].reg
), (yyvsp
[-2].expr
)))
3220 return yyerror ("Bad dreg pair");
3223 notethat ("dsp32alu: dregs = BYTEOP2P (dregs_pair , dregs_pair ) (rnd_op)\n");
3224 (yyval
.instr
) = DSP32ALU (22, (yyvsp
[0].modcodes
).r0
, 0, &(yyvsp
[-12].reg
), &(yyvsp
[-8].reg
), &(yyvsp
[-4].reg
), (yyvsp
[0].modcodes
).s0
, 0, (yyvsp
[0].modcodes
).x0
);
3230 #line 1023 "bfin-parse.y"
3232 if (!IS_DREG ((yyvsp
[-12].reg
)))
3233 return yyerror ("Dregs expected");
3234 else if (!valid_dreg_pair (&(yyvsp
[-8].reg
), (yyvsp
[-6].expr
)))
3235 return yyerror ("Bad dreg pair");
3236 else if (!valid_dreg_pair (&(yyvsp
[-4].reg
), (yyvsp
[-2].expr
)))
3237 return yyerror ("Bad dreg pair");
3240 notethat ("dsp32alu: dregs = BYTEOP3P (dregs_pair , dregs_pair ) (b3_op)\n");
3241 (yyval
.instr
) = DSP32ALU (23, (yyvsp
[0].modcodes
).x0
, 0, &(yyvsp
[-12].reg
), &(yyvsp
[-8].reg
), &(yyvsp
[-4].reg
), (yyvsp
[0].modcodes
).s0
, 0, 0);
3247 #line 1038 "bfin-parse.y"
3249 if (IS_DREG ((yyvsp
[-7].reg
)) && IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[-1].reg
)))
3251 notethat ("dsp32alu: dregs = BYTEPACK (dregs , dregs )\n");
3252 (yyval
.instr
) = DSP32ALU (24, 0, 0, &(yyvsp
[-7].reg
), &(yyvsp
[-3].reg
), &(yyvsp
[-1].reg
), 0, 0, 0);
3255 return yyerror ("Dregs expected");
3260 #line 1050 "bfin-parse.y"
3262 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
)))
3264 notethat ("dsp32alu: dregs_hi = dregs_lo ="
3265 "SIGN (dregs_hi) * dregs_hi + "
3266 "SIGN (dregs_lo) * dregs_lo \n");
3268 (yyval
.instr
) = DSP32ALU (12, 0, 0, &(yyvsp
[-16].reg
), &(yyvsp
[-10].reg
), &(yyvsp
[-7].reg
), 0, 0, 0);
3271 return yyerror ("Dregs expected");
3276 #line 1063 "bfin-parse.y"
3278 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[-1].reg
)))
3280 if ((yyvsp
[0].modcodes
).aop
== 0)
3282 /* No saturation flag specified, generate the 16 bit variant. */
3283 notethat ("COMP3op: dregs = dregs +- dregs\n");
3284 (yyval
.instr
) = COMP3OP (&(yyvsp
[-5].reg
), &(yyvsp
[-3].reg
), &(yyvsp
[-1].reg
), (yyvsp
[-2].r0
).r0
);
3288 /* Saturation flag specified, generate the 32 bit variant. */
3289 notethat ("dsp32alu: dregs = dregs +- dregs (amod1)\n");
3290 (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
);
3294 if (IS_PREG ((yyvsp
[-5].reg
)) && IS_PREG ((yyvsp
[-3].reg
)) && IS_PREG ((yyvsp
[-1].reg
)) && (yyvsp
[-2].r0
).r0
== 0)
3296 notethat ("COMP3op: pregs = pregs + pregs\n");
3297 (yyval
.instr
) = COMP3OP (&(yyvsp
[-5].reg
), &(yyvsp
[-3].reg
), &(yyvsp
[-1].reg
), 5);
3300 return yyerror ("Dregs expected");
3305 #line 1089 "bfin-parse.y"
3309 if (IS_DREG ((yyvsp
[-8].reg
)) && IS_DREG ((yyvsp
[-4].reg
)) && IS_DREG ((yyvsp
[-2].reg
)))
3311 if ((yyvsp
[0].r0
).r0
)
3316 notethat ("dsp32alu: dregs = {MIN|MAX} (dregs, dregs)\n");
3317 (yyval
.instr
) = DSP32ALU (op
, 0, 0, &(yyvsp
[-8].reg
), &(yyvsp
[-4].reg
), &(yyvsp
[-2].reg
), 0, 0, (yyvsp
[-6].r0
).r0
);
3320 return yyerror ("Dregs expected");
3325 #line 1107 "bfin-parse.y"
3327 notethat ("dsp32alu: Ax = - Ax\n");
3328 (yyval
.instr
) = DSP32ALU (14, IS_A1 ((yyvsp
[-2].reg
)), 0, 0, 0, 0, 0, 0, IS_A1 ((yyvsp
[0].reg
)));
3333 #line 1112 "bfin-parse.y"
3335 notethat ("dsp32alu: dregs_lo = dregs_lo +- dregs_lo (amod1)\n");
3336 (yyval
.instr
) = DSP32ALU (2 | (yyvsp
[-2].r0
).r0
, IS_H ((yyvsp
[-5].reg
)), 0, &(yyvsp
[-5].reg
), &(yyvsp
[-3].reg
), &(yyvsp
[-1].reg
),
3337 (yyvsp
[0].modcodes
).s0
, (yyvsp
[0].modcodes
).x0
, HL2 ((yyvsp
[-3].reg
), (yyvsp
[-1].reg
)));
3342 #line 1118 "bfin-parse.y"
3344 if (EXPR_VALUE ((yyvsp
[0].expr
)) == 0 && !REG_SAME ((yyvsp
[-2].reg
), (yyvsp
[-1].reg
)))
3346 notethat ("dsp32alu: A1 = A0 = 0\n");
3347 (yyval
.instr
) = DSP32ALU (8, 0, 0, 0, 0, 0, 0, 0, 2);
3350 return yyerror ("Bad value, 0 expected");
3355 #line 1130 "bfin-parse.y"
3357 if (REG_SAME ((yyvsp
[-4].reg
), (yyvsp
[-3].reg
)))
3359 notethat ("dsp32alu: Ax = Ax (S)\n");
3360 (yyval
.instr
) = DSP32ALU (8, 0, 0, 0, 0, 0, 1, 0, IS_A1 ((yyvsp
[-4].reg
)));
3363 return yyerror ("Registers must be equal");
3368 #line 1141 "bfin-parse.y"
3370 if (IS_DREG ((yyvsp
[-3].reg
)))
3372 notethat ("dsp32alu: dregs_half = dregs (RND)\n");
3373 (yyval
.instr
) = DSP32ALU (12, IS_H ((yyvsp
[-5].reg
)), 0, &(yyvsp
[-5].reg
), &(yyvsp
[-3].reg
), 0, 0, 0, 3);
3376 return yyerror ("Dregs expected");
3381 #line 1152 "bfin-parse.y"
3383 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-3].reg
)))
3385 notethat ("dsp32alu: dregs_half = dregs (+-) dregs (RND12)\n");
3386 (yyval
.instr
) = DSP32ALU (5, IS_H ((yyvsp
[-7].reg
)), 0, &(yyvsp
[-7].reg
), &(yyvsp
[-5].reg
), &(yyvsp
[-3].reg
), 0, 0, (yyvsp
[-4].r0
).r0
);
3389 return yyerror ("Dregs expected");
3394 #line 1163 "bfin-parse.y"
3396 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-3].reg
)))
3398 notethat ("dsp32alu: dregs_half = dregs -+ dregs (RND20)\n");
3399 (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);
3402 return yyerror ("Dregs expected");
3407 #line 1174 "bfin-parse.y"
3409 if (!REG_SAME ((yyvsp
[-1].reg
), (yyvsp
[0].reg
)))
3411 notethat ("dsp32alu: An = Am\n");
3412 (yyval
.instr
) = DSP32ALU (8, 0, 0, 0, 0, 0, IS_A1 ((yyvsp
[-1].reg
)), 0, 3);
3415 return yyerror ("Accu reg arguments must differ");
3420 #line 1185 "bfin-parse.y"
3422 if (IS_DREG ((yyvsp
[0].reg
)))
3424 notethat ("dsp32alu: An = dregs\n");
3425 (yyval
.instr
) = DSP32ALU (9, 0, 0, 0, &(yyvsp
[0].reg
), 0, 1, 0, IS_A1 ((yyvsp
[-1].reg
)) << 1);
3428 return yyerror ("Dregs expected");
3433 #line 1196 "bfin-parse.y"
3435 if (!IS_H ((yyvsp
[-1].reg
)))
3437 if ((yyvsp
[-3].reg
).regno
== REG_A0x
&& IS_DREG ((yyvsp
[-1].reg
)))
3439 notethat ("dsp32alu: A0.x = dregs_lo\n");
3440 (yyval
.instr
) = DSP32ALU (9, 0, 0, 0, &(yyvsp
[-1].reg
), 0, 0, 0, 1);
3442 else if ((yyvsp
[-3].reg
).regno
== REG_A1x
&& IS_DREG ((yyvsp
[-1].reg
)))
3444 notethat ("dsp32alu: A1.x = dregs_lo\n");
3445 (yyval
.instr
) = DSP32ALU (9, 0, 0, 0, &(yyvsp
[-1].reg
), 0, 0, 0, 3);
3447 else if (IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[-1].reg
)))
3449 notethat ("ALU2op: dregs = dregs_lo\n");
3450 (yyval
.instr
) = ALU2OP (&(yyvsp
[-3].reg
), &(yyvsp
[-1].reg
), 10 | ((yyvsp
[0].r0
).r0
? 0: 1));
3453 return yyerror ("Register mismatch");
3456 return yyerror ("Low reg expected");
3461 #line 1222 "bfin-parse.y"
3463 notethat ("LDIMMhalf: pregs_half = imm16\n");
3465 if (!IS_DREG ((yyvsp
[-2].reg
)) && !IS_PREG ((yyvsp
[-2].reg
)) && !IS_IREG ((yyvsp
[-2].reg
))
3466 && !IS_MREG ((yyvsp
[-2].reg
)) && !IS_BREG ((yyvsp
[-2].reg
)) && !IS_LREG ((yyvsp
[-2].reg
)))
3467 return yyerror ("Wrong register for load immediate");
3469 if (!IS_IMM ((yyvsp
[0].expr
), 16) && !IS_UIMM ((yyvsp
[0].expr
), 16))
3470 return yyerror ("Constant out of range");
3472 (yyval
.instr
) = LDIMMHALF_R (&(yyvsp
[-2].reg
), IS_H ((yyvsp
[-2].reg
)), 0, 0, (yyvsp
[0].expr
));
3477 #line 1236 "bfin-parse.y"
3479 notethat ("dsp32alu: An = 0\n");
3481 if (imm7 ((yyvsp
[0].expr
)) != 0)
3482 return yyerror ("0 expected");
3484 (yyval
.instr
) = DSP32ALU (8, 0, 0, 0, 0, 0, 0, 0, IS_A1 ((yyvsp
[-1].reg
)));
3489 #line 1246 "bfin-parse.y"
3491 if (!IS_DREG ((yyvsp
[-3].reg
)) && !IS_PREG ((yyvsp
[-3].reg
)) && !IS_IREG ((yyvsp
[-3].reg
))
3492 && !IS_MREG ((yyvsp
[-3].reg
)) && !IS_BREG ((yyvsp
[-3].reg
)) && !IS_LREG ((yyvsp
[-3].reg
)))
3493 return yyerror ("Wrong register for load immediate");
3495 if ((yyvsp
[0].r0
).r0
== 0)
3497 /* 7 bit immediate value if possible.
3498 We will check for that constant value for efficiency
3499 If it goes to reloc, it will be 16 bit. */
3500 if (IS_CONST ((yyvsp
[-1].expr
)) && IS_IMM ((yyvsp
[-1].expr
), 7) && IS_DREG ((yyvsp
[-3].reg
)))
3502 notethat ("COMPI2opD: dregs = imm7 (x) \n");
3503 (yyval
.instr
) = COMPI2OPD (&(yyvsp
[-3].reg
), imm7 ((yyvsp
[-1].expr
)), 0);
3505 else if (IS_CONST ((yyvsp
[-1].expr
)) && IS_IMM ((yyvsp
[-1].expr
), 7) && IS_PREG ((yyvsp
[-3].reg
)))
3507 notethat ("COMPI2opP: pregs = imm7 (x)\n");
3508 (yyval
.instr
) = COMPI2OPP (&(yyvsp
[-3].reg
), imm7 ((yyvsp
[-1].expr
)), 0);
3512 if (IS_CONST ((yyvsp
[-1].expr
)) && !IS_IMM ((yyvsp
[-1].expr
), 16))
3513 return yyerror ("Immediate value out of range");
3515 notethat ("LDIMMhalf: regs = luimm16 (x)\n");
3517 (yyval
.instr
) = LDIMMHALF_R5 (&(yyvsp
[-3].reg
), 0, 1, 0, (yyvsp
[-1].expr
));
3522 /* (z) There is no 7 bit zero extended instruction.
3523 If the expr is a relocation, generate it. */
3525 if (IS_CONST ((yyvsp
[-1].expr
)) && !IS_UIMM ((yyvsp
[-1].expr
), 16))
3526 return yyerror ("Immediate value out of range");
3528 notethat ("LDIMMhalf: regs = luimm16 (x)\n");
3530 (yyval
.instr
) = LDIMMHALF_R5 (&(yyvsp
[-3].reg
), 0, 0, 1, (yyvsp
[-1].expr
));
3536 #line 1291 "bfin-parse.y"
3538 if (IS_H ((yyvsp
[-2].reg
)))
3539 return yyerror ("Low reg expected");
3541 if (IS_DREG ((yyvsp
[-2].reg
)) && (yyvsp
[0].reg
).regno
== REG_A0x
)
3543 notethat ("dsp32alu: dregs_lo = A0.x\n");
3544 (yyval
.instr
) = DSP32ALU (10, 0, 0, &(yyvsp
[-2].reg
), 0, 0, 0, 0, 0);
3546 else if (IS_DREG ((yyvsp
[-2].reg
)) && (yyvsp
[0].reg
).regno
== REG_A1x
)
3548 notethat ("dsp32alu: dregs_lo = A1.x\n");
3549 (yyval
.instr
) = DSP32ALU (10, 0, 0, &(yyvsp
[-2].reg
), 0, 0, 0, 0, 1);
3552 return yyerror ("Register mismatch");
3557 #line 1310 "bfin-parse.y"
3559 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[-1].reg
)))
3561 notethat ("dsp32alu: dregs = dregs .|. dregs (amod0)\n");
3562 (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
);
3565 return yyerror ("Register mismatch");
3570 #line 1321 "bfin-parse.y"
3572 if (IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[-1].reg
)))
3574 notethat ("ALU2op: dregs = dregs_byte\n");
3575 (yyval
.instr
) = ALU2OP (&(yyvsp
[-3].reg
), &(yyvsp
[-1].reg
), 12 | ((yyvsp
[0].r0
).r0
? 0: 1));
3578 return yyerror ("Register mismatch");
3583 #line 1332 "bfin-parse.y"
3585 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
)))
3587 notethat ("dsp32alu: A1 = ABS A1 , A0 = ABS A0\n");
3588 (yyval
.instr
) = DSP32ALU (16, 0, 0, 0, 0, 0, 0, 0, 3);
3591 return yyerror ("Register mismatch");
3596 #line 1343 "bfin-parse.y"
3598 if (REG_SAME ((yyvsp
[-6].reg
), (yyvsp
[-4].reg
)) && REG_SAME ((yyvsp
[-2].reg
), (yyvsp
[0].reg
)) && !REG_SAME ((yyvsp
[-6].reg
), (yyvsp
[-2].reg
)))
3600 notethat ("dsp32alu: A1 = - A1 , A0 = - A0\n");
3601 (yyval
.instr
) = DSP32ALU (14, 0, 0, 0, 0, 0, 0, 0, 3);
3604 return yyerror ("Register mismatch");
3609 #line 1354 "bfin-parse.y"
3611 if (!IS_A1 ((yyvsp
[-2].reg
)) && IS_A1 ((yyvsp
[-1].reg
)))
3613 notethat ("dsp32alu: A0 -= A1\n");
3614 (yyval
.instr
) = DSP32ALU (11, 0, 0, 0, 0, 0, (yyvsp
[0].r0
).r0
, 0, 3);
3617 return yyerror ("Register mismatch");
3622 #line 1365 "bfin-parse.y"
3624 if (IS_IREG ((yyvsp
[-2].reg
)) && EXPR_VALUE ((yyvsp
[0].expr
)) == 4)
3626 notethat ("dagMODik: iregs -= 4\n");
3627 (yyval
.instr
) = DAGMODIK (&(yyvsp
[-2].reg
), 3);
3629 else if (IS_IREG ((yyvsp
[-2].reg
)) && EXPR_VALUE ((yyvsp
[0].expr
)) == 2)
3631 notethat ("dagMODik: iregs -= 2\n");
3632 (yyval
.instr
) = DAGMODIK (&(yyvsp
[-2].reg
), 1);
3635 return yyerror ("Register or value mismatch");
3640 #line 1381 "bfin-parse.y"
3642 if (IS_IREG ((yyvsp
[-5].reg
)) && IS_MREG ((yyvsp
[-3].reg
)))
3644 notethat ("dagMODim: iregs += mregs (opt_brev)\n");
3646 (yyval
.instr
) = DAGMODIM (&(yyvsp
[-5].reg
), &(yyvsp
[-3].reg
), 0, 1);
3648 else if (IS_PREG ((yyvsp
[-5].reg
)) && IS_PREG ((yyvsp
[-3].reg
)))
3650 notethat ("PTR2op: pregs += pregs (BREV )\n");
3651 (yyval
.instr
) = PTR2OP (&(yyvsp
[-5].reg
), &(yyvsp
[-3].reg
), 5);
3654 return yyerror ("Register mismatch");
3659 #line 1398 "bfin-parse.y"
3661 if (IS_IREG ((yyvsp
[-2].reg
)) && IS_MREG ((yyvsp
[0].reg
)))
3663 notethat ("dagMODim: iregs -= mregs\n");
3664 (yyval
.instr
) = DAGMODIM (&(yyvsp
[-2].reg
), &(yyvsp
[0].reg
), 1, 0);
3666 else if (IS_PREG ((yyvsp
[-2].reg
)) && IS_PREG ((yyvsp
[0].reg
)))
3668 notethat ("PTR2op: pregs -= pregs\n");
3669 (yyval
.instr
) = PTR2OP (&(yyvsp
[-2].reg
), &(yyvsp
[0].reg
), 0);
3672 return yyerror ("Register mismatch");
3677 #line 1414 "bfin-parse.y"
3679 if (!IS_A1 ((yyvsp
[-3].reg
)) && IS_A1 ((yyvsp
[-1].reg
)))
3681 notethat ("dsp32alu: A0 += A1 (W32)\n");
3682 (yyval
.instr
) = DSP32ALU (11, 0, 0, 0, 0, 0, (yyvsp
[0].r0
).r0
, 0, 2);
3685 return yyerror ("Register mismatch");
3690 #line 1425 "bfin-parse.y"
3692 if (IS_IREG ((yyvsp
[-2].reg
)) && IS_MREG ((yyvsp
[0].reg
)))
3694 notethat ("dagMODim: iregs += mregs\n");
3695 (yyval
.instr
) = DAGMODIM (&(yyvsp
[-2].reg
), &(yyvsp
[0].reg
), 0, 0);
3698 return yyerror ("iregs += mregs expected");
3703 #line 1436 "bfin-parse.y"
3705 if (IS_IREG ((yyvsp
[-2].reg
)))
3707 if (EXPR_VALUE ((yyvsp
[0].expr
)) == 4)
3709 notethat ("dagMODik: iregs += 4\n");
3710 (yyval
.instr
) = DAGMODIK (&(yyvsp
[-2].reg
), 2);
3712 else if (EXPR_VALUE ((yyvsp
[0].expr
)) == 2)
3714 notethat ("dagMODik: iregs += 2\n");
3715 (yyval
.instr
) = DAGMODIK (&(yyvsp
[-2].reg
), 0);
3718 return yyerror ("iregs += [ 2 | 4 ");
3720 else if (IS_PREG ((yyvsp
[-2].reg
)) && IS_IMM ((yyvsp
[0].expr
), 7))
3722 notethat ("COMPI2opP: pregs += imm7\n");
3723 (yyval
.instr
) = COMPI2OPP (&(yyvsp
[-2].reg
), imm7 ((yyvsp
[0].expr
)), 1);
3725 else if (IS_DREG ((yyvsp
[-2].reg
)) && IS_IMM ((yyvsp
[0].expr
), 7))
3727 notethat ("COMPI2opD: dregs += imm7\n");
3728 (yyval
.instr
) = COMPI2OPD (&(yyvsp
[-2].reg
), imm7 ((yyvsp
[0].expr
)), 1);
3730 else if ((IS_DREG ((yyvsp
[-2].reg
)) || IS_PREG ((yyvsp
[-2].reg
))) && IS_CONST ((yyvsp
[0].expr
)))
3731 return yyerror ("Immediate value out of range");
3733 return yyerror ("Register mismatch");
3738 #line 1469 "bfin-parse.y"
3740 if (IS_DREG ((yyvsp
[-2].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
3742 notethat ("ALU2op: dregs *= dregs\n");
3743 (yyval
.instr
) = ALU2OP (&(yyvsp
[-2].reg
), &(yyvsp
[0].reg
), 3);
3746 return yyerror ("Register mismatch");
3751 #line 1480 "bfin-parse.y"
3753 if (!valid_dreg_pair (&(yyvsp
[-8].reg
), (yyvsp
[-6].expr
)))
3754 return yyerror ("Bad dreg pair");
3755 else if (!valid_dreg_pair (&(yyvsp
[-4].reg
), (yyvsp
[-2].expr
)))
3756 return yyerror ("Bad dreg pair");
3759 notethat ("dsp32alu: SAA (dregs_pair , dregs_pair ) (aligndir)\n");
3760 (yyval
.instr
) = DSP32ALU (18, 0, 0, 0, &(yyvsp
[-8].reg
), &(yyvsp
[-4].reg
), (yyvsp
[0].r0
).r0
, 0, 0);
3766 #line 1493 "bfin-parse.y"
3768 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
)))
3770 notethat ("dsp32alu: A1 = A1 (S) , A0 = A0 (S)\n");
3771 (yyval
.instr
) = DSP32ALU (8, 0, 0, 0, 0, 0, 1, 0, 2);
3774 return yyerror ("Register mismatch");
3779 #line 1504 "bfin-parse.y"
3781 if (IS_DREG ((yyvsp
[-8].reg
)) && IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-3].reg
))
3782 && REG_SAME ((yyvsp
[-8].reg
), (yyvsp
[-5].reg
)))
3784 if (EXPR_VALUE ((yyvsp
[0].expr
)) == 1)
3786 notethat ("ALU2op: dregs = (dregs + dregs) << 1\n");
3787 (yyval
.instr
) = ALU2OP (&(yyvsp
[-8].reg
), &(yyvsp
[-3].reg
), 4);
3789 else if (EXPR_VALUE ((yyvsp
[0].expr
)) == 2)
3791 notethat ("ALU2op: dregs = (dregs + dregs) << 2\n");
3792 (yyval
.instr
) = ALU2OP (&(yyvsp
[-8].reg
), &(yyvsp
[-3].reg
), 5);
3795 return yyerror ("Bad shift value");
3797 else if (IS_PREG ((yyvsp
[-8].reg
)) && IS_PREG ((yyvsp
[-5].reg
)) && IS_PREG ((yyvsp
[-3].reg
))
3798 && REG_SAME ((yyvsp
[-8].reg
), (yyvsp
[-5].reg
)))
3800 if (EXPR_VALUE ((yyvsp
[0].expr
)) == 1)
3802 notethat ("PTR2op: pregs = (pregs + pregs) << 1\n");
3803 (yyval
.instr
) = PTR2OP (&(yyvsp
[-8].reg
), &(yyvsp
[-3].reg
), 6);
3805 else if (EXPR_VALUE ((yyvsp
[0].expr
)) == 2)
3807 notethat ("PTR2op: pregs = (pregs + pregs) << 2\n");
3808 (yyval
.instr
) = PTR2OP (&(yyvsp
[-8].reg
), &(yyvsp
[-3].reg
), 7);
3811 return yyerror ("Bad shift value");
3814 return yyerror ("Register mismatch");
3819 #line 1543 "bfin-parse.y"
3821 if (IS_DREG ((yyvsp
[-4].reg
)) && IS_DREG ((yyvsp
[-2].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
3823 notethat ("COMP3op: dregs = dregs | dregs\n");
3824 (yyval
.instr
) = COMP3OP (&(yyvsp
[-4].reg
), &(yyvsp
[-2].reg
), &(yyvsp
[0].reg
), 3);
3827 return yyerror ("Dregs expected");
3832 #line 1553 "bfin-parse.y"
3834 if (IS_DREG ((yyvsp
[-4].reg
)) && IS_DREG ((yyvsp
[-2].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
3836 notethat ("COMP3op: dregs = dregs ^ dregs\n");
3837 (yyval
.instr
) = COMP3OP (&(yyvsp
[-4].reg
), &(yyvsp
[-2].reg
), &(yyvsp
[0].reg
), 4);
3840 return yyerror ("Dregs expected");
3845 #line 1563 "bfin-parse.y"
3847 if (IS_PREG ((yyvsp
[-8].reg
)) && IS_PREG ((yyvsp
[-6].reg
)) && IS_PREG ((yyvsp
[-3].reg
)))
3849 if (EXPR_VALUE ((yyvsp
[-1].expr
)) == 1)
3851 notethat ("COMP3op: pregs = pregs + (pregs << 1)\n");
3852 (yyval
.instr
) = COMP3OP (&(yyvsp
[-8].reg
), &(yyvsp
[-6].reg
), &(yyvsp
[-3].reg
), 6);
3854 else if (EXPR_VALUE ((yyvsp
[-1].expr
)) == 2)
3856 notethat ("COMP3op: pregs = pregs + (pregs << 2)\n");
3857 (yyval
.instr
) = COMP3OP (&(yyvsp
[-8].reg
), &(yyvsp
[-6].reg
), &(yyvsp
[-3].reg
), 7);
3860 return yyerror ("Bad shift value");
3863 return yyerror ("Dregs expected");
3868 #line 1583 "bfin-parse.y"
3870 if ((yyvsp
[-2].reg
).regno
== REG_A0
&& (yyvsp
[0].reg
).regno
== REG_A1
)
3872 notethat ("CCflag: CC = A0 == A1\n");
3873 (yyval
.instr
) = CCFLAG (0, 0, 5, 0, 0);
3876 return yyerror ("AREGs are in bad order or same");
3881 #line 1593 "bfin-parse.y"
3883 if ((yyvsp
[-2].reg
).regno
== REG_A0
&& (yyvsp
[0].reg
).regno
== REG_A1
)
3885 notethat ("CCflag: CC = A0 < A1\n");
3886 (yyval
.instr
) = CCFLAG (0, 0, 6, 0, 0);
3889 return yyerror ("AREGs are in bad order or same");
3894 #line 1603 "bfin-parse.y"
3896 if (REG_CLASS((yyvsp
[-3].reg
)) == REG_CLASS((yyvsp
[-1].reg
)))
3898 notethat ("CCflag: CC = dpregs < dpregs\n");
3899 (yyval
.instr
) = CCFLAG (&(yyvsp
[-3].reg
), (yyvsp
[-1].reg
).regno
& CODE_MASK
, (yyvsp
[0].r0
).r0
, 0, IS_PREG ((yyvsp
[-3].reg
)) ? 1 : 0);
3902 return yyerror ("Compare only of same register class");
3907 #line 1613 "bfin-parse.y"
3909 if (((yyvsp
[0].r0
).r0
== 1 && IS_IMM ((yyvsp
[-1].expr
), 3))
3910 || ((yyvsp
[0].r0
).r0
== 3 && IS_UIMM ((yyvsp
[-1].expr
), 3)))
3912 notethat ("CCflag: CC = dpregs < (u)imm3\n");
3913 (yyval
.instr
) = CCFLAG (&(yyvsp
[-3].reg
), imm3 ((yyvsp
[-1].expr
)), (yyvsp
[0].r0
).r0
, 1, IS_PREG ((yyvsp
[-3].reg
)) ? 1 : 0);
3916 return yyerror ("Bad constant value");
3921 #line 1624 "bfin-parse.y"
3923 if (REG_CLASS((yyvsp
[-2].reg
)) == REG_CLASS((yyvsp
[0].reg
)))
3925 notethat ("CCflag: CC = dpregs == dpregs\n");
3926 (yyval
.instr
) = CCFLAG (&(yyvsp
[-2].reg
), (yyvsp
[0].reg
).regno
& CODE_MASK
, 0, 0, IS_PREG ((yyvsp
[-2].reg
)) ? 1 : 0);
3929 return yyerror ("Compare only of same register class");
3934 #line 1634 "bfin-parse.y"
3936 if (IS_IMM ((yyvsp
[0].expr
), 3))
3938 notethat ("CCflag: CC = dpregs == imm3\n");
3939 (yyval
.instr
) = CCFLAG (&(yyvsp
[-2].reg
), imm3 ((yyvsp
[0].expr
)), 0, 1, IS_PREG ((yyvsp
[-2].reg
)) ? 1 : 0);
3942 return yyerror ("Bad constant range");
3947 #line 1644 "bfin-parse.y"
3949 if ((yyvsp
[-2].reg
).regno
== REG_A0
&& (yyvsp
[0].reg
).regno
== REG_A1
)
3951 notethat ("CCflag: CC = A0 <= A1\n");
3952 (yyval
.instr
) = CCFLAG (0, 0, 7, 0, 0);
3955 return yyerror ("AREGs are in bad order or same");
3960 #line 1654 "bfin-parse.y"
3962 if (REG_CLASS((yyvsp
[-3].reg
)) == REG_CLASS((yyvsp
[-1].reg
)))
3964 notethat ("CCflag: CC = pregs <= pregs (..)\n");
3965 (yyval
.instr
) = CCFLAG (&(yyvsp
[-3].reg
), (yyvsp
[-1].reg
).regno
& CODE_MASK
,
3966 1 + (yyvsp
[0].r0
).r0
, 0, IS_PREG ((yyvsp
[-3].reg
)) ? 1 : 0);
3969 return yyerror ("Compare only of same register class");
3974 #line 1665 "bfin-parse.y"
3976 if (((yyvsp
[0].r0
).r0
== 1 && IS_IMM ((yyvsp
[-1].expr
), 3))
3977 || ((yyvsp
[0].r0
).r0
== 3 && IS_UIMM ((yyvsp
[-1].expr
), 3)))
3979 if (IS_DREG ((yyvsp
[-3].reg
)))
3981 notethat ("CCflag: CC = dregs <= (u)imm3\n");
3983 (yyval
.instr
) = CCFLAG (&(yyvsp
[-3].reg
), imm3 ((yyvsp
[-1].expr
)), 1 + (yyvsp
[0].r0
).r0
, 1, 0);
3985 else if (IS_PREG ((yyvsp
[-3].reg
)))
3987 notethat ("CCflag: CC = pregs <= (u)imm3\n");
3989 (yyval
.instr
) = CCFLAG (&(yyvsp
[-3].reg
), imm3 ((yyvsp
[-1].expr
)), 1 + (yyvsp
[0].r0
).r0
, 1, 1);
3992 return yyerror ("Dreg or Preg expected");
3995 return yyerror ("Bad constant value");
4000 #line 1689 "bfin-parse.y"
4002 if (IS_DREG ((yyvsp
[-4].reg
)) && IS_DREG ((yyvsp
[-2].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
4004 notethat ("COMP3op: dregs = dregs & dregs\n");
4005 (yyval
.instr
) = COMP3OP (&(yyvsp
[-4].reg
), &(yyvsp
[-2].reg
), &(yyvsp
[0].reg
), 2);
4008 return yyerror ("Dregs expected");
4013 #line 1700 "bfin-parse.y"
4015 notethat ("CC2stat operation\n");
4016 (yyval
.instr
) = bfin_gen_cc2stat ((yyvsp
[0].modcodes
).r0
, (yyvsp
[0].modcodes
).x0
, (yyvsp
[0].modcodes
).s0
);
4021 #line 1706 "bfin-parse.y"
4023 if (IS_ALLREG ((yyvsp
[-2].reg
)) && IS_ALLREG ((yyvsp
[0].reg
)))
4025 notethat ("REGMV: allregs = allregs\n");
4026 (yyval
.instr
) = bfin_gen_regmv (&(yyvsp
[0].reg
), &(yyvsp
[-2].reg
));
4029 return yyerror ("Register mismatch");
4034 #line 1717 "bfin-parse.y"
4036 if (IS_DREG ((yyvsp
[0].reg
)))
4038 notethat ("CC2dreg: CC = dregs\n");
4039 (yyval
.instr
) = bfin_gen_cc2dreg (1, &(yyvsp
[0].reg
));
4042 return yyerror ("Register mismatch");
4047 #line 1728 "bfin-parse.y"
4049 if (IS_DREG ((yyvsp
[-2].reg
)))
4051 notethat ("CC2dreg: dregs = CC\n");
4052 (yyval
.instr
) = bfin_gen_cc2dreg (0, &(yyvsp
[-2].reg
));
4055 return yyerror ("Register mismatch");
4060 #line 1739 "bfin-parse.y"
4062 notethat ("CC2dreg: CC =! CC\n");
4063 (yyval
.instr
) = bfin_gen_cc2dreg (3, 0);
4068 #line 1747 "bfin-parse.y"
4070 notethat ("dsp32mult: dregs_half = multiply_halfregs (opt_mode)\n");
4072 if (!IS_H ((yyvsp
[-3].reg
)) && (yyvsp
[0].mod
).MM
)
4073 return yyerror ("(M) not allowed with MAC0");
4075 if ((yyvsp
[0].mod
).mod
!= 0 && (yyvsp
[0].mod
).mod
!= M_FU
&& (yyvsp
[0].mod
).mod
!= M_IS
4076 && (yyvsp
[0].mod
).mod
!= M_IU
&& (yyvsp
[0].mod
).mod
!= M_T
&& (yyvsp
[0].mod
).mod
!= M_TFU
4077 && (yyvsp
[0].mod
).mod
!= M_S2RND
&& (yyvsp
[0].mod
).mod
!= M_ISS2
&& (yyvsp
[0].mod
).mod
!= M_IH
)
4078 return yyerror ("bad option.");
4080 if (IS_H ((yyvsp
[-3].reg
)))
4082 (yyval
.instr
) = DSP32MULT (0, (yyvsp
[0].mod
).MM
, (yyvsp
[0].mod
).mod
, 1, 0,
4083 IS_H ((yyvsp
[-1].macfunc
).s0
), IS_H ((yyvsp
[-1].macfunc
).s1
), 0, 0,
4084 &(yyvsp
[-3].reg
), 0, &(yyvsp
[-1].macfunc
).s0
, &(yyvsp
[-1].macfunc
).s1
, 0);
4088 (yyval
.instr
) = DSP32MULT (0, 0, (yyvsp
[0].mod
).mod
, 0, 0,
4089 0, 0, IS_H ((yyvsp
[-1].macfunc
).s0
), IS_H ((yyvsp
[-1].macfunc
).s1
),
4090 &(yyvsp
[-3].reg
), 0, &(yyvsp
[-1].macfunc
).s0
, &(yyvsp
[-1].macfunc
).s1
, 1);
4096 #line 1773 "bfin-parse.y"
4098 /* Odd registers can use (M). */
4099 if (!IS_DREG ((yyvsp
[-3].reg
)))
4100 return yyerror ("Dreg expected");
4102 if (IS_EVEN ((yyvsp
[-3].reg
)) && (yyvsp
[0].mod
).MM
)
4103 return yyerror ("(M) not allowed with MAC0");
4105 if ((yyvsp
[0].mod
).mod
!= 0 && (yyvsp
[0].mod
).mod
!= M_FU
&& (yyvsp
[0].mod
).mod
!= M_IS
4106 && (yyvsp
[0].mod
).mod
!= M_S2RND
&& (yyvsp
[0].mod
).mod
!= M_ISS2
)
4107 return yyerror ("bad option");
4109 if (!IS_EVEN ((yyvsp
[-3].reg
)))
4111 notethat ("dsp32mult: dregs = multiply_halfregs (opt_mode)\n");
4113 (yyval
.instr
) = DSP32MULT (0, (yyvsp
[0].mod
).MM
, (yyvsp
[0].mod
).mod
, 1, 1,
4114 IS_H ((yyvsp
[-1].macfunc
).s0
), IS_H ((yyvsp
[-1].macfunc
).s1
), 0, 0,
4115 &(yyvsp
[-3].reg
), 0, &(yyvsp
[-1].macfunc
).s0
, &(yyvsp
[-1].macfunc
).s1
, 0);
4119 notethat ("dsp32mult: dregs = multiply_halfregs opt_mode\n");
4120 (yyval
.instr
) = DSP32MULT (0, 0, (yyvsp
[0].mod
).mod
, 0, 1,
4121 0, 0, IS_H ((yyvsp
[-1].macfunc
).s0
), IS_H ((yyvsp
[-1].macfunc
).s1
),
4122 &(yyvsp
[-3].reg
), 0, &(yyvsp
[-1].macfunc
).s0
, &(yyvsp
[-1].macfunc
).s1
, 1);
4128 #line 1804 "bfin-parse.y"
4130 if (!IS_DREG ((yyvsp
[-8].reg
)) || !IS_DREG ((yyvsp
[-3].reg
)))
4131 return yyerror ("Dregs expected");
4133 if (!IS_HCOMPL((yyvsp
[-8].reg
), (yyvsp
[-3].reg
)))
4134 return yyerror ("Dest registers mismatch");
4136 if (check_multiply_halfregs (&(yyvsp
[-6].macfunc
), &(yyvsp
[-1].macfunc
)) < 0)
4139 if ((!IS_H ((yyvsp
[-8].reg
)) && (yyvsp
[-5].mod
).MM
)
4140 || (!IS_H ((yyvsp
[-3].reg
)) && (yyvsp
[0].mod
).MM
))
4141 return yyerror ("(M) not allowed with MAC0");
4143 notethat ("dsp32mult: dregs_hi = multiply_halfregs mxd_mod, "
4144 "dregs_lo = multiply_halfregs opt_mode\n");
4146 if (IS_H ((yyvsp
[-8].reg
)))
4147 (yyval
.instr
) = DSP32MULT (0, (yyvsp
[-5].mod
).MM
, (yyvsp
[0].mod
).mod
, 1, 0,
4148 IS_H ((yyvsp
[-6].macfunc
).s0
), IS_H ((yyvsp
[-6].macfunc
).s1
), IS_H ((yyvsp
[-1].macfunc
).s0
), IS_H ((yyvsp
[-1].macfunc
).s1
),
4149 &(yyvsp
[-8].reg
), 0, &(yyvsp
[-6].macfunc
).s0
, &(yyvsp
[-6].macfunc
).s1
, 1);
4151 (yyval
.instr
) = DSP32MULT (0, (yyvsp
[0].mod
).MM
, (yyvsp
[0].mod
).mod
, 1, 0,
4152 IS_H ((yyvsp
[-1].macfunc
).s0
), IS_H ((yyvsp
[-1].macfunc
).s1
), IS_H ((yyvsp
[-6].macfunc
).s0
), IS_H ((yyvsp
[-6].macfunc
).s1
),
4153 &(yyvsp
[-8].reg
), 0, &(yyvsp
[-6].macfunc
).s0
, &(yyvsp
[-6].macfunc
).s1
, 1);
4158 #line 1832 "bfin-parse.y"
4160 if (!IS_DREG ((yyvsp
[-8].reg
)) || !IS_DREG ((yyvsp
[-3].reg
)))
4161 return yyerror ("Dregs expected");
4163 if ((IS_EVEN ((yyvsp
[-8].reg
)) && (yyvsp
[-3].reg
).regno
- (yyvsp
[-8].reg
).regno
!= 1)
4164 || (IS_EVEN ((yyvsp
[-3].reg
)) && (yyvsp
[-8].reg
).regno
- (yyvsp
[-3].reg
).regno
!= 1))
4165 return yyerror ("Dest registers mismatch");
4167 if (check_multiply_halfregs (&(yyvsp
[-6].macfunc
), &(yyvsp
[-1].macfunc
)) < 0)
4170 if ((IS_EVEN ((yyvsp
[-8].reg
)) && (yyvsp
[-5].mod
).MM
)
4171 || (IS_EVEN ((yyvsp
[-3].reg
)) && (yyvsp
[0].mod
).MM
))
4172 return yyerror ("(M) not allowed with MAC0");
4174 notethat ("dsp32mult: dregs = multiply_halfregs mxd_mod, "
4175 "dregs = multiply_halfregs opt_mode\n");
4177 if (IS_EVEN ((yyvsp
[-8].reg
)))
4178 (yyval
.instr
) = DSP32MULT (0, (yyvsp
[0].mod
).MM
, (yyvsp
[0].mod
).mod
, 1, 1,
4179 IS_H ((yyvsp
[-1].macfunc
).s0
), IS_H ((yyvsp
[-1].macfunc
).s1
), IS_H ((yyvsp
[-6].macfunc
).s0
), IS_H ((yyvsp
[-6].macfunc
).s1
),
4180 &(yyvsp
[-8].reg
), 0, &(yyvsp
[-6].macfunc
).s0
, &(yyvsp
[-6].macfunc
).s1
, 1);
4182 (yyval
.instr
) = DSP32MULT (0, (yyvsp
[-5].mod
).MM
, (yyvsp
[0].mod
).mod
, 1, 1,
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);
4189 #line 1863 "bfin-parse.y"
4191 if (!REG_SAME ((yyvsp
[-4].reg
), (yyvsp
[-2].reg
)))
4192 return yyerror ("Aregs must be same");
4194 if (IS_DREG ((yyvsp
[0].reg
)) && !IS_H ((yyvsp
[0].reg
)))
4196 notethat ("dsp32shift: A0 = ASHIFT A0 BY dregs_lo\n");
4197 (yyval
.instr
) = DSP32SHIFT (3, 0, &(yyvsp
[0].reg
), 0, 0, IS_A1 ((yyvsp
[-4].reg
)));
4200 return yyerror ("Dregs expected");
4205 #line 1877 "bfin-parse.y"
4207 if (IS_DREG ((yyvsp
[-1].reg
)) && !IS_H ((yyvsp
[-1].reg
)))
4209 notethat ("dsp32shift: dregs_half = ASHIFT dregs_half BY dregs_lo\n");
4210 (yyval
.instr
) = DSP32SHIFT (0, &(yyvsp
[-6].reg
), &(yyvsp
[-1].reg
), &(yyvsp
[-3].reg
), (yyvsp
[0].modcodes
).s0
, HL2 ((yyvsp
[-6].reg
), (yyvsp
[-3].reg
)));
4213 return yyerror ("Dregs expected");
4218 #line 1888 "bfin-parse.y"
4220 if (!REG_SAME ((yyvsp
[-3].reg
), (yyvsp
[-2].reg
)))
4221 return yyerror ("Aregs must be same");
4223 if (IS_UIMM ((yyvsp
[0].expr
), 5))
4225 notethat ("dsp32shiftimm: A0 = A0 << uimm5\n");
4226 (yyval
.instr
) = DSP32SHIFTIMM (3, 0, imm5 ((yyvsp
[0].expr
)), 0, 0, IS_A1 ((yyvsp
[-3].reg
)));
4229 return yyerror ("Bad shift value");
4234 #line 1902 "bfin-parse.y"
4236 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-3].reg
)) && IS_UIMM ((yyvsp
[-1].expr
), 5))
4238 if ((yyvsp
[0].modcodes
).r0
)
4241 notethat ("dsp32shiftimm: dregs = dregs << expr (V, .)\n");
4242 (yyval
.instr
) = DSP32SHIFTIMM (1, &(yyvsp
[-5].reg
), imm4 ((yyvsp
[-1].expr
)), &(yyvsp
[-3].reg
), (yyvsp
[0].modcodes
).s0
? 1 : 2, 0);
4246 notethat ("dsp32shiftimm: dregs = dregs << uimm5 (.)\n");
4247 (yyval
.instr
) = DSP32SHIFTIMM (2, &(yyvsp
[-5].reg
), imm6 ((yyvsp
[-1].expr
)), &(yyvsp
[-3].reg
), (yyvsp
[0].modcodes
).s0
? 1 : 2, 0);
4250 else if ((yyvsp
[0].modcodes
).s0
== 0 && IS_PREG ((yyvsp
[-5].reg
)) && IS_PREG ((yyvsp
[-3].reg
)))
4252 if (EXPR_VALUE ((yyvsp
[-1].expr
)) == 2)
4254 notethat ("PTR2op: pregs = pregs << 2\n");
4255 (yyval
.instr
) = PTR2OP (&(yyvsp
[-5].reg
), &(yyvsp
[-3].reg
), 1);
4257 else if (EXPR_VALUE ((yyvsp
[-1].expr
)) == 1)
4259 notethat ("COMP3op: pregs = pregs << 1\n");
4260 (yyval
.instr
) = COMP3OP (&(yyvsp
[-5].reg
), &(yyvsp
[-3].reg
), &(yyvsp
[-3].reg
), 5);
4263 return yyerror ("Bad shift value");
4266 return yyerror ("Bad shift value or register");
4271 #line 1936 "bfin-parse.y"
4273 if (IS_UIMM ((yyvsp
[0].expr
), 4))
4275 notethat ("dsp32shiftimm: dregs_half = dregs_half << uimm4\n");
4276 (yyval
.instr
) = DSP32SHIFTIMM (0x0, &(yyvsp
[-4].reg
), imm5 ((yyvsp
[0].expr
)), &(yyvsp
[-2].reg
), 2, HL2 ((yyvsp
[-4].reg
), (yyvsp
[-2].reg
)));
4279 return yyerror ("Bad shift value");
4284 #line 1946 "bfin-parse.y"
4286 if (IS_UIMM ((yyvsp
[-1].expr
), 4))
4288 notethat ("dsp32shiftimm: dregs_half = dregs_half << uimm4\n");
4289 (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
)));
4292 return yyerror ("Bad shift value");
4297 #line 1956 "bfin-parse.y"
4301 if (IS_DREG ((yyvsp
[-6].reg
)) && IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[-1].reg
)) && !IS_H ((yyvsp
[-1].reg
)))
4303 if ((yyvsp
[0].modcodes
).r0
)
4306 notethat ("dsp32shift: dregs = ASHIFT dregs BY "
4307 "dregs_lo (V, .)\n");
4313 notethat ("dsp32shift: dregs = ASHIFT dregs BY dregs_lo (.)\n");
4315 (yyval
.instr
) = DSP32SHIFT (op
, &(yyvsp
[-6].reg
), &(yyvsp
[-1].reg
), &(yyvsp
[-3].reg
), (yyvsp
[0].modcodes
).s0
, 0);
4318 return yyerror ("Dregs expected");
4323 #line 1981 "bfin-parse.y"
4325 if (IS_DREG_L ((yyvsp
[-8].reg
)) && IS_DREG_L ((yyvsp
[-4].reg
)) && IS_DREG_L ((yyvsp
[-2].reg
)))
4327 notethat ("dsp32shift: dregs_lo = EXPADJ (dregs , dregs_lo )\n");
4328 (yyval
.instr
) = DSP32SHIFT (7, &(yyvsp
[-8].reg
), &(yyvsp
[-2].reg
), &(yyvsp
[-4].reg
), (yyvsp
[0].r0
).r0
, 0);
4331 return yyerror ("Bad shift value or register");
4336 #line 1993 "bfin-parse.y"
4338 if (IS_DREG_L ((yyvsp
[-7].reg
)) && IS_DREG_L ((yyvsp
[-3].reg
)) && IS_DREG_L ((yyvsp
[-1].reg
)))
4340 notethat ("dsp32shift: dregs_lo = EXPADJ (dregs_lo, dregs_lo)\n");
4341 (yyval
.instr
) = DSP32SHIFT (7, &(yyvsp
[-7].reg
), &(yyvsp
[-1].reg
), &(yyvsp
[-3].reg
), 2, 0);
4343 else if (IS_DREG_L ((yyvsp
[-7].reg
)) && IS_DREG_H ((yyvsp
[-3].reg
)) && IS_DREG_L ((yyvsp
[-1].reg
)))
4345 notethat ("dsp32shift: dregs_lo = EXPADJ (dregs_hi, dregs_lo)\n");
4346 (yyval
.instr
) = DSP32SHIFT (7, &(yyvsp
[-7].reg
), &(yyvsp
[-1].reg
), &(yyvsp
[-3].reg
), 3, 0);
4349 return yyerror ("Bad shift value or register");
4354 #line 2011 "bfin-parse.y"
4356 if (IS_DREG ((yyvsp
[-7].reg
)) && IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[-1].reg
)))
4358 notethat ("dsp32shift: dregs = DEPOSIT (dregs , dregs )\n");
4359 (yyval
.instr
) = DSP32SHIFT (10, &(yyvsp
[-7].reg
), &(yyvsp
[-1].reg
), &(yyvsp
[-3].reg
), 2, 0);
4362 return yyerror ("Register mismatch");
4367 #line 2022 "bfin-parse.y"
4369 if (IS_DREG ((yyvsp
[-10].reg
)) && IS_DREG ((yyvsp
[-6].reg
)) && IS_DREG ((yyvsp
[-4].reg
)))
4371 notethat ("dsp32shift: dregs = DEPOSIT (dregs , dregs ) (X)\n");
4372 (yyval
.instr
) = DSP32SHIFT (10, &(yyvsp
[-10].reg
), &(yyvsp
[-4].reg
), &(yyvsp
[-6].reg
), 3, 0);
4375 return yyerror ("Register mismatch");
4380 #line 2033 "bfin-parse.y"
4382 if (IS_DREG ((yyvsp
[-8].reg
)) && IS_DREG ((yyvsp
[-4].reg
)) && IS_DREG_L ((yyvsp
[-2].reg
)))
4384 notethat ("dsp32shift: dregs = EXTRACT (dregs, dregs_lo ) (.)\n");
4385 (yyval
.instr
) = DSP32SHIFT (10, &(yyvsp
[-8].reg
), &(yyvsp
[-2].reg
), &(yyvsp
[-4].reg
), (yyvsp
[0].r0
).r0
, 0);
4388 return yyerror ("Register mismatch");
4393 #line 2044 "bfin-parse.y"
4395 if (!REG_SAME ((yyvsp
[-3].reg
), (yyvsp
[-2].reg
)))
4396 return yyerror ("Aregs must be same");
4398 if (IS_UIMM ((yyvsp
[0].expr
), 5))
4400 notethat ("dsp32shiftimm: Ax = Ax >>> uimm5\n");
4401 (yyval
.instr
) = DSP32SHIFTIMM (3, 0, -imm6 ((yyvsp
[0].expr
)), 0, 0, IS_A1 ((yyvsp
[-3].reg
)));
4404 return yyerror ("Shift value range error");
4409 #line 2057 "bfin-parse.y"
4411 if (REG_SAME ((yyvsp
[-4].reg
), (yyvsp
[-2].reg
)) && IS_DREG_L ((yyvsp
[0].reg
)))
4413 notethat ("dsp32shift: Ax = LSHIFT Ax BY dregs_lo\n");
4414 (yyval
.instr
) = DSP32SHIFT (3, 0, &(yyvsp
[0].reg
), 0, 1, IS_A1 ((yyvsp
[-4].reg
)));
4417 return yyerror ("Register mismatch");
4422 #line 2068 "bfin-parse.y"
4424 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-2].reg
)) && IS_DREG_L ((yyvsp
[0].reg
)))
4426 notethat ("dsp32shift: dregs_lo = LSHIFT dregs_hi BY dregs_lo\n");
4427 (yyval
.instr
) = DSP32SHIFT (0, &(yyvsp
[-5].reg
), &(yyvsp
[0].reg
), &(yyvsp
[-2].reg
), 2, HL2 ((yyvsp
[-5].reg
), (yyvsp
[-2].reg
)));
4430 return yyerror ("Register mismatch");
4435 #line 2079 "bfin-parse.y"
4437 if (IS_DREG ((yyvsp
[-6].reg
)) && IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG_L ((yyvsp
[-1].reg
)))
4439 notethat ("dsp32shift: dregs = LSHIFT dregs BY dregs_lo (V )\n");
4440 (yyval
.instr
) = DSP32SHIFT ((yyvsp
[0].r0
).r0
? 1: 2, &(yyvsp
[-6].reg
), &(yyvsp
[-1].reg
), &(yyvsp
[-3].reg
), 2, 0);
4443 return yyerror ("Register mismatch");
4448 #line 2090 "bfin-parse.y"
4450 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-2].reg
)) && IS_DREG_L ((yyvsp
[0].reg
)))
4452 notethat ("dsp32shift: dregs = SHIFT dregs BY dregs_lo\n");
4453 (yyval
.instr
) = DSP32SHIFT (2, &(yyvsp
[-5].reg
), &(yyvsp
[0].reg
), &(yyvsp
[-2].reg
), 2, 0);
4456 return yyerror ("Register mismatch");
4461 #line 2101 "bfin-parse.y"
4463 if (REG_SAME ((yyvsp
[-3].reg
), (yyvsp
[-2].reg
)) && IS_IMM ((yyvsp
[0].expr
), 6) >= 0)
4465 notethat ("dsp32shiftimm: Ax = Ax >> imm6\n");
4466 (yyval
.instr
) = DSP32SHIFTIMM (3, 0, -imm6 ((yyvsp
[0].expr
)), 0, 1, IS_A1 ((yyvsp
[-3].reg
)));
4469 return yyerror ("Accu register expected");
4474 #line 2112 "bfin-parse.y"
4476 if ((yyvsp
[0].r0
).r0
== 1)
4478 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-3].reg
)) && IS_UIMM ((yyvsp
[-1].expr
), 5))
4480 notethat ("dsp32shiftimm: dregs = dregs >> uimm5 (V)\n");
4481 (yyval
.instr
) = DSP32SHIFTIMM (1, &(yyvsp
[-5].reg
), -uimm5 ((yyvsp
[-1].expr
)), &(yyvsp
[-3].reg
), 2, 0);
4484 return yyerror ("Register mismatch");
4488 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-3].reg
)) && IS_UIMM ((yyvsp
[-1].expr
), 5))
4490 notethat ("dsp32shiftimm: dregs = dregs >> uimm5\n");
4491 (yyval
.instr
) = DSP32SHIFTIMM (2, &(yyvsp
[-5].reg
), -imm6 ((yyvsp
[-1].expr
)), &(yyvsp
[-3].reg
), 2, 0);
4493 else if (IS_PREG ((yyvsp
[-5].reg
)) && IS_PREG ((yyvsp
[-3].reg
)) && EXPR_VALUE ((yyvsp
[-1].expr
)) == 2)
4495 notethat ("PTR2op: pregs = pregs >> 2\n");
4496 (yyval
.instr
) = PTR2OP (&(yyvsp
[-5].reg
), &(yyvsp
[-3].reg
), 3);
4498 else if (IS_PREG ((yyvsp
[-5].reg
)) && IS_PREG ((yyvsp
[-3].reg
)) && EXPR_VALUE ((yyvsp
[-1].expr
)) == 1)
4500 notethat ("PTR2op: pregs = pregs >> 1\n");
4501 (yyval
.instr
) = PTR2OP (&(yyvsp
[-5].reg
), &(yyvsp
[-3].reg
), 4);
4504 return yyerror ("Register mismatch");
4510 #line 2145 "bfin-parse.y"
4512 if (IS_UIMM ((yyvsp
[0].expr
), 5))
4514 notethat ("dsp32shiftimm: dregs_half = dregs_half >> uimm5\n");
4515 (yyval
.instr
) = DSP32SHIFTIMM (0, &(yyvsp
[-4].reg
), -uimm5 ((yyvsp
[0].expr
)), &(yyvsp
[-2].reg
), 2, HL2 ((yyvsp
[-4].reg
), (yyvsp
[-2].reg
)));
4518 return yyerror ("Register mismatch");
4523 #line 2155 "bfin-parse.y"
4525 if (IS_UIMM ((yyvsp
[-1].expr
), 5))
4527 notethat ("dsp32shiftimm: dregs_half = dregs_half >>> uimm5\n");
4528 (yyval
.instr
) = DSP32SHIFTIMM (0, &(yyvsp
[-5].reg
), -uimm5 ((yyvsp
[-1].expr
)), &(yyvsp
[-3].reg
),
4529 (yyvsp
[0].modcodes
).s0
, HL2 ((yyvsp
[-5].reg
), (yyvsp
[-3].reg
)));
4532 return yyerror ("Register or modifier mismatch");
4537 #line 2168 "bfin-parse.y"
4539 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-3].reg
)) && IS_UIMM ((yyvsp
[-1].expr
), 5))
4541 if ((yyvsp
[0].modcodes
).r0
)
4544 notethat ("dsp32shiftimm: dregs = dregs >>> uimm5 (V, .)\n");
4545 (yyval
.instr
) = DSP32SHIFTIMM (1, &(yyvsp
[-5].reg
), -uimm5 ((yyvsp
[-1].expr
)), &(yyvsp
[-3].reg
), (yyvsp
[0].modcodes
).s0
, 0);
4549 notethat ("dsp32shiftimm: dregs = dregs >>> uimm5 (.)\n");
4550 (yyval
.instr
) = DSP32SHIFTIMM (2, &(yyvsp
[-5].reg
), -uimm5 ((yyvsp
[-1].expr
)), &(yyvsp
[-3].reg
), (yyvsp
[0].modcodes
).s0
, 0);
4554 return yyerror ("Register mismatch");
4559 #line 2188 "bfin-parse.y"
4561 if (IS_DREG_L ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
4563 notethat ("dsp32shift: dregs_lo = ONES dregs\n");
4564 (yyval
.instr
) = DSP32SHIFT (6, &(yyvsp
[-3].reg
), 0, &(yyvsp
[0].reg
), 3, 0);
4567 return yyerror ("Register mismatch");
4572 #line 2199 "bfin-parse.y"
4574 if (IS_DREG ((yyvsp
[-7].reg
)) && IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[-1].reg
)))
4576 notethat ("dsp32shift: dregs = PACK (dregs_hi , dregs_hi )\n");
4577 (yyval
.instr
) = DSP32SHIFT (4, &(yyvsp
[-7].reg
), &(yyvsp
[-1].reg
), &(yyvsp
[-3].reg
), HL2 ((yyvsp
[-3].reg
), (yyvsp
[-1].reg
)), 0);
4580 return yyerror ("Register mismatch");
4585 #line 2210 "bfin-parse.y"
4587 if (IS_DREG ((yyvsp
[-9].reg
))
4588 && (yyvsp
[-3].reg
).regno
== REG_A0
4589 && IS_DREG ((yyvsp
[-1].reg
)) && !IS_H ((yyvsp
[-9].reg
)) && !IS_A1 ((yyvsp
[-3].reg
)))
4591 notethat ("dsp32shift: dregs_lo = CC = BXORSHIFT (A0 , dregs )\n");
4592 (yyval
.instr
) = DSP32SHIFT (11, &(yyvsp
[-9].reg
), &(yyvsp
[-1].reg
), 0, 0, 0);
4595 return yyerror ("Register mismatch");
4600 #line 2223 "bfin-parse.y"
4602 if (IS_DREG ((yyvsp
[-9].reg
))
4603 && (yyvsp
[-3].reg
).regno
== REG_A0
4604 && IS_DREG ((yyvsp
[-1].reg
)) && !IS_H ((yyvsp
[-9].reg
)) && !IS_A1 ((yyvsp
[-3].reg
)))
4606 notethat ("dsp32shift: dregs_lo = CC = BXOR (A0 , dregs)\n");
4607 (yyval
.instr
) = DSP32SHIFT (11, &(yyvsp
[-9].reg
), &(yyvsp
[-1].reg
), 0, 1, 0);
4610 return yyerror ("Register mismatch");
4615 #line 2236 "bfin-parse.y"
4617 if (IS_DREG ((yyvsp
[-11].reg
)) && !IS_H ((yyvsp
[-11].reg
)) && !REG_SAME ((yyvsp
[-5].reg
), (yyvsp
[-3].reg
)))
4619 notethat ("dsp32shift: dregs_lo = CC = BXOR (A0 , A1 , CC)\n");
4620 (yyval
.instr
) = DSP32SHIFT (12, &(yyvsp
[-11].reg
), 0, 0, 1, 0);
4623 return yyerror ("Register mismatch");
4628 #line 2247 "bfin-parse.y"
4630 if (REG_SAME ((yyvsp
[-4].reg
), (yyvsp
[-2].reg
)) && IS_DREG_L ((yyvsp
[0].reg
)))
4632 notethat ("dsp32shift: Ax = ROT Ax BY dregs_lo\n");
4633 (yyval
.instr
) = DSP32SHIFT (3, 0, &(yyvsp
[0].reg
), 0, 2, IS_A1 ((yyvsp
[-4].reg
)));
4636 return yyerror ("Register mismatch");
4641 #line 2258 "bfin-parse.y"
4643 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-2].reg
)) && IS_DREG_L ((yyvsp
[0].reg
)))
4645 notethat ("dsp32shift: dregs = ROT dregs BY dregs_lo\n");
4646 (yyval
.instr
) = DSP32SHIFT (2, &(yyvsp
[-5].reg
), &(yyvsp
[0].reg
), &(yyvsp
[-2].reg
), 3, 0);
4649 return yyerror ("Register mismatch");
4654 #line 2269 "bfin-parse.y"
4656 if (IS_IMM ((yyvsp
[0].expr
), 6))
4658 notethat ("dsp32shiftimm: An = ROT An BY imm6\n");
4659 (yyval
.instr
) = DSP32SHIFTIMM (3, 0, imm6 ((yyvsp
[0].expr
)), 0, 2, IS_A1 ((yyvsp
[-4].reg
)));
4662 return yyerror ("Register mismatch");
4667 #line 2280 "bfin-parse.y"
4669 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_DREG ((yyvsp
[-2].reg
)) && IS_IMM ((yyvsp
[0].expr
), 6))
4671 (yyval
.instr
) = DSP32SHIFTIMM (2, &(yyvsp
[-5].reg
), imm6 ((yyvsp
[0].expr
)), &(yyvsp
[-2].reg
), 3, IS_A1 ((yyvsp
[-5].reg
)));
4674 return yyerror ("Register mismatch");
4679 #line 2290 "bfin-parse.y"
4681 if (IS_DREG_L ((yyvsp
[-3].reg
)))
4683 notethat ("dsp32shift: dregs_lo = SIGNBITS An\n");
4684 (yyval
.instr
) = DSP32SHIFT (6, &(yyvsp
[-3].reg
), 0, 0, IS_A1 ((yyvsp
[0].reg
)), 0);
4687 return yyerror ("Register mismatch");
4692 #line 2301 "bfin-parse.y"
4694 if (IS_DREG_L ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
4696 notethat ("dsp32shift: dregs_lo = SIGNBITS dregs\n");
4697 (yyval
.instr
) = DSP32SHIFT (5, &(yyvsp
[-3].reg
), 0, &(yyvsp
[0].reg
), 0, 0);
4700 return yyerror ("Register mismatch");
4705 #line 2312 "bfin-parse.y"
4707 if (IS_DREG_L ((yyvsp
[-3].reg
)))
4709 notethat ("dsp32shift: dregs_lo = SIGNBITS dregs_lo\n");
4710 (yyval
.instr
) = DSP32SHIFT (5, &(yyvsp
[-3].reg
), 0, &(yyvsp
[0].reg
), 1 + IS_H ((yyvsp
[0].reg
)), 0);
4713 return yyerror ("Register mismatch");
4718 #line 2324 "bfin-parse.y"
4720 if (IS_DREG_L ((yyvsp
[-6].reg
)) && IS_DREG ((yyvsp
[-2].reg
)))
4722 notethat ("dsp32shift: dregs_lo = VIT_MAX (dregs) (..)\n");
4723 (yyval
.instr
) = DSP32SHIFT (9, &(yyvsp
[-6].reg
), 0, &(yyvsp
[-2].reg
), ((yyvsp
[0].r0
).r0
? 0 : 1), 0);
4726 return yyerror ("Register mismatch");
4731 #line 2335 "bfin-parse.y"
4733 if (IS_DREG ((yyvsp
[-8].reg
)) && IS_DREG ((yyvsp
[-4].reg
)) && IS_DREG ((yyvsp
[-2].reg
)))
4735 notethat ("dsp32shift: dregs = VIT_MAX (dregs, dregs) (ASR)\n");
4736 (yyval
.instr
) = DSP32SHIFT (9, &(yyvsp
[-8].reg
), &(yyvsp
[-2].reg
), &(yyvsp
[-4].reg
), 2 | ((yyvsp
[0].r0
).r0
? 0 : 1), 0);
4739 return yyerror ("Register mismatch");
4744 #line 2346 "bfin-parse.y"
4746 if (IS_DREG ((yyvsp
[-6].reg
)) && IS_DREG ((yyvsp
[-4].reg
)) && !IS_A1 ((yyvsp
[-2].reg
)))
4748 notethat ("dsp32shift: BITMUX (dregs , dregs , A0) (ASR)\n");
4749 (yyval
.instr
) = DSP32SHIFT (8, 0, &(yyvsp
[-6].reg
), &(yyvsp
[-4].reg
), (yyvsp
[0].r0
).r0
, 0);
4752 return yyerror ("Register mismatch");
4757 #line 2357 "bfin-parse.y"
4759 if (!IS_A1 ((yyvsp
[-8].reg
)) && !IS_A1 ((yyvsp
[-5].reg
)) && IS_A1 ((yyvsp
[-3].reg
)))
4761 notethat ("dsp32shift: A0 = BXORSHIFT (A0 , A1 , CC )\n");
4762 (yyval
.instr
) = DSP32SHIFT (12, 0, 0, 0, 0, 0);
4765 return yyerror ("Dregs expected");
4770 #line 2370 "bfin-parse.y"
4772 if (IS_DREG ((yyvsp
[-3].reg
)) && IS_UIMM ((yyvsp
[-1].expr
), 5))
4774 notethat ("LOGI2op: BITCLR (dregs , uimm5 )\n");
4775 (yyval
.instr
) = LOGI2OP ((yyvsp
[-3].reg
), uimm5 ((yyvsp
[-1].expr
)), 4);
4778 return yyerror ("Register mismatch");
4783 #line 2382 "bfin-parse.y"
4785 if (IS_DREG ((yyvsp
[-3].reg
)) && IS_UIMM ((yyvsp
[-1].expr
), 5))
4787 notethat ("LOGI2op: BITCLR (dregs , uimm5 )\n");
4788 (yyval
.instr
) = LOGI2OP ((yyvsp
[-3].reg
), uimm5 ((yyvsp
[-1].expr
)), 2);
4791 return yyerror ("Register mismatch");
4796 #line 2394 "bfin-parse.y"
4798 if (IS_DREG ((yyvsp
[-3].reg
)) && IS_UIMM ((yyvsp
[-1].expr
), 5))
4800 notethat ("LOGI2op: BITCLR (dregs , uimm5 )\n");
4801 (yyval
.instr
) = LOGI2OP ((yyvsp
[-3].reg
), uimm5 ((yyvsp
[-1].expr
)), 3);
4804 return yyerror ("Register mismatch");
4809 #line 2405 "bfin-parse.y"
4811 if (IS_DREG ((yyvsp
[-3].reg
)) && IS_UIMM ((yyvsp
[-1].expr
), 5))
4813 notethat ("LOGI2op: CC =! BITTST (dregs , uimm5 )\n");
4814 (yyval
.instr
) = LOGI2OP ((yyvsp
[-3].reg
), uimm5 ((yyvsp
[-1].expr
)), 0);
4817 return yyerror ("Register mismatch or value error");
4822 #line 2416 "bfin-parse.y"
4824 if (IS_DREG ((yyvsp
[-3].reg
)) && IS_UIMM ((yyvsp
[-1].expr
), 5))
4826 notethat ("LOGI2op: CC = BITTST (dregs , uimm5 )\n");
4827 (yyval
.instr
) = LOGI2OP ((yyvsp
[-3].reg
), uimm5 ((yyvsp
[-1].expr
)), 1);
4830 return yyerror ("Register mismatch or value error");
4835 #line 2427 "bfin-parse.y"
4837 if ((IS_DREG ((yyvsp
[-2].reg
)) || IS_PREG ((yyvsp
[-2].reg
)))
4838 && (IS_DREG ((yyvsp
[0].reg
)) || IS_PREG ((yyvsp
[0].reg
))))
4840 notethat ("ccMV: IF ! CC gregs = gregs\n");
4841 (yyval
.instr
) = CCMV (&(yyvsp
[0].reg
), &(yyvsp
[-2].reg
), 0);
4844 return yyerror ("Register mismatch");
4849 #line 2439 "bfin-parse.y"
4851 if ((IS_DREG ((yyvsp
[0].reg
)) || IS_PREG ((yyvsp
[0].reg
)))
4852 && (IS_DREG ((yyvsp
[-2].reg
)) || IS_PREG ((yyvsp
[-2].reg
))))
4854 notethat ("ccMV: IF CC gregs = gregs\n");
4855 (yyval
.instr
) = CCMV (&(yyvsp
[0].reg
), &(yyvsp
[-2].reg
), 1);
4858 return yyerror ("Register mismatch");
4863 #line 2451 "bfin-parse.y"
4865 if (IS_PCREL10 ((yyvsp
[0].expr
)))
4867 notethat ("BRCC: IF !CC JUMP pcrel11m2\n");
4868 (yyval
.instr
) = BRCC (0, 0, (yyvsp
[0].expr
));
4871 return yyerror ("Bad jump offset");
4876 #line 2462 "bfin-parse.y"
4878 if (IS_PCREL10 ((yyvsp
[-3].expr
)))
4880 notethat ("BRCC: IF !CC JUMP pcrel11m2\n");
4881 (yyval
.instr
) = BRCC (0, 1, (yyvsp
[-3].expr
));
4884 return yyerror ("Bad jump offset");
4889 #line 2473 "bfin-parse.y"
4891 if (IS_PCREL10 ((yyvsp
[0].expr
)))
4893 notethat ("BRCC: IF CC JUMP pcrel11m2\n");
4894 (yyval
.instr
) = BRCC (1, 0, (yyvsp
[0].expr
));
4897 return yyerror ("Bad jump offset");
4902 #line 2484 "bfin-parse.y"
4904 if (IS_PCREL10 ((yyvsp
[-3].expr
)))
4906 notethat ("BRCC: IF !CC JUMP pcrel11m2\n");
4907 (yyval
.instr
) = BRCC (1, 1, (yyvsp
[-3].expr
));
4910 return yyerror ("Bad jump offset");
4915 #line 2494 "bfin-parse.y"
4917 notethat ("ProgCtrl: NOP\n");
4918 (yyval
.instr
) = PROGCTRL (0, 0);
4923 #line 2500 "bfin-parse.y"
4925 notethat ("ProgCtrl: RTS\n");
4926 (yyval
.instr
) = PROGCTRL (1, 0);
4931 #line 2506 "bfin-parse.y"
4933 notethat ("ProgCtrl: RTI\n");
4934 (yyval
.instr
) = PROGCTRL (1, 1);
4939 #line 2512 "bfin-parse.y"
4941 notethat ("ProgCtrl: RTX\n");
4942 (yyval
.instr
) = PROGCTRL (1, 2);
4947 #line 2518 "bfin-parse.y"
4949 notethat ("ProgCtrl: RTN\n");
4950 (yyval
.instr
) = PROGCTRL (1, 3);
4955 #line 2524 "bfin-parse.y"
4957 notethat ("ProgCtrl: RTE\n");
4958 (yyval
.instr
) = PROGCTRL (1, 4);
4963 #line 2530 "bfin-parse.y"
4965 notethat ("ProgCtrl: IDLE\n");
4966 (yyval
.instr
) = PROGCTRL (2, 0);
4971 #line 2536 "bfin-parse.y"
4973 notethat ("ProgCtrl: CSYNC\n");
4974 (yyval
.instr
) = PROGCTRL (2, 3);
4979 #line 2542 "bfin-parse.y"
4981 notethat ("ProgCtrl: SSYNC\n");
4982 (yyval
.instr
) = PROGCTRL (2, 4);
4987 #line 2548 "bfin-parse.y"
4989 notethat ("ProgCtrl: EMUEXCPT\n");
4990 (yyval
.instr
) = PROGCTRL (2, 5);
4995 #line 2554 "bfin-parse.y"
4997 if (IS_DREG ((yyvsp
[0].reg
)))
4999 notethat ("ProgCtrl: CLI dregs\n");
5000 (yyval
.instr
) = PROGCTRL (3, (yyvsp
[0].reg
).regno
& CODE_MASK
);
5003 return yyerror ("Dreg expected for CLI");
5008 #line 2565 "bfin-parse.y"
5010 if (IS_DREG ((yyvsp
[0].reg
)))
5012 notethat ("ProgCtrl: STI dregs\n");
5013 (yyval
.instr
) = PROGCTRL (4, (yyvsp
[0].reg
).regno
& CODE_MASK
);
5016 return yyerror ("Dreg expected for STI");
5021 #line 2576 "bfin-parse.y"
5023 if (IS_PREG ((yyvsp
[-1].reg
)))
5025 notethat ("ProgCtrl: JUMP (pregs )\n");
5026 (yyval
.instr
) = PROGCTRL (5, (yyvsp
[-1].reg
).regno
& CODE_MASK
);
5029 return yyerror ("Bad register for indirect jump");
5034 #line 2587 "bfin-parse.y"
5036 if (IS_PREG ((yyvsp
[-1].reg
)))
5038 notethat ("ProgCtrl: CALL (pregs )\n");
5039 (yyval
.instr
) = PROGCTRL (6, (yyvsp
[-1].reg
).regno
& CODE_MASK
);
5042 return yyerror ("Bad register for indirect call");
5047 #line 2598 "bfin-parse.y"
5049 if (IS_PREG ((yyvsp
[-1].reg
)))
5051 notethat ("ProgCtrl: CALL (PC + pregs )\n");
5052 (yyval
.instr
) = PROGCTRL (7, (yyvsp
[-1].reg
).regno
& CODE_MASK
);
5055 return yyerror ("Bad register for indirect call");
5060 #line 2609 "bfin-parse.y"
5062 if (IS_PREG ((yyvsp
[-1].reg
)))
5064 notethat ("ProgCtrl: JUMP (PC + pregs )\n");
5065 (yyval
.instr
) = PROGCTRL (8, (yyvsp
[-1].reg
).regno
& CODE_MASK
);
5068 return yyerror ("Bad register for indirect jump");
5073 #line 2620 "bfin-parse.y"
5075 if (IS_UIMM ((yyvsp
[0].expr
), 4))
5077 notethat ("ProgCtrl: RAISE uimm4\n");
5078 (yyval
.instr
) = PROGCTRL (9, uimm4 ((yyvsp
[0].expr
)));
5081 return yyerror ("Bad value for RAISE");
5086 #line 2631 "bfin-parse.y"
5088 notethat ("ProgCtrl: EMUEXCPT\n");
5089 (yyval
.instr
) = PROGCTRL (10, uimm4 ((yyvsp
[0].expr
)));
5094 #line 2637 "bfin-parse.y"
5096 if (IS_PREG ((yyvsp
[-1].reg
)))
5098 notethat ("ProgCtrl: TESTSET (pregs )\n");
5099 (yyval
.instr
) = PROGCTRL (11, (yyvsp
[-1].reg
).regno
& CODE_MASK
);
5102 return yyerror ("Preg expected");
5107 #line 2648 "bfin-parse.y"
5109 if (IS_PCREL12 ((yyvsp
[0].expr
)))
5111 notethat ("UJUMP: JUMP pcrel12\n");
5112 (yyval
.instr
) = UJUMP ((yyvsp
[0].expr
));
5115 return yyerror ("Bad value for relative jump");
5120 #line 2659 "bfin-parse.y"
5122 if (IS_PCREL12 ((yyvsp
[0].expr
)))
5124 notethat ("UJUMP: JUMP_DOT_S pcrel12\n");
5125 (yyval
.instr
) = UJUMP((yyvsp
[0].expr
));
5128 return yyerror ("Bad value for relative jump");
5133 #line 2670 "bfin-parse.y"
5135 if (IS_PCREL24 ((yyvsp
[0].expr
)))
5137 notethat ("CALLa: jump.l pcrel24\n");
5138 (yyval
.instr
) = CALLA ((yyvsp
[0].expr
), 0);
5141 return yyerror ("Bad value for long jump");
5146 #line 2681 "bfin-parse.y"
5148 if (IS_PCREL24 ((yyvsp
[0].expr
)))
5150 notethat ("CALLa: jump.l pcrel24\n");
5151 (yyval
.instr
) = CALLA ((yyvsp
[0].expr
), 2);
5154 return yyerror ("Bad value for long jump");
5159 #line 2692 "bfin-parse.y"
5161 if (IS_PCREL24 ((yyvsp
[0].expr
)))
5163 notethat ("CALLa: CALL pcrel25m2\n");
5164 (yyval
.instr
) = CALLA ((yyvsp
[0].expr
), 1);
5167 return yyerror ("Bad call address");
5172 #line 2702 "bfin-parse.y"
5174 if (IS_PCREL24 ((yyvsp
[0].expr
)))
5176 notethat ("CALLa: CALL pcrel25m2\n");
5177 (yyval
.instr
) = CALLA ((yyvsp
[0].expr
), 2);
5180 return yyerror ("Bad call address");
5185 #line 2715 "bfin-parse.y"
5187 if (IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[-1].reg
)))
5188 (yyval
.instr
) = ALU2OP (&(yyvsp
[-3].reg
), &(yyvsp
[-1].reg
), 8);
5190 return yyerror ("Bad registers for DIVQ");
5195 #line 2723 "bfin-parse.y"
5197 if (IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[-1].reg
)))
5198 (yyval
.instr
) = ALU2OP (&(yyvsp
[-3].reg
), &(yyvsp
[-1].reg
), 9);
5200 return yyerror ("Bad registers for DIVS");
5205 #line 2731 "bfin-parse.y"
5207 if (IS_DREG ((yyvsp
[-4].reg
)) && IS_DREG ((yyvsp
[-1].reg
)))
5209 if ((yyvsp
[0].modcodes
).r0
== 0 && (yyvsp
[0].modcodes
).s0
== 0 && (yyvsp
[0].modcodes
).aop
== 0)
5211 notethat ("ALU2op: dregs = - dregs\n");
5212 (yyval
.instr
) = ALU2OP (&(yyvsp
[-4].reg
), &(yyvsp
[-1].reg
), 14);
5214 else if ((yyvsp
[0].modcodes
).r0
== 1 && (yyvsp
[0].modcodes
).s0
== 0 && (yyvsp
[0].modcodes
).aop
== 3)
5216 notethat ("dsp32alu: dregs = - dregs (.)\n");
5217 (yyval
.instr
) = DSP32ALU (15, 0, 0, &(yyvsp
[-4].reg
), &(yyvsp
[-1].reg
), 0, (yyvsp
[0].modcodes
).s0
, 0, 3);
5221 notethat ("dsp32alu: dregs = - dregs (.)\n");
5222 (yyval
.instr
) = DSP32ALU (7, 0, 0, &(yyvsp
[-4].reg
), &(yyvsp
[-1].reg
), 0, (yyvsp
[0].modcodes
).s0
, 0, 3);
5226 return yyerror ("Dregs expected");
5231 #line 2755 "bfin-parse.y"
5233 if (IS_DREG ((yyvsp
[-3].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
5235 notethat ("ALU2op: dregs = ~dregs\n");
5236 (yyval
.instr
) = ALU2OP (&(yyvsp
[-3].reg
), &(yyvsp
[0].reg
), 15);
5239 return yyerror ("Dregs expected");
5244 #line 2766 "bfin-parse.y"
5246 if (IS_DREG ((yyvsp
[-2].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
5248 notethat ("ALU2op: dregs >>= dregs\n");
5249 (yyval
.instr
) = ALU2OP (&(yyvsp
[-2].reg
), &(yyvsp
[0].reg
), 1);
5252 return yyerror ("Dregs expected");
5257 #line 2777 "bfin-parse.y"
5259 if (IS_DREG ((yyvsp
[-2].reg
)) && IS_UIMM ((yyvsp
[0].expr
), 5))
5261 notethat ("LOGI2op: dregs >>= uimm5\n");
5262 (yyval
.instr
) = LOGI2OP ((yyvsp
[-2].reg
), uimm5 ((yyvsp
[0].expr
)), 6);
5265 return yyerror ("Dregs expected or value error");
5270 #line 2788 "bfin-parse.y"
5272 if (IS_DREG ((yyvsp
[-2].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
5274 notethat ("ALU2op: dregs >>>= dregs\n");
5275 (yyval
.instr
) = ALU2OP (&(yyvsp
[-2].reg
), &(yyvsp
[0].reg
), 0);
5278 return yyerror ("Dregs expected");
5283 #line 2799 "bfin-parse.y"
5285 if (IS_DREG ((yyvsp
[-2].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
5287 notethat ("ALU2op: dregs <<= dregs\n");
5288 (yyval
.instr
) = ALU2OP (&(yyvsp
[-2].reg
), &(yyvsp
[0].reg
), 2);
5291 return yyerror ("Dregs expected");
5296 #line 2810 "bfin-parse.y"
5298 if (IS_DREG ((yyvsp
[-2].reg
)) && IS_UIMM ((yyvsp
[0].expr
), 5))
5300 notethat ("LOGI2op: dregs <<= uimm5\n");
5301 (yyval
.instr
) = LOGI2OP ((yyvsp
[-2].reg
), uimm5 ((yyvsp
[0].expr
)), 7);
5304 return yyerror ("Dregs expected or const value error");
5309 #line 2822 "bfin-parse.y"
5311 if (IS_DREG ((yyvsp
[-2].reg
)) && IS_UIMM ((yyvsp
[0].expr
), 5))
5313 notethat ("LOGI2op: dregs >>>= uimm5\n");
5314 (yyval
.instr
) = LOGI2OP ((yyvsp
[-2].reg
), uimm5 ((yyvsp
[0].expr
)), 5);
5317 return yyerror ("Dregs expected");
5322 #line 2835 "bfin-parse.y"
5324 notethat ("CaCTRL: FLUSH [ pregs ]\n");
5325 if (IS_PREG ((yyvsp
[-1].reg
)))
5326 (yyval
.instr
) = CACTRL (&(yyvsp
[-1].reg
), 0, 2);
5328 return yyerror ("Bad register(s) for FLUSH");
5333 #line 2844 "bfin-parse.y"
5335 if (IS_PREG ((yyvsp
[0].reg
)))
5337 notethat ("CaCTRL: FLUSH [ pregs ++ ]\n");
5338 (yyval
.instr
) = CACTRL (&(yyvsp
[0].reg
), 1, 2);
5341 return yyerror ("Bad register(s) for FLUSH");
5346 #line 2855 "bfin-parse.y"
5348 if (IS_PREG ((yyvsp
[-1].reg
)))
5350 notethat ("CaCTRL: FLUSHINV [ pregs ]\n");
5351 (yyval
.instr
) = CACTRL (&(yyvsp
[-1].reg
), 0, 1);
5354 return yyerror ("Bad register(s) for FLUSH");
5359 #line 2866 "bfin-parse.y"
5361 if (IS_PREG ((yyvsp
[0].reg
)))
5363 notethat ("CaCTRL: FLUSHINV [ pregs ++ ]\n");
5364 (yyval
.instr
) = CACTRL (&(yyvsp
[0].reg
), 1, 1);
5367 return yyerror ("Bad register(s) for FLUSH");
5372 #line 2878 "bfin-parse.y"
5374 if (IS_PREG ((yyvsp
[-1].reg
)))
5376 notethat ("CaCTRL: IFLUSH [ pregs ]\n");
5377 (yyval
.instr
) = CACTRL (&(yyvsp
[-1].reg
), 0, 3);
5380 return yyerror ("Bad register(s) for FLUSH");
5385 #line 2889 "bfin-parse.y"
5387 if (IS_PREG ((yyvsp
[0].reg
)))
5389 notethat ("CaCTRL: IFLUSH [ pregs ++ ]\n");
5390 (yyval
.instr
) = CACTRL (&(yyvsp
[0].reg
), 1, 3);
5393 return yyerror ("Bad register(s) for FLUSH");
5398 #line 2900 "bfin-parse.y"
5400 if (IS_PREG ((yyvsp
[-1].reg
)))
5402 notethat ("CaCTRL: PREFETCH [ pregs ]\n");
5403 (yyval
.instr
) = CACTRL (&(yyvsp
[-1].reg
), 0, 0);
5406 return yyerror ("Bad register(s) for PREFETCH");
5411 #line 2911 "bfin-parse.y"
5413 if (IS_PREG ((yyvsp
[0].reg
)))
5415 notethat ("CaCTRL: PREFETCH [ pregs ++ ]\n");
5416 (yyval
.instr
) = CACTRL (&(yyvsp
[0].reg
), 1, 0);
5419 return yyerror ("Bad register(s) for PREFETCH");
5424 #line 2925 "bfin-parse.y"
5426 if (IS_PREG ((yyvsp
[-4].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
5428 notethat ("LDST: B [ pregs <post_op> ] = dregs\n");
5429 (yyval
.instr
) = LDST (&(yyvsp
[-4].reg
), &(yyvsp
[0].reg
), (yyvsp
[-3].modcodes
).x0
, 2, 0, 1);
5432 return yyerror ("Register mismatch");
5437 #line 2937 "bfin-parse.y"
5439 if (IS_PREG ((yyvsp
[-5].reg
)) && IS_RANGE(16, (yyvsp
[-3].expr
), (yyvsp
[-4].r0
).r0
, 1) && IS_DREG ((yyvsp
[0].reg
)))
5441 notethat ("LDST: B [ pregs + imm16 ] = dregs\n");
5442 if ((yyvsp
[-4].r0
).r0
)
5443 neg_value ((yyvsp
[-3].expr
));
5444 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[-5].reg
), &(yyvsp
[0].reg
), 1, 2, 0, (yyvsp
[-3].expr
));
5447 return yyerror ("Register mismatch or const size wrong");
5452 #line 2952 "bfin-parse.y"
5454 if (IS_PREG ((yyvsp
[-5].reg
)) && IS_URANGE (4, (yyvsp
[-3].expr
), (yyvsp
[-4].r0
).r0
, 2) && IS_DREG ((yyvsp
[0].reg
)))
5456 notethat ("LDSTii: W [ pregs +- uimm5m2 ] = dregs\n");
5457 (yyval
.instr
) = LDSTII (&(yyvsp
[-5].reg
), &(yyvsp
[0].reg
), (yyvsp
[-3].expr
), 1, 1);
5459 else if (IS_PREG ((yyvsp
[-5].reg
)) && IS_RANGE(16, (yyvsp
[-3].expr
), (yyvsp
[-4].r0
).r0
, 2) && IS_DREG ((yyvsp
[0].reg
)))
5461 notethat ("LDSTidxI: W [ pregs + imm17m2 ] = dregs\n");
5462 if ((yyvsp
[-4].r0
).r0
)
5463 neg_value ((yyvsp
[-3].expr
));
5464 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[-5].reg
), &(yyvsp
[0].reg
), 1, 1, 0, (yyvsp
[-3].expr
));
5467 return yyerror ("Bad register(s) or wrong constant size");
5472 #line 2971 "bfin-parse.y"
5474 if (IS_PREG ((yyvsp
[-4].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
5476 notethat ("LDST: W [ pregs <post_op> ] = dregs\n");
5477 (yyval
.instr
) = LDST (&(yyvsp
[-4].reg
), &(yyvsp
[0].reg
), (yyvsp
[-3].modcodes
).x0
, 1, 0, 1);
5480 return yyerror ("Bad register(s) for STORE");
5485 #line 2982 "bfin-parse.y"
5487 if (IS_IREG ((yyvsp
[-4].reg
)))
5489 notethat ("dspLDST: W [ iregs <post_op> ] = dregs_half\n");
5490 (yyval
.instr
) = DSPLDST (&(yyvsp
[-4].reg
), 1 + IS_H ((yyvsp
[0].reg
)), &(yyvsp
[0].reg
), (yyvsp
[-3].modcodes
).x0
, 1);
5492 else if ((yyvsp
[-3].modcodes
).x0
== 2 && IS_PREG ((yyvsp
[-4].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
5494 notethat ("LDSTpmod: W [ pregs <post_op>] = dregs_half\n");
5495 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[-4].reg
), &(yyvsp
[0].reg
), &(yyvsp
[-4].reg
), 1 + IS_H ((yyvsp
[0].reg
)), 1);
5499 return yyerror ("Bad register(s) for STORE");
5504 #line 3000 "bfin-parse.y"
5506 Expr_Node
*tmp
= (yyvsp
[-3].expr
);
5507 int ispreg
= IS_PREG ((yyvsp
[0].reg
));
5509 if (!IS_PREG ((yyvsp
[-5].reg
)))
5510 return yyerror ("Preg expected for indirect");
5512 if (!IS_DREG ((yyvsp
[0].reg
)) && !ispreg
)
5513 return yyerror ("Bad source register for STORE");
5515 if ((yyvsp
[-4].r0
).r0
)
5516 tmp
= unary (Expr_Op_Type_NEG
, tmp
);
5518 if (in_range_p (tmp
, 0, 63, 3))
5520 notethat ("LDSTii: dpregs = [ pregs + uimm6m4 ]\n");
5521 (yyval
.instr
) = LDSTII (&(yyvsp
[-5].reg
), &(yyvsp
[0].reg
), tmp
, 1, ispreg
? 3 : 0);
5523 else if ((yyvsp
[-5].reg
).regno
== REG_FP
&& in_range_p (tmp
, -128, 0, 3))
5525 notethat ("LDSTiiFP: dpregs = [ FP - uimm7m4 ]\n");
5526 tmp
= unary (Expr_Op_Type_NEG
, tmp
);
5527 (yyval
.instr
) = LDSTIIFP (tmp
, &(yyvsp
[0].reg
), 1);
5529 else if (in_range_p (tmp
, -131072, 131071, 3))
5531 notethat ("LDSTidxI: [ pregs + imm18m4 ] = dpregs\n");
5532 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[-5].reg
), &(yyvsp
[0].reg
), 1, 0, ispreg
? 1: 0, tmp
);
5535 return yyerror ("Displacement out of range for store");
5540 #line 3034 "bfin-parse.y"
5542 if (IS_DREG ((yyvsp
[-8].reg
)) && IS_PREG ((yyvsp
[-4].reg
)) && IS_URANGE (4, (yyvsp
[-2].expr
), (yyvsp
[-3].r0
).r0
, 2))
5544 notethat ("LDSTii: dregs = W [ pregs + uimm4s2 ] (.)\n");
5545 (yyval
.instr
) = LDSTII (&(yyvsp
[-4].reg
), &(yyvsp
[-8].reg
), (yyvsp
[-2].expr
), 0, 1 << (yyvsp
[0].r0
).r0
);
5547 else if (IS_DREG ((yyvsp
[-8].reg
)) && IS_PREG ((yyvsp
[-4].reg
)) && IS_RANGE(16, (yyvsp
[-2].expr
), (yyvsp
[-3].r0
).r0
, 2))
5549 notethat ("LDSTidxI: dregs = W [ pregs + imm17m2 ] (.)\n");
5550 if ((yyvsp
[-3].r0
).r0
)
5551 neg_value ((yyvsp
[-2].expr
));
5552 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[-4].reg
), &(yyvsp
[-8].reg
), 0, 1, (yyvsp
[0].r0
).r0
, (yyvsp
[-2].expr
));
5555 return yyerror ("Bad register or constant for LOAD");
5560 #line 3052 "bfin-parse.y"
5562 if (IS_IREG ((yyvsp
[-2].reg
)))
5564 notethat ("dspLDST: dregs_half = W [ iregs ]\n");
5565 (yyval
.instr
) = DSPLDST(&(yyvsp
[-2].reg
), 1 + IS_H ((yyvsp
[-6].reg
)), &(yyvsp
[-6].reg
), (yyvsp
[-1].modcodes
).x0
, 0);
5567 else if ((yyvsp
[-1].modcodes
).x0
== 2 && IS_DREG ((yyvsp
[-6].reg
)) && IS_PREG ((yyvsp
[-2].reg
)))
5569 notethat ("LDSTpmod: dregs_half = W [ pregs ]\n");
5570 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[-2].reg
), &(yyvsp
[-6].reg
), &(yyvsp
[-2].reg
), 1 + IS_H ((yyvsp
[-6].reg
)), 0);
5573 return yyerror ("Bad register or post_op for LOAD");
5578 #line 3069 "bfin-parse.y"
5580 if (IS_DREG ((yyvsp
[-7].reg
)) && IS_PREG ((yyvsp
[-3].reg
)))
5582 notethat ("LDST: dregs = W [ pregs <post_op> ] (.)\n");
5583 (yyval
.instr
) = LDST (&(yyvsp
[-3].reg
), &(yyvsp
[-7].reg
), (yyvsp
[-2].modcodes
).x0
, 1, (yyvsp
[0].r0
).r0
, 0);
5586 return yyerror ("Bad register for LOAD");
5591 #line 3080 "bfin-parse.y"
5593 if (IS_DREG ((yyvsp
[-8].reg
)) && IS_PREG ((yyvsp
[-4].reg
)) && IS_PREG ((yyvsp
[-2].reg
)))
5595 notethat ("LDSTpmod: dregs = W [ pregs ++ pregs ] (.)\n");
5596 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[-4].reg
), &(yyvsp
[-8].reg
), &(yyvsp
[-2].reg
), 3, (yyvsp
[0].r0
).r0
);
5599 return yyerror ("Bad register for LOAD");
5604 #line 3091 "bfin-parse.y"
5606 if (IS_DREG ((yyvsp
[-7].reg
)) && IS_PREG ((yyvsp
[-3].reg
)) && IS_PREG ((yyvsp
[-1].reg
)))
5608 notethat ("LDSTpmod: dregs_half = W [ pregs ++ pregs ]\n");
5609 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[-3].reg
), &(yyvsp
[-7].reg
), &(yyvsp
[-1].reg
), 1 + IS_H ((yyvsp
[-7].reg
)), 0);
5612 return yyerror ("Bad register for LOAD");
5617 #line 3102 "bfin-parse.y"
5619 if (IS_IREG ((yyvsp
[-4].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
5621 notethat ("dspLDST: [ iregs <post_op> ] = dregs\n");
5622 (yyval
.instr
) = DSPLDST(&(yyvsp
[-4].reg
), 0, &(yyvsp
[0].reg
), (yyvsp
[-3].modcodes
).x0
, 1);
5624 else if (IS_PREG ((yyvsp
[-4].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
5626 notethat ("LDST: [ pregs <post_op> ] = dregs\n");
5627 (yyval
.instr
) = LDST (&(yyvsp
[-4].reg
), &(yyvsp
[0].reg
), (yyvsp
[-3].modcodes
).x0
, 0, 0, 1);
5629 else if (IS_PREG ((yyvsp
[-4].reg
)) && IS_PREG ((yyvsp
[0].reg
)))
5631 notethat ("LDST: [ pregs <post_op> ] = pregs\n");
5632 (yyval
.instr
) = LDST (&(yyvsp
[-4].reg
), &(yyvsp
[0].reg
), (yyvsp
[-3].modcodes
).x0
, 0, 1, 1);
5635 return yyerror ("Bad register for STORE");
5640 #line 3123 "bfin-parse.y"
5642 if (! IS_DREG ((yyvsp
[0].reg
)))
5643 return yyerror ("Expected Dreg for last argument");
5645 if (IS_IREG ((yyvsp
[-5].reg
)) && IS_MREG ((yyvsp
[-3].reg
)))
5647 notethat ("dspLDST: [ iregs ++ mregs ] = dregs\n");
5648 (yyval
.instr
) = DSPLDST(&(yyvsp
[-5].reg
), (yyvsp
[-3].reg
).regno
& CODE_MASK
, &(yyvsp
[0].reg
), 3, 1);
5650 else if (IS_PREG ((yyvsp
[-5].reg
)) && IS_PREG ((yyvsp
[-3].reg
)))
5652 notethat ("LDSTpmod: [ pregs ++ pregs ] = dregs\n");
5653 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[-5].reg
), &(yyvsp
[0].reg
), &(yyvsp
[-3].reg
), 0, 1);
5656 return yyerror ("Bad register for STORE");
5661 #line 3142 "bfin-parse.y"
5663 if (!IS_DREG ((yyvsp
[0].reg
)))
5664 return yyerror ("Expect Dreg as last argument");
5665 if (IS_PREG ((yyvsp
[-5].reg
)) && IS_PREG ((yyvsp
[-3].reg
)))
5667 notethat ("LDSTpmod: W [ pregs ++ pregs ] = dregs_half\n");
5668 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[-5].reg
), &(yyvsp
[0].reg
), &(yyvsp
[-3].reg
), 1 + IS_H ((yyvsp
[0].reg
)), 1);
5671 return yyerror ("Bad register for STORE");
5676 #line 3155 "bfin-parse.y"
5678 if (IS_DREG ((yyvsp
[-8].reg
)) && IS_PREG ((yyvsp
[-4].reg
)) && IS_RANGE(16, (yyvsp
[-2].expr
), (yyvsp
[-3].r0
).r0
, 1))
5680 notethat ("LDSTidxI: dregs = B [ pregs + imm16 ] (%c)\n",
5681 (yyvsp
[0].r0
).r0
? 'X' : 'Z');
5682 if ((yyvsp
[-3].r0
).r0
)
5683 neg_value ((yyvsp
[-2].expr
));
5684 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[-4].reg
), &(yyvsp
[-8].reg
), 0, 2, (yyvsp
[0].r0
).r0
, (yyvsp
[-2].expr
));
5687 return yyerror ("Bad register or value for LOAD");
5692 #line 3169 "bfin-parse.y"
5694 if (IS_DREG ((yyvsp
[-7].reg
)) && IS_PREG ((yyvsp
[-3].reg
)))
5696 notethat ("LDST: dregs = B [ pregs <post_op> ] (%c)\n",
5697 (yyvsp
[0].r0
).r0
? 'X' : 'Z');
5698 (yyval
.instr
) = LDST (&(yyvsp
[-3].reg
), &(yyvsp
[-7].reg
), (yyvsp
[-2].modcodes
).x0
, 2, (yyvsp
[0].r0
).r0
, 0);
5701 return yyerror ("Bad register for LOAD");
5706 #line 3181 "bfin-parse.y"
5708 if (IS_DREG ((yyvsp
[-6].reg
)) && IS_IREG ((yyvsp
[-3].reg
)) && IS_MREG ((yyvsp
[-1].reg
)))
5710 notethat ("dspLDST: dregs = [ iregs ++ mregs ]\n");
5711 (yyval
.instr
) = DSPLDST(&(yyvsp
[-3].reg
), (yyvsp
[-1].reg
).regno
& CODE_MASK
, &(yyvsp
[-6].reg
), 3, 0);
5713 else if (IS_DREG ((yyvsp
[-6].reg
)) && IS_PREG ((yyvsp
[-3].reg
)) && IS_PREG ((yyvsp
[-1].reg
)))
5715 notethat ("LDSTpmod: dregs = [ pregs ++ pregs ]\n");
5716 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[-3].reg
), &(yyvsp
[-6].reg
), &(yyvsp
[-1].reg
), 0, 0);
5719 return yyerror ("Bad register for LOAD");
5724 #line 3197 "bfin-parse.y"
5726 Expr_Node
*tmp
= (yyvsp
[-1].expr
);
5727 int ispreg
= IS_PREG ((yyvsp
[-6].reg
));
5728 int isgot
= IS_RELOC((yyvsp
[-1].expr
));
5730 if (!IS_PREG ((yyvsp
[-3].reg
)))
5731 return yyerror ("Preg expected for indirect");
5733 if (!IS_DREG ((yyvsp
[-6].reg
)) && !ispreg
)
5734 return yyerror ("Bad destination register for LOAD");
5736 if (tmp
->type
== Expr_Node_Reloc
5737 && strcmp (tmp
->value
.s_value
,
5738 "_current_shared_library_p5_offset_") != 0)
5739 return yyerror ("Plain symbol used as offset");
5741 if ((yyvsp
[-2].r0
).r0
)
5742 tmp
= unary (Expr_Op_Type_NEG
, tmp
);
5745 notethat ("LDSTidxI: dpregs = [ pregs + sym@got ]\n");
5746 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[-3].reg
), &(yyvsp
[-6].reg
), 0, 0, ispreg
? 1: 0, tmp
);
5748 else if (in_range_p (tmp
, 0, 63, 3))
5750 notethat ("LDSTii: dpregs = [ pregs + uimm7m4 ]\n");
5751 (yyval
.instr
) = LDSTII (&(yyvsp
[-3].reg
), &(yyvsp
[-6].reg
), tmp
, 0, ispreg
? 3 : 0);
5753 else if ((yyvsp
[-3].reg
).regno
== REG_FP
&& in_range_p (tmp
, -128, 0, 3))
5755 notethat ("LDSTiiFP: dpregs = [ FP - uimm7m4 ]\n");
5756 tmp
= unary (Expr_Op_Type_NEG
, tmp
);
5757 (yyval
.instr
) = LDSTIIFP (tmp
, &(yyvsp
[-6].reg
), 0);
5759 else if (in_range_p (tmp
, -131072, 131071, 3))
5761 notethat ("LDSTidxI: dpregs = [ pregs + imm18m4 ]\n");
5762 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[-3].reg
), &(yyvsp
[-6].reg
), 0, 0, ispreg
? 1: 0, tmp
);
5766 return yyerror ("Displacement out of range for load");
5771 #line 3242 "bfin-parse.y"
5773 if (IS_DREG ((yyvsp
[-5].reg
)) && IS_IREG ((yyvsp
[-2].reg
)))
5775 notethat ("dspLDST: dregs = [ iregs <post_op> ]\n");
5776 (yyval
.instr
) = DSPLDST (&(yyvsp
[-2].reg
), 0, &(yyvsp
[-5].reg
), (yyvsp
[-1].modcodes
).x0
, 0);
5778 else if (IS_DREG ((yyvsp
[-5].reg
)) && IS_PREG ((yyvsp
[-2].reg
)))
5780 notethat ("LDST: dregs = [ pregs <post_op> ]\n");
5781 (yyval
.instr
) = LDST (&(yyvsp
[-2].reg
), &(yyvsp
[-5].reg
), (yyvsp
[-1].modcodes
).x0
, 0, 0, 0);
5783 else if (IS_PREG ((yyvsp
[-5].reg
)) && IS_PREG ((yyvsp
[-2].reg
)))
5785 if (REG_SAME ((yyvsp
[-5].reg
), (yyvsp
[-2].reg
)) && (yyvsp
[-1].modcodes
).x0
!= 2)
5786 return yyerror ("Pregs can't be same");
5788 notethat ("LDST: pregs = [ pregs <post_op> ]\n");
5789 (yyval
.instr
) = LDST (&(yyvsp
[-2].reg
), &(yyvsp
[-5].reg
), (yyvsp
[-1].modcodes
).x0
, 0, 1, 0);
5791 else if ((yyvsp
[-2].reg
).regno
== REG_SP
&& IS_ALLREG ((yyvsp
[-5].reg
)) && (yyvsp
[-1].modcodes
).x0
== 0)
5793 notethat ("PushPopReg: allregs = [ SP ++ ]\n");
5794 (yyval
.instr
) = PUSHPOPREG (&(yyvsp
[-5].reg
), 0);
5797 return yyerror ("Bad register or value");
5802 #line 3273 "bfin-parse.y"
5804 if ((yyvsp
[-10].reg
).regno
!= REG_SP
)
5805 yyerror ("Stack Pointer expected");
5806 if ((yyvsp
[-7].reg
).regno
== REG_R7
5807 && IN_RANGE ((yyvsp
[-5].expr
), 0, 7)
5808 && (yyvsp
[-3].reg
).regno
== REG_P5
5809 && IN_RANGE ((yyvsp
[-1].expr
), 0, 5))
5811 notethat ("PushPopMultiple: [ -- SP ] = (R7 : reglim , P5 : reglim )\n");
5812 (yyval
.instr
) = PUSHPOPMULTIPLE (imm5 ((yyvsp
[-5].expr
)), imm5 ((yyvsp
[-1].expr
)), 1, 1, 1);
5815 return yyerror ("Bad register for PushPopMultiple");
5820 #line 3289 "bfin-parse.y"
5822 if ((yyvsp
[-6].reg
).regno
!= REG_SP
)
5823 yyerror ("Stack Pointer expected");
5825 if ((yyvsp
[-3].reg
).regno
== REG_R7
&& IN_RANGE ((yyvsp
[-1].expr
), 0, 7))
5827 notethat ("PushPopMultiple: [ -- SP ] = (R7 : reglim )\n");
5828 (yyval
.instr
) = PUSHPOPMULTIPLE (imm5 ((yyvsp
[-1].expr
)), 0, 1, 0, 1);
5830 else if ((yyvsp
[-3].reg
).regno
== REG_P5
&& IN_RANGE ((yyvsp
[-1].expr
), 0, 6))
5832 notethat ("PushPopMultiple: [ -- SP ] = (P5 : reglim )\n");
5833 (yyval
.instr
) = PUSHPOPMULTIPLE (0, imm5 ((yyvsp
[-1].expr
)), 0, 1, 1);
5836 return yyerror ("Bad register for PushPopMultiple");
5841 #line 3308 "bfin-parse.y"
5843 if ((yyvsp
[0].reg
).regno
!= REG_SP
)
5844 yyerror ("Stack Pointer expected");
5845 if ((yyvsp
[-9].reg
).regno
== REG_R7
&& (IN_RANGE ((yyvsp
[-7].expr
), 0, 7))
5846 && (yyvsp
[-5].reg
).regno
== REG_P5
&& (IN_RANGE ((yyvsp
[-3].expr
), 0, 6)))
5848 notethat ("PushPopMultiple: (R7 : reglim , P5 : reglim ) = [ SP ++ ]\n");
5849 (yyval
.instr
) = PUSHPOPMULTIPLE (imm5 ((yyvsp
[-7].expr
)), imm5 ((yyvsp
[-3].expr
)), 1, 1, 0);
5852 return yyerror ("Bad register range for PushPopMultiple");
5857 #line 3322 "bfin-parse.y"
5859 if ((yyvsp
[0].reg
).regno
!= REG_SP
)
5860 yyerror ("Stack Pointer expected");
5862 if ((yyvsp
[-5].reg
).regno
== REG_R7
&& IN_RANGE ((yyvsp
[-3].expr
), 0, 7))
5864 notethat ("PushPopMultiple: (R7 : reglim ) = [ SP ++ ]\n");
5865 (yyval
.instr
) = PUSHPOPMULTIPLE (imm5 ((yyvsp
[-3].expr
)), 0, 1, 0, 0);
5867 else if ((yyvsp
[-5].reg
).regno
== REG_P5
&& IN_RANGE ((yyvsp
[-3].expr
), 0, 6))
5869 notethat ("PushPopMultiple: (P5 : reglim ) = [ SP ++ ]\n");
5870 (yyval
.instr
) = PUSHPOPMULTIPLE (0, imm5 ((yyvsp
[-3].expr
)), 0, 1, 0);
5873 return yyerror ("Bad register range for PushPopMultiple");
5878 #line 3341 "bfin-parse.y"
5880 if ((yyvsp
[-2].reg
).regno
!= REG_SP
)
5881 yyerror ("Stack Pointer expected");
5883 if (IS_ALLREG ((yyvsp
[0].reg
)))
5885 notethat ("PushPopReg: [ -- SP ] = allregs\n");
5886 (yyval
.instr
) = PUSHPOPREG (&(yyvsp
[0].reg
), 1);
5889 return yyerror ("Bad register for PushPopReg");
5894 #line 3357 "bfin-parse.y"
5896 if (IS_URANGE (16, (yyvsp
[0].expr
), 0, 4))
5897 (yyval
.instr
) = LINKAGE (0, uimm16s4 ((yyvsp
[0].expr
)));
5899 return yyerror ("Bad constant for LINK");
5904 #line 3365 "bfin-parse.y"
5906 notethat ("linkage: UNLINK\n");
5907 (yyval
.instr
) = LINKAGE (1, 0);
5912 #line 3374 "bfin-parse.y"
5914 if (IS_PCREL4 ((yyvsp
[-4].expr
)) && IS_LPPCREL10 ((yyvsp
[-2].expr
)) && IS_CREG ((yyvsp
[0].reg
)))
5916 notethat ("LoopSetup: LSETUP (pcrel4 , lppcrel10 ) counters\n");
5917 (yyval
.instr
) = LOOPSETUP ((yyvsp
[-4].expr
), &(yyvsp
[0].reg
), 0, (yyvsp
[-2].expr
), 0);
5920 return yyerror ("Bad register or values for LSETUP");
5926 #line 3385 "bfin-parse.y"
5928 if (IS_PCREL4 ((yyvsp
[-6].expr
)) && IS_LPPCREL10 ((yyvsp
[-4].expr
))
5929 && IS_PREG ((yyvsp
[0].reg
)) && IS_CREG ((yyvsp
[-2].reg
)))
5931 notethat ("LoopSetup: LSETUP (pcrel4 , lppcrel10 ) counters = pregs\n");
5932 (yyval
.instr
) = LOOPSETUP ((yyvsp
[-6].expr
), &(yyvsp
[-2].reg
), 1, (yyvsp
[-4].expr
), &(yyvsp
[0].reg
));
5935 return yyerror ("Bad register or values for LSETUP");
5940 #line 3397 "bfin-parse.y"
5942 if (IS_PCREL4 ((yyvsp
[-8].expr
)) && IS_LPPCREL10 ((yyvsp
[-6].expr
))
5943 && IS_PREG ((yyvsp
[-2].reg
)) && IS_CREG ((yyvsp
[-4].reg
))
5944 && EXPR_VALUE ((yyvsp
[0].expr
)) == 1)
5946 notethat ("LoopSetup: LSETUP (pcrel4 , lppcrel10 ) counters = pregs >> 1\n");
5947 (yyval
.instr
) = LOOPSETUP ((yyvsp
[-8].expr
), &(yyvsp
[-4].reg
), 3, (yyvsp
[-6].expr
), &(yyvsp
[-2].reg
));
5950 return yyerror ("Bad register or values for LSETUP");
5955 #line 3411 "bfin-parse.y"
5957 if (!IS_RELOC ((yyvsp
[-1].expr
)))
5958 return yyerror ("Invalid expression in loop statement");
5959 if (!IS_CREG ((yyvsp
[0].reg
)))
5960 return yyerror ("Invalid loop counter register");
5961 (yyval
.instr
) = bfin_gen_loop ((yyvsp
[-1].expr
), &(yyvsp
[0].reg
), 0, 0);
5966 #line 3419 "bfin-parse.y"
5968 if (IS_RELOC ((yyvsp
[-3].expr
)) && IS_PREG ((yyvsp
[0].reg
)) && IS_CREG ((yyvsp
[-2].reg
)))
5970 notethat ("Loop: LOOP expr counters = pregs\n");
5971 (yyval
.instr
) = bfin_gen_loop ((yyvsp
[-3].expr
), &(yyvsp
[-2].reg
), 1, &(yyvsp
[0].reg
));
5974 return yyerror ("Bad register or values for LOOP");
5979 #line 3429 "bfin-parse.y"
5981 if (IS_RELOC ((yyvsp
[-5].expr
)) && IS_PREG ((yyvsp
[-2].reg
)) && IS_CREG ((yyvsp
[-4].reg
)) && EXPR_VALUE ((yyvsp
[0].expr
)) == 1)
5983 notethat ("Loop: LOOP expr counters = pregs >> 1\n");
5984 (yyval
.instr
) = bfin_gen_loop ((yyvsp
[-5].expr
), &(yyvsp
[-4].reg
), 3, &(yyvsp
[-2].reg
));
5987 return yyerror ("Bad register or values for LOOP");
5992 #line 3441 "bfin-parse.y"
5994 notethat ("pseudoDEBUG: DBG\n");
5995 (yyval
.instr
) = bfin_gen_pseudodbg (3, 7, 0);
6000 #line 3446 "bfin-parse.y"
6002 notethat ("pseudoDEBUG: DBG REG_A\n");
6003 (yyval
.instr
) = bfin_gen_pseudodbg (3, IS_A1 ((yyvsp
[0].reg
)), 0);
6008 #line 3451 "bfin-parse.y"
6010 notethat ("pseudoDEBUG: DBG allregs\n");
6011 (yyval
.instr
) = bfin_gen_pseudodbg (0, (yyvsp
[0].reg
).regno
& CODE_MASK
, (yyvsp
[0].reg
).regno
& CLASS_MASK
);
6016 #line 3457 "bfin-parse.y"
6018 if (!IS_DREG ((yyvsp
[-1].reg
)))
6019 return yyerror ("Dregs expected");
6020 notethat ("pseudoDEBUG: DBGCMPLX (dregs )\n");
6021 (yyval
.instr
) = bfin_gen_pseudodbg (3, 6, (yyvsp
[-1].reg
).regno
& CODE_MASK
);
6026 #line 3465 "bfin-parse.y"
6028 notethat ("psedoDEBUG: DBGHALT\n");
6029 (yyval
.instr
) = bfin_gen_pseudodbg (3, 5, 0);
6034 #line 3471 "bfin-parse.y"
6036 notethat ("pseudodbg_assert: DBGA (dregs_lo , uimm16 )\n");
6037 (yyval
.instr
) = bfin_gen_pseudodbg_assert (IS_H ((yyvsp
[-3].reg
)), &(yyvsp
[-3].reg
), uimm16 ((yyvsp
[-1].expr
)));
6042 #line 3477 "bfin-parse.y"
6044 notethat ("pseudodbg_assert: DBGAH (dregs , uimm16 )\n");
6045 (yyval
.instr
) = bfin_gen_pseudodbg_assert (3, &(yyvsp
[-3].reg
), uimm16 ((yyvsp
[-1].expr
)));
6050 #line 3483 "bfin-parse.y"
6052 notethat ("psedodbg_assert: DBGAL (dregs , uimm16 )\n");
6053 (yyval
.instr
) = bfin_gen_pseudodbg_assert (2, &(yyvsp
[-3].reg
), uimm16 ((yyvsp
[-1].expr
)));
6058 #line 3496 "bfin-parse.y"
6060 (yyval
.reg
) = (yyvsp
[0].reg
);
6065 #line 3500 "bfin-parse.y"
6067 (yyval
.reg
) = (yyvsp
[0].reg
);
6072 #line 3509 "bfin-parse.y"
6075 (yyval
.mod
).mod
= 0;
6080 #line 3514 "bfin-parse.y"
6083 (yyval
.mod
).mod
= (yyvsp
[-1].value
);
6088 #line 3519 "bfin-parse.y"
6091 (yyval
.mod
).mod
= (yyvsp
[-3].value
);
6096 #line 3524 "bfin-parse.y"
6099 (yyval
.mod
).mod
= (yyvsp
[-1].value
);
6104 #line 3529 "bfin-parse.y"
6107 (yyval
.mod
).mod
= 0;
6112 #line 3536 "bfin-parse.y"
6119 #line 3540 "bfin-parse.y"
6126 #line 3546 "bfin-parse.y"
6128 (yyval
.modcodes
).s0
= 0;
6129 (yyval
.modcodes
).x0
= 0;
6134 #line 3551 "bfin-parse.y"
6136 (yyval
.modcodes
).s0
= 1;
6137 (yyval
.modcodes
).x0
= 0;
6142 #line 3556 "bfin-parse.y"
6144 (yyval
.modcodes
).s0
= 0;
6145 (yyval
.modcodes
).x0
= 1;
6150 #line 3561 "bfin-parse.y"
6152 (yyval
.modcodes
).s0
= 1;
6153 (yyval
.modcodes
).x0
= 1;
6158 #line 3569 "bfin-parse.y"
6165 #line 3573 "bfin-parse.y"
6172 #line 3579 "bfin-parse.y"
6174 (yyval
.modcodes
).s0
= 0;
6175 (yyval
.modcodes
).x0
= 0;
6180 #line 3584 "bfin-parse.y"
6182 (yyval
.modcodes
).s0
= (yyvsp
[-1].modcodes
).s0
;
6183 (yyval
.modcodes
).x0
= (yyvsp
[-1].modcodes
).x0
;
6188 #line 3591 "bfin-parse.y"
6190 (yyval
.modcodes
).s0
= 0;
6191 (yyval
.modcodes
).x0
= 0;
6192 (yyval
.modcodes
).aop
= 0;
6197 #line 3597 "bfin-parse.y"
6199 (yyval
.modcodes
).s0
= 0;
6200 (yyval
.modcodes
).x0
= 0;
6201 (yyval
.modcodes
).aop
= 1;
6206 #line 3603 "bfin-parse.y"
6208 (yyval
.modcodes
).s0
= 1;
6209 (yyval
.modcodes
).x0
= 0;
6210 (yyval
.modcodes
).aop
= 1;
6215 #line 3611 "bfin-parse.y"
6217 (yyval
.modcodes
).r0
= 0;
6218 (yyval
.modcodes
).s0
= 0;
6219 (yyval
.modcodes
).x0
= 0;
6224 #line 3617 "bfin-parse.y"
6226 (yyval
.modcodes
).r0
= 2 + (yyvsp
[-1].r0
).r0
;
6227 (yyval
.modcodes
).s0
= 0;
6228 (yyval
.modcodes
).x0
= 0;
6233 #line 3623 "bfin-parse.y"
6235 (yyval
.modcodes
).r0
= 0;
6236 (yyval
.modcodes
).s0
= (yyvsp
[-1].modcodes
).s0
;
6237 (yyval
.modcodes
).x0
= (yyvsp
[-1].modcodes
).x0
;
6242 #line 3629 "bfin-parse.y"
6244 (yyval
.modcodes
).r0
= 2 + (yyvsp
[-3].r0
).r0
;
6245 (yyval
.modcodes
).s0
= (yyvsp
[-1].modcodes
).s0
;
6246 (yyval
.modcodes
).x0
= (yyvsp
[-1].modcodes
).x0
;
6251 #line 3635 "bfin-parse.y"
6253 (yyval
.modcodes
).r0
= 2 + (yyvsp
[-1].r0
).r0
;
6254 (yyval
.modcodes
).s0
= (yyvsp
[-3].modcodes
).s0
;
6255 (yyval
.modcodes
).x0
= (yyvsp
[-3].modcodes
).x0
;
6260 #line 3643 "bfin-parse.y"
6267 #line 3647 "bfin-parse.y"
6274 #line 3651 "bfin-parse.y"
6281 #line 3657 "bfin-parse.y"
6288 #line 3661 "bfin-parse.y"
6295 #line 3665 "bfin-parse.y"
6302 #line 3671 "bfin-parse.y"
6304 (yyval
.modcodes
).r0
= 0;
6305 (yyval
.modcodes
).s0
= 0;
6306 (yyval
.modcodes
).aop
= 0;
6311 #line 3677 "bfin-parse.y"
6313 (yyval
.modcodes
).r0
= 0;
6314 (yyval
.modcodes
).s0
= 0;
6315 (yyval
.modcodes
).aop
= 3;
6320 #line 3683 "bfin-parse.y"
6322 (yyval
.modcodes
).r0
= 0;
6323 (yyval
.modcodes
).s0
= 1;
6324 (yyval
.modcodes
).aop
= 3;
6329 #line 3689 "bfin-parse.y"
6331 (yyval
.modcodes
).r0
= 1;
6332 (yyval
.modcodes
).s0
= 0;
6333 (yyval
.modcodes
).aop
= 3;
6338 #line 3695 "bfin-parse.y"
6340 (yyval
.modcodes
).r0
= 1;
6341 (yyval
.modcodes
).s0
= 1;
6346 #line 3700 "bfin-parse.y"
6348 (yyval
.modcodes
).r0
= 1;
6349 (yyval
.modcodes
).s0
= 1;
6354 #line 3707 "bfin-parse.y"
6361 #line 3711 "bfin-parse.y"
6368 #line 3717 "bfin-parse.y"
6370 (yyval
.modcodes
).s0
= 0;
6375 #line 3721 "bfin-parse.y"
6377 (yyval
.modcodes
).s0
= 1;
6382 #line 3728 "bfin-parse.y"
6389 #line 3732 "bfin-parse.y"
6396 #line 3736 "bfin-parse.y"
6403 #line 3740 "bfin-parse.y"
6410 #line 3746 "bfin-parse.y"
6417 #line 3750 "bfin-parse.y"
6424 #line 3757 "bfin-parse.y"
6426 (yyval
.modcodes
).r0
= 0;
6427 (yyval
.modcodes
).s0
= 1;
6432 #line 3762 "bfin-parse.y"
6434 if ((yyvsp
[-1].value
) != M_T
)
6435 return yyerror ("Bad modifier");
6436 (yyval
.modcodes
).r0
= 1;
6437 (yyval
.modcodes
).s0
= 0;
6442 #line 3769 "bfin-parse.y"
6444 if ((yyvsp
[-3].value
) != M_T
)
6445 return yyerror ("Bad modifier");
6446 (yyval
.modcodes
).r0
= 1;
6447 (yyval
.modcodes
).s0
= 1;
6452 #line 3776 "bfin-parse.y"
6454 if ((yyvsp
[-1].value
) != M_T
)
6455 return yyerror ("Bad modifier");
6456 (yyval
.modcodes
).r0
= 1;
6457 (yyval
.modcodes
).s0
= 1;
6462 #line 3788 "bfin-parse.y"
6469 #line 3792 "bfin-parse.y"
6476 #line 3796 "bfin-parse.y"
6483 #line 3802 "bfin-parse.y"
6490 #line 3806 "bfin-parse.y"
6492 if ((yyvsp
[-1].value
) == M_W32
)
6495 return yyerror ("Only (W32) allowed");
6500 #line 3815 "bfin-parse.y"
6507 #line 3819 "bfin-parse.y"
6509 if ((yyvsp
[-1].value
) == M_IU
)
6512 return yyerror ("(IU) expected");
6517 #line 3828 "bfin-parse.y"
6519 (yyval
.reg
) = (yyvsp
[-1].reg
);
6524 #line 3834 "bfin-parse.y"
6526 (yyval
.reg
) = (yyvsp
[-2].reg
);
6531 #line 3843 "bfin-parse.y"
6538 #line 3847 "bfin-parse.y"
6545 #line 3854 "bfin-parse.y"
6552 #line 3858 "bfin-parse.y"
6559 #line 3862 "bfin-parse.y"
6566 #line 3866 "bfin-parse.y"
6573 #line 3873 "bfin-parse.y"
6580 #line 3877 "bfin-parse.y"
6587 #line 3884 "bfin-parse.y"
6589 (yyval
.modcodes
).r0
= 1; /* HL. */
6590 (yyval
.modcodes
).s0
= 0; /* s. */
6591 (yyval
.modcodes
).x0
= 0; /* x. */
6592 (yyval
.modcodes
).aop
= 0; /* aop. */
6597 #line 3892 "bfin-parse.y"
6599 (yyval
.modcodes
).r0
= 1; /* HL. */
6600 (yyval
.modcodes
).s0
= 0; /* s. */
6601 (yyval
.modcodes
).x0
= 0; /* x. */
6602 (yyval
.modcodes
).aop
= 1; /* aop. */
6607 #line 3900 "bfin-parse.y"
6609 (yyval
.modcodes
).r0
= 0; /* HL. */
6610 (yyval
.modcodes
).s0
= 0; /* s. */
6611 (yyval
.modcodes
).x0
= 0; /* x. */
6612 (yyval
.modcodes
).aop
= 0; /* aop. */
6617 #line 3908 "bfin-parse.y"
6619 (yyval
.modcodes
).r0
= 0; /* HL. */
6620 (yyval
.modcodes
).s0
= 0; /* s. */
6621 (yyval
.modcodes
).x0
= 0; /* x. */
6622 (yyval
.modcodes
).aop
= 1;
6627 #line 3916 "bfin-parse.y"
6629 (yyval
.modcodes
).r0
= 1; /* HL. */
6630 (yyval
.modcodes
).s0
= 1; /* s. */
6631 (yyval
.modcodes
).x0
= 0; /* x. */
6632 (yyval
.modcodes
).aop
= 0; /* aop. */
6637 #line 3923 "bfin-parse.y"
6639 (yyval
.modcodes
).r0
= 1; /* HL. */
6640 (yyval
.modcodes
).s0
= 1; /* s. */
6641 (yyval
.modcodes
).x0
= 0; /* x. */
6642 (yyval
.modcodes
).aop
= 1; /* aop. */
6647 #line 3930 "bfin-parse.y"
6649 (yyval
.modcodes
).r0
= 0; /* HL. */
6650 (yyval
.modcodes
).s0
= 1; /* s. */
6651 (yyval
.modcodes
).x0
= 0; /* x. */
6652 (yyval
.modcodes
).aop
= 0; /* aop. */
6657 #line 3938 "bfin-parse.y"
6659 (yyval
.modcodes
).r0
= 0; /* HL. */
6660 (yyval
.modcodes
).s0
= 1; /* s. */
6661 (yyval
.modcodes
).x0
= 0; /* x. */
6662 (yyval
.modcodes
).aop
= 1; /* aop. */
6667 #line 3948 "bfin-parse.y"
6669 (yyval
.modcodes
).s0
= 0; /* s. */
6670 (yyval
.modcodes
).x0
= 0; /* HL. */
6675 #line 3953 "bfin-parse.y"
6677 (yyval
.modcodes
).s0
= 0; /* s. */
6678 (yyval
.modcodes
).x0
= 1; /* HL. */
6683 #line 3958 "bfin-parse.y"
6685 (yyval
.modcodes
).s0
= 1; /* s. */
6686 (yyval
.modcodes
).x0
= 0; /* HL. */
6691 #line 3963 "bfin-parse.y"
6693 (yyval
.modcodes
).s0
= 1; /* s. */
6694 (yyval
.modcodes
).x0
= 1; /* HL. */
6699 #line 3970 "bfin-parse.y"
6701 (yyval
.modcodes
).x0
= 2;
6706 #line 3974 "bfin-parse.y"
6708 (yyval
.modcodes
).x0
= 0;
6713 #line 3978 "bfin-parse.y"
6715 (yyval
.modcodes
).x0
= 1;
6720 #line 3987 "bfin-parse.y"
6722 (yyval
.reg
) = (yyvsp
[-1].reg
);
6727 #line 3994 "bfin-parse.y"
6729 (yyval
.reg
) = (yyvsp
[-1].reg
);
6734 #line 4001 "bfin-parse.y"
6736 (yyval
.reg
) = (yyvsp
[-1].reg
);
6741 #line 4008 "bfin-parse.y"
6743 if (IS_A1 ((yyvsp
[0].reg
)) && IS_EVEN ((yyvsp
[-2].reg
)))
6744 return yyerror ("Cannot move A1 to even register");
6745 else if (!IS_A1 ((yyvsp
[0].reg
)) && !IS_EVEN ((yyvsp
[-2].reg
)))
6746 return yyerror ("Cannot move A0 to odd register");
6748 (yyval
.macfunc
).w
= 1;
6749 (yyval
.macfunc
).P
= 1;
6750 (yyval
.macfunc
).n
= IS_A1 ((yyvsp
[0].reg
));
6751 (yyval
.macfunc
).op
= 3;
6752 (yyval
.macfunc
).dst
= (yyvsp
[-2].reg
);
6753 (yyval
.macfunc
).s0
.regno
= 0;
6754 (yyval
.macfunc
).s1
.regno
= 0;
6759 #line 4023 "bfin-parse.y"
6761 (yyval
.macfunc
) = (yyvsp
[0].macfunc
);
6762 (yyval
.macfunc
).w
= 0; (yyval
.macfunc
).P
= 0;
6763 (yyval
.macfunc
).dst
.regno
= 0;
6768 #line 4029 "bfin-parse.y"
6770 if ((yyvsp
[-1].macfunc
).n
&& IS_EVEN ((yyvsp
[-4].reg
)))
6771 return yyerror ("Cannot move A1 to even register");
6772 else if (!(yyvsp
[-1].macfunc
).n
&& !IS_EVEN ((yyvsp
[-4].reg
)))
6773 return yyerror ("Cannot move A0 to odd register");
6775 (yyval
.macfunc
) = (yyvsp
[-1].macfunc
);
6776 (yyval
.macfunc
).w
= 1;
6777 (yyval
.macfunc
).P
= 1;
6778 (yyval
.macfunc
).dst
= (yyvsp
[-4].reg
);
6783 #line 4042 "bfin-parse.y"
6785 if ((yyvsp
[-1].macfunc
).n
&& !IS_H ((yyvsp
[-4].reg
)))
6786 return yyerror ("Cannot move A1 to low half of register");
6787 else if (!(yyvsp
[-1].macfunc
).n
&& IS_H ((yyvsp
[-4].reg
)))
6788 return yyerror ("Cannot move A0 to high half of register");
6790 (yyval
.macfunc
) = (yyvsp
[-1].macfunc
);
6791 (yyval
.macfunc
).w
= 1;
6792 (yyval
.macfunc
).P
= 0;
6793 (yyval
.macfunc
).dst
= (yyvsp
[-4].reg
);
6798 #line 4055 "bfin-parse.y"
6800 if (IS_A1 ((yyvsp
[0].reg
)) && !IS_H ((yyvsp
[-2].reg
)))
6801 return yyerror ("Cannot move A1 to low half of register");
6802 else if (!IS_A1 ((yyvsp
[0].reg
)) && IS_H ((yyvsp
[-2].reg
)))
6803 return yyerror ("Cannot move A0 to high half of register");
6805 (yyval
.macfunc
).w
= 1;
6806 (yyval
.macfunc
).P
= 0;
6807 (yyval
.macfunc
).n
= IS_A1 ((yyvsp
[0].reg
));
6808 (yyval
.macfunc
).op
= 3;
6809 (yyval
.macfunc
).dst
= (yyvsp
[-2].reg
);
6810 (yyval
.macfunc
).s0
.regno
= 0;
6811 (yyval
.macfunc
).s1
.regno
= 0;
6816 #line 4073 "bfin-parse.y"
6818 (yyval
.macfunc
).n
= IS_A1 ((yyvsp
[-1].reg
));
6819 (yyval
.macfunc
).op
= 0;
6820 (yyval
.macfunc
).s0
= (yyvsp
[0].macfunc
).s0
;
6821 (yyval
.macfunc
).s1
= (yyvsp
[0].macfunc
).s1
;
6826 #line 4080 "bfin-parse.y"
6828 (yyval
.macfunc
).n
= IS_A1 ((yyvsp
[-1].reg
));
6829 (yyval
.macfunc
).op
= 1;
6830 (yyval
.macfunc
).s0
= (yyvsp
[0].macfunc
).s0
;
6831 (yyval
.macfunc
).s1
= (yyvsp
[0].macfunc
).s1
;
6836 #line 4087 "bfin-parse.y"
6838 (yyval
.macfunc
).n
= IS_A1 ((yyvsp
[-1].reg
));
6839 (yyval
.macfunc
).op
= 2;
6840 (yyval
.macfunc
).s0
= (yyvsp
[0].macfunc
).s0
;
6841 (yyval
.macfunc
).s1
= (yyvsp
[0].macfunc
).s1
;
6846 #line 4097 "bfin-parse.y"
6848 if (IS_DREG ((yyvsp
[-2].reg
)) && IS_DREG ((yyvsp
[0].reg
)))
6850 (yyval
.macfunc
).s0
= (yyvsp
[-2].reg
);
6851 (yyval
.macfunc
).s1
= (yyvsp
[0].reg
);
6854 return yyerror ("Dregs expected");
6859 #line 4110 "bfin-parse.y"
6866 #line 4114 "bfin-parse.y"
6873 #line 4118 "bfin-parse.y"
6880 #line 4122 "bfin-parse.y"
6887 #line 4129 "bfin-parse.y"
6889 (yyval
.modcodes
).r0
= (yyvsp
[0].reg
).regno
;
6890 (yyval
.modcodes
).x0
= (yyvsp
[-1].r0
).r0
;
6891 (yyval
.modcodes
).s0
= 0;
6896 #line 4135 "bfin-parse.y"
6898 (yyval
.modcodes
).r0
= 0x18;
6899 (yyval
.modcodes
).x0
= (yyvsp
[-1].r0
).r0
;
6900 (yyval
.modcodes
).s0
= 0;
6905 #line 4141 "bfin-parse.y"
6907 (yyval
.modcodes
).r0
= (yyvsp
[-2].reg
).regno
;
6908 (yyval
.modcodes
).x0
= (yyvsp
[-1].r0
).r0
;
6909 (yyval
.modcodes
).s0
= 1;
6914 #line 4147 "bfin-parse.y"
6916 (yyval
.modcodes
).r0
= 0x18;
6917 (yyval
.modcodes
).x0
= (yyvsp
[-1].r0
).r0
;
6918 (yyval
.modcodes
).s0
= 1;
6923 #line 4157 "bfin-parse.y"
6925 Expr_Node_Value val
;
6926 val
.s_value
= S_GET_NAME((yyvsp
[0].symbol
));
6927 (yyval
.expr
) = Expr_Node_Create (Expr_Node_Reloc
, val
, NULL
, NULL
);
6932 #line 4166 "bfin-parse.y"
6933 { (yyval
.value
) = BFD_RELOC_BFIN_GOT
; }
6937 #line 4168 "bfin-parse.y"
6938 { (yyval
.value
) = BFD_RELOC_BFIN_GOT17M4
; }
6942 #line 4170 "bfin-parse.y"
6943 { (yyval
.value
) = BFD_RELOC_BFIN_FUNCDESC_GOT17M4
; }
6947 #line 4174 "bfin-parse.y"
6949 Expr_Node_Value val
;
6950 val
.i_value
= (yyvsp
[0].value
);
6951 (yyval
.expr
) = Expr_Node_Create (Expr_Node_GOT_Reloc
, val
, (yyvsp
[-2].expr
), NULL
);
6956 #line 4182 "bfin-parse.y"
6958 (yyval
.expr
) = (yyvsp
[0].expr
);
6963 #line 4186 "bfin-parse.y"
6965 (yyval
.expr
) = (yyvsp
[0].expr
);
6970 #line 4193 "bfin-parse.y"
6972 (yyval
.expr
) = (yyvsp
[-2].expr
);
6977 #line 4199 "bfin-parse.y"
6979 Expr_Node_Value val
;
6980 val
.i_value
= (yyvsp
[0].value
);
6981 (yyval
.expr
) = Expr_Node_Create (Expr_Node_Constant
, val
, NULL
, NULL
);
6986 #line 4205 "bfin-parse.y"
6988 (yyval
.expr
) = (yyvsp
[0].expr
);
6993 #line 4209 "bfin-parse.y"
6995 (yyval
.expr
) = (yyvsp
[-1].expr
);
7000 #line 4213 "bfin-parse.y"
7002 (yyval
.expr
) = unary (Expr_Op_Type_COMP
, (yyvsp
[0].expr
));
7007 #line 4217 "bfin-parse.y"
7009 (yyval
.expr
) = unary (Expr_Op_Type_NEG
, (yyvsp
[0].expr
));
7014 #line 4223 "bfin-parse.y"
7016 (yyval
.expr
) = (yyvsp
[0].expr
);
7021 #line 4229 "bfin-parse.y"
7023 (yyval
.expr
) = binary (Expr_Op_Type_Mult
, (yyvsp
[-2].expr
), (yyvsp
[0].expr
));
7028 #line 4233 "bfin-parse.y"
7030 (yyval
.expr
) = binary (Expr_Op_Type_Div
, (yyvsp
[-2].expr
), (yyvsp
[0].expr
));
7035 #line 4237 "bfin-parse.y"
7037 (yyval
.expr
) = binary (Expr_Op_Type_Mod
, (yyvsp
[-2].expr
), (yyvsp
[0].expr
));
7042 #line 4241 "bfin-parse.y"
7044 (yyval
.expr
) = binary (Expr_Op_Type_Add
, (yyvsp
[-2].expr
), (yyvsp
[0].expr
));
7049 #line 4245 "bfin-parse.y"
7051 (yyval
.expr
) = binary (Expr_Op_Type_Sub
, (yyvsp
[-2].expr
), (yyvsp
[0].expr
));
7056 #line 4249 "bfin-parse.y"
7058 (yyval
.expr
) = binary (Expr_Op_Type_Lshift
, (yyvsp
[-2].expr
), (yyvsp
[0].expr
));
7063 #line 4253 "bfin-parse.y"
7065 (yyval
.expr
) = binary (Expr_Op_Type_Rshift
, (yyvsp
[-2].expr
), (yyvsp
[0].expr
));
7070 #line 4257 "bfin-parse.y"
7072 (yyval
.expr
) = binary (Expr_Op_Type_BAND
, (yyvsp
[-2].expr
), (yyvsp
[0].expr
));
7077 #line 4261 "bfin-parse.y"
7079 (yyval
.expr
) = binary (Expr_Op_Type_LOR
, (yyvsp
[-2].expr
), (yyvsp
[0].expr
));
7084 #line 4265 "bfin-parse.y"
7086 (yyval
.expr
) = binary (Expr_Op_Type_BOR
, (yyvsp
[-2].expr
), (yyvsp
[0].expr
));
7091 #line 4269 "bfin-parse.y"
7093 (yyval
.expr
) = (yyvsp
[0].expr
);
7101 /* Line 1126 of yacc.c. */
7102 #line 7103 "bfin-parse.c"
7108 YY_STACK_PRINT (yyss
, yyssp
);
7113 /* Now `shift' the result of the reduction. Determine what state
7114 that goes to, based on the state we popped back to and the rule
7115 number reduced by. */
7119 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
7120 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
7121 yystate
= yytable
[yystate
];
7123 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
7128 /*------------------------------------.
7129 | yyerrlab -- here on detecting error |
7130 `------------------------------------*/
7132 /* If not already recovering from an error, report this error. */
7137 yyn
= yypact
[yystate
];
7139 if (YYPACT_NINF
< yyn
&& yyn
< YYLAST
)
7141 int yytype
= YYTRANSLATE (yychar
);
7142 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
7143 YYSIZE_T yysize
= yysize0
;
7145 int yysize_overflow
= 0;
7147 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
7148 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
7152 /* This is so xgettext sees the translatable formats that are
7153 constructed on the fly. */
7154 YY_("syntax error, unexpected %s");
7155 YY_("syntax error, unexpected %s, expecting %s");
7156 YY_("syntax error, unexpected %s, expecting %s or %s");
7157 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
7158 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
7162 static char const yyunexpected
[] = "syntax error, unexpected %s";
7163 static char const yyexpecting
[] = ", expecting %s";
7164 static char const yyor
[] = " or %s";
7165 char yyformat
[sizeof yyunexpected
7166 + sizeof yyexpecting
- 1
7167 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
7168 * (sizeof yyor
- 1))];
7169 char const *yyprefix
= yyexpecting
;
7171 /* Start YYX at -YYN if negative to avoid negative indexes in
7173 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
7175 /* Stay within bounds of both yycheck and yytname. */
7176 int yychecklim
= YYLAST
- yyn
;
7177 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
7180 yyarg
[0] = yytname
[yytype
];
7181 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
7183 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
7184 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
7186 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
7190 yyformat
[sizeof yyunexpected
- 1] = '\0';
7193 yyarg
[yycount
++] = yytname
[yyx
];
7194 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
7195 yysize_overflow
|= yysize1
< yysize
;
7197 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
7201 yyf
= YY_(yyformat
);
7202 yysize1
= yysize
+ yystrlen (yyf
);
7203 yysize_overflow
|= yysize1
< yysize
;
7206 if (!yysize_overflow
&& yysize
<= YYSTACK_ALLOC_MAXIMUM
)
7207 yymsg
= (char *) YYSTACK_ALLOC (yysize
);
7210 /* Avoid sprintf, as that infringes on the user's name space.
7211 Don't have undefined behavior even if the translation
7212 produced a string with the wrong number of "%s"s. */
7215 while ((*yyp
= *yyf
))
7217 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
7219 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
7229 YYSTACK_FREE (yymsg
);
7233 yyerror (YY_("syntax error"));
7234 goto yyexhaustedlab
;
7238 #endif /* YYERROR_VERBOSE */
7239 yyerror (YY_("syntax error"));
7244 if (yyerrstatus
== 3)
7246 /* If just tried and failed to reuse look-ahead token after an
7247 error, discard it. */
7249 if (yychar
<= YYEOF
)
7251 /* Return failure if at end of input. */
7252 if (yychar
== YYEOF
)
7257 yydestruct ("Error: discarding", yytoken
, &yylval
);
7262 /* Else will try to reuse look-ahead token after shifting the error
7267 /*---------------------------------------------------.
7268 | yyerrorlab -- error raised explicitly by YYERROR. |
7269 `---------------------------------------------------*/
7272 /* Pacify compilers like GCC when the user code never invokes
7273 YYERROR and the label yyerrorlab therefore never appears in user
7284 /*-------------------------------------------------------------.
7285 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7286 `-------------------------------------------------------------*/
7288 yyerrstatus
= 3; /* Each real token shifted decrements this. */
7292 yyn
= yypact
[yystate
];
7293 if (yyn
!= YYPACT_NINF
)
7296 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
7304 /* Pop the current state because it cannot handle the error token. */
7309 yydestruct ("Error: popping", yystos
[yystate
], yyvsp
);
7312 YY_STACK_PRINT (yyss
, yyssp
);
7321 /* Shift the error token. */
7322 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
7328 /*-------------------------------------.
7329 | yyacceptlab -- YYACCEPT comes here. |
7330 `-------------------------------------*/
7335 /*-----------------------------------.
7336 | yyabortlab -- YYABORT comes here. |
7337 `-----------------------------------*/
7343 /*-------------------------------------------------.
7344 | yyexhaustedlab -- memory exhaustion comes here. |
7345 `-------------------------------------------------*/
7347 yyerror (YY_("memory exhausted"));
7353 if (yychar
!= YYEOF
&& yychar
!= YYEMPTY
)
7354 yydestruct ("Cleanup: discarding lookahead",
7356 while (yyssp
!= yyss
)
7358 yydestruct ("Cleanup: popping",
7359 yystos
[*yyssp
], yyvsp
);
7364 YYSTACK_FREE (yyss
);
7370 #line 4275 "bfin-parse.y"
7374 mkexpr (int x
, SYMBOL_T s
)
7376 EXPR_T e
= (EXPR_T
) ALLOCATE (sizeof (struct expression_cell
));
7383 value_match (Expr_Node
*expr
, int sz
, int sign
, int mul
, int issigned
)
7385 long umax
= (1L << sz
) - 1;
7386 long min
= -1L << (sz
- 1);
7387 long max
= (1L << (sz
- 1)) - 1;
7389 long v
= EXPR_VALUE (expr
);
7393 error ("%s:%d: Value Error -- Must align to %d\n", __FILE__
, __LINE__
, mul
);
7404 if (v
>= min
&& v
<= max
) return 1;
7407 fprintf(stderr
, "signed value %lx out of range\n", v
* mul
);
7411 if (v
<= umax
&& v
>= 0)
7414 fprintf(stderr
, "unsigned value %lx out of range\n", v
* mul
);
7419 /* Return the expression structure that allows symbol operations.
7420 If the left and right children are constants, do the operation. */
7422 binary (Expr_Op_Type op
, Expr_Node
*x
, Expr_Node
*y
)
7424 Expr_Node_Value val
;
7426 if (x
->type
== Expr_Node_Constant
&& y
->type
== Expr_Node_Constant
)
7430 case Expr_Op_Type_Add
:
7431 x
->value
.i_value
+= y
->value
.i_value
;
7433 case Expr_Op_Type_Sub
:
7434 x
->value
.i_value
-= y
->value
.i_value
;
7436 case Expr_Op_Type_Mult
:
7437 x
->value
.i_value
*= y
->value
.i_value
;
7439 case Expr_Op_Type_Div
:
7440 if (y
->value
.i_value
== 0)
7441 error ("Illegal Expression: Division by zero.");
7443 x
->value
.i_value
/= y
->value
.i_value
;
7445 case Expr_Op_Type_Mod
:
7446 x
->value
.i_value
%= y
->value
.i_value
;
7448 case Expr_Op_Type_Lshift
:
7449 x
->value
.i_value
<<= y
->value
.i_value
;
7451 case Expr_Op_Type_Rshift
:
7452 x
->value
.i_value
>>= y
->value
.i_value
;
7454 case Expr_Op_Type_BAND
:
7455 x
->value
.i_value
&= y
->value
.i_value
;
7457 case Expr_Op_Type_BOR
:
7458 x
->value
.i_value
|= y
->value
.i_value
;
7460 case Expr_Op_Type_BXOR
:
7461 x
->value
.i_value
^= y
->value
.i_value
;
7463 case Expr_Op_Type_LAND
:
7464 x
->value
.i_value
= x
->value
.i_value
&& y
->value
.i_value
;
7466 case Expr_Op_Type_LOR
:
7467 x
->value
.i_value
= x
->value
.i_value
|| y
->value
.i_value
;
7471 error ("%s:%d: Internal compiler error\n", __FILE__
, __LINE__
);
7475 /* Canonicalize order to EXPR OP CONSTANT. */
7476 if (x
->type
== Expr_Node_Constant
)
7482 /* Canonicalize subtraction of const to addition of negated const. */
7483 if (op
== Expr_Op_Type_Sub
&& y
->type
== Expr_Node_Constant
)
7485 op
= Expr_Op_Type_Add
;
7486 y
->value
.i_value
= -y
->value
.i_value
;
7488 if (y
->type
== Expr_Node_Constant
&& x
->type
== Expr_Node_Binop
7489 && x
->Right_Child
->type
== Expr_Node_Constant
)
7491 if (op
== x
->value
.op_value
&& x
->value
.op_value
== Expr_Op_Type_Add
)
7493 x
->Right_Child
->value
.i_value
+= y
->value
.i_value
;
7498 /* Create a new expression structure. */
7500 return Expr_Node_Create (Expr_Node_Binop
, val
, x
, y
);
7504 unary (Expr_Op_Type op
, Expr_Node
*x
)
7506 if (x
->type
== Expr_Node_Constant
)
7510 case Expr_Op_Type_NEG
:
7511 x
->value
.i_value
= -x
->value
.i_value
;
7513 case Expr_Op_Type_COMP
:
7514 x
->value
.i_value
= ~x
->value
.i_value
;
7517 error ("%s:%d: Internal compiler error\n", __FILE__
, __LINE__
);
7523 /* Create a new expression structure. */
7524 Expr_Node_Value val
;
7526 return Expr_Node_Create (Expr_Node_Unop
, val
, x
, NULL
);
7530 int debug_codeselection
= 0;
7532 notethat (char *format
, ...)
7535 va_start (ap
, format
);
7536 if (debug_codeselection
)
7538 vfprintf (errorf
, format
, ap
);
7544 main (int argc
, char **argv
)