1 /* A Bison parser, made by GNU Bison 2.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
39 /* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
46 /* Identify Bison output. */
50 #define YYBISON_VERSION "2.3"
53 #define YYSKELETON_NAME "yacc.c"
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
66 /* Put the tokens into the symbol table, so that GDB and other debuggers
96 REG_A_DOUBLE_ZERO
= 285,
97 REG_A_DOUBLE_ONE
= 286,
145 _PLUS_BAR_PLUS
= 334,
146 _PLUS_BAR_MINUS
= 335,
147 _MINUS_BAR_PLUS
= 336,
148 _MINUS_BAR_MINUS
= 337,
155 _GREATER_GREATER_GREATER_THAN_ASSIGN
= 344,
158 GREATER_GREATER
= 347,
159 _GREATER_GREATER_GREATER
= 348,
160 _LESS_LESS_ASSIGN
= 349,
161 _GREATER_GREATER_ASSIGN
= 350,
168 _AMPERSAND_ASSIGN
= 357,
172 _LESS_THAN_ASSIGN
= 361,
173 _ASSIGN_ASSIGN
= 362,
238 FUNCDESC_GOT17M4
= 427,
244 #define BYTEOP16P 258
245 #define BYTEOP16M 259
250 #define BYTEUNPACK 264
270 #define BYTE_DREG 284
271 #define REG_A_DOUBLE_ZERO 285
272 #define REG_A_DOUBLE_ONE 286
273 #define A_ZERO_DOT_L 287
274 #define A_ZERO_DOT_H 288
275 #define A_ONE_DOT_L 289
276 #define A_ONE_DOT_H 290
295 #define LOOP_BEGIN 309
297 #define DISALGNEXCPT 311
299 #define JUMP_DOT_S 313
300 #define JUMP_DOT_L 314
306 #define AMPERSAND 320
319 #define DOUBLE_BAR 333
320 #define _PLUS_BAR_PLUS 334
321 #define _PLUS_BAR_MINUS 335
322 #define _MINUS_BAR_PLUS 336
323 #define _MINUS_BAR_MINUS 337
324 #define _MINUS_MINUS 338
325 #define _PLUS_PLUS 339
329 #define BXORSHIFT 343
330 #define _GREATER_GREATER_GREATER_THAN_ASSIGN 344
332 #define LESS_LESS 346
333 #define GREATER_GREATER 347
334 #define _GREATER_GREATER_GREATER 348
335 #define _LESS_LESS_ASSIGN 349
336 #define _GREATER_GREATER_ASSIGN 350
340 #define _STAR_ASSIGN 354
341 #define _BAR_ASSIGN 355
342 #define _CARET_ASSIGN 356
343 #define _AMPERSAND_ASSIGN 357
344 #define _MINUS_ASSIGN 358
345 #define _PLUS_ASSIGN 359
346 #define _ASSIGN_BANG 360
347 #define _LESS_THAN_ASSIGN 361
348 #define _ASSIGN_ASSIGN 362
353 #define LESS_THAN 367
402 #define SEMICOLON 416
407 #define STATUS_REG 421
413 #define FUNCDESC_GOT17M4 427
420 /* Copy the first part of user declarations. */
421 #line 21 "bfin-parse.y"
427 #include "bfin-aux.h" // opcode generating auxiliaries
429 #include "elf/common.h"
430 #include "elf/bfin.h"
432 #define DSP32ALU(aopcde, HL, dst1, dst0, src0, src1, s, x, aop) \
433 bfin_gen_dsp32alu (HL, aopcde, aop, s, x, dst0, dst1, src0, src1)
435 #define DSP32MAC(op1, MM, mmod, w1, P, h01, h11, h00, h10, dst, op0, src0, src1, w0) \
436 bfin_gen_dsp32mac (op1, MM, mmod, w1, P, h01, h11, h00, h10, op0, \
439 #define DSP32MULT(op1, MM, mmod, w1, P, h01, h11, h00, h10, dst, op0, src0, src1, w0) \
440 bfin_gen_dsp32mult (op1, MM, mmod, w1, P, h01, h11, h00, h10, op0, \
443 #define DSP32SHIFT(sopcde, dst0, src0, src1, sop, hls) \
444 bfin_gen_dsp32shift (sopcde, dst0, src0, src1, sop, hls)
446 #define DSP32SHIFTIMM(sopcde, dst0, immag, src1, sop, hls) \
447 bfin_gen_dsp32shiftimm (sopcde, dst0, immag, src1, sop, hls)
449 #define LDIMMHALF_R(reg, h, s, z, hword) \
450 bfin_gen_ldimmhalf (reg, h, s, z, hword, 1)
452 #define LDIMMHALF_R5(reg, h, s, z, hword) \
453 bfin_gen_ldimmhalf (reg, h, s, z, hword, 2)
455 #define LDSTIDXI(ptr, reg, w, sz, z, offset) \
456 bfin_gen_ldstidxi (ptr, reg, w, sz, z, offset)
458 #define LDST(ptr, reg, aop, sz, z, w) \
459 bfin_gen_ldst (ptr, reg, aop, sz, z, w)
461 #define LDSTII(ptr, reg, offset, w, op) \
462 bfin_gen_ldstii (ptr, reg, offset, w, op)
464 #define DSPLDST(i, m, reg, aop, w) \
465 bfin_gen_dspldst (i, reg, aop, w, m)
467 #define LDSTPMOD(ptr, reg, idx, aop, w) \
468 bfin_gen_ldstpmod (ptr, reg, aop, w, idx)
470 #define LDSTIIFP(offset, reg, w) \
471 bfin_gen_ldstiifp (reg, offset, w)
473 #define LOGI2OP(dst, src, opc) \
474 bfin_gen_logi2op (opc, src, dst.regno & CODE_MASK)
476 #define ALU2OP(dst, src, opc) \
477 bfin_gen_alu2op (dst, src, opc)
479 #define BRCC(t, b, offset) \
480 bfin_gen_brcc (t, b, offset)
482 #define UJUMP(offset) \
483 bfin_gen_ujump (offset)
485 #define PROGCTRL(prgfunc, poprnd) \
486 bfin_gen_progctrl (prgfunc, poprnd)
488 #define PUSHPOPMULTIPLE(dr, pr, d, p, w) \
489 bfin_gen_pushpopmultiple (dr, pr, d, p, w)
491 #define PUSHPOPREG(reg, w) \
492 bfin_gen_pushpopreg (reg, w)
494 #define CALLA(addr, s) \
495 bfin_gen_calla (addr, s)
497 #define LINKAGE(r, framesize) \
498 bfin_gen_linkage (r, framesize)
500 #define COMPI2OPD(dst, src, op) \
501 bfin_gen_compi2opd (dst, src, op)
503 #define COMPI2OPP(dst, src, op) \
504 bfin_gen_compi2opp (dst, src, op)
506 #define DAGMODIK(i, op) \
507 bfin_gen_dagmodik (i, op)
509 #define DAGMODIM(i, m, op, br) \
510 bfin_gen_dagmodim (i, m, op, br)
512 #define COMP3OP(dst, src0, src1, opc) \
513 bfin_gen_comp3op (src0, src1, dst, opc)
515 #define PTR2OP(dst, src, opc) \
516 bfin_gen_ptr2op (dst, src, opc)
518 #define CCFLAG(x, y, opc, i, g) \
519 bfin_gen_ccflag (x, y, opc, i, g)
521 #define CCMV(src, dst, t) \
522 bfin_gen_ccmv (src, dst, t)
524 #define CACTRL(reg, a, op) \
525 bfin_gen_cactrl (reg, a, op)
527 #define LOOPSETUP(soffset, c, rop, eoffset, reg) \
528 bfin_gen_loopsetup (soffset, c, rop, eoffset, reg)
530 #define HL2(r1, r0) (IS_H (r1) << 1 | IS_H (r0))
531 #define IS_RANGE(bits, expr, sign, mul) \
532 value_match(expr, bits, sign, mul, 1)
533 #define IS_URANGE(bits, expr, sign, mul) \
534 value_match(expr, bits, sign, mul, 0)
535 #define IS_CONST(expr) (expr->type == Expr_Node_Constant)
536 #define IS_RELOC(expr) (expr->type != Expr_Node_Constant)
537 #define IS_IMM(expr, bits) value_match (expr, bits, 0, 1, 1)
538 #define IS_UIMM(expr, bits) value_match (expr, bits, 0, 1, 0)
540 #define IS_PCREL4(expr) \
541 (value_match (expr, 4, 0, 2, 0))
543 #define IS_LPPCREL10(expr) \
544 (value_match (expr, 10, 0, 2, 0))
546 #define IS_PCREL10(expr) \
547 (value_match (expr, 10, 0, 2, 1))
549 #define IS_PCREL12(expr) \
550 (value_match (expr, 12, 0, 2, 1))
552 #define IS_PCREL24(expr) \
553 (value_match (expr, 24, 0, 2, 1))
556 static int value_match (Expr_Node
*expr
, int sz
, int sign
, int mul
, int issigned
);
561 static Expr_Node
*binary (Expr_Op_Type
, Expr_Node
*, Expr_Node
*);
562 static Expr_Node
*unary (Expr_Op_Type
, Expr_Node
*);
564 static void notethat (char *format
, ...);
566 char *current_inputline
;
568 int yyerror (char *msg
);
570 void error (char *format
, ...)
575 va_start (ap
, format
);
576 vsprintf (buffer
, format
, ap
);
588 else if (yytext
[0] != ';')
589 error ("%s. Input text was %s.", msg
, yytext
);
597 in_range_p (Expr_Node
*expr
, int from
, int to
, unsigned int mask
)
599 int val
= EXPR_VALUE (expr
);
600 if (expr
->type
!= Expr_Node_Constant
)
602 if (val
< from
|| val
> to
)
604 return (val
& mask
) == 0;
607 extern int yylex (void);
609 #define imm3(x) EXPR_VALUE (x)
610 #define imm4(x) EXPR_VALUE (x)
611 #define uimm4(x) EXPR_VALUE (x)
612 #define imm5(x) EXPR_VALUE (x)
613 #define uimm5(x) EXPR_VALUE (x)
614 #define imm6(x) EXPR_VALUE (x)
615 #define imm7(x) EXPR_VALUE (x)
616 #define imm16(x) EXPR_VALUE (x)
617 #define uimm16s4(x) ((EXPR_VALUE (x)) >> 2)
618 #define uimm16(x) EXPR_VALUE (x)
620 /* Return true if a value is inside a range. */
621 #define IN_RANGE(x, low, high) \
622 (((EXPR_VALUE(x)) >= (low)) && (EXPR_VALUE(x)) <= ((high)))
624 /* Auxiliary functions. */
627 neg_value (Expr_Node
*expr
)
629 expr
->value
.i_value
= -expr
->value
.i_value
;
633 valid_dreg_pair (Register
*reg1
, Expr_Node
*reg2
)
635 if (!IS_DREG (*reg1
))
637 yyerror ("Dregs expected");
641 if (reg1
->regno
!= 1 && reg1
->regno
!= 3)
643 yyerror ("Bad register pair");
647 if (imm7 (reg2
) != reg1
->regno
- 1)
649 yyerror ("Bad register pair");
658 check_multiply_halfregs (Macfunc
*aa
, Macfunc
*ab
)
660 if ((!REG_EQUAL (aa
->s0
, ab
->s0
) && !REG_EQUAL (aa
->s0
, ab
->s1
))
661 || (!REG_EQUAL (aa
->s1
, ab
->s1
) && !REG_EQUAL (aa
->s1
, ab
->s0
)))
662 return yyerror ("Source multiplication register mismatch");
668 /* Check (vector) mac funcs and ops. */
671 check_macfuncs (Macfunc
*aa
, Opt_mode
*opa
,
672 Macfunc
*ab
, Opt_mode
*opb
)
674 /* Variables for swapping. */
678 /* If a0macfunc comes before a1macfunc, swap them. */
682 /* (M) is not allowed here. */
684 return yyerror ("(M) not allowed with A0MAC");
686 return yyerror ("Vector AxMACs can't be same");
688 mtmp
= *aa
; *aa
= *ab
; *ab
= mtmp
;
689 otmp
= *opa
; *opa
= *opb
; *opb
= otmp
;
694 return yyerror ("(M) not allowed with A0MAC");
696 return yyerror ("Bad opt mode");
698 return yyerror ("Vector AxMACs can't be same");
701 /* If both ops are one of 0, 1, or 2, we have multiply_halfregs in both
702 assignment_or_macfuncs. */
703 if (aa
->op
< 3 && aa
->op
>=0
704 && ab
->op
< 3 && ab
->op
>= 0)
706 if (check_multiply_halfregs (aa
, ab
) < 0)
711 /* Only one of the assign_macfuncs has a half reg multiply
712 Evil trick: Just 'OR' their source register codes:
713 We can do that, because we know they were initialized to 0
714 in the rules that don't use multiply_halfregs. */
715 aa
->s0
.regno
|= (ab
->s0
.regno
& CODE_MASK
);
716 aa
->s1
.regno
|= (ab
->s1
.regno
& CODE_MASK
);
719 if (aa
->w
== ab
->w
&& aa
->P
!= ab
->P
)
721 return yyerror ("macfuncs must differ");
722 if (aa
->w
&& (aa
->dst
.regno
- ab
->dst
.regno
!= 1))
723 return yyerror ("Destination Dregs must differ by one");
725 /* We assign to full regs, thus obey even/odd rules. */
726 else if ((aa
->w
&& aa
->P
&& IS_EVEN (aa
->dst
))
727 || (ab
->w
&& ab
->P
&& !IS_EVEN (ab
->dst
)))
728 return yyerror ("Even/Odd register assignment mismatch");
729 /* We assign to half regs, thus obey hi/low rules. */
730 else if ( (aa
->w
&& !aa
->P
&& !IS_H (aa
->dst
))
731 || (ab
->w
&& !aa
->P
&& IS_H (ab
->dst
)))
732 return yyerror ("High/Low register assignment mismatch");
734 /* Make sure first macfunc has got both P flags ORed. */
737 /* Make sure mod flags get ORed, too. */
738 opb
->mod
|= opa
->mod
;
744 is_group1 (INSTR_T x
)
746 /* Group1 is dpsLDST, LDSTpmod, LDST, LDSTiiFP, LDSTii. */
747 if ((x
->value
& 0xc000) == 0x8000 || (x
->value
== 0x0000))
754 is_group2 (INSTR_T x
)
756 if ((((x
->value
& 0xfc00) == 0x9c00) /* dspLDST. */
757 && !((x
->value
& 0xfde0) == 0x9c60) /* dagMODim. */
758 && !((x
->value
& 0xfde0) == 0x9ce0) /* dagMODim with bit rev. */
759 && !((x
->value
& 0xfde0) == 0x9d60)) /* pick dagMODik. */
760 || (x
->value
== 0x0000))
767 /* Enabling traces. */
772 /* Enabling verbose error messages. */
773 #ifdef YYERROR_VERBOSE
774 # undef YYERROR_VERBOSE
775 # define YYERROR_VERBOSE 1
777 # define YYERROR_VERBOSE 0
780 /* Enabling the token table. */
781 #ifndef YYTOKEN_TABLE
782 # define YYTOKEN_TABLE 0
785 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
786 typedef union YYSTYPE
787 #line 366 "bfin-parse.y"
795 struct { int r0
; int s0
; int x0
; int aop
; } modcodes
;
796 struct { int r0
; } r0
;
799 /* Line 187 of yacc.c. */
800 #line 801 "bfin-parse.c"
802 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
803 # define YYSTYPE_IS_DECLARED 1
804 # define YYSTYPE_IS_TRIVIAL 1
809 /* Copy the second part of user declarations. */
812 /* Line 216 of yacc.c. */
813 #line 814 "bfin-parse.c"
820 typedef YYTYPE_UINT8 yytype_uint8
;
822 typedef unsigned char yytype_uint8
;
826 typedef YYTYPE_INT8 yytype_int8
;
827 #elif (defined __STDC__ || defined __C99__FUNC__ \
828 || defined __cplusplus || defined _MSC_VER)
829 typedef signed char yytype_int8
;
831 typedef short int yytype_int8
;
835 typedef YYTYPE_UINT16 yytype_uint16
;
837 typedef unsigned short int yytype_uint16
;
841 typedef YYTYPE_INT16 yytype_int16
;
843 typedef short int yytype_int16
;
847 # ifdef __SIZE_TYPE__
848 # define YYSIZE_T __SIZE_TYPE__
849 # elif defined size_t
850 # define YYSIZE_T size_t
851 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
852 || defined __cplusplus || defined _MSC_VER)
853 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
854 # define YYSIZE_T size_t
856 # define YYSIZE_T unsigned int
860 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
865 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
866 # define YY_(msgid) dgettext ("bison-runtime", msgid)
870 # define YY_(msgid) msgid
874 /* Suppress unused-variable warnings by "using" E. */
875 #if ! defined lint || defined __GNUC__
876 # define YYUSE(e) ((void) (e))
878 # define YYUSE(e) /* empty */
881 /* Identity function, used to suppress warnings about constant conditions. */
885 #if (defined __STDC__ || defined __C99__FUNC__ \
886 || defined __cplusplus || defined _MSC_VER)
899 #if ! defined yyoverflow || YYERROR_VERBOSE
901 /* The parser invokes alloca or malloc; define the necessary symbols. */
903 # ifdef YYSTACK_USE_ALLOCA
904 # if YYSTACK_USE_ALLOCA
906 # define YYSTACK_ALLOC __builtin_alloca
907 # elif defined __BUILTIN_VA_ARG_INCR
908 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
910 # define YYSTACK_ALLOC __alloca
911 # elif defined _MSC_VER
912 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
913 # define alloca _alloca
915 # define YYSTACK_ALLOC alloca
916 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
917 || defined __cplusplus || defined _MSC_VER)
918 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
927 # ifdef YYSTACK_ALLOC
928 /* Pacify GCC's `empty if-body' warning. */
929 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
930 # ifndef YYSTACK_ALLOC_MAXIMUM
931 /* The OS might guarantee only one guard page at the bottom of the stack,
932 and a page size can be as small as 4096 bytes. So we cannot safely
933 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
934 to allow for a few compiler-allocated temporary stack slots. */
935 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
938 # define YYSTACK_ALLOC YYMALLOC
939 # define YYSTACK_FREE YYFREE
940 # ifndef YYSTACK_ALLOC_MAXIMUM
941 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
943 # if (defined __cplusplus && ! defined _STDLIB_H \
944 && ! ((defined YYMALLOC || defined malloc) \
945 && (defined YYFREE || defined free)))
946 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
952 # define YYMALLOC malloc
953 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
954 || defined __cplusplus || defined _MSC_VER)
955 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
960 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
961 || defined __cplusplus || defined _MSC_VER)
962 void free (void *); /* INFRINGES ON USER NAME SPACE */
966 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
969 #if (! defined yyoverflow \
970 && (! defined __cplusplus \
971 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
973 /* A type that is properly aligned for any stack member. */
980 /* The size of the maximum gap between one aligned stack and the next. */
981 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
983 /* The size of an array large to enough to hold all stacks, each with
985 # define YYSTACK_BYTES(N) \
986 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
987 + YYSTACK_GAP_MAXIMUM)
989 /* Copy COUNT objects from FROM to TO. The source and destination do
992 # if defined __GNUC__ && 1 < __GNUC__
993 # define YYCOPY(To, From, Count) \
994 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
996 # define YYCOPY(To, From, Count) \
1000 for (yyi = 0; yyi < (Count); yyi++) \
1001 (To)[yyi] = (From)[yyi]; \
1007 /* Relocate STACK from its old location to the new one. The
1008 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1009 elements in the stack, and YYPTR gives the new location of the
1010 stack. Advance YYPTR to a properly aligned location for the next
1012 # define YYSTACK_RELOCATE(Stack) \
1015 YYSIZE_T yynewbytes; \
1016 YYCOPY (&yyptr->Stack, Stack, yysize); \
1017 Stack = &yyptr->Stack; \
1018 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1019 yyptr += yynewbytes / sizeof (*yyptr); \
1025 /* YYFINAL -- State number of the termination state. */
1027 /* YYLAST -- Last index in YYTABLE. */
1030 /* YYNTOKENS -- Number of terminals. */
1031 #define YYNTOKENS 175
1032 /* YYNNTS -- Number of nonterminals. */
1034 /* YYNRULES -- Number of rules. */
1035 #define YYNRULES 348
1036 /* YYNRULES -- Number of states. */
1037 #define YYNSTATES 1021
1039 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1040 #define YYUNDEFTOK 2
1041 #define YYMAXUTOK 429
1043 #define YYTRANSLATE(YYX) \
1044 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1046 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1047 static const yytype_uint8 yytranslate
[] =
1049 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1050 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1051 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1052 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1053 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1054 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1055 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1056 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1057 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1058 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1059 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1060 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1061 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1062 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1063 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1064 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1065 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1066 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1067 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1068 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1069 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1070 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1071 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1072 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1073 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1074 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1075 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1076 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1077 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1078 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1079 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1080 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1081 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1082 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1083 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1084 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1085 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1086 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
1087 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
1088 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
1089 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
1090 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
1091 165, 166, 167, 168, 169, 170, 171, 172, 173, 174
1095 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1097 static const yytype_uint16 yyprhs
[] =
1099 0, 0, 3, 4, 6, 9, 16, 21, 23, 25,
1100 28, 34, 36, 43, 50, 54, 58, 76, 94, 106,
1101 118, 130, 143, 156, 169, 175, 179, 183, 187, 196,
1102 210, 223, 237, 251, 265, 274, 292, 299, 309, 313,
1103 320, 324, 330, 337, 346, 355, 358, 361, 366, 370,
1104 373, 378, 382, 389, 394, 402, 410, 414, 418, 425,
1105 429, 434, 438, 442, 446, 458, 470, 480, 486, 492,
1106 502, 508, 514, 521, 528, 534, 540, 546, 553, 560,
1107 566, 568, 572, 576, 580, 584, 589, 594, 604, 614,
1108 620, 628, 633, 640, 646, 653, 661, 671, 680, 689,
1109 701, 711, 716, 722, 729, 737, 744, 749, 756, 762,
1110 769, 776, 781, 790, 801, 812, 825, 831, 838, 844,
1111 851, 856, 861, 866, 874, 884, 894, 904, 911, 918,
1112 925, 934, 943, 950, 956, 962, 971, 976, 984, 986,
1113 988, 990, 992, 994, 996, 998, 1000, 1002, 1004, 1007,
1114 1010, 1015, 1020, 1027, 1034, 1037, 1040, 1045, 1048, 1051,
1115 1054, 1057, 1060, 1063, 1070, 1077, 1083, 1088, 1092, 1096,
1116 1100, 1104, 1108, 1112, 1117, 1120, 1125, 1128, 1133, 1136,
1117 1141, 1144, 1152, 1161, 1170, 1178, 1186, 1194, 1204, 1212,
1118 1221, 1231, 1240, 1247, 1255, 1264, 1274, 1283, 1291, 1299,
1119 1306, 1318, 1326, 1338, 1346, 1350, 1353, 1355, 1363, 1373,
1120 1385, 1389, 1395, 1403, 1405, 1408, 1411, 1416, 1418, 1425,
1121 1432, 1439, 1441, 1443, 1444, 1450, 1456, 1460, 1464, 1468,
1122 1472, 1473, 1475, 1477, 1479, 1481, 1483, 1484, 1488, 1489,
1123 1493, 1497, 1498, 1502, 1506, 1512, 1518, 1519, 1523, 1527,
1124 1528, 1532, 1536, 1537, 1541, 1545, 1549, 1555, 1561, 1562,
1125 1566, 1567, 1571, 1573, 1575, 1577, 1579, 1580, 1584, 1588,
1126 1592, 1598, 1604, 1606, 1608, 1610, 1611, 1615, 1616, 1620,
1127 1625, 1630, 1632, 1634, 1636, 1638, 1640, 1642, 1644, 1646,
1128 1650, 1654, 1658, 1662, 1668, 1674, 1680, 1686, 1690, 1694,
1129 1700, 1706, 1707, 1709, 1711, 1714, 1717, 1720, 1724, 1726,
1130 1732, 1738, 1742, 1745, 1748, 1751, 1755, 1757, 1759, 1761,
1131 1763, 1767, 1771, 1775, 1779, 1781, 1783, 1785, 1787, 1791,
1132 1793, 1795, 1799, 1801, 1803, 1807, 1810, 1813, 1815, 1819,
1133 1823, 1827, 1831, 1835, 1839, 1843, 1847, 1851, 1855
1136 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1137 static const yytype_int16 yyrhs
[] =
1139 176, 0, -1, -1, 177, -1, 178, 161, -1, 178,
1140 78, 178, 78, 178, 161, -1, 178, 78, 178, 161,
1141 -1, 1, -1, 167, -1, 209, 180, -1, 209, 180,
1142 158, 209, 180, -1, 56, -1, 26, 98, 163, 208,
1143 179, 162, -1, 36, 98, 163, 208, 179, 162, -1,
1144 33, 98, 36, -1, 35, 98, 36, -1, 163, 26,
1145 158, 26, 162, 98, 3, 163, 26, 160, 220, 158,
1146 26, 160, 220, 162, 193, -1, 163, 26, 158, 26,
1147 162, 98, 4, 163, 26, 160, 220, 158, 26, 160,
1148 220, 162, 193, -1, 163, 26, 158, 26, 162, 98,
1149 9, 26, 160, 220, 193, -1, 163, 26, 158, 26,
1150 162, 98, 20, 26, 163, 192, 162, -1, 26, 98,
1151 34, 71, 35, 158, 26, 98, 32, 71, 33, -1,
1152 26, 98, 179, 71, 179, 158, 26, 98, 179, 70,
1153 179, 185, -1, 26, 98, 26, 202, 26, 158, 26,
1154 98, 26, 202, 26, 185, -1, 26, 98, 26, 201,
1155 26, 158, 26, 98, 26, 201, 26, 186, -1, 26,
1156 98, 77, 26, 190, -1, 206, 77, 179, -1, 32,
1157 98, 36, -1, 34, 98, 36, -1, 26, 98, 195,
1158 163, 26, 158, 26, 162, -1, 26, 98, 5, 163,
1159 26, 160, 220, 158, 26, 160, 220, 162, 194, -1,
1160 26, 98, 5, 163, 26, 160, 220, 158, 26, 160,
1161 220, 162, -1, 26, 98, 6, 163, 26, 160, 220,
1162 158, 26, 160, 220, 162, 203, -1, 26, 98, 7,
1163 163, 26, 160, 220, 158, 26, 160, 220, 162, 203,
1164 -1, 26, 98, 8, 163, 26, 160, 220, 158, 26,
1165 160, 220, 162, 204, -1, 26, 98, 10, 163, 26,
1166 158, 26, 162, -1, 36, 98, 36, 98, 22, 163,
1167 36, 162, 72, 36, 71, 22, 163, 36, 162, 72,
1168 36, -1, 26, 98, 26, 202, 26, 185, -1, 26,
1169 98, 200, 163, 26, 158, 26, 162, 190, -1, 206,
1170 70, 179, -1, 36, 98, 36, 202, 36, 185, -1,
1171 206, 206, 220, -1, 206, 179, 163, 126, 162, -1,
1172 36, 98, 26, 163, 138, 162, -1, 36, 98, 26,
1173 202, 26, 163, 141, 162, -1, 36, 98, 26, 202,
1174 26, 163, 142, 162, -1, 206, 179, -1, 206, 26,
1175 -1, 26, 98, 36, 187, -1, 36, 98, 220, -1,
1176 206, 220, -1, 26, 98, 220, 188, -1, 36, 98,
1177 26, -1, 26, 98, 26, 201, 26, 184, -1, 26,
1178 98, 29, 187, -1, 206, 77, 179, 158, 206, 77,
1179 179, -1, 206, 70, 179, 158, 206, 70, 179, -1,
1180 207, 179, 196, -1, 26, 103, 220, -1, 26, 104,
1181 26, 163, 132, 162, -1, 26, 103, 26, -1, 179,
1182 104, 179, 196, -1, 26, 104, 26, -1, 26, 104,
1183 220, -1, 26, 99, 26, -1, 12, 163, 26, 160,
1184 220, 158, 26, 160, 220, 162, 193, -1, 206, 179,
1185 163, 126, 162, 158, 206, 179, 163, 126, 162, -1,
1186 26, 98, 163, 26, 71, 26, 162, 91, 220, -1,
1187 26, 98, 26, 66, 26, -1, 26, 98, 26, 68,
1188 26, -1, 26, 98, 26, 71, 163, 26, 91, 220,
1189 162, -1, 28, 98, 179, 107, 179, -1, 28, 98,
1190 179, 112, 179, -1, 28, 98, 26, 112, 26, 197,
1191 -1, 28, 98, 26, 112, 220, 197, -1, 28, 98,
1192 26, 107, 26, -1, 28, 98, 26, 107, 220, -1,
1193 28, 98, 179, 106, 179, -1, 28, 98, 26, 106,
1194 26, 197, -1, 28, 98, 26, 106, 220, 197, -1,
1195 26, 98, 26, 65, 26, -1, 213, -1, 26, 98,
1196 26, -1, 28, 98, 26, -1, 26, 98, 28, -1,
1197 28, 105, 28, -1, 36, 98, 211, 180, -1, 26,
1198 98, 211, 180, -1, 36, 98, 211, 180, 158, 36,
1199 98, 211, 180, -1, 26, 98, 211, 180, 158, 26,
1200 98, 211, 180, -1, 206, 87, 179, 159, 36, -1,
1201 36, 98, 87, 36, 159, 36, 191, -1, 206, 179,
1202 91, 220, -1, 26, 98, 26, 91, 220, 189, -1,
1203 36, 98, 36, 91, 220, -1, 36, 98, 36, 91,
1204 220, 191, -1, 26, 98, 87, 26, 159, 36, 189,
1205 -1, 36, 98, 19, 163, 26, 158, 36, 162, 190,
1206 -1, 36, 98, 19, 163, 36, 158, 36, 162, -1,
1207 26, 98, 18, 163, 26, 158, 26, 162, -1, 26,
1208 98, 18, 163, 26, 158, 26, 162, 163, 133, 162,
1209 -1, 26, 98, 17, 163, 26, 158, 36, 162, 187,
1210 -1, 206, 179, 93, 220, -1, 206, 86, 179, 159,
1211 36, -1, 36, 98, 86, 36, 159, 36, -1, 26,
1212 98, 86, 26, 159, 36, 190, -1, 26, 98, 85,
1213 26, 159, 36, -1, 206, 179, 92, 220, -1, 26,
1214 98, 26, 92, 220, 190, -1, 36, 98, 36, 92,
1215 220, -1, 36, 98, 36, 93, 220, 191, -1, 26,
1216 98, 26, 93, 220, 189, -1, 36, 98, 21, 26,
1217 -1, 26, 98, 11, 163, 36, 158, 36, 162, -1,
1218 36, 98, 28, 98, 88, 163, 179, 158, 26, 162,
1219 -1, 36, 98, 28, 98, 69, 163, 179, 158, 26,
1220 162, -1, 36, 98, 28, 98, 69, 163, 179, 158,
1221 179, 158, 28, 162, -1, 206, 90, 179, 159, 36,
1222 -1, 26, 98, 90, 26, 159, 36, -1, 206, 90,
1223 179, 159, 220, -1, 26, 98, 90, 26, 159, 220,
1224 -1, 36, 98, 23, 179, -1, 36, 98, 23, 26,
1225 -1, 36, 98, 23, 36, -1, 36, 98, 16, 163,
1226 26, 162, 181, -1, 26, 98, 16, 163, 26, 158,
1227 26, 162, 181, -1, 150, 163, 26, 158, 26, 158,
1228 179, 162, 181, -1, 206, 88, 163, 179, 158, 179,
1229 158, 28, 162, -1, 147, 163, 26, 158, 220, 162,
1230 -1, 148, 163, 26, 158, 220, 162, -1, 146, 163,
1231 26, 158, 220, 162, -1, 28, 105, 149, 163, 26,
1232 158, 220, 162, -1, 28, 98, 149, 163, 26, 158,
1233 220, 162, -1, 157, 64, 28, 26, 98, 26, -1,
1234 157, 28, 26, 98, 26, -1, 157, 64, 28, 57,
1235 220, -1, 157, 64, 28, 57, 220, 163, 131, 162,
1236 -1, 157, 28, 57, 220, -1, 157, 28, 57, 220,
1237 163, 131, 162, -1, 37, -1, 39, -1, 38, -1,
1238 40, -1, 41, -1, 42, -1, 44, -1, 47, -1,
1239 48, -1, 49, -1, 46, 26, -1, 45, 26, -1,
1240 57, 163, 26, 162, -1, 60, 163, 26, 162, -1,
1241 60, 163, 27, 71, 26, 162, -1, 57, 163, 27,
1242 71, 26, 162, -1, 50, 220, -1, 51, 220, -1,
1243 120, 163, 26, 162, -1, 57, 220, -1, 58, 220,
1244 -1, 59, 220, -1, 59, 218, -1, 60, 220, -1,
1245 60, 218, -1, 97, 163, 26, 158, 26, 162, -1,
1246 96, 163, 26, 158, 26, 162, -1, 26, 98, 70,
1247 26, 189, -1, 26, 98, 63, 26, -1, 26, 95,
1248 26, -1, 26, 95, 220, -1, 26, 89, 26, -1,
1249 26, 94, 26, -1, 26, 94, 220, -1, 26, 89,
1250 220, -1, 114, 164, 26, 165, -1, 114, 199, -1,
1251 113, 164, 26, 165, -1, 113, 199, -1, 115, 164,
1252 26, 165, -1, 115, 199, -1, 116, 164, 26, 165,
1253 -1, 116, 199, -1, 123, 164, 26, 205, 165, 98,
1254 26, -1, 123, 164, 26, 202, 220, 165, 98, 26,
1255 -1, 124, 164, 26, 202, 220, 165, 98, 26, -1,
1256 124, 164, 26, 205, 165, 98, 26, -1, 124, 164,
1257 26, 205, 165, 98, 36, -1, 164, 26, 202, 220,
1258 165, 98, 26, -1, 26, 98, 124, 164, 26, 202,
1259 220, 165, 187, -1, 36, 98, 124, 164, 26, 205,
1260 165, -1, 26, 98, 124, 164, 26, 205, 165, 187,
1261 -1, 26, 98, 124, 164, 26, 84, 26, 165, 187,
1262 -1, 36, 98, 124, 164, 26, 84, 26, 165, -1,
1263 164, 26, 205, 165, 98, 26, -1, 164, 26, 84,
1264 26, 165, 98, 26, -1, 124, 164, 26, 84, 26,
1265 165, 98, 36, -1, 26, 98, 123, 164, 26, 202,
1266 220, 165, 187, -1, 26, 98, 123, 164, 26, 205,
1267 165, 187, -1, 26, 98, 164, 26, 84, 26, 165,
1268 -1, 26, 98, 164, 26, 202, 217, 165, -1, 26,
1269 98, 164, 26, 205, 165, -1, 198, 98, 163, 26,
1270 160, 220, 158, 26, 160, 220, 162, -1, 198, 98,
1271 163, 26, 160, 220, 162, -1, 163, 26, 160, 220,
1272 158, 26, 160, 220, 162, 98, 199, -1, 163, 26,
1273 160, 220, 162, 98, 199, -1, 198, 98, 26, -1,
1274 24, 220, -1, 25, -1, 52, 163, 220, 158, 220,
1275 162, 26, -1, 52, 163, 220, 158, 220, 162, 26,
1276 98, 26, -1, 52, 163, 220, 158, 220, 162, 26,
1277 98, 26, 92, 220, -1, 53, 220, 26, -1, 53,
1278 220, 26, 98, 26, -1, 53, 220, 26, 98, 26,
1279 92, 220, -1, 154, -1, 154, 179, -1, 154, 26,
1280 -1, 156, 163, 26, 162, -1, 153, -1, 155, 163,
1281 36, 158, 220, 162, -1, 152, 163, 26, 158, 220,
1282 162, -1, 151, 163, 26, 158, 220, 162, -1, 30,
1283 -1, 31, -1, -1, 163, 135, 158, 136, 162, -1,
1284 163, 136, 158, 135, 162, -1, 163, 136, 162, -1,
1285 163, 135, 162, -1, 163, 121, 162, -1, 163, 122,
1286 162, -1, -1, 126, -1, 127, -1, 128, -1, 121,
1287 -1, 122, -1, -1, 163, 182, 162, -1, -1, 163,
1288 125, 162, -1, 163, 126, 162, -1, -1, 163, 183,
1289 162, -1, 163, 182, 162, -1, 163, 183, 158, 182,
1290 162, -1, 163, 182, 158, 183, 162, -1, -1, 163,
1291 134, 162, -1, 163, 133, 162, -1, -1, 163, 133,
1292 162, -1, 163, 134, 162, -1, -1, 163, 125, 162,
1293 -1, 163, 126, 162, -1, 163, 143, 162, -1, 163,
1294 143, 158, 126, 162, -1, 163, 126, 158, 143, 162,
1295 -1, -1, 163, 143, 162, -1, -1, 163, 126, 162,
1296 -1, 108, -1, 111, -1, 110, -1, 109, -1, -1,
1297 163, 137, 162, -1, 163, 137, 162, -1, 163, 136,
1298 162, -1, 163, 136, 158, 137, 162, -1, 163, 137,
1299 158, 136, 162, -1, 13, -1, 14, -1, 15, -1,
1300 -1, 163, 136, 162, -1, -1, 163, 136, 162, -1,
1301 164, 83, 26, 165, -1, 164, 26, 84, 165, -1,
1302 75, -1, 76, -1, 79, -1, 80, -1, 81, -1,
1303 82, -1, 71, -1, 70, -1, 163, 140, 162, -1,
1304 163, 129, 162, -1, 163, 139, 162, -1, 163, 130,
1305 162, -1, 163, 140, 158, 137, 162, -1, 163, 129,
1306 158, 137, 162, -1, 163, 139, 158, 137, 162, -1,
1307 163, 130, 158, 137, 162, -1, 163, 144, 162, -1,
1308 163, 145, 162, -1, 163, 144, 158, 137, 162, -1,
1309 163, 145, 158, 137, 162, -1, -1, 84, -1, 83,
1310 -1, 179, 98, -1, 179, 103, -1, 179, 104, -1,
1311 26, 98, 179, -1, 210, -1, 26, 98, 163, 210,
1312 162, -1, 36, 98, 163, 210, 162, -1, 36, 98,
1313 179, -1, 206, 211, -1, 208, 211, -1, 207, 211,
1314 -1, 36, 72, 36, -1, 98, -1, 100, -1, 102,
1315 -1, 101, -1, 28, 212, 166, -1, 28, 212, 143,
1316 -1, 166, 212, 28, -1, 143, 212, 28, -1, 168,
1317 -1, 170, -1, 171, -1, 172, -1, 214, 173, 215,
1318 -1, 216, -1, 220, -1, 214, 173, 174, -1, 169,
1319 -1, 214, -1, 163, 221, 162, -1, 63, 221, -1,
1320 70, 221, -1, 221, -1, 221, 72, 221, -1, 221,
1321 73, 221, -1, 221, 67, 221, -1, 221, 71, 221,
1322 -1, 221, 70, 221, -1, 221, 91, 221, -1, 221,
1323 92, 221, -1, 221, 65, 221, -1, 221, 68, 221,
1324 -1, 221, 66, 221, -1, 219, -1
1327 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1328 static const yytype_uint16 yyrline
[] =
1330 0, 567, 567, 568, 580, 582, 615, 642, 653, 657,
1331 692, 712, 717, 727, 737, 742, 747, 763, 779, 791,
1332 801, 814, 833, 851, 874, 896, 901, 911, 922, 933,
1333 947, 962, 978, 994, 1010, 1021, 1035, 1061, 1079, 1084,
1334 1090, 1102, 1113, 1124, 1135, 1146, 1157, 1168, 1194, 1208,
1335 1218, 1263, 1282, 1293, 1304, 1315, 1326, 1337, 1353, 1370,
1336 1386, 1397, 1408, 1439, 1450, 1463, 1474, 1513, 1523, 1533,
1337 1553, 1563, 1573, 1583, 1594, 1602, 1612, 1622, 1633, 1657,
1338 1668, 1674, 1685, 1696, 1707, 1715, 1736, 1762, 1791, 1822,
1339 1836, 1847, 1861, 1895, 1905, 1915, 1940, 1952, 1970, 1981,
1340 1992, 2003, 2016, 2027, 2038, 2049, 2060, 2071, 2104, 2114,
1341 2127, 2147, 2158, 2169, 2182, 2195, 2206, 2217, 2228, 2239,
1342 2249, 2260, 2271, 2283, 2294, 2305, 2316, 2329, 2341, 2353,
1343 2364, 2375, 2386, 2398, 2410, 2421, 2432, 2443, 2453, 2459,
1344 2465, 2471, 2477, 2483, 2489, 2495, 2501, 2507, 2513, 2524,
1345 2535, 2546, 2557, 2568, 2579, 2590, 2596, 2607, 2618, 2629,
1346 2640, 2651, 2661, 2674, 2682, 2690, 2714, 2725, 2736, 2747,
1347 2758, 2769, 2781, 2794, 2803, 2814, 2825, 2837, 2848, 2859,
1348 2870, 2884, 2896, 2911, 2930, 2941, 2959, 2993, 3011, 3028,
1349 3039, 3050, 3061, 3082, 3101, 3114, 3128, 3140, 3156, 3196,
1350 3227, 3243, 3262, 3276, 3295, 3311, 3319, 3328, 3339, 3351,
1351 3365, 3373, 3383, 3395, 3400, 3405, 3411, 3419, 3425, 3431,
1352 3437, 3450, 3454, 3464, 3468, 3473, 3478, 3483, 3490, 3494,
1353 3501, 3505, 3510, 3515, 3523, 3527, 3534, 3538, 3546, 3551,
1354 3557, 3566, 3571, 3577, 3583, 3589, 3598, 3601, 3605, 3612,
1355 3615, 3619, 3626, 3631, 3637, 3643, 3649, 3654, 3662, 3665,
1356 3672, 3675, 3682, 3686, 3690, 3694, 3701, 3704, 3711, 3716,
1357 3723, 3730, 3742, 3746, 3750, 3757, 3760, 3770, 3773, 3782,
1358 3788, 3797, 3801, 3808, 3812, 3816, 3820, 3827, 3831, 3838,
1359 3846, 3854, 3862, 3870, 3877, 3884, 3892, 3902, 3907, 3912,
1360 3917, 3925, 3928, 3932, 3941, 3948, 3955, 3962, 3977, 3983,
1361 3991, 3999, 4017, 4024, 4031, 4041, 4054, 4058, 4062, 4066,
1362 4073, 4079, 4085, 4091, 4101, 4110, 4112, 4114, 4118, 4126,
1363 4130, 4137, 4143, 4149, 4153, 4157, 4161, 4167, 4173, 4177,
1364 4181, 4185, 4189, 4193, 4197, 4201, 4205, 4209, 4213
1368 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1369 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1370 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1371 static const char *const yytname
[] =
1373 "$end", "error", "$undefined", "BYTEOP16P", "BYTEOP16M", "BYTEOP1P",
1374 "BYTEOP2P", "BYTEOP2M", "BYTEOP3P", "BYTEUNPACK", "BYTEPACK", "PACK",
1375 "SAA", "ALIGN8", "ALIGN16", "ALIGN24", "VIT_MAX", "EXTRACT", "DEPOSIT",
1376 "EXPADJ", "SEARCH", "ONES", "SIGN", "SIGNBITS", "LINK", "UNLINK", "REG",
1377 "PC", "CCREG", "BYTE_DREG", "REG_A_DOUBLE_ZERO", "REG_A_DOUBLE_ONE",
1378 "A_ZERO_DOT_L", "A_ZERO_DOT_H", "A_ONE_DOT_L", "A_ONE_DOT_H", "HALF_REG",
1379 "NOP", "RTI", "RTS", "RTX", "RTN", "RTE", "HLT", "IDLE", "STI", "CLI",
1380 "CSYNC", "SSYNC", "EMUEXCPT", "RAISE", "EXCPT", "LSETUP", "LOOP",
1381 "LOOP_BEGIN", "LOOP_END", "DISALGNEXCPT", "JUMP", "JUMP_DOT_S",
1382 "JUMP_DOT_L", "CALL", "ABORT", "NOT", "TILDA", "BANG", "AMPERSAND",
1383 "BAR", "PERCENT", "CARET", "BXOR", "MINUS", "PLUS", "STAR", "SLASH",
1384 "NEG", "MIN", "MAX", "ABS", "DOUBLE_BAR", "_PLUS_BAR_PLUS",
1385 "_PLUS_BAR_MINUS", "_MINUS_BAR_PLUS", "_MINUS_BAR_MINUS", "_MINUS_MINUS",
1386 "_PLUS_PLUS", "SHIFT", "LSHIFT", "ASHIFT", "BXORSHIFT",
1387 "_GREATER_GREATER_GREATER_THAN_ASSIGN", "ROT", "LESS_LESS",
1388 "GREATER_GREATER", "_GREATER_GREATER_GREATER", "_LESS_LESS_ASSIGN",
1389 "_GREATER_GREATER_ASSIGN", "DIVS", "DIVQ", "ASSIGN", "_STAR_ASSIGN",
1390 "_BAR_ASSIGN", "_CARET_ASSIGN", "_AMPERSAND_ASSIGN", "_MINUS_ASSIGN",
1391 "_PLUS_ASSIGN", "_ASSIGN_BANG", "_LESS_THAN_ASSIGN", "_ASSIGN_ASSIGN",
1392 "GE", "LT", "LE", "GT", "LESS_THAN", "FLUSHINV", "FLUSH", "IFLUSH",
1393 "PREFETCH", "PRNT", "OUTC", "WHATREG", "TESTSET", "ASL", "ASR", "B", "W",
1394 "NS", "S", "CO", "SCO", "TH", "TL", "BP", "BREV", "X", "Z", "M", "MMOD",
1395 "R", "RND", "RNDL", "RNDH", "RND12", "RND20", "V", "LO", "HI", "BITTGL",
1396 "BITCLR", "BITSET", "BITTST", "BITMUX", "DBGAL", "DBGAH", "DBGHALT",
1397 "DBG", "DBGA", "DBGCMPLX", "IF", "COMMA", "BY", "COLON", "SEMICOLON",
1398 "RPAREN", "LPAREN", "LBRACK", "RBRACK", "STATUS_REG", "MNOP", "SYMBOL",
1399 "NUMBER", "GOT", "GOT17M4", "FUNCDESC_GOT17M4", "AT", "PLTPC", "$accept",
1400 "statement", "asm", "asm_1", "REG_A", "opt_mode", "asr_asl", "sco",
1401 "asr_asl_0", "amod0", "amod1", "amod2", "xpmod", "xpmod1", "vsmod",
1402 "vmod", "smod", "searchmod", "aligndir", "byteop_mod", "c_align",
1403 "w32_or_nothing", "iu_or_nothing", "reg_with_predec", "reg_with_postinc",
1404 "min_max", "op_bar_op", "plus_minus", "rnd_op", "b3_op", "post_op",
1405 "a_assign", "a_minusassign", "a_plusassign", "assign_macfunc",
1406 "a_macfunc", "multiply_halfregs", "cc_op", "ccstat", "symbol",
1407 "any_gotrel", "got", "got_or_expr", "pltpc", "eterm", "expr", "expr_1", 0
1412 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1414 static const yytype_uint16 yytoknum
[] =
1416 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1417 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1418 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1419 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1420 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1421 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1422 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1423 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1424 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1425 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1426 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1427 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1428 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1429 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1430 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1431 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
1432 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1433 425, 426, 427, 428, 429
1437 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1438 static const yytype_uint8 yyr1
[] =
1440 0, 175, 176, 176, 177, 177, 177, 177, 178, 178,
1441 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1442 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1443 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1444 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1445 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1446 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1447 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1448 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1449 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1450 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1451 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1452 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1453 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1454 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1455 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1456 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1457 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1458 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1459 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1460 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1461 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1462 178, 179, 179, 180, 180, 180, 180, 180, 181, 181,
1463 182, 182, 182, 182, 183, 183, 184, 184, 185, 185,
1464 185, 186, 186, 186, 186, 186, 187, 187, 187, 188,
1465 188, 188, 189, 189, 189, 189, 189, 189, 190, 190,
1466 191, 191, 192, 192, 192, 192, 193, 193, 194, 194,
1467 194, 194, 195, 195, 195, 196, 196, 197, 197, 198,
1468 199, 200, 200, 201, 201, 201, 201, 202, 202, 203,
1469 203, 203, 203, 203, 203, 203, 203, 204, 204, 204,
1470 204, 205, 205, 205, 206, 207, 208, 209, 209, 209,
1471 209, 209, 210, 210, 210, 211, 212, 212, 212, 212,
1472 213, 213, 213, 213, 214, 215, 215, 215, 216, 217,
1473 217, 218, 219, 219, 219, 219, 219, 220, 221, 221,
1474 221, 221, 221, 221, 221, 221, 221, 221, 221
1477 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1478 static const yytype_uint8 yyr2
[] =
1480 0, 2, 0, 1, 2, 6, 4, 1, 1, 2,
1481 5, 1, 6, 6, 3, 3, 17, 17, 11, 11,
1482 11, 12, 12, 12, 5, 3, 3, 3, 8, 13,
1483 12, 13, 13, 13, 8, 17, 6, 9, 3, 6,
1484 3, 5, 6, 8, 8, 2, 2, 4, 3, 2,
1485 4, 3, 6, 4, 7, 7, 3, 3, 6, 3,
1486 4, 3, 3, 3, 11, 11, 9, 5, 5, 9,
1487 5, 5, 6, 6, 5, 5, 5, 6, 6, 5,
1488 1, 3, 3, 3, 3, 4, 4, 9, 9, 5,
1489 7, 4, 6, 5, 6, 7, 9, 8, 8, 11,
1490 9, 4, 5, 6, 7, 6, 4, 6, 5, 6,
1491 6, 4, 8, 10, 10, 12, 5, 6, 5, 6,
1492 4, 4, 4, 7, 9, 9, 9, 6, 6, 6,
1493 8, 8, 6, 5, 5, 8, 4, 7, 1, 1,
1494 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1495 4, 4, 6, 6, 2, 2, 4, 2, 2, 2,
1496 2, 2, 2, 6, 6, 5, 4, 3, 3, 3,
1497 3, 3, 3, 4, 2, 4, 2, 4, 2, 4,
1498 2, 7, 8, 8, 7, 7, 7, 9, 7, 8,
1499 9, 8, 6, 7, 8, 9, 8, 7, 7, 6,
1500 11, 7, 11, 7, 3, 2, 1, 7, 9, 11,
1501 3, 5, 7, 1, 2, 2, 4, 1, 6, 6,
1502 6, 1, 1, 0, 5, 5, 3, 3, 3, 3,
1503 0, 1, 1, 1, 1, 1, 0, 3, 0, 3,
1504 3, 0, 3, 3, 5, 5, 0, 3, 3, 0,
1505 3, 3, 0, 3, 3, 3, 5, 5, 0, 3,
1506 0, 3, 1, 1, 1, 1, 0, 3, 3, 3,
1507 5, 5, 1, 1, 1, 0, 3, 0, 3, 4,
1508 4, 1, 1, 1, 1, 1, 1, 1, 1, 3,
1509 3, 3, 3, 5, 5, 5, 5, 3, 3, 5,
1510 5, 0, 1, 1, 2, 2, 2, 3, 1, 5,
1511 5, 3, 2, 2, 2, 3, 1, 1, 1, 1,
1512 3, 3, 3, 3, 1, 1, 1, 1, 3, 1,
1513 1, 3, 1, 1, 3, 2, 2, 1, 3, 3,
1514 3, 3, 3, 3, 3, 3, 3, 3, 1
1517 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1518 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1519 means the default is an error. */
1520 static const yytype_uint16 yydefact
[] =
1522 0, 7, 0, 0, 206, 0, 0, 221, 222, 0,
1523 0, 0, 0, 0, 138, 140, 139, 141, 142, 143,
1524 144, 0, 0, 145, 146, 147, 0, 0, 0, 0,
1525 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1526 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1527 0, 217, 213, 0, 0, 0, 0, 0, 0, 8,
1528 0, 3, 0, 0, 0, 0, 0, 0, 223, 308,
1529 80, 0, 0, 0, 0, 324, 332, 333, 348, 205,
1530 337, 0, 0, 0, 0, 0, 0, 0, 316, 317,
1531 319, 318, 0, 0, 0, 0, 0, 0, 0, 149,
1532 148, 154, 155, 0, 0, 0, 157, 158, 333, 160,
1533 159, 0, 162, 161, 0, 0, 0, 176, 0, 174,
1534 0, 178, 0, 180, 0, 0, 0, 316, 0, 0,
1535 0, 0, 0, 0, 0, 215, 214, 0, 0, 0,
1536 0, 0, 301, 0, 0, 1, 0, 4, 304, 305,
1537 306, 0, 46, 0, 0, 0, 0, 0, 0, 0,
1538 45, 0, 312, 49, 275, 314, 313, 0, 9, 0,
1539 335, 336, 0, 0, 0, 0, 0, 0, 0, 0,
1540 0, 0, 0, 169, 172, 170, 171, 167, 168, 0,
1541 0, 0, 0, 0, 0, 272, 273, 274, 0, 0,
1542 0, 81, 83, 246, 0, 246, 0, 0, 281, 282,
1543 0, 0, 0, 0, 0, 0, 0, 0, 0, 307,
1544 0, 0, 223, 249, 63, 59, 57, 61, 62, 82,
1545 0, 0, 84, 0, 321, 320, 26, 14, 27, 15,
1546 0, 0, 0, 0, 51, 0, 0, 0, 0, 0,
1547 0, 311, 223, 48, 0, 210, 0, 0, 0, 0,
1548 0, 0, 0, 0, 0, 0, 0, 0, 301, 301,
1549 323, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1550 0, 0, 0, 0, 288, 287, 303, 302, 0, 0,
1551 0, 322, 0, 275, 204, 0, 0, 38, 25, 0,
1552 0, 0, 0, 0, 0, 0, 0, 40, 0, 56,
1553 0, 0, 0, 0, 334, 345, 347, 340, 346, 342,
1554 341, 338, 339, 343, 344, 0, 0, 0, 0, 0,
1555 0, 0, 0, 0, 0, 0, 0, 287, 283, 284,
1556 285, 286, 0, 0, 0, 0, 0, 0, 53, 0,
1557 47, 166, 252, 258, 0, 0, 0, 0, 0, 0,
1558 0, 0, 0, 0, 0, 0, 301, 0, 0, 0,
1559 86, 0, 50, 0, 0, 0, 0, 0, 0, 0,
1560 0, 0, 0, 0, 111, 121, 122, 120, 0, 0,
1561 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1562 0, 85, 0, 0, 150, 0, 331, 151, 0, 0,
1563 0, 0, 175, 173, 177, 179, 156, 302, 0, 0,
1564 302, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1565 216, 0, 136, 0, 0, 0, 0, 0, 0, 0,
1566 279, 0, 6, 60, 0, 315, 0, 0, 0, 0,
1567 0, 0, 91, 106, 101, 0, 0, 0, 227, 0,
1568 226, 0, 0, 223, 0, 0, 0, 0, 0, 0,
1569 0, 0, 0, 0, 79, 67, 68, 0, 252, 258,
1570 252, 236, 238, 0, 0, 0, 0, 165, 0, 24,
1571 0, 0, 0, 0, 301, 301, 0, 306, 0, 309,
1572 302, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1573 277, 277, 74, 75, 277, 277, 0, 76, 70, 71,
1574 0, 0, 0, 0, 0, 0, 0, 0, 93, 108,
1575 260, 0, 238, 0, 0, 301, 0, 310, 0, 0,
1576 211, 0, 0, 0, 0, 280, 0, 0, 0, 0,
1577 0, 0, 0, 0, 0, 0, 0, 0, 133, 0,
1578 0, 134, 0, 0, 0, 0, 0, 0, 0, 0,
1579 0, 0, 0, 102, 89, 0, 116, 118, 41, 276,
1580 0, 0, 0, 0, 10, 0, 0, 0, 0, 0,
1581 0, 0, 0, 0, 0, 0, 92, 107, 110, 0,
1582 230, 52, 0, 0, 36, 248, 247, 0, 0, 0,
1583 0, 0, 105, 258, 252, 117, 119, 0, 0, 302,
1584 0, 0, 0, 12, 0, 333, 329, 0, 330, 199,
1585 0, 0, 0, 0, 250, 251, 58, 0, 77, 78,
1586 72, 73, 0, 0, 0, 0, 0, 42, 0, 0,
1587 0, 0, 94, 109, 0, 39, 103, 260, 302, 0,
1588 13, 0, 0, 0, 153, 152, 164, 163, 0, 0,
1589 0, 0, 0, 129, 127, 128, 0, 220, 219, 218,
1590 0, 132, 0, 0, 0, 0, 0, 0, 192, 5,
1591 0, 0, 0, 0, 0, 224, 225, 0, 307, 0,
1592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1593 0, 0, 231, 232, 233, 0, 0, 0, 0, 0,
1594 253, 0, 254, 0, 255, 259, 104, 95, 0, 246,
1595 0, 0, 246, 0, 197, 0, 198, 0, 0, 0,
1596 0, 0, 0, 0, 0, 123, 0, 0, 0, 0,
1597 0, 0, 0, 0, 90, 0, 188, 0, 207, 212,
1598 0, 181, 0, 0, 184, 185, 0, 137, 0, 0,
1599 0, 0, 0, 0, 0, 203, 193, 186, 0, 201,
1600 55, 54, 0, 0, 0, 0, 0, 0, 0, 34,
1601 112, 0, 246, 98, 0, 0, 237, 0, 239, 240,
1602 0, 0, 0, 246, 196, 246, 246, 189, 0, 325,
1603 326, 327, 328, 0, 28, 258, 223, 278, 131, 130,
1604 0, 0, 258, 97, 43, 44, 0, 0, 261, 0,
1605 191, 223, 0, 182, 194, 183, 0, 135, 0, 0,
1606 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1607 0, 0, 124, 100, 0, 69, 0, 0, 0, 257,
1608 256, 195, 190, 187, 66, 0, 37, 88, 228, 229,
1609 96, 0, 0, 0, 0, 87, 208, 125, 0, 0,
1610 0, 0, 0, 0, 126, 0, 266, 0, 0, 0,
1611 0, 0, 0, 0, 0, 0, 114, 0, 113, 0,
1612 0, 0, 0, 266, 262, 265, 264, 263, 0, 0,
1613 0, 0, 0, 64, 0, 0, 0, 0, 99, 241,
1614 238, 20, 238, 0, 0, 209, 0, 0, 18, 19,
1615 202, 200, 65, 0, 30, 0, 0, 0, 230, 23,
1616 22, 21, 115, 0, 0, 0, 267, 0, 29, 0,
1617 31, 32, 0, 33, 234, 235, 0, 0, 0, 0,
1618 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1619 243, 230, 242, 0, 0, 0, 0, 269, 0, 268,
1620 0, 290, 0, 292, 0, 291, 0, 289, 0, 297,
1621 0, 298, 0, 0, 0, 0, 0, 0, 0, 0,
1622 0, 0, 0, 0, 0, 245, 244, 0, 266, 266,
1623 270, 271, 294, 296, 295, 293, 299, 300, 35, 16,
1627 /* YYDEFGOTO[NTERM-NUM]. */
1628 static const yytype_int16 yydefgoto
[] =
1630 -1, 60, 61, 62, 361, 168, 745, 715, 957, 601,
1631 604, 939, 348, 372, 487, 489, 652, 908, 913, 948,
1632 220, 309, 638, 64, 117, 221, 345, 288, 950, 953,
1633 289, 362, 363, 67, 68, 69, 166, 93, 70, 77,
1634 812, 626, 627, 109, 78, 79, 80
1637 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1639 #define YYPACT_NINF -907
1640 static const yytype_int16 yypact
[] =
1642 878, -907, -120, 291, -907, 614, 439, -907, -907, -35,
1643 -11, 31, 61, 81, -907, -907, -907, -907, -907, -907,
1644 -907, 183, 202, -907, -907, -907, 291, 291, -56, 291,
1645 -907, 351, 291, 291, 354, 96, 111, 86, 160, 162,
1646 168, 122, 170, 172, 318, 134, 146, 196, 200, 217,
1647 228, -907, 230, 233, 252, 46, 207, 26, 318, -907,
1648 412, -907, -48, 195, 324, 270, 274, 394, 271, -907,
1649 -907, 418, 291, 291, 291, -907, -907, -907, -907, -907,
1650 561, 55, 69, 71, 482, 421, 80, 107, 70, -907,
1651 -907, -907, 5, -107, 414, 419, 422, 440, 121, -907,
1652 -907, -907, -907, 291, 465, 42, -907, -907, 321, -907,
1653 -907, 52, -907, -907, 479, 489, 495, -907, 502, -907,
1654 520, -907, 558, -907, 560, 569, 593, -907, 594, 599,
1655 604, 609, 630, 640, 643, -907, -907, 638, 650, 27,
1656 657, -22, 237, 663, 667, -907, 1024, -907, -907, -907,
1657 186, 9, -907, 568, 272, 186, 186, 186, 547, 186,
1658 174, 291, -907, -907, 548, -907, -907, 147, 556, 555,
1659 -907, -907, 459, 291, 291, 291, 291, 291, 291, 291,
1660 291, 291, 291, -907, -907, -907, -907, -907, -907, 562,
1661 563, 564, 565, 567, 570, -907, -907, -907, 572, 573,
1662 574, 508, -907, 575, 645, -52, 159, 201, -907, -907,
1663 697, 698, 703, 705, 706, 576, 577, 20, 708, 668,
1664 579, 580, 271, 581, -907, -907, -907, 582, -907, 239,
1665 583, 320, -907, 585, -907, -907, -907, -907, -907, -907,
1666 586, 587, 725, 145, 15, 654, 411, 717, 718, 591,
1667 272, -907, 271, -907, 598, 659, 597, 689, 588, 601,
1668 690, 606, 607, -46, -39, -37, -4, 605, 301, 323,
1669 -907, 610, 613, 615, 616, 617, 618, 619, 621, 671,
1670 291, 47, 740, 291, -907, -907, -907, 744, 291, 620,
1671 622, -907, -47, 548, -907, 746, 742, 623, 626, 627,
1672 629, 186, 631, 291, 291, 291, 653, -907, 644, -907,
1673 -42, -31, 374, 291, -907, 608, 571, -907, 600, 397,
1674 397, -907, -907, 510, 510, 763, 765, 766, 768, 769,
1675 760, 771, 772, 773, 774, 775, 776, 641, -907, -907,
1676 -907, -907, 291, 291, 291, 777, 779, 219, -907, 778,
1677 -907, -907, 646, 647, 648, 649, 652, 655, 780, 786,
1678 745, 403, 394, 394, 274, 656, 382, 186, 789, 791,
1679 661, 249, -907, 688, 218, 260, 268, 795, 186, 186,
1680 186, 796, 798, 154, -907, -907, -907, -907, 687, 800,
1681 33, 291, 291, 291, 805, 792, 670, 672, 804, 274,
1682 673, 674, 291, 807, -907, 808, -907, -907, 811, 812,
1683 813, 675, -907, -907, -907, -907, -907, -907, 291, 676,
1684 816, 291, 678, 291, 291, 291, 818, 291, 291, 291,
1685 -907, 819, 683, 749, 291, 686, 0, 684, 685, 753,
1686 -907, 1024, -907, -907, 692, -907, 186, 186, 817, 820,
1687 700, 210, -907, -907, -907, 693, 704, 723, -907, 730,
1688 -907, 762, 770, 271, 709, 710, 711, 712, 713, 719,
1689 722, 726, 727, 728, -907, -907, -907, 843, 646, 647,
1690 646, 24, 105, 721, 729, 731, 87, -907, 738, -907,
1691 851, 852, 856, 305, 301, 464, 867, -907, 732, -907,
1692 869, 291, 733, 739, 741, 743, 870, 759, 781, 782,
1693 737, 737, -907, -907, 737, 737, 783, -907, -907, -907,
1694 784, 785, 787, 788, 790, 793, 794, 797, 799, -907,
1695 799, 801, 802, 871, 896, 481, 806, -907, 897, 809,
1696 847, 810, 814, 815, 821, -907, 822, 842, 823, 824,
1697 853, 828, 833, 834, 803, 835, 837, 838, -907, 827,
1698 924, 840, 855, 928, 857, 861, 865, 940, 825, 291,
1699 872, 899, 890, -907, -907, 186, -907, -907, 826, -907,
1700 844, 845, 11, 40, -907, 947, 291, 291, 291, 291,
1701 952, 943, 954, 945, 956, 894, -907, -907, -907, 978,
1702 428, -907, 979, 487, -907, -907, -907, 982, 848, 44,
1703 73, 849, -907, 647, 646, -907, -907, 291, 850, 983,
1704 291, 854, 858, -907, 862, 839, -907, 873, -907, -907,
1705 987, 988, 990, 919, -907, -907, -907, 882, -907, -907,
1706 -907, -907, 291, 291, 859, 1001, 1003, -907, 513, 186,
1707 186, 914, -907, -907, 1007, -907, -907, 799, 997, 881,
1708 -907, 949, 1025, 291, -907, -907, -907, -907, 955, 1041,
1709 980, 981, 178, -907, -907, -907, 186, -907, -907, -907,
1710 923, -907, 957, 238, 926, 925, 1061, 1064, -907, -907,
1711 133, 186, 186, 933, 186, -907, -907, 186, -907, 186,
1712 932, 935, 936, 937, 938, 939, 941, 942, 944, 946,
1713 291, 999, -907, -907, -907, 948, 1000, 950, 951, 1002,
1714 -907, 959, -907, 973, -907, -907, -907, -907, 953, 575,
1715 958, 960, 575, 1014, -907, 477, -907, 1009, 962, 964,
1716 394, 965, 966, 967, 566, -907, 968, 969, 970, 971,
1717 961, 976, 974, 984, -907, 977, -907, 394, 1011, -907,
1718 1085, -907, 1078, 1089, -907, -907, 989, -907, 991, 972,
1719 986, 1090, 1091, 291, 1096, -907, -907, -907, 1115, -907,
1720 -907, -907, 1117, 186, 291, 1124, 1126, 1128, 1129, -907,
1721 -907, 859, 575, 993, 995, 1132, -907, 1133, -907, -907,
1722 1111, 998, 1004, 575, -907, 575, 575, -907, 291, -907,
1723 -907, -907, -907, 186, -907, 647, 271, -907, -907, -907,
1724 1006, 1020, 647, -907, -907, -907, 313, 1135, -907, 1092,
1725 -907, 271, 1136, -907, -907, -907, 859, -907, 1137, 1139,
1726 1013, 1021, 1023, 1099, 1026, 1027, 1029, 1031, 1034, 1035,
1727 1036, 1037, -907, -907, 1065, -907, 398, 612, 1098, -907,
1728 -907, -907, -907, -907, -907, 1130, -907, -907, -907, -907,
1729 -907, 1039, 1044, 1042, 1163, -907, 1113, -907, 1043, 1046,
1730 291, 611, 1109, 291, -907, 1082, 1047, 291, 291, 291,
1731 291, 1049, 1183, 1186, 1180, 186, -907, 1187, -907, 1143,
1732 291, 291, 291, 1047, -907, -907, -907, -907, 1054, 925,
1733 1055, 1056, 1083, -907, 1057, 1059, 1060, 1062, -907, 1063,
1734 802, -907, 802, 1066, 1201, -907, 1067, 1069, -907, -907,
1735 -907, -907, -907, 1068, 1070, 1071, 1071, 1072, 476, -907,
1736 -907, -907, -907, 1073, 1203, 1205, -907, 557, -907, 332,
1737 -907, -907, 553, -907, -907, -907, 167, 380, 1196, 1077,
1738 1079, 391, 408, 413, 453, 456, 462, 499, 506, 584,
1739 -907, 428, -907, 1076, 291, 291, 1103, -907, 1105, -907,
1740 1106, -907, 1107, -907, 1108, -907, 1110, -907, 1112, -907,
1741 1114, -907, 1080, 1084, 1176, 1088, 1093, 1094, 1095, 1097,
1742 1100, 1101, 1102, 1104, 1116, -907, -907, 1216, 1047, 1047,
1743 -907, -907, -907, -907, -907, -907, -907, -907, -907, -907,
1747 /* YYPGOTO[NTERM-NUM]. */
1748 static const yytype_int16 yypgoto
[] =
1750 -907, -907, -907, -122, 10, -208, -737, -906, 284, -907,
1751 -509, -907, -196, -907, -451, -460, -502, -907, -863, -907,
1752 -907, 975, -69, -907, -27, -907, 402, -180, 325, -907,
1753 -243, 2, 22, -168, 963, -213, -50, 59, -907, -16,
1754 -907, -907, -907, 1220, -907, -26, 19
1757 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1758 positive, shift that token. If negative, reduce the rule which
1759 number is the opposite. If zero, do what YYDEFACT says.
1760 If YYTABLE_NINF, syntax error. */
1761 #define YYTABLE_NINF -3
1762 static const yytype_int16 yytable
[] =
1764 101, 102, 65, 104, 365, 106, 107, 110, 113, 350,
1765 63, 119, 121, 123, 370, 162, 165, 108, 108, 597,
1766 296, 346, 66, 655, 292, 419, 422, 596, 653, 598,
1767 146, 441, 956, 232, 222, 294, 234, 400, 411, 163,
1768 928, 7, 8, 71, 401, 411, 360, 411, 252, 364,
1769 7, 8, 142, 279, 852, 184, 186, 188, 223, 235,
1770 226, 228, 136, 94, 389, 993, 395, 161, 256, 257,
1771 7, 8, 253, 433, 139, 160, 164, 254, 259, 260,
1772 411, 183, 399, 72, 280, 284, 285, 95, 418, 421,
1773 73, 170, 171, 172, 219, 185, 229, 187, 231, 877,
1774 7, 8, 526, 128, 434, 72, 225, 103, 251, 143,
1775 140, 347, 73, 147, 442, 72, 457, 144, 72, 412,
1776 458, 527, 73, 502, 172, 73, 413, 459, 414, 96,
1777 172, 460, 72, 227, 72, 307, 282, 240, 283, 73,
1778 241, 73, 242, 72, 243, 1019, 1020, 244, 65, 245,
1779 73, 7, 8, 726, 233, 754, 63, 246, 563, 97,
1780 293, 415, 564, 727, 297, 298, 299, 300, 66, 302,
1781 72, 385, 295, 171, 697, 7, 8, 73, 388, 98,
1782 522, 386, 599, 74, 72, 351, 501, 600, 75, 76,
1783 523, 73, 315, 316, 317, 318, 319, 320, 321, 322,
1784 323, 324, 721, 699, 764, 74, 722, 247, 248, 99,
1785 75, 76, 608, 609, 765, 74, 7, 8, 74, 230,
1786 75, 76, 72, 75, 76, 170, 171, 352, 100, 73,
1787 610, 723, 74, 141, 74, 724, 172, 75, 76, 75,
1788 76, 769, 770, 74, 510, 249, 576, 771, 75, 76,
1789 116, 618, 621, 387, 432, 584, 135, 436, 772, 114,
1790 7, 8, 438, 602, 72, 303, 304, 305, 603, 172,
1791 74, 73, 148, 72, 115, 75, 76, 452, 453, 454,
1792 73, 72, 310, 311, 250, 124, 512, 464, 73, 75,
1793 76, 778, 659, 148, 514, 779, 152, 129, 149, 150,
1794 7, 8, 7, 8, 7, 8, 153, 284, 285, 130,
1795 153, 450, 162, 165, 617, 620, 478, 479, 480, 568,
1796 286, 287, 74, 72, 118, 969, 120, 75, 76, 970,
1797 73, 72, 122, 72, 125, 72, 126, 306, 73, 871,
1798 154, 615, 73, 7, 8, 374, 375, 155, 511, 513,
1799 515, 376, 483, 484, 72, 866, 156, 157, 158, 131,
1800 159, 73, 870, 132, 74, 528, 529, 530, 72, 75,
1801 76, 284, 285, 74, 498, 73, 539, 503, 75, 76,
1802 133, 74, 507, 508, 286, 417, 75, 76, 517, 518,
1803 519, 134, 546, 284, 285, 549, 137, 551, 552, 553,
1804 461, 555, 556, 557, 7, 8, 286, 420, 561, 536,
1805 462, 940, 145, 941, 72, 138, 127, 72, 89, 90,
1806 91, 73, 151, 74, 73, 577, 378, 379, 75, 76,
1807 153, 74, 380, 74, 167, 74, 75, 76, 75, 76,
1808 75, 76, 639, 65, 169, 640, 641, 224, 571, 572,
1809 236, 63, 284, 285, 74, 237, 570, 570, 238, 75,
1810 76, 963, 964, 66, 175, 286, 500, 616, 74, 179,
1811 180, 965, 966, 75, 76, 628, 239, 338, 339, 340,
1812 341, 284, 285, 296, 365, 625, 400, 189, 190, 191,
1813 192, 255, 193, 194, 258, 195, 196, 197, 198, 199,
1814 200, 148, 391, 392, 393, 261, 149, 497, 201, 394,
1815 202, 203, 7, 8, 105, 262, 204, 111, 205, 75,
1816 76, 263, 75, 76, 173, 174, 175, 176, 264, 177,
1817 178, 179, 180, 804, 284, 285, 807, 88, 971, 89,
1818 90, 91, 972, 690, 92, 206, 265, 286, 619, 976,
1819 181, 182, 207, 977, 712, 713, 714, 208, 209, 210,
1820 701, 702, 703, 704, 286, 658, 978, 211, 212, 213,
1821 979, 980, 214, 334, 335, 981, 336, 175, 284, 337,
1822 177, 178, 179, 180, 266, 693, 267, 338, 339, 340,
1823 341, 728, 698, 251, 731, 268, 853, 954, 955, 342,
1824 343, 344, 712, 713, 714, 215, 216, 861, 867, 862,
1825 863, 982, 717, 718, 984, 983, 742, 743, 985, 269,
1826 986, 314, 270, 875, 987, 271, 173, 174, 175, 176,
1827 272, 177, 178, 179, 180, 273, 173, 759, 175, 176,
1828 296, 177, 178, 179, 180, 217, 218, 809, 810, 811,
1829 75, 76, 181, 182, 748, 749, 274, 988, 775, 750,
1830 751, 989, 181, 182, 990, 173, 275, 175, 991, 276,
1831 177, 178, 179, 180, 277, 175, 278, 893, 177, 178,
1832 179, 180, 284, 285, 794, 281, 766, 820, 821, 290,
1833 816, 181, 182, 961, 962, 291, 783, 967, 968, 181,
1834 182, 780, 781, 81, 570, 954, 955, 831, 82, 83,
1835 301, 308, 84, 85, 312, 313, 349, 86, 87, 904,
1836 905, 906, 907, 353, 354, 325, 326, 327, 328, 355,
1837 329, 356, 357, 330, 366, 331, 332, 333, 347, 367,
1838 358, 359, 368, 369, 371, 373, 377, 842, 381, 382,
1839 383, 384, 390, 396, 397, 398, 402, 403, 847, 404,
1840 405, 408, 406, 407, 409, 410, 435, 416, 423, 431,
1841 437, 424, 444, 425, 426, 427, 428, 429, 445, 455,
1842 456, 446, 864, 430, 447, 439, 448, 440, 449, 465,
1843 451, 466, 467, 846, 468, 469, 470, 471, 472, 473,
1844 474, 475, 476, 481, 477, 482, 494, 490, 491, 486,
1845 488, 492, 495, 485, 493, 504, 496, 505, 499, 506,
1846 509, 516, 520, 865, 521, 524, 525, 531, 532, 533,
1847 535, 534, 538, 540, 541, 537, 872, 542, 543, 544,
1848 545, 547, 548, 550, 554, 558, 559, 560, 562, 565,
1849 566, 567, 569, 573, 903, 578, 574, 910, 575, 580,
1850 582, 914, 915, 916, 917, 581, 579, 585, 583, 595,
1851 586, 587, 588, 589, 925, 926, 927, 590, -2, 1,
1852 591, 611, 930, 605, 592, 593, 594, 612, 613, 607,
1853 2, 606, 614, 622, 623, 624, 633, 630, 629, 631,
1854 637, 632, 3, 4, 5, 922, 6, 656, 7, 8,
1855 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
1856 19, 634, 20, 21, 22, 23, 24, 25, 26, 27,
1857 28, 29, 657, 661, 30, 31, 32, 33, 34, 663,
1858 669, 642, 643, 635, 636, 645, 646, 644, 995, 996,
1859 681, 672, 647, 683, 684, 685, 648, 649, 680, 686,
1860 650, 676, 651, 687, 654, 603, 688, 692, 660, 691,
1861 148, 662, 664, 700, 35, 36, 665, 666, 705, 706,
1862 707, 708, 709, 667, 694, 710, 689, 668, 670, 671,
1863 673, 37, 38, 39, 40, 674, 675, 677, 41, 678,
1864 679, 42, 43, 682, 711, 716, 695, 696, 719, 730,
1865 720, 725, 735, 737, 738, 729, 739, 740, 741, 732,
1866 733, 44, 744, 755, 45, 46, 47, 734, 48, 49,
1867 50, 51, 52, 53, 54, 55, 2, 746, 736, 747,
1868 752, 56, 57, 753, 58, 59, 756, 757, 3, 4,
1869 5, 758, 6, 760, 7, 8, 9, 10, 11, 12,
1870 13, 14, 15, 16, 17, 18, 19, 761, 20, 21,
1871 22, 23, 24, 25, 26, 27, 28, 29, 762, 763,
1872 30, 31, 32, 33, 34, 767, 773, 776, 768, 774,
1873 777, 782, 784, 785, 786, 787, 788, 795, 797, 802,
1874 800, 789, 801, 790, 791, 808, 792, 813, 793, 832,
1875 796, 833, 798, 799, 834, 835, 840, 841, 803, 826,
1876 35, 36, 843, 805, 814, 806, 815, 817, 818, 819,
1877 822, 823, 824, 825, 827, 838, 828, 37, 38, 39,
1878 40, 844, 830, 858, 41, 845, 829, 42, 43, 839,
1879 848, 836, 849, 837, 850, 851, 854, 855, 856, 857,
1880 859, 873, 876, 878, 874, 879, 860, 44, 868, 894,
1881 45, 46, 47, 880, 48, 49, 50, 51, 52, 53,
1882 54, 55, 869, 411, 881, 882, 883, 56, 57, 884,
1883 58, 59, 885, 886, 887, 888, 889, 890, 891, 899,
1884 895, 896, 897, 901, 898, 900, 902, 909, 911, 919,
1885 912, 918, 920, 921, 924, 923, 929, 931, 932, 934,
1886 933, 935, 936, 943, 937, 944, 938, 945, 942, 959,
1887 946, 960, 973, 947, 949, 952, 958, 974, 994, 975,
1888 997, 998, 1005, 999, 1000, 1001, 1006, 1002, 1007, 1003,
1889 1008, 1004, 1018, 992, 112, 1009, 1010, 1011, 892, 1012,
1890 0, 951, 1013, 1014, 1015, 0, 1016, 0, 443, 0,
1891 0, 0, 0, 0, 0, 463, 0, 0, 1017
1894 static const yytype_int16 yycheck
[] =
1896 26, 27, 0, 29, 217, 31, 32, 33, 34, 205,
1897 0, 38, 39, 40, 222, 65, 66, 33, 34, 479,
1898 72, 201, 0, 532, 146, 268, 269, 478, 530, 480,
1899 78, 78, 938, 28, 84, 26, 143, 250, 84, 65,
1900 903, 30, 31, 163, 252, 84, 26, 84, 98, 217,
1901 30, 31, 26, 26, 791, 81, 82, 83, 84, 166,
1902 86, 87, 52, 98, 244, 971, 246, 65, 26, 27,
1903 30, 31, 98, 26, 28, 65, 66, 103, 26, 27,
1904 84, 26, 250, 63, 57, 70, 71, 98, 268, 269,
1905 70, 72, 73, 74, 84, 26, 26, 26, 88, 836,
1906 30, 31, 69, 44, 57, 63, 26, 163, 98, 83,
1907 64, 163, 70, 161, 161, 63, 158, 58, 63, 165,
1908 162, 88, 70, 366, 105, 70, 165, 158, 165, 98,
1909 111, 162, 63, 26, 63, 161, 158, 16, 160, 70,
1910 19, 70, 21, 63, 23, 1008, 1009, 26, 146, 28,
1911 70, 30, 31, 613, 149, 657, 146, 36, 158, 98,
1912 150, 165, 162, 614, 154, 155, 156, 157, 146, 159,
1913 63, 26, 163, 154, 163, 30, 31, 70, 163, 98,
1914 26, 36, 158, 163, 63, 26, 366, 163, 168, 169,
1915 36, 70, 173, 174, 175, 176, 177, 178, 179, 180,
1916 181, 182, 158, 163, 26, 163, 162, 86, 87, 26,
1917 168, 169, 125, 126, 36, 163, 30, 31, 163, 149,
1918 168, 169, 63, 168, 169, 206, 207, 26, 26, 70,
1919 143, 158, 163, 26, 163, 162, 217, 168, 169, 168,
1920 169, 3, 4, 163, 26, 124, 36, 9, 168, 169,
1921 164, 494, 495, 243, 280, 463, 26, 283, 20, 163,
1922 30, 31, 288, 158, 63, 91, 92, 93, 163, 250,
1923 163, 70, 98, 63, 163, 168, 169, 303, 304, 305,
1924 70, 63, 135, 136, 163, 163, 26, 313, 70, 168,
1925 169, 158, 535, 98, 26, 162, 26, 163, 103, 104,
1926 30, 31, 30, 31, 30, 31, 36, 70, 71, 163,
1927 36, 301, 362, 363, 494, 495, 342, 343, 344, 441,
1928 83, 84, 163, 63, 164, 158, 164, 168, 169, 162,
1929 70, 63, 164, 63, 164, 63, 164, 163, 70, 26,
1930 70, 36, 70, 30, 31, 106, 107, 77, 374, 375,
1931 376, 112, 133, 134, 63, 815, 86, 87, 88, 163,
1932 90, 70, 822, 163, 163, 391, 392, 393, 63, 168,
1933 169, 70, 71, 163, 364, 70, 402, 367, 168, 169,
1934 163, 163, 133, 134, 83, 84, 168, 169, 378, 379,
1935 380, 163, 418, 70, 71, 421, 163, 423, 424, 425,
1936 26, 427, 428, 429, 30, 31, 83, 84, 434, 399,
1937 36, 920, 0, 922, 63, 163, 98, 63, 100, 101,
1938 102, 70, 98, 163, 70, 451, 106, 107, 168, 169,
1939 36, 163, 112, 163, 163, 163, 168, 169, 168, 169,
1940 168, 169, 511, 441, 26, 514, 515, 26, 446, 447,
1941 36, 441, 70, 71, 163, 36, 446, 447, 36, 168,
1942 169, 129, 130, 441, 67, 83, 84, 493, 163, 72,
1943 73, 139, 140, 168, 169, 501, 36, 79, 80, 81,
1944 82, 70, 71, 72, 697, 501, 699, 5, 6, 7,
1945 8, 26, 10, 11, 173, 13, 14, 15, 16, 17,
1946 18, 98, 91, 92, 93, 26, 103, 104, 26, 98,
1947 28, 29, 30, 31, 163, 26, 34, 163, 36, 168,
1948 169, 26, 168, 169, 65, 66, 67, 68, 26, 70,
1949 71, 72, 73, 729, 70, 71, 732, 98, 158, 100,
1950 101, 102, 162, 569, 105, 63, 26, 83, 84, 158,
1951 91, 92, 70, 162, 126, 127, 128, 75, 76, 77,
1952 586, 587, 588, 589, 83, 84, 158, 85, 86, 87,
1953 162, 158, 90, 65, 66, 162, 68, 67, 70, 71,
1954 70, 71, 72, 73, 26, 575, 26, 79, 80, 81,
1955 82, 617, 582, 583, 620, 26, 792, 121, 122, 91,
1956 92, 93, 126, 127, 128, 123, 124, 803, 816, 805,
1957 806, 158, 125, 126, 158, 162, 642, 643, 162, 26,
1958 158, 162, 28, 831, 162, 26, 65, 66, 67, 68,
1959 26, 70, 71, 72, 73, 26, 65, 663, 67, 68,
1960 72, 70, 71, 72, 73, 163, 164, 170, 171, 172,
1961 168, 169, 91, 92, 141, 142, 26, 158, 685, 649,
1962 650, 162, 91, 92, 158, 65, 26, 67, 162, 26,
1963 70, 71, 72, 73, 36, 67, 26, 857, 70, 71,
1964 72, 73, 70, 71, 710, 28, 676, 121, 122, 26,
1965 740, 91, 92, 136, 137, 28, 694, 144, 145, 91,
1966 92, 691, 692, 89, 694, 121, 122, 757, 94, 95,
1967 163, 163, 98, 99, 158, 160, 71, 103, 104, 108,
1968 109, 110, 111, 26, 26, 163, 163, 163, 163, 26,
1969 163, 26, 26, 163, 26, 163, 163, 163, 163, 71,
1970 164, 164, 163, 163, 163, 163, 163, 773, 163, 163,
1971 163, 26, 98, 36, 36, 164, 158, 98, 784, 162,
1972 71, 71, 174, 162, 158, 158, 26, 162, 158, 98,
1973 26, 158, 26, 158, 158, 158, 158, 158, 36, 126,
1974 136, 158, 808, 162, 158, 165, 159, 165, 159, 26,
1975 159, 26, 26, 783, 26, 26, 36, 26, 26, 26,
1976 26, 26, 26, 26, 163, 26, 26, 159, 159, 163,
1977 163, 159, 26, 35, 159, 26, 71, 26, 162, 158,
1978 132, 26, 26, 813, 26, 138, 26, 22, 36, 159,
1979 26, 159, 158, 26, 26, 162, 826, 26, 26, 26,
1980 165, 165, 26, 165, 26, 26, 163, 98, 162, 165,
1981 165, 98, 160, 36, 880, 162, 36, 883, 158, 136,
1982 98, 887, 888, 889, 890, 135, 162, 158, 98, 26,
1983 160, 160, 160, 160, 900, 901, 902, 158, 0, 1,
1984 158, 143, 909, 162, 158, 158, 158, 36, 36, 158,
1985 12, 162, 36, 26, 162, 26, 26, 158, 165, 158,
1986 163, 158, 24, 25, 26, 895, 28, 36, 30, 31,
1987 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1988 42, 162, 44, 45, 46, 47, 48, 49, 50, 51,
1989 52, 53, 36, 36, 56, 57, 58, 59, 60, 92,
1990 98, 158, 158, 162, 162, 158, 158, 162, 974, 975,
1991 26, 98, 162, 98, 26, 98, 163, 163, 131, 98,
1992 163, 158, 163, 98, 163, 163, 26, 77, 162, 70,
1993 98, 162, 162, 26, 96, 97, 162, 162, 26, 36,
1994 26, 36, 26, 162, 158, 91, 161, 165, 165, 165,
1995 162, 113, 114, 115, 116, 162, 162, 162, 120, 162,
1996 162, 123, 124, 163, 26, 26, 162, 162, 26, 26,
1997 162, 162, 173, 26, 26, 165, 26, 98, 136, 165,
1998 162, 143, 163, 26, 146, 147, 148, 165, 150, 151,
1999 152, 153, 154, 155, 156, 157, 12, 36, 165, 36,
2000 126, 163, 164, 36, 166, 167, 165, 98, 24, 25,
2001 26, 26, 28, 98, 30, 31, 32, 33, 34, 35,
2002 36, 37, 38, 39, 40, 41, 42, 26, 44, 45,
2003 46, 47, 48, 49, 50, 51, 52, 53, 98, 98,
2004 56, 57, 58, 59, 60, 162, 160, 26, 131, 164,
2005 26, 158, 160, 158, 158, 158, 158, 98, 98, 126,
2006 98, 162, 143, 162, 162, 91, 162, 98, 162, 98,
2007 162, 26, 162, 162, 36, 26, 26, 26, 165, 158,
2008 96, 97, 26, 165, 162, 165, 162, 162, 162, 162,
2009 162, 162, 162, 162, 158, 163, 162, 113, 114, 115,
2010 116, 26, 165, 32, 120, 28, 162, 123, 124, 163,
2011 26, 162, 26, 162, 26, 26, 163, 162, 26, 26,
2012 162, 26, 26, 26, 72, 26, 162, 143, 162, 71,
2013 146, 147, 148, 160, 150, 151, 152, 153, 154, 155,
2014 156, 157, 162, 84, 163, 162, 160, 163, 164, 162,
2015 166, 167, 163, 162, 160, 160, 160, 160, 133, 36,
2016 70, 162, 158, 160, 162, 92, 160, 98, 126, 26,
2017 163, 162, 26, 33, 71, 28, 162, 162, 162, 162,
2018 137, 162, 162, 22, 162, 158, 163, 158, 162, 26,
2019 162, 26, 36, 163, 163, 163, 163, 160, 162, 160,
2020 137, 136, 162, 137, 137, 137, 162, 137, 72, 137,
2021 162, 137, 36, 969, 34, 162, 162, 162, 856, 162,
2022 -1, 936, 162, 162, 162, -1, 162, -1, 293, -1,
2023 -1, -1, -1, -1, -1, 312, -1, -1, 162
2026 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
2027 symbol of state STATE-NUM. */
2028 static const yytype_uint8 yystos
[] =
2030 0, 1, 12, 24, 25, 26, 28, 30, 31, 32,
2031 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
2032 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
2033 56, 57, 58, 59, 60, 96, 97, 113, 114, 115,
2034 116, 120, 123, 124, 143, 146, 147, 148, 150, 151,
2035 152, 153, 154, 155, 156, 157, 163, 164, 166, 167,
2036 176, 177, 178, 179, 198, 206, 207, 208, 209, 210,
2037 213, 163, 63, 70, 163, 168, 169, 214, 219, 220,
2038 221, 89, 94, 95, 98, 99, 103, 104, 98, 100,
2039 101, 102, 105, 212, 98, 98, 98, 98, 98, 26,
2040 26, 220, 220, 163, 220, 163, 220, 220, 214, 218,
2041 220, 163, 218, 220, 163, 163, 164, 199, 164, 199,
2042 164, 199, 164, 199, 163, 164, 164, 98, 212, 163,
2043 163, 163, 163, 163, 163, 26, 179, 163, 163, 28,
2044 64, 26, 26, 83, 212, 0, 78, 161, 98, 103,
2045 104, 98, 26, 36, 70, 77, 86, 87, 88, 90,
2046 179, 206, 211, 220, 179, 211, 211, 163, 180, 26,
2047 221, 221, 221, 65, 66, 67, 68, 70, 71, 72,
2048 73, 91, 92, 26, 220, 26, 220, 26, 220, 5,
2049 6, 7, 8, 10, 11, 13, 14, 15, 16, 17,
2050 18, 26, 28, 29, 34, 36, 63, 70, 75, 76,
2051 77, 85, 86, 87, 90, 123, 124, 163, 164, 179,
2052 195, 200, 211, 220, 26, 26, 220, 26, 220, 26,
2053 149, 179, 28, 149, 143, 166, 36, 36, 36, 36,
2054 16, 19, 21, 23, 26, 28, 36, 86, 87, 124,
2055 163, 179, 211, 220, 220, 26, 26, 27, 173, 26,
2056 27, 26, 26, 26, 26, 26, 26, 26, 26, 26,
2057 28, 26, 26, 26, 26, 26, 26, 36, 26, 26,
2058 57, 28, 158, 160, 70, 71, 83, 84, 202, 205,
2059 26, 28, 178, 179, 26, 163, 72, 179, 179, 179,
2060 179, 163, 179, 91, 92, 93, 163, 220, 163, 196,
2061 135, 136, 158, 160, 162, 221, 221, 221, 221, 221,
2062 221, 221, 221, 221, 221, 163, 163, 163, 163, 163,
2063 163, 163, 163, 163, 65, 66, 68, 71, 79, 80,
2064 81, 82, 91, 92, 93, 201, 202, 163, 187, 71,
2065 187, 26, 26, 26, 26, 26, 26, 26, 164, 164,
2066 26, 179, 206, 207, 208, 210, 26, 71, 163, 163,
2067 180, 163, 188, 163, 106, 107, 112, 163, 106, 107,
2068 112, 163, 163, 163, 26, 26, 36, 179, 163, 202,
2069 98, 91, 92, 93, 98, 202, 36, 36, 164, 208,
2070 210, 180, 158, 98, 162, 71, 174, 162, 71, 158,
2071 158, 84, 165, 165, 165, 165, 162, 84, 202, 205,
2072 84, 202, 205, 158, 158, 158, 158, 158, 158, 158,
2073 162, 98, 220, 26, 57, 26, 220, 26, 220, 165,
2074 165, 78, 161, 196, 26, 36, 158, 158, 159, 159,
2075 179, 159, 220, 220, 220, 126, 136, 158, 162, 158,
2076 162, 26, 36, 209, 220, 26, 26, 26, 26, 26,
2077 36, 26, 26, 26, 26, 26, 26, 163, 220, 220,
2078 220, 26, 26, 133, 134, 35, 163, 189, 163, 190,
2079 159, 159, 159, 159, 26, 26, 71, 104, 179, 162,
2080 84, 202, 205, 179, 26, 26, 158, 133, 134, 132,
2081 26, 220, 26, 220, 26, 220, 26, 179, 179, 179,
2082 26, 26, 26, 36, 138, 26, 69, 88, 220, 220,
2083 220, 22, 36, 159, 159, 26, 179, 162, 158, 220,
2084 26, 26, 26, 26, 26, 165, 220, 165, 26, 220,
2085 165, 220, 220, 220, 26, 220, 220, 220, 26, 163,
2086 98, 220, 162, 158, 162, 165, 165, 98, 178, 160,
2087 179, 206, 206, 36, 36, 158, 36, 220, 162, 162,
2088 136, 135, 98, 98, 180, 158, 160, 160, 160, 160,
2089 158, 158, 158, 158, 158, 26, 189, 190, 189, 158,
2090 163, 184, 158, 163, 185, 162, 162, 158, 125, 126,
2091 143, 143, 36, 36, 36, 36, 220, 202, 205, 84,
2092 202, 205, 26, 162, 26, 214, 216, 217, 220, 165,
2093 158, 158, 158, 26, 162, 162, 162, 163, 197, 197,
2094 197, 197, 158, 158, 162, 158, 158, 162, 163, 163,
2095 163, 163, 191, 191, 163, 185, 36, 36, 84, 205,
2096 162, 36, 162, 92, 162, 162, 162, 162, 165, 98,
2097 165, 165, 98, 162, 162, 162, 158, 162, 162, 162,
2098 131, 26, 163, 98, 26, 98, 98, 98, 26, 161,
2099 220, 70, 77, 179, 158, 162, 162, 163, 179, 163,
2100 26, 220, 220, 220, 220, 26, 36, 26, 36, 26,
2101 91, 26, 126, 127, 128, 182, 26, 125, 126, 26,
2102 162, 158, 162, 158, 162, 162, 190, 189, 220, 165,
2103 26, 220, 165, 162, 165, 173, 165, 26, 26, 26,
2104 98, 136, 220, 220, 163, 181, 36, 36, 141, 142,
2105 179, 179, 126, 36, 191, 26, 165, 98, 26, 220,
2106 98, 26, 98, 98, 26, 36, 179, 162, 131, 3,
2107 4, 9, 20, 160, 164, 199, 26, 26, 158, 162,
2108 179, 179, 158, 206, 160, 158, 158, 158, 158, 162,
2109 162, 162, 162, 162, 220, 98, 162, 98, 162, 162,
2110 98, 143, 126, 165, 187, 165, 165, 187, 91, 170,
2111 171, 172, 215, 98, 162, 162, 211, 162, 162, 162,
2112 121, 122, 162, 162, 162, 162, 158, 158, 162, 162,
2113 165, 211, 98, 26, 36, 26, 162, 162, 163, 163,
2114 26, 26, 220, 26, 26, 28, 179, 220, 26, 26,
2115 26, 26, 181, 187, 163, 162, 26, 26, 32, 162,
2116 162, 187, 187, 187, 220, 179, 190, 180, 162, 162,
2117 190, 26, 179, 26, 72, 180, 26, 181, 26, 26,
2118 160, 163, 162, 160, 162, 163, 162, 160, 160, 160,
2119 160, 133, 201, 202, 71, 70, 162, 158, 162, 36,
2120 92, 160, 160, 220, 108, 109, 110, 111, 192, 98,
2121 220, 126, 163, 193, 220, 220, 220, 220, 162, 26,
2122 26, 33, 179, 28, 71, 220, 220, 220, 193, 162,
2123 199, 162, 162, 137, 162, 162, 162, 162, 163, 186,
2124 185, 185, 162, 22, 158, 158, 162, 163, 194, 163,
2125 203, 203, 163, 204, 121, 122, 182, 183, 163, 26,
2126 26, 136, 137, 129, 130, 139, 140, 144, 145, 158,
2127 162, 158, 162, 36, 160, 160, 158, 162, 158, 162,
2128 158, 162, 158, 162, 158, 162, 158, 162, 158, 162,
2129 158, 162, 183, 182, 162, 220, 220, 137, 136, 137,
2130 137, 137, 137, 137, 137, 162, 162, 72, 162, 162,
2131 162, 162, 162, 162, 162, 162, 162, 162, 36, 193,
2135 #define yyerrok (yyerrstatus = 0)
2136 #define yyclearin (yychar = YYEMPTY)
2137 #define YYEMPTY (-2)
2140 #define YYACCEPT goto yyacceptlab
2141 #define YYABORT goto yyabortlab
2142 #define YYERROR goto yyerrorlab
2145 /* Like YYERROR except do call yyerror. This remains here temporarily
2146 to ease the transition to the new meaning of YYERROR, for GCC.
2147 Once GCC version 2 has supplanted version 1, this can go. */
2149 #define YYFAIL goto yyerrlab
2151 #define YYRECOVERING() (!!yyerrstatus)
2153 #define YYBACKUP(Token, Value) \
2155 if (yychar == YYEMPTY && yylen == 1) \
2159 yytoken = YYTRANSLATE (yychar); \
2165 yyerror (YY_("syntax error: cannot back up")); \
2172 #define YYERRCODE 256
2175 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2176 If N is 0, then set CURRENT to the empty location which ends
2177 the previous symbol: RHS[0] (always defined). */
2179 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2180 #ifndef YYLLOC_DEFAULT
2181 # define YYLLOC_DEFAULT(Current, Rhs, N) \
2185 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2186 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2187 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2188 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2192 (Current).first_line = (Current).last_line = \
2193 YYRHSLOC (Rhs, 0).last_line; \
2194 (Current).first_column = (Current).last_column = \
2195 YYRHSLOC (Rhs, 0).last_column; \
2201 /* YY_LOCATION_PRINT -- Print the location on the stream.
2202 This macro was not mandated originally: define only if we know
2203 we won't break user code: when these are the locations we know. */
2205 #ifndef YY_LOCATION_PRINT
2206 # if YYLTYPE_IS_TRIVIAL
2207 # define YY_LOCATION_PRINT(File, Loc) \
2208 fprintf (File, "%d.%d-%d.%d", \
2209 (Loc).first_line, (Loc).first_column, \
2210 (Loc).last_line, (Loc).last_column)
2212 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2217 /* YYLEX -- calling `yylex' with the right arguments. */
2220 # define YYLEX yylex (YYLEX_PARAM)
2222 # define YYLEX yylex ()
2225 /* Enable debugging if requested. */
2229 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2230 # define YYFPRINTF fprintf
2233 # define YYDPRINTF(Args) \
2239 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2243 YYFPRINTF (stderr, "%s ", Title); \
2244 yy_symbol_print (stderr, \
2246 YYFPRINTF (stderr, "\n"); \
2251 /*--------------------------------.
2252 | Print this symbol on YYOUTPUT. |
2253 `--------------------------------*/
2256 #if (defined __STDC__ || defined __C99__FUNC__ \
2257 || defined __cplusplus || defined _MSC_VER)
2259 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
2262 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
)
2265 YYSTYPE
const * const yyvaluep
;
2271 if (yytype
< YYNTOKENS
)
2272 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
2284 /*--------------------------------.
2285 | Print this symbol on YYOUTPUT. |
2286 `--------------------------------*/
2288 #if (defined __STDC__ || defined __C99__FUNC__ \
2289 || defined __cplusplus || defined _MSC_VER)
2291 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
2294 yy_symbol_print (yyoutput
, yytype
, yyvaluep
)
2297 YYSTYPE
const * const yyvaluep
;
2300 if (yytype
< YYNTOKENS
)
2301 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
2303 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
2305 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
2306 YYFPRINTF (yyoutput
, ")");
2309 /*------------------------------------------------------------------.
2310 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
2312 `------------------------------------------------------------------*/
2314 #if (defined __STDC__ || defined __C99__FUNC__ \
2315 || defined __cplusplus || defined _MSC_VER)
2317 yy_stack_print (yytype_int16
*bottom
, yytype_int16
*top
)
2320 yy_stack_print (bottom
, top
)
2321 yytype_int16
*bottom
;
2325 YYFPRINTF (stderr
, "Stack now");
2326 for (; bottom
<= top
; ++bottom
)
2327 YYFPRINTF (stderr
, " %d", *bottom
);
2328 YYFPRINTF (stderr
, "\n");
2331 # define YY_STACK_PRINT(Bottom, Top) \
2334 yy_stack_print ((Bottom), (Top)); \
2338 /*------------------------------------------------.
2339 | Report that the YYRULE is going to be reduced. |
2340 `------------------------------------------------*/
2342 #if (defined __STDC__ || defined __C99__FUNC__ \
2343 || defined __cplusplus || defined _MSC_VER)
2345 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
)
2348 yy_reduce_print (yyvsp
, yyrule
)
2353 int yynrhs
= yyr2
[yyrule
];
2355 unsigned long int yylno
= yyrline
[yyrule
];
2356 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
2358 /* The symbols being reduced. */
2359 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
2361 fprintf (stderr
, " $%d = ", yyi
+ 1);
2362 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
2363 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
2365 fprintf (stderr
, "\n");
2369 # define YY_REDUCE_PRINT(Rule) \
2372 yy_reduce_print (yyvsp, Rule); \
2375 /* Nonzero means print parse trace. It is left uninitialized so that
2376 multiple parsers can coexist. */
2378 #else /* !YYDEBUG */
2379 # define YYDPRINTF(Args)
2380 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
2381 # define YY_STACK_PRINT(Bottom, Top)
2382 # define YY_REDUCE_PRINT(Rule)
2383 #endif /* !YYDEBUG */
2386 /* YYINITDEPTH -- initial size of the parser's stacks. */
2388 # define YYINITDEPTH 200
2391 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
2392 if the built-in stack extension method is used).
2394 Do not make this value too large; the results are undefined if
2395 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
2396 evaluated with infinite-precision integer arithmetic. */
2399 # define YYMAXDEPTH 10000
2407 # if defined __GLIBC__ && defined _STRING_H
2408 # define yystrlen strlen
2410 /* Return the length of YYSTR. */
2411 #if (defined __STDC__ || defined __C99__FUNC__ \
2412 || defined __cplusplus || defined _MSC_VER)
2414 yystrlen (const char *yystr
)
2422 for (yylen
= 0; yystr
[yylen
]; yylen
++)
2430 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
2431 # define yystpcpy stpcpy
2433 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2435 #if (defined __STDC__ || defined __C99__FUNC__ \
2436 || defined __cplusplus || defined _MSC_VER)
2438 yystpcpy (char *yydest
, const char *yysrc
)
2441 yystpcpy (yydest
, yysrc
)
2447 const char *yys
= yysrc
;
2449 while ((*yyd
++ = *yys
++) != '\0')
2458 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2459 quotes and backslashes, so that it's suitable for yyerror. The
2460 heuristic is that double-quoting is unnecessary unless the string
2461 contains an apostrophe, a comma, or backslash (other than
2462 backslash-backslash). YYSTR is taken from yytname. If YYRES is
2463 null, do not copy; instead, return the length of what the result
2466 yytnamerr (char *yyres
, const char *yystr
)
2471 char const *yyp
= yystr
;
2478 goto do_not_strip_quotes
;
2482 goto do_not_strip_quotes
;
2495 do_not_strip_quotes
: ;
2499 return yystrlen (yystr
);
2501 return yystpcpy (yyres
, yystr
) - yyres
;
2505 /* Copy into YYRESULT an error message about the unexpected token
2506 YYCHAR while in state YYSTATE. Return the number of bytes copied,
2507 including the terminating null byte. If YYRESULT is null, do not
2508 copy anything; just return the number of bytes that would be
2509 copied. As a special case, return 0 if an ordinary "syntax error"
2510 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2511 size calculation. */
2513 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
2515 int yyn
= yypact
[yystate
];
2517 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
2521 int yytype
= YYTRANSLATE (yychar
);
2522 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
2523 YYSIZE_T yysize
= yysize0
;
2525 int yysize_overflow
= 0;
2526 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
2527 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
2531 /* This is so xgettext sees the translatable formats that are
2532 constructed on the fly. */
2533 YY_("syntax error, unexpected %s");
2534 YY_("syntax error, unexpected %s, expecting %s");
2535 YY_("syntax error, unexpected %s, expecting %s or %s");
2536 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2537 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2541 static char const yyunexpected
[] = "syntax error, unexpected %s";
2542 static char const yyexpecting
[] = ", expecting %s";
2543 static char const yyor
[] = " or %s";
2544 char yyformat
[sizeof yyunexpected
2545 + sizeof yyexpecting
- 1
2546 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
2547 * (sizeof yyor
- 1))];
2548 char const *yyprefix
= yyexpecting
;
2550 /* Start YYX at -YYN if negative to avoid negative indexes in
2552 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
2554 /* Stay within bounds of both yycheck and yytname. */
2555 int yychecklim
= YYLAST
- yyn
+ 1;
2556 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
2559 yyarg
[0] = yytname
[yytype
];
2560 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
2562 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
2563 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
2565 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
2569 yyformat
[sizeof yyunexpected
- 1] = '\0';
2572 yyarg
[yycount
++] = yytname
[yyx
];
2573 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
2574 yysize_overflow
|= (yysize1
< yysize
);
2576 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
2580 yyf
= YY_(yyformat
);
2581 yysize1
= yysize
+ yystrlen (yyf
);
2582 yysize_overflow
|= (yysize1
< yysize
);
2585 if (yysize_overflow
)
2586 return YYSIZE_MAXIMUM
;
2590 /* Avoid sprintf, as that infringes on the user's name space.
2591 Don't have undefined behavior even if the translation
2592 produced a string with the wrong number of "%s"s. */
2593 char *yyp
= yyresult
;
2595 while ((*yyp
= *yyf
) != '\0')
2597 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
2599 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
2612 #endif /* YYERROR_VERBOSE */
2615 /*-----------------------------------------------.
2616 | Release the memory associated to this symbol. |
2617 `-----------------------------------------------*/
2620 #if (defined __STDC__ || defined __C99__FUNC__ \
2621 || defined __cplusplus || defined _MSC_VER)
2623 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
2626 yydestruct (yymsg
, yytype
, yyvaluep
)
2636 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
2647 /* Prevent warnings from -Wmissing-prototypes. */
2649 #ifdef YYPARSE_PARAM
2650 #if defined __STDC__ || defined __cplusplus
2651 int yyparse (void *YYPARSE_PARAM
);
2655 #else /* ! YYPARSE_PARAM */
2656 #if defined __STDC__ || defined __cplusplus
2661 #endif /* ! YYPARSE_PARAM */
2665 /* The look-ahead symbol. */
2668 /* The semantic value of the look-ahead symbol. */
2671 /* Number of syntax errors so far. */
2680 #ifdef YYPARSE_PARAM
2681 #if (defined __STDC__ || defined __C99__FUNC__ \
2682 || defined __cplusplus || defined _MSC_VER)
2684 yyparse (void *YYPARSE_PARAM
)
2687 yyparse (YYPARSE_PARAM
)
2688 void *YYPARSE_PARAM
;
2690 #else /* ! YYPARSE_PARAM */
2691 #if (defined __STDC__ || defined __C99__FUNC__ \
2692 || defined __cplusplus || defined _MSC_VER)
2706 /* Number of tokens to shift before error messages enabled. */
2708 /* Look-ahead token as an internal (translated) token number. */
2711 /* Buffer for error messages, and its allocated size. */
2713 char *yymsg
= yymsgbuf
;
2714 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
2717 /* Three stacks and their tools:
2718 `yyss': related to states,
2719 `yyvs': related to semantic values,
2720 `yyls': related to locations.
2722 Refer to the stacks thru separate pointers, to allow yyoverflow
2723 to reallocate them elsewhere. */
2725 /* The state stack. */
2726 yytype_int16 yyssa
[YYINITDEPTH
];
2727 yytype_int16
*yyss
= yyssa
;
2728 yytype_int16
*yyssp
;
2730 /* The semantic value stack. */
2731 YYSTYPE yyvsa
[YYINITDEPTH
];
2732 YYSTYPE
*yyvs
= yyvsa
;
2737 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2739 YYSIZE_T yystacksize
= YYINITDEPTH
;
2741 /* The variables used to return semantic value and location from the
2746 /* The number of symbols on the RHS of the reduced rule.
2747 Keep to zero when no symbol should be popped. */
2750 YYDPRINTF ((stderr
, "Starting parse\n"));
2755 yychar
= YYEMPTY
; /* Cause a token to be read. */
2757 /* Initialize stack pointers.
2758 Waste one element of value and location stack
2759 so that they stay on the same level as the state stack.
2760 The wasted elements are never initialized. */
2767 /*------------------------------------------------------------.
2768 | yynewstate -- Push a new state, which is found in yystate. |
2769 `------------------------------------------------------------*/
2771 /* In all cases, when you get here, the value and location stacks
2772 have just been pushed. So pushing a state here evens the stacks. */
2778 if (yyss
+ yystacksize
- 1 <= yyssp
)
2780 /* Get the current used size of the three stacks, in elements. */
2781 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
2785 /* Give user a chance to reallocate the stack. Use copies of
2786 these so that the &'s don't force the real ones into
2788 YYSTYPE
*yyvs1
= yyvs
;
2789 yytype_int16
*yyss1
= yyss
;
2792 /* Each stack pointer address is followed by the size of the
2793 data in use in that stack, in bytes. This used to be a
2794 conditional around just the two extra args, but that might
2795 be undefined if yyoverflow is a macro. */
2796 yyoverflow (YY_("memory exhausted"),
2797 &yyss1
, yysize
* sizeof (*yyssp
),
2798 &yyvs1
, yysize
* sizeof (*yyvsp
),
2805 #else /* no yyoverflow */
2806 # ifndef YYSTACK_RELOCATE
2807 goto yyexhaustedlab
;
2809 /* Extend the stack our own way. */
2810 if (YYMAXDEPTH
<= yystacksize
)
2811 goto yyexhaustedlab
;
2813 if (YYMAXDEPTH
< yystacksize
)
2814 yystacksize
= YYMAXDEPTH
;
2817 yytype_int16
*yyss1
= yyss
;
2818 union yyalloc
*yyptr
=
2819 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
2821 goto yyexhaustedlab
;
2822 YYSTACK_RELOCATE (yyss
);
2823 YYSTACK_RELOCATE (yyvs
);
2825 # undef YYSTACK_RELOCATE
2827 YYSTACK_FREE (yyss1
);
2830 #endif /* no yyoverflow */
2832 yyssp
= yyss
+ yysize
- 1;
2833 yyvsp
= yyvs
+ yysize
- 1;
2836 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
2837 (unsigned long int) yystacksize
));
2839 if (yyss
+ yystacksize
- 1 <= yyssp
)
2843 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
2852 /* Do appropriate processing given the current state. Read a
2853 look-ahead token if we need one and don't already have one. */
2855 /* First try to decide what to do without reference to look-ahead token. */
2856 yyn
= yypact
[yystate
];
2857 if (yyn
== YYPACT_NINF
)
2860 /* Not known => get a look-ahead token if don't already have one. */
2862 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2863 if (yychar
== YYEMPTY
)
2865 YYDPRINTF ((stderr
, "Reading a token: "));
2869 if (yychar
<= YYEOF
)
2871 yychar
= yytoken
= YYEOF
;
2872 YYDPRINTF ((stderr
, "Now at end of input.\n"));
2876 yytoken
= YYTRANSLATE (yychar
);
2877 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
2880 /* If the proper action on seeing token YYTOKEN is to reduce or to
2881 detect an error, take that action. */
2883 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
2888 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
2897 /* Count tokens shifted since error; after three, turn off error
2902 /* Shift the look-ahead token. */
2903 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
2905 /* Discard the shifted token unless it is eof. */
2906 if (yychar
!= YYEOF
)
2915 /*-----------------------------------------------------------.
2916 | yydefault -- do the default action for the current state. |
2917 `-----------------------------------------------------------*/
2919 yyn
= yydefact
[yystate
];
2925 /*-----------------------------.
2926 | yyreduce -- Do a reduction. |
2927 `-----------------------------*/
2929 /* yyn is the number of a rule to reduce with. */
2932 /* If YYLEN is nonzero, implement the default value of the action:
2935 Otherwise, the following line sets YYVAL to garbage.
2936 This behavior is undocumented and Bison
2937 users should not rely upon it. Assigning to YYVAL
2938 unconditionally makes the parser a bit smaller, and it avoids a
2939 GCC warning that YYVAL may be used uninitialized. */
2940 yyval
= yyvsp
[1-yylen
];
2943 YY_REDUCE_PRINT (yyn
);
2947 #line 569 "bfin-parse.y"
2949 insn
= (yyvsp
[(1) - (1)].instr
);
2950 if (insn
== (INSTR_T
) 0)
2951 return NO_INSN_GENERATED
;
2952 else if (insn
== (INSTR_T
) - 1)
2953 return SEMANTIC_ERROR
;
2955 return INSN_GENERATED
;
2960 #line 583 "bfin-parse.y"
2962 if (((yyvsp
[(1) - (6)].instr
)->value
& 0xf800) == 0xc000)
2964 if (is_group1 ((yyvsp
[(3) - (6)].instr
)) && is_group2 ((yyvsp
[(5) - (6)].instr
)))
2965 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[(1) - (6)].instr
), (yyvsp
[(3) - (6)].instr
), (yyvsp
[(5) - (6)].instr
));
2966 else if (is_group2 ((yyvsp
[(3) - (6)].instr
)) && is_group1 ((yyvsp
[(5) - (6)].instr
)))
2967 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[(1) - (6)].instr
), (yyvsp
[(5) - (6)].instr
), (yyvsp
[(3) - (6)].instr
));
2969 return yyerror ("Wrong 16 bit instructions groups, slot 2 and slot 3 must be 16-bit instrution group");
2971 else if (((yyvsp
[(3) - (6)].instr
)->value
& 0xf800) == 0xc000)
2973 if (is_group1 ((yyvsp
[(1) - (6)].instr
)) && is_group2 ((yyvsp
[(5) - (6)].instr
)))
2974 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[(3) - (6)].instr
), (yyvsp
[(1) - (6)].instr
), (yyvsp
[(5) - (6)].instr
));
2975 else if (is_group2 ((yyvsp
[(1) - (6)].instr
)) && is_group1 ((yyvsp
[(5) - (6)].instr
)))
2976 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[(3) - (6)].instr
), (yyvsp
[(5) - (6)].instr
), (yyvsp
[(1) - (6)].instr
));
2978 return yyerror ("Wrong 16 bit instructions groups, slot 1 and slot 3 must be 16-bit instrution group");
2980 else if (((yyvsp
[(5) - (6)].instr
)->value
& 0xf800) == 0xc000)
2982 if (is_group1 ((yyvsp
[(1) - (6)].instr
)) && is_group2 ((yyvsp
[(3) - (6)].instr
)))
2983 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[(5) - (6)].instr
), (yyvsp
[(1) - (6)].instr
), (yyvsp
[(3) - (6)].instr
));
2984 else if (is_group2 ((yyvsp
[(1) - (6)].instr
)) && is_group1 ((yyvsp
[(3) - (6)].instr
)))
2985 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[(5) - (6)].instr
), (yyvsp
[(3) - (6)].instr
), (yyvsp
[(1) - (6)].instr
));
2987 return yyerror ("Wrong 16 bit instructions groups, slot 1 and slot 2 must be 16-bit instrution group");
2990 error ("\nIllegal Multi Issue Construct, at least any one of the slot must be DSP32 instruction group\n");
2995 #line 616 "bfin-parse.y"
2997 if (((yyvsp
[(1) - (4)].instr
)->value
& 0xf800) == 0xc000)
2999 if (is_group1 ((yyvsp
[(3) - (4)].instr
)))
3000 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[(1) - (4)].instr
), (yyvsp
[(3) - (4)].instr
), 0);
3001 else if (is_group2 ((yyvsp
[(3) - (4)].instr
)))
3002 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[(1) - (4)].instr
), 0, (yyvsp
[(3) - (4)].instr
));
3004 return yyerror ("Wrong 16 bit instructions groups, slot 2 must be the 16-bit instruction group");
3006 else if (((yyvsp
[(3) - (4)].instr
)->value
& 0xf800) == 0xc000)
3008 if (is_group1 ((yyvsp
[(1) - (4)].instr
)))
3009 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[(3) - (4)].instr
), (yyvsp
[(1) - (4)].instr
), 0);
3010 else if (is_group2 ((yyvsp
[(1) - (4)].instr
)))
3011 (yyval
.instr
) = bfin_gen_multi_instr ((yyvsp
[(3) - (4)].instr
), 0, (yyvsp
[(1) - (4)].instr
));
3013 return yyerror ("Wrong 16 bit instructions groups, slot 1 must be the 16-bit instruction group");
3015 else if (is_group1 ((yyvsp
[(1) - (4)].instr
)) && is_group2 ((yyvsp
[(3) - (4)].instr
)))
3016 (yyval
.instr
) = bfin_gen_multi_instr (0, (yyvsp
[(1) - (4)].instr
), (yyvsp
[(3) - (4)].instr
));
3017 else if (is_group2 ((yyvsp
[(1) - (4)].instr
)) && is_group1 ((yyvsp
[(3) - (4)].instr
)))
3018 (yyval
.instr
) = bfin_gen_multi_instr (0, (yyvsp
[(3) - (4)].instr
), (yyvsp
[(1) - (4)].instr
));
3020 return yyerror ("Wrong 16 bit instructions groups, slot 1 and slot 2 must be the 16-bit instruction group");
3025 #line 643 "bfin-parse.y"
3034 #line 654 "bfin-parse.y"
3036 (yyval
.instr
) = DSP32MAC (3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0);
3041 #line 658 "bfin-parse.y"
3045 int h00
, h10
, h01
, h11
;
3047 if ((yyvsp
[(1) - (2)].macfunc
).n
== 0)
3049 if ((yyvsp
[(2) - (2)].mod
).MM
)
3050 return yyerror ("(m) not allowed with a0 unit");
3052 op0
= (yyvsp
[(1) - (2)].macfunc
).op
;
3054 w0
= (yyvsp
[(1) - (2)].macfunc
).w
;
3055 h00
= IS_H ((yyvsp
[(1) - (2)].macfunc
).s0
);
3056 h10
= IS_H ((yyvsp
[(1) - (2)].macfunc
).s1
);
3061 op1
= (yyvsp
[(1) - (2)].macfunc
).op
;
3063 w1
= (yyvsp
[(1) - (2)].macfunc
).w
;
3066 h01
= IS_H ((yyvsp
[(1) - (2)].macfunc
).s0
);
3067 h11
= IS_H ((yyvsp
[(1) - (2)].macfunc
).s1
);
3069 (yyval
.instr
) = DSP32MAC (op1
, (yyvsp
[(2) - (2)].mod
).MM
, (yyvsp
[(2) - (2)].mod
).mod
, w1
, (yyvsp
[(1) - (2)].macfunc
).P
, h01
, h11
, h00
, h10
,
3070 &(yyvsp
[(1) - (2)].macfunc
).dst
, op0
, &(yyvsp
[(1) - (2)].macfunc
).s0
, &(yyvsp
[(1) - (2)].macfunc
).s1
, w0
);
3075 #line 693 "bfin-parse.y"
3079 if (check_macfuncs (&(yyvsp
[(1) - (5)].macfunc
), &(yyvsp
[(2) - (5)].mod
), &(yyvsp
[(4) - (5)].macfunc
), &(yyvsp
[(5) - (5)].mod
)) < 0)
3081 notethat ("assign_macfunc (.), assign_macfunc (.)\n");
3083 if ((yyvsp
[(1) - (5)].macfunc
).w
)
3084 dst
= &(yyvsp
[(1) - (5)].macfunc
).dst
;
3086 dst
= &(yyvsp
[(4) - (5)].macfunc
).dst
;
3088 (yyval
.instr
) = DSP32MAC ((yyvsp
[(1) - (5)].macfunc
).op
, (yyvsp
[(2) - (5)].mod
).MM
, (yyvsp
[(5) - (5)].mod
).mod
, (yyvsp
[(1) - (5)].macfunc
).w
, (yyvsp
[(1) - (5)].macfunc
).P
,
3089 IS_H ((yyvsp
[(1) - (5)].macfunc
).s0
), IS_H ((yyvsp
[(1) - (5)].macfunc
).s1
), IS_H ((yyvsp
[(4) - (5)].macfunc
).s0
), IS_H ((yyvsp
[(4) - (5)].macfunc
).s1
),
3090 dst
, (yyvsp
[(4) - (5)].macfunc
).op
, &(yyvsp
[(1) - (5)].macfunc
).s0
, &(yyvsp
[(1) - (5)].macfunc
).s1
, (yyvsp
[(4) - (5)].macfunc
).w
);
3095 #line 713 "bfin-parse.y"
3097 notethat ("dsp32alu: DISALGNEXCPT\n");
3098 (yyval
.instr
) = DSP32ALU (18, 0, 0, 0, 0, 0, 0, 0, 3);
3103 #line 718 "bfin-parse.y"
3105 if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && !IS_A1 ((yyvsp
[(4) - (6)].reg
)) && IS_A1 ((yyvsp
[(5) - (6)].reg
)))
3107 notethat ("dsp32alu: dregs = ( A0 += A1 )\n");
3108 (yyval
.instr
) = DSP32ALU (11, 0, 0, &(yyvsp
[(1) - (6)].reg
), 0, 0, 0, 0, 0);
3111 return yyerror ("Register mismatch");
3116 #line 728 "bfin-parse.y"
3118 if (!IS_A1 ((yyvsp
[(4) - (6)].reg
)) && IS_A1 ((yyvsp
[(5) - (6)].reg
)))
3120 notethat ("dsp32alu: dregs_half = ( A0 += A1 )\n");
3121 (yyval
.instr
) = DSP32ALU (11, IS_H ((yyvsp
[(1) - (6)].reg
)), 0, &(yyvsp
[(1) - (6)].reg
), 0, 0, 0, 0, 1);
3124 return yyerror ("Register mismatch");
3129 #line 738 "bfin-parse.y"
3131 notethat ("dsp32alu: A_ZERO_DOT_H = dregs_hi\n");
3132 (yyval
.instr
) = DSP32ALU (9, IS_H ((yyvsp
[(3) - (3)].reg
)), 0, 0, &(yyvsp
[(3) - (3)].reg
), 0, 0, 0, 0);
3137 #line 743 "bfin-parse.y"
3139 notethat ("dsp32alu: A_ZERO_DOT_H = dregs_hi\n");
3140 (yyval
.instr
) = DSP32ALU (9, IS_H ((yyvsp
[(3) - (3)].reg
)), 0, 0, &(yyvsp
[(3) - (3)].reg
), 0, 0, 0, 2);
3145 #line 749 "bfin-parse.y"
3147 if (!IS_DREG ((yyvsp
[(2) - (17)].reg
)) || !IS_DREG ((yyvsp
[(4) - (17)].reg
)))
3148 return yyerror ("Dregs expected");
3149 else if (!valid_dreg_pair (&(yyvsp
[(9) - (17)].reg
), (yyvsp
[(11) - (17)].expr
)))
3150 return yyerror ("Bad dreg pair");
3151 else if (!valid_dreg_pair (&(yyvsp
[(13) - (17)].reg
), (yyvsp
[(15) - (17)].expr
)))
3152 return yyerror ("Bad dreg pair");
3155 notethat ("dsp32alu: (dregs , dregs ) = BYTEOP16P (dregs_pair , dregs_pair ) (half)\n");
3156 (yyval
.instr
) = DSP32ALU (21, 0, &(yyvsp
[(2) - (17)].reg
), &(yyvsp
[(4) - (17)].reg
), &(yyvsp
[(9) - (17)].reg
), &(yyvsp
[(13) - (17)].reg
), (yyvsp
[(17) - (17)].r0
).r0
, 0, 0);
3162 #line 765 "bfin-parse.y"
3164 if (!IS_DREG ((yyvsp
[(2) - (17)].reg
)) || !IS_DREG((yyvsp
[(4) - (17)].reg
)))
3165 return yyerror ("Dregs expected");
3166 else if (!valid_dreg_pair (&(yyvsp
[(9) - (17)].reg
), (yyvsp
[(11) - (17)].expr
)))
3167 return yyerror ("Bad dreg pair");
3168 else if (!valid_dreg_pair (&(yyvsp
[(13) - (17)].reg
), (yyvsp
[(15) - (17)].expr
)))
3169 return yyerror ("Bad dreg pair");
3172 notethat ("dsp32alu: (dregs , dregs ) = BYTEOP16M (dregs_pair , dregs_pair ) (aligndir)\n");
3173 (yyval
.instr
) = DSP32ALU (21, 0, &(yyvsp
[(2) - (17)].reg
), &(yyvsp
[(4) - (17)].reg
), &(yyvsp
[(9) - (17)].reg
), &(yyvsp
[(13) - (17)].reg
), (yyvsp
[(17) - (17)].r0
).r0
, 0, 1);
3179 #line 780 "bfin-parse.y"
3181 if (!IS_DREG ((yyvsp
[(2) - (11)].reg
)) || !IS_DREG ((yyvsp
[(4) - (11)].reg
)))
3182 return yyerror ("Dregs expected");
3183 else if (!valid_dreg_pair (&(yyvsp
[(8) - (11)].reg
), (yyvsp
[(10) - (11)].expr
)))
3184 return yyerror ("Bad dreg pair");
3187 notethat ("dsp32alu: (dregs , dregs ) = BYTEUNPACK dregs_pair (aligndir)\n");
3188 (yyval
.instr
) = DSP32ALU (24, 0, &(yyvsp
[(2) - (11)].reg
), &(yyvsp
[(4) - (11)].reg
), &(yyvsp
[(8) - (11)].reg
), 0, (yyvsp
[(11) - (11)].r0
).r0
, 0, 1);
3194 #line 792 "bfin-parse.y"
3196 if (IS_DREG ((yyvsp
[(2) - (11)].reg
)) && IS_DREG ((yyvsp
[(4) - (11)].reg
)) && IS_DREG ((yyvsp
[(8) - (11)].reg
)))
3198 notethat ("dsp32alu: (dregs , dregs ) = SEARCH dregs (searchmod)\n");
3199 (yyval
.instr
) = DSP32ALU (13, 0, &(yyvsp
[(2) - (11)].reg
), &(yyvsp
[(4) - (11)].reg
), &(yyvsp
[(8) - (11)].reg
), 0, 0, 0, (yyvsp
[(10) - (11)].r0
).r0
);
3202 return yyerror ("Register mismatch");
3207 #line 803 "bfin-parse.y"
3209 if (IS_DREG ((yyvsp
[(1) - (11)].reg
)) && IS_DREG ((yyvsp
[(7) - (11)].reg
)))
3211 notethat ("dsp32alu: dregs = A1.l + A1.h, dregs = A0.l + A0.h \n");
3212 (yyval
.instr
) = DSP32ALU (12, 0, &(yyvsp
[(1) - (11)].reg
), &(yyvsp
[(7) - (11)].reg
), 0, 0, 0, 0, 1);
3215 return yyerror ("Register mismatch");
3220 #line 815 "bfin-parse.y"
3222 if (IS_DREG ((yyvsp
[(1) - (12)].reg
)) && IS_DREG ((yyvsp
[(7) - (12)].reg
)) && !REG_SAME ((yyvsp
[(3) - (12)].reg
), (yyvsp
[(5) - (12)].reg
))
3223 && IS_A1 ((yyvsp
[(9) - (12)].reg
)) && !IS_A1 ((yyvsp
[(11) - (12)].reg
)))
3225 notethat ("dsp32alu: dregs = A1 + A0 , dregs = A1 - A0 (amod1)\n");
3226 (yyval
.instr
) = DSP32ALU (17, 0, &(yyvsp
[(1) - (12)].reg
), &(yyvsp
[(7) - (12)].reg
), 0, 0, (yyvsp
[(12) - (12)].modcodes
).s0
, (yyvsp
[(12) - (12)].modcodes
).x0
, 0);
3229 else if (IS_DREG ((yyvsp
[(1) - (12)].reg
)) && IS_DREG ((yyvsp
[(7) - (12)].reg
)) && !REG_SAME ((yyvsp
[(3) - (12)].reg
), (yyvsp
[(5) - (12)].reg
))
3230 && !IS_A1 ((yyvsp
[(9) - (12)].reg
)) && IS_A1 ((yyvsp
[(11) - (12)].reg
)))
3232 notethat ("dsp32alu: dregs = A0 + A1 , dregs = A0 - A1 (amod1)\n");
3233 (yyval
.instr
) = DSP32ALU (17, 0, &(yyvsp
[(1) - (12)].reg
), &(yyvsp
[(7) - (12)].reg
), 0, 0, (yyvsp
[(12) - (12)].modcodes
).s0
, (yyvsp
[(12) - (12)].modcodes
).x0
, 1);
3236 return yyerror ("Register mismatch");
3241 #line 834 "bfin-parse.y"
3243 if ((yyvsp
[(4) - (12)].r0
).r0
== (yyvsp
[(10) - (12)].r0
).r0
)
3244 return yyerror ("Operators must differ");
3246 if (IS_DREG ((yyvsp
[(1) - (12)].reg
)) && IS_DREG ((yyvsp
[(3) - (12)].reg
)) && IS_DREG ((yyvsp
[(5) - (12)].reg
))
3247 && REG_SAME ((yyvsp
[(3) - (12)].reg
), (yyvsp
[(9) - (12)].reg
)) && REG_SAME ((yyvsp
[(5) - (12)].reg
), (yyvsp
[(11) - (12)].reg
)))
3249 notethat ("dsp32alu: dregs = dregs + dregs,"
3250 "dregs = dregs - dregs (amod1)\n");
3251 (yyval
.instr
) = DSP32ALU (4, 0, &(yyvsp
[(1) - (12)].reg
), &(yyvsp
[(7) - (12)].reg
), &(yyvsp
[(3) - (12)].reg
), &(yyvsp
[(5) - (12)].reg
), (yyvsp
[(12) - (12)].modcodes
).s0
, (yyvsp
[(12) - (12)].modcodes
).x0
, 2);
3254 return yyerror ("Register mismatch");
3259 #line 852 "bfin-parse.y"
3261 if (!REG_SAME ((yyvsp
[(3) - (12)].reg
), (yyvsp
[(9) - (12)].reg
)) || !REG_SAME ((yyvsp
[(5) - (12)].reg
), (yyvsp
[(11) - (12)].reg
)))
3262 return yyerror ("Differing source registers");
3264 if (!IS_DREG ((yyvsp
[(1) - (12)].reg
)) || !IS_DREG ((yyvsp
[(3) - (12)].reg
)) || !IS_DREG ((yyvsp
[(5) - (12)].reg
)) || !IS_DREG ((yyvsp
[(7) - (12)].reg
)))
3265 return yyerror ("Dregs expected");
3268 if ((yyvsp
[(4) - (12)].r0
).r0
== 1 && (yyvsp
[(10) - (12)].r0
).r0
== 2)
3270 notethat ("dsp32alu: dregs = dregs .|. dregs , dregs = dregs .|. dregs (amod2)\n");
3271 (yyval
.instr
) = DSP32ALU (1, 1, &(yyvsp
[(1) - (12)].reg
), &(yyvsp
[(7) - (12)].reg
), &(yyvsp
[(3) - (12)].reg
), &(yyvsp
[(5) - (12)].reg
), (yyvsp
[(12) - (12)].modcodes
).s0
, (yyvsp
[(12) - (12)].modcodes
).x0
, (yyvsp
[(12) - (12)].modcodes
).r0
);
3273 else if ((yyvsp
[(4) - (12)].r0
).r0
== 0 && (yyvsp
[(10) - (12)].r0
).r0
== 3)
3275 notethat ("dsp32alu: dregs = dregs .|. dregs , dregs = dregs .|. dregs (amod2)\n");
3276 (yyval
.instr
) = DSP32ALU (1, 0, &(yyvsp
[(1) - (12)].reg
), &(yyvsp
[(7) - (12)].reg
), &(yyvsp
[(3) - (12)].reg
), &(yyvsp
[(5) - (12)].reg
), (yyvsp
[(12) - (12)].modcodes
).s0
, (yyvsp
[(12) - (12)].modcodes
).x0
, (yyvsp
[(12) - (12)].modcodes
).r0
);
3279 return yyerror ("Bar operand mismatch");
3284 #line 875 "bfin-parse.y"
3288 if (IS_DREG ((yyvsp
[(1) - (5)].reg
)) && IS_DREG ((yyvsp
[(4) - (5)].reg
)))
3290 if ((yyvsp
[(5) - (5)].r0
).r0
)
3292 notethat ("dsp32alu: dregs = ABS dregs (v)\n");
3297 /* Vector version of ABS. */
3298 notethat ("dsp32alu: dregs = ABS dregs\n");
3301 (yyval
.instr
) = DSP32ALU (op
, 0, 0, &(yyvsp
[(1) - (5)].reg
), &(yyvsp
[(4) - (5)].reg
), 0, 0, 0, 2);
3304 return yyerror ("Dregs expected");
3309 #line 897 "bfin-parse.y"
3311 notethat ("dsp32alu: Ax = ABS Ax\n");
3312 (yyval
.instr
) = DSP32ALU (16, IS_A1 ((yyvsp
[(1) - (3)].reg
)), 0, 0, 0, 0, 0, 0, IS_A1 ((yyvsp
[(3) - (3)].reg
)));
3317 #line 902 "bfin-parse.y"
3319 if (IS_DREG_L ((yyvsp
[(3) - (3)].reg
)))
3321 notethat ("dsp32alu: A0.l = reg_half\n");
3322 (yyval
.instr
) = DSP32ALU (9, IS_H ((yyvsp
[(3) - (3)].reg
)), 0, 0, &(yyvsp
[(3) - (3)].reg
), 0, 0, 0, 0);
3325 return yyerror ("A0.l = Rx.l expected");
3330 #line 912 "bfin-parse.y"
3332 if (IS_DREG_L ((yyvsp
[(3) - (3)].reg
)))
3334 notethat ("dsp32alu: A1.l = reg_half\n");
3335 (yyval
.instr
) = DSP32ALU (9, IS_H ((yyvsp
[(3) - (3)].reg
)), 0, 0, &(yyvsp
[(3) - (3)].reg
), 0, 0, 0, 2);
3338 return yyerror ("A1.l = Rx.l expected");
3343 #line 923 "bfin-parse.y"
3345 if (IS_DREG ((yyvsp
[(1) - (8)].reg
)) && IS_DREG ((yyvsp
[(5) - (8)].reg
)) && IS_DREG ((yyvsp
[(7) - (8)].reg
)))
3347 notethat ("dsp32shift: dregs = ALIGN8 (dregs , dregs )\n");
3348 (yyval
.instr
) = DSP32SHIFT (13, &(yyvsp
[(1) - (8)].reg
), &(yyvsp
[(7) - (8)].reg
), &(yyvsp
[(5) - (8)].reg
), (yyvsp
[(3) - (8)].r0
).r0
, 0);
3351 return yyerror ("Dregs expected");
3356 #line 934 "bfin-parse.y"
3358 if (!IS_DREG ((yyvsp
[(1) - (13)].reg
)))
3359 return yyerror ("Dregs expected");
3360 else if (!valid_dreg_pair (&(yyvsp
[(5) - (13)].reg
), (yyvsp
[(7) - (13)].expr
)))
3361 return yyerror ("Bad dreg pair");
3362 else if (!valid_dreg_pair (&(yyvsp
[(9) - (13)].reg
), (yyvsp
[(11) - (13)].expr
)))
3363 return yyerror ("Bad dreg pair");
3366 notethat ("dsp32alu: dregs = BYTEOP1P (dregs_pair , dregs_pair ) (T)\n");
3367 (yyval
.instr
) = DSP32ALU (20, 0, 0, &(yyvsp
[(1) - (13)].reg
), &(yyvsp
[(5) - (13)].reg
), &(yyvsp
[(9) - (13)].reg
), (yyvsp
[(13) - (13)].modcodes
).s0
, 0, (yyvsp
[(13) - (13)].modcodes
).r0
);
3373 #line 948 "bfin-parse.y"
3375 if (!IS_DREG ((yyvsp
[(1) - (12)].reg
)))
3376 return yyerror ("Dregs expected");
3377 else if (!valid_dreg_pair (&(yyvsp
[(5) - (12)].reg
), (yyvsp
[(7) - (12)].expr
)))
3378 return yyerror ("Bad dreg pair");
3379 else if (!valid_dreg_pair (&(yyvsp
[(9) - (12)].reg
), (yyvsp
[(11) - (12)].expr
)))
3380 return yyerror ("Bad dreg pair");
3383 notethat ("dsp32alu: dregs = BYTEOP1P (dregs_pair , dregs_pair ) (T)\n");
3384 (yyval
.instr
) = DSP32ALU (20, 0, 0, &(yyvsp
[(1) - (12)].reg
), &(yyvsp
[(5) - (12)].reg
), &(yyvsp
[(9) - (12)].reg
), 0, 0, 0);
3390 #line 964 "bfin-parse.y"
3392 if (!IS_DREG ((yyvsp
[(1) - (13)].reg
)))
3393 return yyerror ("Dregs expected");
3394 else if (!valid_dreg_pair (&(yyvsp
[(5) - (13)].reg
), (yyvsp
[(7) - (13)].expr
)))
3395 return yyerror ("Bad dreg pair");
3396 else if (!valid_dreg_pair (&(yyvsp
[(9) - (13)].reg
), (yyvsp
[(11) - (13)].expr
)))
3397 return yyerror ("Bad dreg pair");
3400 notethat ("dsp32alu: dregs = BYTEOP2P (dregs_pair , dregs_pair ) (rnd_op)\n");
3401 (yyval
.instr
) = DSP32ALU (22, (yyvsp
[(13) - (13)].modcodes
).r0
, 0, &(yyvsp
[(1) - (13)].reg
), &(yyvsp
[(5) - (13)].reg
), &(yyvsp
[(9) - (13)].reg
), (yyvsp
[(13) - (13)].modcodes
).s0
, (yyvsp
[(13) - (13)].modcodes
).x0
, (yyvsp
[(13) - (13)].modcodes
).aop
);
3407 #line 980 "bfin-parse.y"
3409 if (!IS_DREG ((yyvsp
[(1) - (13)].reg
)))
3410 return yyerror ("Dregs expected");
3411 else if (!valid_dreg_pair (&(yyvsp
[(5) - (13)].reg
), (yyvsp
[(7) - (13)].expr
)))
3412 return yyerror ("Bad dreg pair");
3413 else if (!valid_dreg_pair (&(yyvsp
[(9) - (13)].reg
), (yyvsp
[(11) - (13)].expr
)))
3414 return yyerror ("Bad dreg pair");
3417 notethat ("dsp32alu: dregs = BYTEOP2P (dregs_pair , dregs_pair ) (rnd_op)\n");
3418 (yyval
.instr
) = DSP32ALU (22, (yyvsp
[(13) - (13)].modcodes
).r0
, 0, &(yyvsp
[(1) - (13)].reg
), &(yyvsp
[(5) - (13)].reg
), &(yyvsp
[(9) - (13)].reg
), (yyvsp
[(13) - (13)].modcodes
).s0
, 0, (yyvsp
[(13) - (13)].modcodes
).x0
);
3424 #line 996 "bfin-parse.y"
3426 if (!IS_DREG ((yyvsp
[(1) - (13)].reg
)))
3427 return yyerror ("Dregs expected");
3428 else if (!valid_dreg_pair (&(yyvsp
[(5) - (13)].reg
), (yyvsp
[(7) - (13)].expr
)))
3429 return yyerror ("Bad dreg pair");
3430 else if (!valid_dreg_pair (&(yyvsp
[(9) - (13)].reg
), (yyvsp
[(11) - (13)].expr
)))
3431 return yyerror ("Bad dreg pair");
3434 notethat ("dsp32alu: dregs = BYTEOP3P (dregs_pair , dregs_pair ) (b3_op)\n");
3435 (yyval
.instr
) = DSP32ALU (23, (yyvsp
[(13) - (13)].modcodes
).x0
, 0, &(yyvsp
[(1) - (13)].reg
), &(yyvsp
[(5) - (13)].reg
), &(yyvsp
[(9) - (13)].reg
), (yyvsp
[(13) - (13)].modcodes
).s0
, 0, 0);
3441 #line 1011 "bfin-parse.y"
3443 if (IS_DREG ((yyvsp
[(1) - (8)].reg
)) && IS_DREG ((yyvsp
[(5) - (8)].reg
)) && IS_DREG ((yyvsp
[(7) - (8)].reg
)))
3445 notethat ("dsp32alu: dregs = BYTEPACK (dregs , dregs )\n");
3446 (yyval
.instr
) = DSP32ALU (24, 0, 0, &(yyvsp
[(1) - (8)].reg
), &(yyvsp
[(5) - (8)].reg
), &(yyvsp
[(7) - (8)].reg
), 0, 0, 0);
3449 return yyerror ("Dregs expected");
3454 #line 1023 "bfin-parse.y"
3456 if (IS_HCOMPL ((yyvsp
[(1) - (17)].reg
), (yyvsp
[(3) - (17)].reg
)) && IS_HCOMPL ((yyvsp
[(7) - (17)].reg
), (yyvsp
[(14) - (17)].reg
)) && IS_HCOMPL ((yyvsp
[(10) - (17)].reg
), (yyvsp
[(17) - (17)].reg
)))
3458 notethat ("dsp32alu: dregs_hi = dregs_lo ="
3459 "SIGN (dregs_hi) * dregs_hi + "
3460 "SIGN (dregs_lo) * dregs_lo \n");
3462 (yyval
.instr
) = DSP32ALU (12, 0, 0, &(yyvsp
[(1) - (17)].reg
), &(yyvsp
[(7) - (17)].reg
), &(yyvsp
[(10) - (17)].reg
), 0, 0, 0);
3465 return yyerror ("Dregs expected");
3470 #line 1036 "bfin-parse.y"
3472 if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && IS_DREG ((yyvsp
[(3) - (6)].reg
)) && IS_DREG ((yyvsp
[(5) - (6)].reg
)))
3474 if ((yyvsp
[(6) - (6)].modcodes
).aop
== 0)
3476 /* No saturation flag specified, generate the 16 bit variant. */
3477 notethat ("COMP3op: dregs = dregs +- dregs\n");
3478 (yyval
.instr
) = COMP3OP (&(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), &(yyvsp
[(5) - (6)].reg
), (yyvsp
[(4) - (6)].r0
).r0
);
3482 /* Saturation flag specified, generate the 32 bit variant. */
3483 notethat ("dsp32alu: dregs = dregs +- dregs (amod1)\n");
3484 (yyval
.instr
) = DSP32ALU (4, 0, 0, &(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), &(yyvsp
[(5) - (6)].reg
), (yyvsp
[(6) - (6)].modcodes
).s0
, (yyvsp
[(6) - (6)].modcodes
).x0
, (yyvsp
[(4) - (6)].r0
).r0
);
3488 if (IS_PREG ((yyvsp
[(1) - (6)].reg
)) && IS_PREG ((yyvsp
[(3) - (6)].reg
)) && IS_PREG ((yyvsp
[(5) - (6)].reg
)) && (yyvsp
[(4) - (6)].r0
).r0
== 0)
3490 notethat ("COMP3op: pregs = pregs + pregs\n");
3491 (yyval
.instr
) = COMP3OP (&(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), &(yyvsp
[(5) - (6)].reg
), 5);
3494 return yyerror ("Dregs expected");
3499 #line 1062 "bfin-parse.y"
3503 if (IS_DREG ((yyvsp
[(1) - (9)].reg
)) && IS_DREG ((yyvsp
[(5) - (9)].reg
)) && IS_DREG ((yyvsp
[(7) - (9)].reg
)))
3505 if ((yyvsp
[(9) - (9)].r0
).r0
)
3510 notethat ("dsp32alu: dregs = {MIN|MAX} (dregs, dregs)\n");
3511 (yyval
.instr
) = DSP32ALU (op
, 0, 0, &(yyvsp
[(1) - (9)].reg
), &(yyvsp
[(5) - (9)].reg
), &(yyvsp
[(7) - (9)].reg
), 0, 0, (yyvsp
[(3) - (9)].r0
).r0
);
3514 return yyerror ("Dregs expected");
3519 #line 1080 "bfin-parse.y"
3521 notethat ("dsp32alu: Ax = - Ax\n");
3522 (yyval
.instr
) = DSP32ALU (14, IS_A1 ((yyvsp
[(1) - (3)].reg
)), 0, 0, 0, 0, 0, 0, IS_A1 ((yyvsp
[(3) - (3)].reg
)));
3527 #line 1085 "bfin-parse.y"
3529 notethat ("dsp32alu: dregs_lo = dregs_lo +- dregs_lo (amod1)\n");
3530 (yyval
.instr
) = DSP32ALU (2 | (yyvsp
[(4) - (6)].r0
).r0
, IS_H ((yyvsp
[(1) - (6)].reg
)), 0, &(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), &(yyvsp
[(5) - (6)].reg
),
3531 (yyvsp
[(6) - (6)].modcodes
).s0
, (yyvsp
[(6) - (6)].modcodes
).x0
, HL2 ((yyvsp
[(3) - (6)].reg
), (yyvsp
[(5) - (6)].reg
)));
3536 #line 1091 "bfin-parse.y"
3538 if (EXPR_VALUE ((yyvsp
[(3) - (3)].expr
)) == 0 && !REG_SAME ((yyvsp
[(1) - (3)].reg
), (yyvsp
[(2) - (3)].reg
)))
3540 notethat ("dsp32alu: A1 = A0 = 0\n");
3541 (yyval
.instr
) = DSP32ALU (8, 0, 0, 0, 0, 0, 0, 0, 2);
3544 return yyerror ("Bad value, 0 expected");
3549 #line 1103 "bfin-parse.y"
3551 if (REG_SAME ((yyvsp
[(1) - (5)].reg
), (yyvsp
[(2) - (5)].reg
)))
3553 notethat ("dsp32alu: Ax = Ax (S)\n");
3554 (yyval
.instr
) = DSP32ALU (8, 0, 0, 0, 0, 0, 1, 0, IS_A1 ((yyvsp
[(1) - (5)].reg
)));
3557 return yyerror ("Registers must be equal");
3562 #line 1114 "bfin-parse.y"
3564 if (IS_DREG ((yyvsp
[(3) - (6)].reg
)))
3566 notethat ("dsp32alu: dregs_half = dregs (RND)\n");
3567 (yyval
.instr
) = DSP32ALU (12, IS_H ((yyvsp
[(1) - (6)].reg
)), 0, &(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), 0, 0, 0, 3);
3570 return yyerror ("Dregs expected");
3575 #line 1125 "bfin-parse.y"
3577 if (IS_DREG ((yyvsp
[(3) - (8)].reg
)) && IS_DREG ((yyvsp
[(5) - (8)].reg
)))
3579 notethat ("dsp32alu: dregs_half = dregs (+-) dregs (RND12)\n");
3580 (yyval
.instr
) = DSP32ALU (5, IS_H ((yyvsp
[(1) - (8)].reg
)), 0, &(yyvsp
[(1) - (8)].reg
), &(yyvsp
[(3) - (8)].reg
), &(yyvsp
[(5) - (8)].reg
), 0, 0, (yyvsp
[(4) - (8)].r0
).r0
);
3583 return yyerror ("Dregs expected");
3588 #line 1136 "bfin-parse.y"
3590 if (IS_DREG ((yyvsp
[(3) - (8)].reg
)) && IS_DREG ((yyvsp
[(5) - (8)].reg
)))
3592 notethat ("dsp32alu: dregs_half = dregs -+ dregs (RND20)\n");
3593 (yyval
.instr
) = DSP32ALU (5, IS_H ((yyvsp
[(1) - (8)].reg
)), 0, &(yyvsp
[(1) - (8)].reg
), &(yyvsp
[(3) - (8)].reg
), &(yyvsp
[(5) - (8)].reg
), 0, 1, (yyvsp
[(4) - (8)].r0
).r0
| 2);
3596 return yyerror ("Dregs expected");
3601 #line 1147 "bfin-parse.y"
3603 if (!REG_SAME ((yyvsp
[(1) - (2)].reg
), (yyvsp
[(2) - (2)].reg
)))
3605 notethat ("dsp32alu: An = Am\n");
3606 (yyval
.instr
) = DSP32ALU (8, 0, 0, 0, 0, 0, IS_A1 ((yyvsp
[(1) - (2)].reg
)), 0, 3);
3609 return yyerror ("Accu reg arguments must differ");
3614 #line 1158 "bfin-parse.y"
3616 if (IS_DREG ((yyvsp
[(2) - (2)].reg
)))
3618 notethat ("dsp32alu: An = dregs\n");
3619 (yyval
.instr
) = DSP32ALU (9, 0, 0, 0, &(yyvsp
[(2) - (2)].reg
), 0, 1, 0, IS_A1 ((yyvsp
[(1) - (2)].reg
)) << 1);
3622 return yyerror ("Dregs expected");
3627 #line 1169 "bfin-parse.y"
3629 if (!IS_H ((yyvsp
[(3) - (4)].reg
)))
3631 if ((yyvsp
[(1) - (4)].reg
).regno
== REG_A0x
&& IS_DREG ((yyvsp
[(3) - (4)].reg
)))
3633 notethat ("dsp32alu: A0.x = dregs_lo\n");
3634 (yyval
.instr
) = DSP32ALU (9, 0, 0, 0, &(yyvsp
[(3) - (4)].reg
), 0, 0, 0, 1);
3636 else if ((yyvsp
[(1) - (4)].reg
).regno
== REG_A1x
&& IS_DREG ((yyvsp
[(3) - (4)].reg
)))
3638 notethat ("dsp32alu: A1.x = dregs_lo\n");
3639 (yyval
.instr
) = DSP32ALU (9, 0, 0, 0, &(yyvsp
[(3) - (4)].reg
), 0, 0, 0, 3);
3641 else if (IS_DREG ((yyvsp
[(1) - (4)].reg
)) && IS_DREG ((yyvsp
[(3) - (4)].reg
)))
3643 notethat ("ALU2op: dregs = dregs_lo\n");
3644 (yyval
.instr
) = ALU2OP (&(yyvsp
[(1) - (4)].reg
), &(yyvsp
[(3) - (4)].reg
), 10 | ((yyvsp
[(4) - (4)].r0
).r0
? 0: 1));
3647 return yyerror ("Register mismatch");
3650 return yyerror ("Low reg expected");
3655 #line 1195 "bfin-parse.y"
3657 notethat ("LDIMMhalf: pregs_half = imm16\n");
3659 if (!IS_DREG ((yyvsp
[(1) - (3)].reg
)) && !IS_PREG ((yyvsp
[(1) - (3)].reg
)) && !IS_IREG ((yyvsp
[(1) - (3)].reg
))
3660 && !IS_MREG ((yyvsp
[(1) - (3)].reg
)) && !IS_BREG ((yyvsp
[(1) - (3)].reg
)) && !IS_LREG ((yyvsp
[(1) - (3)].reg
)))
3661 return yyerror ("Wrong register for load immediate");
3663 if (!IS_IMM ((yyvsp
[(3) - (3)].expr
), 16) && !IS_UIMM ((yyvsp
[(3) - (3)].expr
), 16))
3664 return yyerror ("Constant out of range");
3666 (yyval
.instr
) = LDIMMHALF_R (&(yyvsp
[(1) - (3)].reg
), IS_H ((yyvsp
[(1) - (3)].reg
)), 0, 0, (yyvsp
[(3) - (3)].expr
));
3671 #line 1209 "bfin-parse.y"
3673 notethat ("dsp32alu: An = 0\n");
3675 if (imm7 ((yyvsp
[(2) - (2)].expr
)) != 0)
3676 return yyerror ("0 expected");
3678 (yyval
.instr
) = DSP32ALU (8, 0, 0, 0, 0, 0, 0, 0, IS_A1 ((yyvsp
[(1) - (2)].reg
)));
3683 #line 1219 "bfin-parse.y"
3685 if (!IS_DREG ((yyvsp
[(1) - (4)].reg
)) && !IS_PREG ((yyvsp
[(1) - (4)].reg
)) && !IS_IREG ((yyvsp
[(1) - (4)].reg
))
3686 && !IS_MREG ((yyvsp
[(1) - (4)].reg
)) && !IS_BREG ((yyvsp
[(1) - (4)].reg
)) && !IS_LREG ((yyvsp
[(1) - (4)].reg
)))
3687 return yyerror ("Wrong register for load immediate");
3689 if ((yyvsp
[(4) - (4)].r0
).r0
== 0)
3691 /* 7 bit immediate value if possible.
3692 We will check for that constant value for efficiency
3693 If it goes to reloc, it will be 16 bit. */
3694 if (IS_CONST ((yyvsp
[(3) - (4)].expr
)) && IS_IMM ((yyvsp
[(3) - (4)].expr
), 7) && IS_DREG ((yyvsp
[(1) - (4)].reg
)))
3696 notethat ("COMPI2opD: dregs = imm7 (x) \n");
3697 (yyval
.instr
) = COMPI2OPD (&(yyvsp
[(1) - (4)].reg
), imm7 ((yyvsp
[(3) - (4)].expr
)), 0);
3699 else if (IS_CONST ((yyvsp
[(3) - (4)].expr
)) && IS_IMM ((yyvsp
[(3) - (4)].expr
), 7) && IS_PREG ((yyvsp
[(1) - (4)].reg
)))
3701 notethat ("COMPI2opP: pregs = imm7 (x)\n");
3702 (yyval
.instr
) = COMPI2OPP (&(yyvsp
[(1) - (4)].reg
), imm7 ((yyvsp
[(3) - (4)].expr
)), 0);
3706 if (IS_CONST ((yyvsp
[(3) - (4)].expr
)) && !IS_IMM ((yyvsp
[(3) - (4)].expr
), 16))
3707 return yyerror ("Immediate value out of range");
3709 notethat ("LDIMMhalf: regs = luimm16 (x)\n");
3711 (yyval
.instr
) = LDIMMHALF_R5 (&(yyvsp
[(1) - (4)].reg
), 0, 1, 0, (yyvsp
[(3) - (4)].expr
));
3716 /* (z) There is no 7 bit zero extended instruction.
3717 If the expr is a relocation, generate it. */
3719 if (IS_CONST ((yyvsp
[(3) - (4)].expr
)) && !IS_UIMM ((yyvsp
[(3) - (4)].expr
), 16))
3720 return yyerror ("Immediate value out of range");
3722 notethat ("LDIMMhalf: regs = luimm16 (x)\n");
3724 (yyval
.instr
) = LDIMMHALF_R5 (&(yyvsp
[(1) - (4)].reg
), 0, 0, 1, (yyvsp
[(3) - (4)].expr
));
3730 #line 1264 "bfin-parse.y"
3732 if (IS_H ((yyvsp
[(1) - (3)].reg
)))
3733 return yyerror ("Low reg expected");
3735 if (IS_DREG ((yyvsp
[(1) - (3)].reg
)) && (yyvsp
[(3) - (3)].reg
).regno
== REG_A0x
)
3737 notethat ("dsp32alu: dregs_lo = A0.x\n");
3738 (yyval
.instr
) = DSP32ALU (10, 0, 0, &(yyvsp
[(1) - (3)].reg
), 0, 0, 0, 0, 0);
3740 else if (IS_DREG ((yyvsp
[(1) - (3)].reg
)) && (yyvsp
[(3) - (3)].reg
).regno
== REG_A1x
)
3742 notethat ("dsp32alu: dregs_lo = A1.x\n");
3743 (yyval
.instr
) = DSP32ALU (10, 0, 0, &(yyvsp
[(1) - (3)].reg
), 0, 0, 0, 0, 1);
3746 return yyerror ("Register mismatch");
3751 #line 1283 "bfin-parse.y"
3753 if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && IS_DREG ((yyvsp
[(3) - (6)].reg
)) && IS_DREG ((yyvsp
[(5) - (6)].reg
)))
3755 notethat ("dsp32alu: dregs = dregs .|. dregs (amod0)\n");
3756 (yyval
.instr
) = DSP32ALU (0, 0, 0, &(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), &(yyvsp
[(5) - (6)].reg
), (yyvsp
[(6) - (6)].modcodes
).s0
, (yyvsp
[(6) - (6)].modcodes
).x0
, (yyvsp
[(4) - (6)].r0
).r0
);
3759 return yyerror ("Register mismatch");
3764 #line 1294 "bfin-parse.y"
3766 if (IS_DREG ((yyvsp
[(1) - (4)].reg
)) && IS_DREG ((yyvsp
[(3) - (4)].reg
)))
3768 notethat ("ALU2op: dregs = dregs_byte\n");
3769 (yyval
.instr
) = ALU2OP (&(yyvsp
[(1) - (4)].reg
), &(yyvsp
[(3) - (4)].reg
), 12 | ((yyvsp
[(4) - (4)].r0
).r0
? 0: 1));
3772 return yyerror ("Register mismatch");
3777 #line 1305 "bfin-parse.y"
3779 if (REG_SAME ((yyvsp
[(1) - (7)].reg
), (yyvsp
[(3) - (7)].reg
)) && REG_SAME ((yyvsp
[(5) - (7)].reg
), (yyvsp
[(7) - (7)].reg
)) && !REG_SAME ((yyvsp
[(1) - (7)].reg
), (yyvsp
[(5) - (7)].reg
)))
3781 notethat ("dsp32alu: A1 = ABS A1 , A0 = ABS A0\n");
3782 (yyval
.instr
) = DSP32ALU (16, 0, 0, 0, 0, 0, 0, 0, 3);
3785 return yyerror ("Register mismatch");
3790 #line 1316 "bfin-parse.y"
3792 if (REG_SAME ((yyvsp
[(1) - (7)].reg
), (yyvsp
[(3) - (7)].reg
)) && REG_SAME ((yyvsp
[(5) - (7)].reg
), (yyvsp
[(7) - (7)].reg
)) && !REG_SAME ((yyvsp
[(1) - (7)].reg
), (yyvsp
[(5) - (7)].reg
)))
3794 notethat ("dsp32alu: A1 = - A1 , A0 = - A0\n");
3795 (yyval
.instr
) = DSP32ALU (14, 0, 0, 0, 0, 0, 0, 0, 3);
3798 return yyerror ("Register mismatch");
3803 #line 1327 "bfin-parse.y"
3805 if (!IS_A1 ((yyvsp
[(1) - (3)].reg
)) && IS_A1 ((yyvsp
[(2) - (3)].reg
)))
3807 notethat ("dsp32alu: A0 -= A1\n");
3808 (yyval
.instr
) = DSP32ALU (11, 0, 0, 0, 0, 0, (yyvsp
[(3) - (3)].r0
).r0
, 0, 3);
3811 return yyerror ("Register mismatch");
3816 #line 1338 "bfin-parse.y"
3818 if (IS_IREG ((yyvsp
[(1) - (3)].reg
)) && EXPR_VALUE ((yyvsp
[(3) - (3)].expr
)) == 4)
3820 notethat ("dagMODik: iregs -= 4\n");
3821 (yyval
.instr
) = DAGMODIK (&(yyvsp
[(1) - (3)].reg
), 3);
3823 else if (IS_IREG ((yyvsp
[(1) - (3)].reg
)) && EXPR_VALUE ((yyvsp
[(3) - (3)].expr
)) == 2)
3825 notethat ("dagMODik: iregs -= 2\n");
3826 (yyval
.instr
) = DAGMODIK (&(yyvsp
[(1) - (3)].reg
), 1);
3829 return yyerror ("Register or value mismatch");
3834 #line 1354 "bfin-parse.y"
3836 if (IS_IREG ((yyvsp
[(1) - (6)].reg
)) && IS_MREG ((yyvsp
[(3) - (6)].reg
)))
3838 notethat ("dagMODim: iregs += mregs (opt_brev)\n");
3840 (yyval
.instr
) = DAGMODIM (&(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), 0, 1);
3842 else if (IS_PREG ((yyvsp
[(1) - (6)].reg
)) && IS_PREG ((yyvsp
[(3) - (6)].reg
)))
3844 notethat ("PTR2op: pregs += pregs (BREV )\n");
3845 (yyval
.instr
) = PTR2OP (&(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), 5);
3848 return yyerror ("Register mismatch");
3853 #line 1371 "bfin-parse.y"
3855 if (IS_IREG ((yyvsp
[(1) - (3)].reg
)) && IS_MREG ((yyvsp
[(3) - (3)].reg
)))
3857 notethat ("dagMODim: iregs -= mregs\n");
3858 (yyval
.instr
) = DAGMODIM (&(yyvsp
[(1) - (3)].reg
), &(yyvsp
[(3) - (3)].reg
), 1, 0);
3860 else if (IS_PREG ((yyvsp
[(1) - (3)].reg
)) && IS_PREG ((yyvsp
[(3) - (3)].reg
)))
3862 notethat ("PTR2op: pregs -= pregs\n");
3863 (yyval
.instr
) = PTR2OP (&(yyvsp
[(1) - (3)].reg
), &(yyvsp
[(3) - (3)].reg
), 0);
3866 return yyerror ("Register mismatch");
3871 #line 1387 "bfin-parse.y"
3873 if (!IS_A1 ((yyvsp
[(1) - (4)].reg
)) && IS_A1 ((yyvsp
[(3) - (4)].reg
)))
3875 notethat ("dsp32alu: A0 += A1 (W32)\n");
3876 (yyval
.instr
) = DSP32ALU (11, 0, 0, 0, 0, 0, (yyvsp
[(4) - (4)].r0
).r0
, 0, 2);
3879 return yyerror ("Register mismatch");
3884 #line 1398 "bfin-parse.y"
3886 if (IS_IREG ((yyvsp
[(1) - (3)].reg
)) && IS_MREG ((yyvsp
[(3) - (3)].reg
)))
3888 notethat ("dagMODim: iregs += mregs\n");
3889 (yyval
.instr
) = DAGMODIM (&(yyvsp
[(1) - (3)].reg
), &(yyvsp
[(3) - (3)].reg
), 0, 0);
3892 return yyerror ("iregs += mregs expected");
3897 #line 1409 "bfin-parse.y"
3899 if (IS_IREG ((yyvsp
[(1) - (3)].reg
)))
3901 if (EXPR_VALUE ((yyvsp
[(3) - (3)].expr
)) == 4)
3903 notethat ("dagMODik: iregs += 4\n");
3904 (yyval
.instr
) = DAGMODIK (&(yyvsp
[(1) - (3)].reg
), 2);
3906 else if (EXPR_VALUE ((yyvsp
[(3) - (3)].expr
)) == 2)
3908 notethat ("dagMODik: iregs += 2\n");
3909 (yyval
.instr
) = DAGMODIK (&(yyvsp
[(1) - (3)].reg
), 0);
3912 return yyerror ("iregs += [ 2 | 4 ");
3914 else if (IS_PREG ((yyvsp
[(1) - (3)].reg
)) && IS_IMM ((yyvsp
[(3) - (3)].expr
), 7))
3916 notethat ("COMPI2opP: pregs += imm7\n");
3917 (yyval
.instr
) = COMPI2OPP (&(yyvsp
[(1) - (3)].reg
), imm7 ((yyvsp
[(3) - (3)].expr
)), 1);
3919 else if (IS_DREG ((yyvsp
[(1) - (3)].reg
)) && IS_IMM ((yyvsp
[(3) - (3)].expr
), 7))
3921 notethat ("COMPI2opD: dregs += imm7\n");
3922 (yyval
.instr
) = COMPI2OPD (&(yyvsp
[(1) - (3)].reg
), imm7 ((yyvsp
[(3) - (3)].expr
)), 1);
3925 return yyerror ("Register mismatch");
3930 #line 1440 "bfin-parse.y"
3932 if (IS_DREG ((yyvsp
[(1) - (3)].reg
)) && IS_DREG ((yyvsp
[(3) - (3)].reg
)))
3934 notethat ("ALU2op: dregs *= dregs\n");
3935 (yyval
.instr
) = ALU2OP (&(yyvsp
[(1) - (3)].reg
), &(yyvsp
[(3) - (3)].reg
), 3);
3938 return yyerror ("Register mismatch");
3943 #line 1451 "bfin-parse.y"
3945 if (!valid_dreg_pair (&(yyvsp
[(3) - (11)].reg
), (yyvsp
[(5) - (11)].expr
)))
3946 return yyerror ("Bad dreg pair");
3947 else if (!valid_dreg_pair (&(yyvsp
[(7) - (11)].reg
), (yyvsp
[(9) - (11)].expr
)))
3948 return yyerror ("Bad dreg pair");
3951 notethat ("dsp32alu: SAA (dregs_pair , dregs_pair ) (aligndir)\n");
3952 (yyval
.instr
) = DSP32ALU (18, 0, 0, 0, &(yyvsp
[(3) - (11)].reg
), &(yyvsp
[(7) - (11)].reg
), (yyvsp
[(11) - (11)].r0
).r0
, 0, 0);
3958 #line 1464 "bfin-parse.y"
3960 if (REG_SAME ((yyvsp
[(1) - (11)].reg
), (yyvsp
[(2) - (11)].reg
)) && REG_SAME ((yyvsp
[(7) - (11)].reg
), (yyvsp
[(8) - (11)].reg
)) && !REG_SAME ((yyvsp
[(1) - (11)].reg
), (yyvsp
[(7) - (11)].reg
)))
3962 notethat ("dsp32alu: A1 = A1 (S) , A0 = A0 (S)\n");
3963 (yyval
.instr
) = DSP32ALU (8, 0, 0, 0, 0, 0, 1, 0, 2);
3966 return yyerror ("Register mismatch");
3971 #line 1475 "bfin-parse.y"
3973 if (IS_DREG ((yyvsp
[(1) - (9)].reg
)) && IS_DREG ((yyvsp
[(4) - (9)].reg
)) && IS_DREG ((yyvsp
[(6) - (9)].reg
))
3974 && REG_SAME ((yyvsp
[(1) - (9)].reg
), (yyvsp
[(4) - (9)].reg
)))
3976 if (EXPR_VALUE ((yyvsp
[(9) - (9)].expr
)) == 1)
3978 notethat ("ALU2op: dregs = (dregs + dregs) << 1\n");
3979 (yyval
.instr
) = ALU2OP (&(yyvsp
[(1) - (9)].reg
), &(yyvsp
[(6) - (9)].reg
), 4);
3981 else if (EXPR_VALUE ((yyvsp
[(9) - (9)].expr
)) == 2)
3983 notethat ("ALU2op: dregs = (dregs + dregs) << 2\n");
3984 (yyval
.instr
) = ALU2OP (&(yyvsp
[(1) - (9)].reg
), &(yyvsp
[(6) - (9)].reg
), 5);
3987 return yyerror ("Bad shift value");
3989 else if (IS_PREG ((yyvsp
[(1) - (9)].reg
)) && IS_PREG ((yyvsp
[(4) - (9)].reg
)) && IS_PREG ((yyvsp
[(6) - (9)].reg
))
3990 && REG_SAME ((yyvsp
[(1) - (9)].reg
), (yyvsp
[(4) - (9)].reg
)))
3992 if (EXPR_VALUE ((yyvsp
[(9) - (9)].expr
)) == 1)
3994 notethat ("PTR2op: pregs = (pregs + pregs) << 1\n");
3995 (yyval
.instr
) = PTR2OP (&(yyvsp
[(1) - (9)].reg
), &(yyvsp
[(6) - (9)].reg
), 6);
3997 else if (EXPR_VALUE ((yyvsp
[(9) - (9)].expr
)) == 2)
3999 notethat ("PTR2op: pregs = (pregs + pregs) << 2\n");
4000 (yyval
.instr
) = PTR2OP (&(yyvsp
[(1) - (9)].reg
), &(yyvsp
[(6) - (9)].reg
), 7);
4003 return yyerror ("Bad shift value");
4006 return yyerror ("Register mismatch");
4011 #line 1514 "bfin-parse.y"
4013 if (IS_DREG ((yyvsp
[(1) - (5)].reg
)) && IS_DREG ((yyvsp
[(3) - (5)].reg
)) && IS_DREG ((yyvsp
[(5) - (5)].reg
)))
4015 notethat ("COMP3op: dregs = dregs | dregs\n");
4016 (yyval
.instr
) = COMP3OP (&(yyvsp
[(1) - (5)].reg
), &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].reg
), 3);
4019 return yyerror ("Dregs expected");
4024 #line 1524 "bfin-parse.y"
4026 if (IS_DREG ((yyvsp
[(1) - (5)].reg
)) && IS_DREG ((yyvsp
[(3) - (5)].reg
)) && IS_DREG ((yyvsp
[(5) - (5)].reg
)))
4028 notethat ("COMP3op: dregs = dregs ^ dregs\n");
4029 (yyval
.instr
) = COMP3OP (&(yyvsp
[(1) - (5)].reg
), &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].reg
), 4);
4032 return yyerror ("Dregs expected");
4037 #line 1534 "bfin-parse.y"
4039 if (IS_PREG ((yyvsp
[(1) - (9)].reg
)) && IS_PREG ((yyvsp
[(3) - (9)].reg
)) && IS_PREG ((yyvsp
[(6) - (9)].reg
)))
4041 if (EXPR_VALUE ((yyvsp
[(8) - (9)].expr
)) == 1)
4043 notethat ("COMP3op: pregs = pregs + (pregs << 1)\n");
4044 (yyval
.instr
) = COMP3OP (&(yyvsp
[(1) - (9)].reg
), &(yyvsp
[(3) - (9)].reg
), &(yyvsp
[(6) - (9)].reg
), 6);
4046 else if (EXPR_VALUE ((yyvsp
[(8) - (9)].expr
)) == 2)
4048 notethat ("COMP3op: pregs = pregs + (pregs << 2)\n");
4049 (yyval
.instr
) = COMP3OP (&(yyvsp
[(1) - (9)].reg
), &(yyvsp
[(3) - (9)].reg
), &(yyvsp
[(6) - (9)].reg
), 7);
4052 return yyerror ("Bad shift value");
4055 return yyerror ("Dregs expected");
4060 #line 1554 "bfin-parse.y"
4062 if (!REG_SAME ((yyvsp
[(3) - (5)].reg
), (yyvsp
[(5) - (5)].reg
)))
4064 notethat ("CCflag: CC = A0 == A1\n");
4065 (yyval
.instr
) = CCFLAG (0, 0, 5, 0, 0);
4068 return yyerror ("CC register expected");
4073 #line 1564 "bfin-parse.y"
4075 if (!REG_SAME ((yyvsp
[(3) - (5)].reg
), (yyvsp
[(5) - (5)].reg
)))
4077 notethat ("CCflag: CC = A0 < A1\n");
4078 (yyval
.instr
) = CCFLAG (0, 0, 6, 0, 0);
4081 return yyerror ("Register mismatch");
4086 #line 1574 "bfin-parse.y"
4088 if (REG_CLASS((yyvsp
[(3) - (6)].reg
)) == REG_CLASS((yyvsp
[(5) - (6)].reg
)))
4090 notethat ("CCflag: CC = dpregs < dpregs\n");
4091 (yyval
.instr
) = CCFLAG (&(yyvsp
[(3) - (6)].reg
), (yyvsp
[(5) - (6)].reg
).regno
& CODE_MASK
, (yyvsp
[(6) - (6)].r0
).r0
, 0, IS_PREG ((yyvsp
[(3) - (6)].reg
)) ? 1 : 0);
4094 return yyerror ("Compare only of same register class");
4099 #line 1584 "bfin-parse.y"
4101 if (((yyvsp
[(6) - (6)].r0
).r0
== 1 && IS_IMM ((yyvsp
[(5) - (6)].expr
), 3))
4102 || ((yyvsp
[(6) - (6)].r0
).r0
== 3 && IS_UIMM ((yyvsp
[(5) - (6)].expr
), 3)))
4104 notethat ("CCflag: CC = dpregs < (u)imm3\n");
4105 (yyval
.instr
) = CCFLAG (&(yyvsp
[(3) - (6)].reg
), imm3 ((yyvsp
[(5) - (6)].expr
)), (yyvsp
[(6) - (6)].r0
).r0
, 1, IS_PREG ((yyvsp
[(3) - (6)].reg
)) ? 1 : 0);
4108 return yyerror ("Bad constant value");
4113 #line 1595 "bfin-parse.y"
4115 if (REG_CLASS((yyvsp
[(3) - (5)].reg
)) == REG_CLASS((yyvsp
[(5) - (5)].reg
)))
4117 notethat ("CCflag: CC = dpregs == dpregs\n");
4118 (yyval
.instr
) = CCFLAG (&(yyvsp
[(3) - (5)].reg
), (yyvsp
[(5) - (5)].reg
).regno
& CODE_MASK
, 0, 0, IS_PREG ((yyvsp
[(3) - (5)].reg
)) ? 1 : 0);
4124 #line 1603 "bfin-parse.y"
4126 if (IS_IMM ((yyvsp
[(5) - (5)].expr
), 3))
4128 notethat ("CCflag: CC = dpregs == imm3\n");
4129 (yyval
.instr
) = CCFLAG (&(yyvsp
[(3) - (5)].reg
), imm3 ((yyvsp
[(5) - (5)].expr
)), 0, 1, IS_PREG ((yyvsp
[(3) - (5)].reg
)) ? 1 : 0);
4132 return yyerror ("Bad constant range");
4137 #line 1613 "bfin-parse.y"
4139 if (!REG_SAME ((yyvsp
[(3) - (5)].reg
), (yyvsp
[(5) - (5)].reg
)))
4141 notethat ("CCflag: CC = A0 <= A1\n");
4142 (yyval
.instr
) = CCFLAG (0, 0, 7, 0, 0);
4145 return yyerror ("CC register expected");
4150 #line 1623 "bfin-parse.y"
4152 if (REG_CLASS((yyvsp
[(3) - (6)].reg
)) == REG_CLASS((yyvsp
[(5) - (6)].reg
)))
4154 notethat ("CCflag: CC = pregs <= pregs (..)\n");
4155 (yyval
.instr
) = CCFLAG (&(yyvsp
[(3) - (6)].reg
), (yyvsp
[(5) - (6)].reg
).regno
& CODE_MASK
,
4156 1 + (yyvsp
[(6) - (6)].r0
).r0
, 0, IS_PREG ((yyvsp
[(3) - (6)].reg
)) ? 1 : 0);
4159 return yyerror ("Compare only of same register class");
4164 #line 1634 "bfin-parse.y"
4166 if (((yyvsp
[(6) - (6)].r0
).r0
== 1 && IS_IMM ((yyvsp
[(5) - (6)].expr
), 3))
4167 || ((yyvsp
[(6) - (6)].r0
).r0
== 3 && IS_UIMM ((yyvsp
[(5) - (6)].expr
), 3)))
4169 if (IS_DREG ((yyvsp
[(3) - (6)].reg
)))
4171 notethat ("CCflag: CC = dregs <= (u)imm3\n");
4173 (yyval
.instr
) = CCFLAG (&(yyvsp
[(3) - (6)].reg
), imm3 ((yyvsp
[(5) - (6)].expr
)), 1 + (yyvsp
[(6) - (6)].r0
).r0
, 1, 0);
4175 else if (IS_PREG ((yyvsp
[(3) - (6)].reg
)))
4177 notethat ("CCflag: CC = pregs <= (u)imm3\n");
4179 (yyval
.instr
) = CCFLAG (&(yyvsp
[(3) - (6)].reg
), imm3 ((yyvsp
[(5) - (6)].expr
)), 1 + (yyvsp
[(6) - (6)].r0
).r0
, 1, 1);
4182 return yyerror ("Dreg or Preg expected");
4185 return yyerror ("Bad constant value");
4190 #line 1658 "bfin-parse.y"
4192 if (IS_DREG ((yyvsp
[(1) - (5)].reg
)) && IS_DREG ((yyvsp
[(3) - (5)].reg
)) && IS_DREG ((yyvsp
[(5) - (5)].reg
)))
4194 notethat ("COMP3op: dregs = dregs & dregs\n");
4195 (yyval
.instr
) = COMP3OP (&(yyvsp
[(1) - (5)].reg
), &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].reg
), 2);
4198 return yyerror ("Dregs expected");
4203 #line 1669 "bfin-parse.y"
4205 notethat ("CC2stat operation\n");
4206 (yyval
.instr
) = bfin_gen_cc2stat ((yyvsp
[(1) - (1)].modcodes
).r0
, (yyvsp
[(1) - (1)].modcodes
).x0
, (yyvsp
[(1) - (1)].modcodes
).s0
);
4211 #line 1675 "bfin-parse.y"
4213 if (IS_ALLREG ((yyvsp
[(1) - (3)].reg
)) && IS_ALLREG ((yyvsp
[(3) - (3)].reg
)))
4215 notethat ("REGMV: allregs = allregs\n");
4216 (yyval
.instr
) = bfin_gen_regmv (&(yyvsp
[(3) - (3)].reg
), &(yyvsp
[(1) - (3)].reg
));
4219 return yyerror ("Register mismatch");
4224 #line 1686 "bfin-parse.y"
4226 if (IS_DREG ((yyvsp
[(3) - (3)].reg
)))
4228 notethat ("CC2dreg: CC = dregs\n");
4229 (yyval
.instr
) = bfin_gen_cc2dreg (1, &(yyvsp
[(3) - (3)].reg
));
4232 return yyerror ("Register mismatch");
4237 #line 1697 "bfin-parse.y"
4239 if (IS_DREG ((yyvsp
[(1) - (3)].reg
)))
4241 notethat ("CC2dreg: dregs = CC\n");
4242 (yyval
.instr
) = bfin_gen_cc2dreg (0, &(yyvsp
[(1) - (3)].reg
));
4245 return yyerror ("Register mismatch");
4250 #line 1708 "bfin-parse.y"
4252 notethat ("CC2dreg: CC =! CC\n");
4253 (yyval
.instr
) = bfin_gen_cc2dreg (3, 0);
4258 #line 1716 "bfin-parse.y"
4260 notethat ("dsp32mult: dregs_half = multiply_halfregs (opt_mode)\n");
4262 if (!IS_H ((yyvsp
[(1) - (4)].reg
)) && (yyvsp
[(4) - (4)].mod
).MM
)
4263 return yyerror ("(M) not allowed with MAC0");
4265 if (IS_H ((yyvsp
[(1) - (4)].reg
)))
4267 (yyval
.instr
) = DSP32MULT (0, (yyvsp
[(4) - (4)].mod
).MM
, (yyvsp
[(4) - (4)].mod
).mod
, 1, 0,
4268 IS_H ((yyvsp
[(3) - (4)].macfunc
).s0
), IS_H ((yyvsp
[(3) - (4)].macfunc
).s1
), 0, 0,
4269 &(yyvsp
[(1) - (4)].reg
), 0, &(yyvsp
[(3) - (4)].macfunc
).s0
, &(yyvsp
[(3) - (4)].macfunc
).s1
, 0);
4273 (yyval
.instr
) = DSP32MULT (0, 0, (yyvsp
[(4) - (4)].mod
).mod
, 0, 0,
4274 0, 0, IS_H ((yyvsp
[(3) - (4)].macfunc
).s0
), IS_H ((yyvsp
[(3) - (4)].macfunc
).s1
),
4275 &(yyvsp
[(1) - (4)].reg
), 0, &(yyvsp
[(3) - (4)].macfunc
).s0
, &(yyvsp
[(3) - (4)].macfunc
).s1
, 1);
4281 #line 1737 "bfin-parse.y"
4283 /* Odd registers can use (M). */
4284 if (!IS_DREG ((yyvsp
[(1) - (4)].reg
)))
4285 return yyerror ("Dreg expected");
4287 if (IS_EVEN ((yyvsp
[(1) - (4)].reg
)) && (yyvsp
[(4) - (4)].mod
).MM
)
4288 return yyerror ("(M) not allowed with MAC0");
4290 if (!IS_EVEN ((yyvsp
[(1) - (4)].reg
)))
4292 notethat ("dsp32mult: dregs = multiply_halfregs (opt_mode)\n");
4294 (yyval
.instr
) = DSP32MULT (0, (yyvsp
[(4) - (4)].mod
).MM
, (yyvsp
[(4) - (4)].mod
).mod
, 1, 1,
4295 IS_H ((yyvsp
[(3) - (4)].macfunc
).s0
), IS_H ((yyvsp
[(3) - (4)].macfunc
).s1
), 0, 0,
4296 &(yyvsp
[(1) - (4)].reg
), 0, &(yyvsp
[(3) - (4)].macfunc
).s0
, &(yyvsp
[(3) - (4)].macfunc
).s1
, 0);
4300 notethat ("dsp32mult: dregs = multiply_halfregs opt_mode\n");
4301 (yyval
.instr
) = DSP32MULT (0, 0, (yyvsp
[(4) - (4)].mod
).mod
, 0, 1,
4302 0, 0, IS_H ((yyvsp
[(3) - (4)].macfunc
).s0
), IS_H ((yyvsp
[(3) - (4)].macfunc
).s1
),
4303 &(yyvsp
[(1) - (4)].reg
), 0, &(yyvsp
[(3) - (4)].macfunc
).s0
, &(yyvsp
[(3) - (4)].macfunc
).s1
, 1);
4309 #line 1764 "bfin-parse.y"
4311 if (!IS_DREG ((yyvsp
[(1) - (9)].reg
)) || !IS_DREG ((yyvsp
[(6) - (9)].reg
)))
4312 return yyerror ("Dregs expected");
4314 if (!IS_HCOMPL((yyvsp
[(1) - (9)].reg
), (yyvsp
[(6) - (9)].reg
)))
4315 return yyerror ("Dest registers mismatch");
4317 if (check_multiply_halfregs (&(yyvsp
[(3) - (9)].macfunc
), &(yyvsp
[(8) - (9)].macfunc
)) < 0)
4320 if ((!IS_H ((yyvsp
[(1) - (9)].reg
)) && (yyvsp
[(4) - (9)].mod
).MM
)
4321 || (!IS_H ((yyvsp
[(6) - (9)].reg
)) && (yyvsp
[(9) - (9)].mod
).MM
))
4322 return yyerror ("(M) not allowed with MAC0");
4324 notethat ("dsp32mult: dregs_hi = multiply_halfregs mxd_mod, "
4325 "dregs_lo = multiply_halfregs opt_mode\n");
4327 if (IS_H ((yyvsp
[(1) - (9)].reg
)))
4328 (yyval
.instr
) = DSP32MULT (0, (yyvsp
[(4) - (9)].mod
).MM
, (yyvsp
[(9) - (9)].mod
).mod
, 1, 0,
4329 IS_H ((yyvsp
[(3) - (9)].macfunc
).s0
), IS_H ((yyvsp
[(3) - (9)].macfunc
).s1
), IS_H ((yyvsp
[(8) - (9)].macfunc
).s0
), IS_H ((yyvsp
[(8) - (9)].macfunc
).s1
),
4330 &(yyvsp
[(1) - (9)].reg
), 0, &(yyvsp
[(3) - (9)].macfunc
).s0
, &(yyvsp
[(3) - (9)].macfunc
).s1
, 1);
4332 (yyval
.instr
) = DSP32MULT (0, (yyvsp
[(9) - (9)].mod
).MM
, (yyvsp
[(9) - (9)].mod
).mod
, 1, 0,
4333 IS_H ((yyvsp
[(8) - (9)].macfunc
).s0
), IS_H ((yyvsp
[(8) - (9)].macfunc
).s1
), IS_H ((yyvsp
[(3) - (9)].macfunc
).s0
), IS_H ((yyvsp
[(3) - (9)].macfunc
).s1
),
4334 &(yyvsp
[(1) - (9)].reg
), 0, &(yyvsp
[(3) - (9)].macfunc
).s0
, &(yyvsp
[(3) - (9)].macfunc
).s1
, 1);
4339 #line 1792 "bfin-parse.y"
4341 if (!IS_DREG ((yyvsp
[(1) - (9)].reg
)) || !IS_DREG ((yyvsp
[(6) - (9)].reg
)))
4342 return yyerror ("Dregs expected");
4344 if ((IS_EVEN ((yyvsp
[(1) - (9)].reg
)) && (yyvsp
[(6) - (9)].reg
).regno
- (yyvsp
[(1) - (9)].reg
).regno
!= 1)
4345 || (IS_EVEN ((yyvsp
[(6) - (9)].reg
)) && (yyvsp
[(1) - (9)].reg
).regno
- (yyvsp
[(6) - (9)].reg
).regno
!= 1))
4346 return yyerror ("Dest registers mismatch");
4348 if (check_multiply_halfregs (&(yyvsp
[(3) - (9)].macfunc
), &(yyvsp
[(8) - (9)].macfunc
)) < 0)
4351 if ((IS_EVEN ((yyvsp
[(1) - (9)].reg
)) && (yyvsp
[(4) - (9)].mod
).MM
)
4352 || (IS_EVEN ((yyvsp
[(6) - (9)].reg
)) && (yyvsp
[(9) - (9)].mod
).MM
))
4353 return yyerror ("(M) not allowed with MAC0");
4355 notethat ("dsp32mult: dregs = multiply_halfregs mxd_mod, "
4356 "dregs = multiply_halfregs opt_mode\n");
4358 if (IS_EVEN ((yyvsp
[(1) - (9)].reg
)))
4359 (yyval
.instr
) = DSP32MULT (0, (yyvsp
[(9) - (9)].mod
).MM
, (yyvsp
[(9) - (9)].mod
).mod
, 1, 1,
4360 IS_H ((yyvsp
[(8) - (9)].macfunc
).s0
), IS_H ((yyvsp
[(8) - (9)].macfunc
).s1
), IS_H ((yyvsp
[(3) - (9)].macfunc
).s0
), IS_H ((yyvsp
[(3) - (9)].macfunc
).s1
),
4361 &(yyvsp
[(1) - (9)].reg
), 0, &(yyvsp
[(3) - (9)].macfunc
).s0
, &(yyvsp
[(3) - (9)].macfunc
).s1
, 1);
4363 (yyval
.instr
) = DSP32MULT (0, (yyvsp
[(4) - (9)].mod
).MM
, (yyvsp
[(9) - (9)].mod
).mod
, 1, 1,
4364 IS_H ((yyvsp
[(3) - (9)].macfunc
).s0
), IS_H ((yyvsp
[(3) - (9)].macfunc
).s1
), IS_H ((yyvsp
[(8) - (9)].macfunc
).s0
), IS_H ((yyvsp
[(8) - (9)].macfunc
).s1
),
4365 &(yyvsp
[(1) - (9)].reg
), 0, &(yyvsp
[(3) - (9)].macfunc
).s0
, &(yyvsp
[(3) - (9)].macfunc
).s1
, 1);
4370 #line 1823 "bfin-parse.y"
4372 if (!REG_SAME ((yyvsp
[(1) - (5)].reg
), (yyvsp
[(3) - (5)].reg
)))
4373 return yyerror ("Aregs must be same");
4375 if (IS_DREG ((yyvsp
[(5) - (5)].reg
)) && !IS_H ((yyvsp
[(5) - (5)].reg
)))
4377 notethat ("dsp32shift: A0 = ASHIFT A0 BY dregs_lo\n");
4378 (yyval
.instr
) = DSP32SHIFT (3, 0, &(yyvsp
[(5) - (5)].reg
), 0, 0, IS_A1 ((yyvsp
[(1) - (5)].reg
)));
4381 return yyerror ("Dregs expected");
4386 #line 1837 "bfin-parse.y"
4388 if (IS_DREG ((yyvsp
[(6) - (7)].reg
)) && !IS_H ((yyvsp
[(6) - (7)].reg
)))
4390 notethat ("dsp32shift: dregs_half = ASHIFT dregs_half BY dregs_lo\n");
4391 (yyval
.instr
) = DSP32SHIFT (0, &(yyvsp
[(1) - (7)].reg
), &(yyvsp
[(6) - (7)].reg
), &(yyvsp
[(4) - (7)].reg
), (yyvsp
[(7) - (7)].modcodes
).s0
, HL2 ((yyvsp
[(1) - (7)].reg
), (yyvsp
[(4) - (7)].reg
)));
4394 return yyerror ("Dregs expected");
4399 #line 1848 "bfin-parse.y"
4401 if (!REG_SAME ((yyvsp
[(1) - (4)].reg
), (yyvsp
[(2) - (4)].reg
)))
4402 return yyerror ("Aregs must be same");
4404 if (IS_UIMM ((yyvsp
[(4) - (4)].expr
), 5))
4406 notethat ("dsp32shiftimm: A0 = A0 << uimm5\n");
4407 (yyval
.instr
) = DSP32SHIFTIMM (3, 0, imm5 ((yyvsp
[(4) - (4)].expr
)), 0, 0, IS_A1 ((yyvsp
[(1) - (4)].reg
)));
4410 return yyerror ("Bad shift value");
4415 #line 1862 "bfin-parse.y"
4417 if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && IS_DREG ((yyvsp
[(3) - (6)].reg
)) && IS_UIMM ((yyvsp
[(5) - (6)].expr
), 5))
4419 if ((yyvsp
[(6) - (6)].modcodes
).r0
)
4422 notethat ("dsp32shiftimm: dregs = dregs << expr (V, .)\n");
4423 (yyval
.instr
) = DSP32SHIFTIMM (1, &(yyvsp
[(1) - (6)].reg
), imm4 ((yyvsp
[(5) - (6)].expr
)), &(yyvsp
[(3) - (6)].reg
), (yyvsp
[(6) - (6)].modcodes
).s0
? 1 : 2, 0);
4427 notethat ("dsp32shiftimm: dregs = dregs << uimm5 (.)\n");
4428 (yyval
.instr
) = DSP32SHIFTIMM (2, &(yyvsp
[(1) - (6)].reg
), imm6 ((yyvsp
[(5) - (6)].expr
)), &(yyvsp
[(3) - (6)].reg
), (yyvsp
[(6) - (6)].modcodes
).s0
? 1 : 2, 0);
4431 else if ((yyvsp
[(6) - (6)].modcodes
).s0
== 0 && IS_PREG ((yyvsp
[(1) - (6)].reg
)) && IS_PREG ((yyvsp
[(3) - (6)].reg
)))
4433 if (EXPR_VALUE ((yyvsp
[(5) - (6)].expr
)) == 2)
4435 notethat ("PTR2op: pregs = pregs << 2\n");
4436 (yyval
.instr
) = PTR2OP (&(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), 1);
4438 else if (EXPR_VALUE ((yyvsp
[(5) - (6)].expr
)) == 1)
4440 notethat ("COMP3op: pregs = pregs << 1\n");
4441 (yyval
.instr
) = COMP3OP (&(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), 5);
4444 return yyerror ("Bad shift value");
4447 return yyerror ("Bad shift value or register");
4452 #line 1896 "bfin-parse.y"
4454 if (IS_UIMM ((yyvsp
[(5) - (5)].expr
), 4))
4456 notethat ("dsp32shiftimm: dregs_half = dregs_half << uimm4\n");
4457 (yyval
.instr
) = DSP32SHIFTIMM (0x0, &(yyvsp
[(1) - (5)].reg
), imm5 ((yyvsp
[(5) - (5)].expr
)), &(yyvsp
[(3) - (5)].reg
), 2, HL2 ((yyvsp
[(1) - (5)].reg
), (yyvsp
[(3) - (5)].reg
)));
4460 return yyerror ("Bad shift value");
4465 #line 1906 "bfin-parse.y"
4467 if (IS_UIMM ((yyvsp
[(5) - (6)].expr
), 4))
4469 notethat ("dsp32shiftimm: dregs_half = dregs_half << uimm4\n");
4470 (yyval
.instr
) = DSP32SHIFTIMM (0x0, &(yyvsp
[(1) - (6)].reg
), imm5 ((yyvsp
[(5) - (6)].expr
)), &(yyvsp
[(3) - (6)].reg
), (yyvsp
[(6) - (6)].modcodes
).s0
, HL2 ((yyvsp
[(1) - (6)].reg
), (yyvsp
[(3) - (6)].reg
)));
4473 return yyerror ("Bad shift value");
4478 #line 1916 "bfin-parse.y"
4482 if (IS_DREG ((yyvsp
[(1) - (7)].reg
)) && IS_DREG ((yyvsp
[(4) - (7)].reg
)) && IS_DREG ((yyvsp
[(6) - (7)].reg
)) && !IS_H ((yyvsp
[(6) - (7)].reg
)))
4484 if ((yyvsp
[(7) - (7)].modcodes
).r0
)
4487 notethat ("dsp32shift: dregs = ASHIFT dregs BY "
4488 "dregs_lo (V, .)\n");
4494 notethat ("dsp32shift: dregs = ASHIFT dregs BY dregs_lo (.)\n");
4496 (yyval
.instr
) = DSP32SHIFT (op
, &(yyvsp
[(1) - (7)].reg
), &(yyvsp
[(6) - (7)].reg
), &(yyvsp
[(4) - (7)].reg
), (yyvsp
[(7) - (7)].modcodes
).s0
, 0);
4499 return yyerror ("Dregs expected");
4504 #line 1941 "bfin-parse.y"
4506 if (IS_DREG_L ((yyvsp
[(1) - (9)].reg
)) && IS_DREG_L ((yyvsp
[(5) - (9)].reg
)) && IS_DREG_L ((yyvsp
[(7) - (9)].reg
)))
4508 notethat ("dsp32shift: dregs_lo = EXPADJ (dregs , dregs_lo )\n");
4509 (yyval
.instr
) = DSP32SHIFT (7, &(yyvsp
[(1) - (9)].reg
), &(yyvsp
[(7) - (9)].reg
), &(yyvsp
[(5) - (9)].reg
), (yyvsp
[(9) - (9)].r0
).r0
, 0);
4512 return yyerror ("Bad shift value or register");
4517 #line 1953 "bfin-parse.y"
4519 if (IS_DREG_L ((yyvsp
[(1) - (8)].reg
)) && IS_DREG_L ((yyvsp
[(5) - (8)].reg
)) && IS_DREG_L ((yyvsp
[(7) - (8)].reg
)))
4521 notethat ("dsp32shift: dregs_lo = EXPADJ (dregs_lo, dregs_lo)\n");
4522 (yyval
.instr
) = DSP32SHIFT (7, &(yyvsp
[(1) - (8)].reg
), &(yyvsp
[(7) - (8)].reg
), &(yyvsp
[(5) - (8)].reg
), 2, 0);
4524 else if (IS_DREG_L ((yyvsp
[(1) - (8)].reg
)) && IS_DREG_H ((yyvsp
[(5) - (8)].reg
)) && IS_DREG_L ((yyvsp
[(7) - (8)].reg
)))
4526 notethat ("dsp32shift: dregs_lo = EXPADJ (dregs_hi, dregs_lo)\n");
4527 (yyval
.instr
) = DSP32SHIFT (7, &(yyvsp
[(1) - (8)].reg
), &(yyvsp
[(7) - (8)].reg
), &(yyvsp
[(5) - (8)].reg
), 3, 0);
4530 return yyerror ("Bad shift value or register");
4535 #line 1971 "bfin-parse.y"
4537 if (IS_DREG ((yyvsp
[(1) - (8)].reg
)) && IS_DREG ((yyvsp
[(5) - (8)].reg
)) && IS_DREG ((yyvsp
[(7) - (8)].reg
)))
4539 notethat ("dsp32shift: dregs = DEPOSIT (dregs , dregs )\n");
4540 (yyval
.instr
) = DSP32SHIFT (10, &(yyvsp
[(1) - (8)].reg
), &(yyvsp
[(7) - (8)].reg
), &(yyvsp
[(5) - (8)].reg
), 2, 0);
4543 return yyerror ("Register mismatch");
4548 #line 1982 "bfin-parse.y"
4550 if (IS_DREG ((yyvsp
[(1) - (11)].reg
)) && IS_DREG ((yyvsp
[(5) - (11)].reg
)) && IS_DREG ((yyvsp
[(7) - (11)].reg
)))
4552 notethat ("dsp32shift: dregs = DEPOSIT (dregs , dregs ) (X)\n");
4553 (yyval
.instr
) = DSP32SHIFT (10, &(yyvsp
[(1) - (11)].reg
), &(yyvsp
[(7) - (11)].reg
), &(yyvsp
[(5) - (11)].reg
), 3, 0);
4556 return yyerror ("Register mismatch");
4561 #line 1993 "bfin-parse.y"
4563 if (IS_DREG ((yyvsp
[(1) - (9)].reg
)) && IS_DREG ((yyvsp
[(5) - (9)].reg
)) && IS_DREG_L ((yyvsp
[(7) - (9)].reg
)))
4565 notethat ("dsp32shift: dregs = EXTRACT (dregs, dregs_lo ) (.)\n");
4566 (yyval
.instr
) = DSP32SHIFT (10, &(yyvsp
[(1) - (9)].reg
), &(yyvsp
[(7) - (9)].reg
), &(yyvsp
[(5) - (9)].reg
), (yyvsp
[(9) - (9)].r0
).r0
, 0);
4569 return yyerror ("Register mismatch");
4574 #line 2004 "bfin-parse.y"
4576 if (!REG_SAME ((yyvsp
[(1) - (4)].reg
), (yyvsp
[(2) - (4)].reg
)))
4577 return yyerror ("Aregs must be same");
4579 if (IS_UIMM ((yyvsp
[(4) - (4)].expr
), 5))
4581 notethat ("dsp32shiftimm: Ax = Ax >>> uimm5\n");
4582 (yyval
.instr
) = DSP32SHIFTIMM (3, 0, -imm6 ((yyvsp
[(4) - (4)].expr
)), 0, 0, IS_A1 ((yyvsp
[(1) - (4)].reg
)));
4585 return yyerror ("Shift value range error");
4590 #line 2017 "bfin-parse.y"
4592 if (REG_SAME ((yyvsp
[(1) - (5)].reg
), (yyvsp
[(3) - (5)].reg
)) && IS_DREG_L ((yyvsp
[(5) - (5)].reg
)))
4594 notethat ("dsp32shift: Ax = LSHIFT Ax BY dregs_lo\n");
4595 (yyval
.instr
) = DSP32SHIFT (3, 0, &(yyvsp
[(5) - (5)].reg
), 0, 1, IS_A1 ((yyvsp
[(1) - (5)].reg
)));
4598 return yyerror ("Register mismatch");
4603 #line 2028 "bfin-parse.y"
4605 if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && IS_DREG ((yyvsp
[(4) - (6)].reg
)) && IS_DREG_L ((yyvsp
[(6) - (6)].reg
)))
4607 notethat ("dsp32shift: dregs_lo = LSHIFT dregs_hi BY dregs_lo\n");
4608 (yyval
.instr
) = DSP32SHIFT (0, &(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(6) - (6)].reg
), &(yyvsp
[(4) - (6)].reg
), 2, HL2 ((yyvsp
[(1) - (6)].reg
), (yyvsp
[(4) - (6)].reg
)));
4611 return yyerror ("Register mismatch");
4616 #line 2039 "bfin-parse.y"
4618 if (IS_DREG ((yyvsp
[(1) - (7)].reg
)) && IS_DREG ((yyvsp
[(4) - (7)].reg
)) && IS_DREG_L ((yyvsp
[(6) - (7)].reg
)))
4620 notethat ("dsp32shift: dregs = LSHIFT dregs BY dregs_lo (V )\n");
4621 (yyval
.instr
) = DSP32SHIFT ((yyvsp
[(7) - (7)].r0
).r0
? 1: 2, &(yyvsp
[(1) - (7)].reg
), &(yyvsp
[(6) - (7)].reg
), &(yyvsp
[(4) - (7)].reg
), 2, 0);
4624 return yyerror ("Register mismatch");
4629 #line 2050 "bfin-parse.y"
4631 if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && IS_DREG ((yyvsp
[(4) - (6)].reg
)) && IS_DREG_L ((yyvsp
[(6) - (6)].reg
)))
4633 notethat ("dsp32shift: dregs = SHIFT dregs BY dregs_lo\n");
4634 (yyval
.instr
) = DSP32SHIFT (2, &(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(6) - (6)].reg
), &(yyvsp
[(4) - (6)].reg
), 2, 0);
4637 return yyerror ("Register mismatch");
4642 #line 2061 "bfin-parse.y"
4644 if (REG_SAME ((yyvsp
[(1) - (4)].reg
), (yyvsp
[(2) - (4)].reg
)) && IS_IMM ((yyvsp
[(4) - (4)].expr
), 6) >= 0)
4646 notethat ("dsp32shiftimm: Ax = Ax >> imm6\n");
4647 (yyval
.instr
) = DSP32SHIFTIMM (3, 0, -imm6 ((yyvsp
[(4) - (4)].expr
)), 0, 1, IS_A1 ((yyvsp
[(1) - (4)].reg
)));
4650 return yyerror ("Accu register expected");
4655 #line 2072 "bfin-parse.y"
4657 if ((yyvsp
[(6) - (6)].r0
).r0
== 1)
4659 if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && IS_DREG ((yyvsp
[(3) - (6)].reg
)) && IS_UIMM ((yyvsp
[(5) - (6)].expr
), 5))
4661 notethat ("dsp32shiftimm: dregs = dregs >> uimm5 (V)\n");
4662 (yyval
.instr
) = DSP32SHIFTIMM (1, &(yyvsp
[(1) - (6)].reg
), -uimm5 ((yyvsp
[(5) - (6)].expr
)), &(yyvsp
[(3) - (6)].reg
), 2, 0);
4665 return yyerror ("Register mismatch");
4669 if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && IS_DREG ((yyvsp
[(3) - (6)].reg
)) && IS_UIMM ((yyvsp
[(5) - (6)].expr
), 5))
4671 notethat ("dsp32shiftimm: dregs = dregs >> uimm5\n");
4672 (yyval
.instr
) = DSP32SHIFTIMM (2, &(yyvsp
[(1) - (6)].reg
), -imm6 ((yyvsp
[(5) - (6)].expr
)), &(yyvsp
[(3) - (6)].reg
), 2, 0);
4674 else if (IS_PREG ((yyvsp
[(1) - (6)].reg
)) && IS_PREG ((yyvsp
[(3) - (6)].reg
)) && EXPR_VALUE ((yyvsp
[(5) - (6)].expr
)) == 2)
4676 notethat ("PTR2op: pregs = pregs >> 2\n");
4677 (yyval
.instr
) = PTR2OP (&(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), 3);
4679 else if (IS_PREG ((yyvsp
[(1) - (6)].reg
)) && IS_PREG ((yyvsp
[(3) - (6)].reg
)) && EXPR_VALUE ((yyvsp
[(5) - (6)].expr
)) == 1)
4681 notethat ("PTR2op: pregs = pregs >> 1\n");
4682 (yyval
.instr
) = PTR2OP (&(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(3) - (6)].reg
), 4);
4685 return yyerror ("Register mismatch");
4691 #line 2105 "bfin-parse.y"
4693 if (IS_UIMM ((yyvsp
[(5) - (5)].expr
), 5))
4695 notethat ("dsp32shiftimm: dregs_half = dregs_half >> uimm5\n");
4696 (yyval
.instr
) = DSP32SHIFTIMM (0, &(yyvsp
[(1) - (5)].reg
), -uimm5 ((yyvsp
[(5) - (5)].expr
)), &(yyvsp
[(3) - (5)].reg
), 2, HL2 ((yyvsp
[(1) - (5)].reg
), (yyvsp
[(3) - (5)].reg
)));
4699 return yyerror ("Register mismatch");
4704 #line 2115 "bfin-parse.y"
4706 if (IS_UIMM ((yyvsp
[(5) - (6)].expr
), 5))
4708 notethat ("dsp32shiftimm: dregs_half = dregs_half >>> uimm5\n");
4709 (yyval
.instr
) = DSP32SHIFTIMM (0, &(yyvsp
[(1) - (6)].reg
), -uimm5 ((yyvsp
[(5) - (6)].expr
)), &(yyvsp
[(3) - (6)].reg
),
4710 (yyvsp
[(6) - (6)].modcodes
).s0
, HL2 ((yyvsp
[(1) - (6)].reg
), (yyvsp
[(3) - (6)].reg
)));
4713 return yyerror ("Register or modifier mismatch");
4718 #line 2128 "bfin-parse.y"
4720 if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && IS_DREG ((yyvsp
[(3) - (6)].reg
)) && IS_UIMM ((yyvsp
[(5) - (6)].expr
), 5))
4722 if ((yyvsp
[(6) - (6)].modcodes
).r0
)
4725 notethat ("dsp32shiftimm: dregs = dregs >>> uimm5 (V, .)\n");
4726 (yyval
.instr
) = DSP32SHIFTIMM (1, &(yyvsp
[(1) - (6)].reg
), -uimm5 ((yyvsp
[(5) - (6)].expr
)), &(yyvsp
[(3) - (6)].reg
), (yyvsp
[(6) - (6)].modcodes
).s0
, 0);
4730 notethat ("dsp32shiftimm: dregs = dregs >>> uimm5 (.)\n");
4731 (yyval
.instr
) = DSP32SHIFTIMM (2, &(yyvsp
[(1) - (6)].reg
), -uimm5 ((yyvsp
[(5) - (6)].expr
)), &(yyvsp
[(3) - (6)].reg
), (yyvsp
[(6) - (6)].modcodes
).s0
, 0);
4735 return yyerror ("Register mismatch");
4740 #line 2148 "bfin-parse.y"
4742 if (IS_DREG_L ((yyvsp
[(1) - (4)].reg
)) && IS_DREG ((yyvsp
[(4) - (4)].reg
)))
4744 notethat ("dsp32shift: dregs_lo = ONES dregs\n");
4745 (yyval
.instr
) = DSP32SHIFT (6, &(yyvsp
[(1) - (4)].reg
), 0, &(yyvsp
[(4) - (4)].reg
), 3, 0);
4748 return yyerror ("Register mismatch");
4753 #line 2159 "bfin-parse.y"
4755 if (IS_DREG ((yyvsp
[(1) - (8)].reg
)) && IS_DREG ((yyvsp
[(5) - (8)].reg
)) && IS_DREG ((yyvsp
[(7) - (8)].reg
)))
4757 notethat ("dsp32shift: dregs = PACK (dregs_hi , dregs_hi )\n");
4758 (yyval
.instr
) = DSP32SHIFT (4, &(yyvsp
[(1) - (8)].reg
), &(yyvsp
[(7) - (8)].reg
), &(yyvsp
[(5) - (8)].reg
), HL2 ((yyvsp
[(5) - (8)].reg
), (yyvsp
[(7) - (8)].reg
)), 0);
4761 return yyerror ("Register mismatch");
4766 #line 2170 "bfin-parse.y"
4768 if (IS_DREG ((yyvsp
[(1) - (10)].reg
))
4769 && (yyvsp
[(7) - (10)].reg
).regno
== REG_A0
4770 && IS_DREG ((yyvsp
[(9) - (10)].reg
)) && !IS_H ((yyvsp
[(1) - (10)].reg
)) && !IS_A1 ((yyvsp
[(7) - (10)].reg
)))
4772 notethat ("dsp32shift: dregs_lo = CC = BXORSHIFT (A0 , dregs )\n");
4773 (yyval
.instr
) = DSP32SHIFT (11, &(yyvsp
[(1) - (10)].reg
), &(yyvsp
[(9) - (10)].reg
), 0, 0, 0);
4776 return yyerror ("Register mismatch");
4781 #line 2183 "bfin-parse.y"
4783 if (IS_DREG ((yyvsp
[(1) - (10)].reg
))
4784 && (yyvsp
[(7) - (10)].reg
).regno
== REG_A0
4785 && IS_DREG ((yyvsp
[(9) - (10)].reg
)) && !IS_H ((yyvsp
[(1) - (10)].reg
)) && !IS_A1 ((yyvsp
[(7) - (10)].reg
)))
4787 notethat ("dsp32shift: dregs_lo = CC = BXOR (A0 , dregs)\n");
4788 (yyval
.instr
) = DSP32SHIFT (11, &(yyvsp
[(1) - (10)].reg
), &(yyvsp
[(9) - (10)].reg
), 0, 1, 0);
4791 return yyerror ("Register mismatch");
4796 #line 2196 "bfin-parse.y"
4798 if (IS_DREG ((yyvsp
[(1) - (12)].reg
)) && !IS_H ((yyvsp
[(1) - (12)].reg
)) && !REG_SAME ((yyvsp
[(7) - (12)].reg
), (yyvsp
[(9) - (12)].reg
)))
4800 notethat ("dsp32shift: dregs_lo = CC = BXOR (A0 , A1 , CC)\n");
4801 (yyval
.instr
) = DSP32SHIFT (12, &(yyvsp
[(1) - (12)].reg
), 0, 0, 1, 0);
4804 return yyerror ("Register mismatch");
4809 #line 2207 "bfin-parse.y"
4811 if (REG_SAME ((yyvsp
[(1) - (5)].reg
), (yyvsp
[(3) - (5)].reg
)) && IS_DREG_L ((yyvsp
[(5) - (5)].reg
)))
4813 notethat ("dsp32shift: Ax = ROT Ax BY dregs_lo\n");
4814 (yyval
.instr
) = DSP32SHIFT (3, 0, &(yyvsp
[(5) - (5)].reg
), 0, 2, IS_A1 ((yyvsp
[(1) - (5)].reg
)));
4817 return yyerror ("Register mismatch");
4822 #line 2218 "bfin-parse.y"
4824 if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && IS_DREG ((yyvsp
[(4) - (6)].reg
)) && IS_DREG_L ((yyvsp
[(6) - (6)].reg
)))
4826 notethat ("dsp32shift: dregs = ROT dregs BY dregs_lo\n");
4827 (yyval
.instr
) = DSP32SHIFT (2, &(yyvsp
[(1) - (6)].reg
), &(yyvsp
[(6) - (6)].reg
), &(yyvsp
[(4) - (6)].reg
), 3, 0);
4830 return yyerror ("Register mismatch");
4835 #line 2229 "bfin-parse.y"
4837 if (IS_IMM ((yyvsp
[(5) - (5)].expr
), 6))
4839 notethat ("dsp32shiftimm: An = ROT An BY imm6\n");
4840 (yyval
.instr
) = DSP32SHIFTIMM (3, 0, imm6 ((yyvsp
[(5) - (5)].expr
)), 0, 2, IS_A1 ((yyvsp
[(1) - (5)].reg
)));
4843 return yyerror ("Register mismatch");
4848 #line 2240 "bfin-parse.y"
4850 if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && IS_DREG ((yyvsp
[(4) - (6)].reg
)) && IS_IMM ((yyvsp
[(6) - (6)].expr
), 6))
4852 (yyval
.instr
) = DSP32SHIFTIMM (2, &(yyvsp
[(1) - (6)].reg
), imm6 ((yyvsp
[(6) - (6)].expr
)), &(yyvsp
[(4) - (6)].reg
), 3, IS_A1 ((yyvsp
[(1) - (6)].reg
)));
4855 return yyerror ("Register mismatch");
4860 #line 2250 "bfin-parse.y"
4862 if (IS_DREG_L ((yyvsp
[(1) - (4)].reg
)))
4864 notethat ("dsp32shift: dregs_lo = SIGNBITS An\n");
4865 (yyval
.instr
) = DSP32SHIFT (6, &(yyvsp
[(1) - (4)].reg
), 0, 0, IS_A1 ((yyvsp
[(4) - (4)].reg
)), 0);
4868 return yyerror ("Register mismatch");
4873 #line 2261 "bfin-parse.y"
4875 if (IS_DREG_L ((yyvsp
[(1) - (4)].reg
)) && IS_DREG ((yyvsp
[(4) - (4)].reg
)))
4877 notethat ("dsp32shift: dregs_lo = SIGNBITS dregs\n");
4878 (yyval
.instr
) = DSP32SHIFT (5, &(yyvsp
[(1) - (4)].reg
), 0, &(yyvsp
[(4) - (4)].reg
), 0, 0);
4881 return yyerror ("Register mismatch");
4886 #line 2272 "bfin-parse.y"
4888 if (IS_DREG_L ((yyvsp
[(1) - (4)].reg
)))
4890 notethat ("dsp32shift: dregs_lo = SIGNBITS dregs_lo\n");
4891 (yyval
.instr
) = DSP32SHIFT (5, &(yyvsp
[(1) - (4)].reg
), 0, &(yyvsp
[(4) - (4)].reg
), 1 + IS_H ((yyvsp
[(4) - (4)].reg
)), 0);
4894 return yyerror ("Register mismatch");
4899 #line 2284 "bfin-parse.y"
4901 if (IS_DREG_L ((yyvsp
[(1) - (7)].reg
)) && IS_DREG ((yyvsp
[(5) - (7)].reg
)))
4903 notethat ("dsp32shift: dregs_lo = VIT_MAX (dregs) (..)\n");
4904 (yyval
.instr
) = DSP32SHIFT (9, &(yyvsp
[(1) - (7)].reg
), 0, &(yyvsp
[(5) - (7)].reg
), ((yyvsp
[(7) - (7)].r0
).r0
? 0 : 1), 0);
4907 return yyerror ("Register mismatch");
4912 #line 2295 "bfin-parse.y"
4914 if (IS_DREG ((yyvsp
[(1) - (9)].reg
)) && IS_DREG ((yyvsp
[(5) - (9)].reg
)) && IS_DREG ((yyvsp
[(7) - (9)].reg
)))
4916 notethat ("dsp32shift: dregs = VIT_MAX (dregs, dregs) (ASR)\n");
4917 (yyval
.instr
) = DSP32SHIFT (9, &(yyvsp
[(1) - (9)].reg
), &(yyvsp
[(7) - (9)].reg
), &(yyvsp
[(5) - (9)].reg
), 2 | ((yyvsp
[(9) - (9)].r0
).r0
? 0 : 1), 0);
4920 return yyerror ("Register mismatch");
4925 #line 2306 "bfin-parse.y"
4927 if (IS_DREG ((yyvsp
[(3) - (9)].reg
)) && IS_DREG ((yyvsp
[(5) - (9)].reg
)) && !IS_A1 ((yyvsp
[(7) - (9)].reg
)))
4929 notethat ("dsp32shift: BITMUX (dregs , dregs , A0) (ASR)\n");
4930 (yyval
.instr
) = DSP32SHIFT (8, 0, &(yyvsp
[(3) - (9)].reg
), &(yyvsp
[(5) - (9)].reg
), (yyvsp
[(9) - (9)].r0
).r0
, 0);
4933 return yyerror ("Register mismatch");
4938 #line 2317 "bfin-parse.y"
4940 if (!IS_A1 ((yyvsp
[(1) - (9)].reg
)) && !IS_A1 ((yyvsp
[(4) - (9)].reg
)) && IS_A1 ((yyvsp
[(6) - (9)].reg
)))
4942 notethat ("dsp32shift: A0 = BXORSHIFT (A0 , A1 , CC )\n");
4943 (yyval
.instr
) = DSP32SHIFT (12, 0, 0, 0, 0, 0);
4946 return yyerror ("Dregs expected");
4951 #line 2330 "bfin-parse.y"
4953 if (IS_DREG ((yyvsp
[(3) - (6)].reg
)) && IS_UIMM ((yyvsp
[(5) - (6)].expr
), 5))
4955 notethat ("LOGI2op: BITCLR (dregs , uimm5 )\n");
4956 (yyval
.instr
) = LOGI2OP ((yyvsp
[(3) - (6)].reg
), uimm5 ((yyvsp
[(5) - (6)].expr
)), 4);
4959 return yyerror ("Register mismatch");
4964 #line 2342 "bfin-parse.y"
4966 if (IS_DREG ((yyvsp
[(3) - (6)].reg
)) && IS_UIMM ((yyvsp
[(5) - (6)].expr
), 5))
4968 notethat ("LOGI2op: BITCLR (dregs , uimm5 )\n");
4969 (yyval
.instr
) = LOGI2OP ((yyvsp
[(3) - (6)].reg
), uimm5 ((yyvsp
[(5) - (6)].expr
)), 2);
4972 return yyerror ("Register mismatch");
4977 #line 2354 "bfin-parse.y"
4979 if (IS_DREG ((yyvsp
[(3) - (6)].reg
)) && IS_UIMM ((yyvsp
[(5) - (6)].expr
), 5))
4981 notethat ("LOGI2op: BITCLR (dregs , uimm5 )\n");
4982 (yyval
.instr
) = LOGI2OP ((yyvsp
[(3) - (6)].reg
), uimm5 ((yyvsp
[(5) - (6)].expr
)), 3);
4985 return yyerror ("Register mismatch");
4990 #line 2365 "bfin-parse.y"
4992 if (IS_DREG ((yyvsp
[(5) - (8)].reg
)) && IS_UIMM ((yyvsp
[(7) - (8)].expr
), 5))
4994 notethat ("LOGI2op: CC =! BITTST (dregs , uimm5 )\n");
4995 (yyval
.instr
) = LOGI2OP ((yyvsp
[(5) - (8)].reg
), uimm5 ((yyvsp
[(7) - (8)].expr
)), 0);
4998 return yyerror ("Register mismatch or value error");
5003 #line 2376 "bfin-parse.y"
5005 if (IS_DREG ((yyvsp
[(5) - (8)].reg
)) && IS_UIMM ((yyvsp
[(7) - (8)].expr
), 5))
5007 notethat ("LOGI2op: CC = BITTST (dregs , uimm5 )\n");
5008 (yyval
.instr
) = LOGI2OP ((yyvsp
[(5) - (8)].reg
), uimm5 ((yyvsp
[(7) - (8)].expr
)), 1);
5011 return yyerror ("Register mismatch or value error");
5016 #line 2387 "bfin-parse.y"
5018 if ((IS_DREG ((yyvsp
[(4) - (6)].reg
)) || IS_PREG ((yyvsp
[(4) - (6)].reg
)))
5019 && (IS_DREG ((yyvsp
[(6) - (6)].reg
)) || IS_PREG ((yyvsp
[(6) - (6)].reg
))))
5021 notethat ("ccMV: IF ! CC gregs = gregs\n");
5022 (yyval
.instr
) = CCMV (&(yyvsp
[(6) - (6)].reg
), &(yyvsp
[(4) - (6)].reg
), 0);
5025 return yyerror ("Register mismatch");
5030 #line 2399 "bfin-parse.y"
5032 if ((IS_DREG ((yyvsp
[(5) - (5)].reg
)) || IS_PREG ((yyvsp
[(5) - (5)].reg
)))
5033 && (IS_DREG ((yyvsp
[(3) - (5)].reg
)) || IS_PREG ((yyvsp
[(3) - (5)].reg
))))
5035 notethat ("ccMV: IF CC gregs = gregs\n");
5036 (yyval
.instr
) = CCMV (&(yyvsp
[(5) - (5)].reg
), &(yyvsp
[(3) - (5)].reg
), 1);
5039 return yyerror ("Register mismatch");
5044 #line 2411 "bfin-parse.y"
5046 if (IS_PCREL10 ((yyvsp
[(5) - (5)].expr
)))
5048 notethat ("BRCC: IF !CC JUMP pcrel11m2\n");
5049 (yyval
.instr
) = BRCC (0, 0, (yyvsp
[(5) - (5)].expr
));
5052 return yyerror ("Bad jump offset");
5057 #line 2422 "bfin-parse.y"
5059 if (IS_PCREL10 ((yyvsp
[(5) - (8)].expr
)))
5061 notethat ("BRCC: IF !CC JUMP pcrel11m2\n");
5062 (yyval
.instr
) = BRCC (0, 1, (yyvsp
[(5) - (8)].expr
));
5065 return yyerror ("Bad jump offset");
5070 #line 2433 "bfin-parse.y"
5072 if (IS_PCREL10 ((yyvsp
[(4) - (4)].expr
)))
5074 notethat ("BRCC: IF CC JUMP pcrel11m2\n");
5075 (yyval
.instr
) = BRCC (1, 0, (yyvsp
[(4) - (4)].expr
));
5078 return yyerror ("Bad jump offset");
5083 #line 2444 "bfin-parse.y"
5085 if (IS_PCREL10 ((yyvsp
[(4) - (7)].expr
)))
5087 notethat ("BRCC: IF !CC JUMP pcrel11m2\n");
5088 (yyval
.instr
) = BRCC (1, 1, (yyvsp
[(4) - (7)].expr
));
5091 return yyerror ("Bad jump offset");
5096 #line 2454 "bfin-parse.y"
5098 notethat ("ProgCtrl: NOP\n");
5099 (yyval
.instr
) = PROGCTRL (0, 0);
5104 #line 2460 "bfin-parse.y"
5106 notethat ("ProgCtrl: RTS\n");
5107 (yyval
.instr
) = PROGCTRL (1, 0);
5112 #line 2466 "bfin-parse.y"
5114 notethat ("ProgCtrl: RTI\n");
5115 (yyval
.instr
) = PROGCTRL (1, 1);
5120 #line 2472 "bfin-parse.y"
5122 notethat ("ProgCtrl: RTX\n");
5123 (yyval
.instr
) = PROGCTRL (1, 2);
5128 #line 2478 "bfin-parse.y"
5130 notethat ("ProgCtrl: RTN\n");
5131 (yyval
.instr
) = PROGCTRL (1, 3);
5136 #line 2484 "bfin-parse.y"
5138 notethat ("ProgCtrl: RTE\n");
5139 (yyval
.instr
) = PROGCTRL (1, 4);
5144 #line 2490 "bfin-parse.y"
5146 notethat ("ProgCtrl: IDLE\n");
5147 (yyval
.instr
) = PROGCTRL (2, 0);
5152 #line 2496 "bfin-parse.y"
5154 notethat ("ProgCtrl: CSYNC\n");
5155 (yyval
.instr
) = PROGCTRL (2, 3);
5160 #line 2502 "bfin-parse.y"
5162 notethat ("ProgCtrl: SSYNC\n");
5163 (yyval
.instr
) = PROGCTRL (2, 4);
5168 #line 2508 "bfin-parse.y"
5170 notethat ("ProgCtrl: EMUEXCPT\n");
5171 (yyval
.instr
) = PROGCTRL (2, 5);
5176 #line 2514 "bfin-parse.y"
5178 if (IS_DREG ((yyvsp
[(2) - (2)].reg
)))
5180 notethat ("ProgCtrl: CLI dregs\n");
5181 (yyval
.instr
) = PROGCTRL (3, (yyvsp
[(2) - (2)].reg
).regno
& CODE_MASK
);
5184 return yyerror ("Dreg expected for CLI");
5189 #line 2525 "bfin-parse.y"
5191 if (IS_DREG ((yyvsp
[(2) - (2)].reg
)))
5193 notethat ("ProgCtrl: STI dregs\n");
5194 (yyval
.instr
) = PROGCTRL (4, (yyvsp
[(2) - (2)].reg
).regno
& CODE_MASK
);
5197 return yyerror ("Dreg expected for STI");
5202 #line 2536 "bfin-parse.y"
5204 if (IS_PREG ((yyvsp
[(3) - (4)].reg
)))
5206 notethat ("ProgCtrl: JUMP (pregs )\n");
5207 (yyval
.instr
) = PROGCTRL (5, (yyvsp
[(3) - (4)].reg
).regno
& CODE_MASK
);
5210 return yyerror ("Bad register for indirect jump");
5215 #line 2547 "bfin-parse.y"
5217 if (IS_PREG ((yyvsp
[(3) - (4)].reg
)))
5219 notethat ("ProgCtrl: CALL (pregs )\n");
5220 (yyval
.instr
) = PROGCTRL (6, (yyvsp
[(3) - (4)].reg
).regno
& CODE_MASK
);
5223 return yyerror ("Bad register for indirect call");
5228 #line 2558 "bfin-parse.y"
5230 if (IS_PREG ((yyvsp
[(5) - (6)].reg
)))
5232 notethat ("ProgCtrl: CALL (PC + pregs )\n");
5233 (yyval
.instr
) = PROGCTRL (7, (yyvsp
[(5) - (6)].reg
).regno
& CODE_MASK
);
5236 return yyerror ("Bad register for indirect call");
5241 #line 2569 "bfin-parse.y"
5243 if (IS_PREG ((yyvsp
[(5) - (6)].reg
)))
5245 notethat ("ProgCtrl: JUMP (PC + pregs )\n");
5246 (yyval
.instr
) = PROGCTRL (8, (yyvsp
[(5) - (6)].reg
).regno
& CODE_MASK
);
5249 return yyerror ("Bad register for indirect jump");
5254 #line 2580 "bfin-parse.y"
5256 if (IS_UIMM ((yyvsp
[(2) - (2)].expr
), 4))
5258 notethat ("ProgCtrl: RAISE uimm4\n");
5259 (yyval
.instr
) = PROGCTRL (9, uimm4 ((yyvsp
[(2) - (2)].expr
)));
5262 return yyerror ("Bad value for RAISE");
5267 #line 2591 "bfin-parse.y"
5269 notethat ("ProgCtrl: EMUEXCPT\n");
5270 (yyval
.instr
) = PROGCTRL (10, uimm4 ((yyvsp
[(2) - (2)].expr
)));
5275 #line 2597 "bfin-parse.y"
5277 if (IS_PREG ((yyvsp
[(3) - (4)].reg
)))
5279 notethat ("ProgCtrl: TESTSET (pregs )\n");
5280 (yyval
.instr
) = PROGCTRL (11, (yyvsp
[(3) - (4)].reg
).regno
& CODE_MASK
);
5283 return yyerror ("Preg expected");
5288 #line 2608 "bfin-parse.y"
5290 if (IS_PCREL12 ((yyvsp
[(2) - (2)].expr
)))
5292 notethat ("UJUMP: JUMP pcrel12\n");
5293 (yyval
.instr
) = UJUMP ((yyvsp
[(2) - (2)].expr
));
5296 return yyerror ("Bad value for relative jump");
5301 #line 2619 "bfin-parse.y"
5303 if (IS_PCREL12 ((yyvsp
[(2) - (2)].expr
)))
5305 notethat ("UJUMP: JUMP_DOT_S pcrel12\n");
5306 (yyval
.instr
) = UJUMP((yyvsp
[(2) - (2)].expr
));
5309 return yyerror ("Bad value for relative jump");
5314 #line 2630 "bfin-parse.y"
5316 if (IS_PCREL24 ((yyvsp
[(2) - (2)].expr
)))
5318 notethat ("CALLa: jump.l pcrel24\n");
5319 (yyval
.instr
) = CALLA ((yyvsp
[(2) - (2)].expr
), 0);
5322 return yyerror ("Bad value for long jump");
5327 #line 2641 "bfin-parse.y"
5329 if (IS_PCREL24 ((yyvsp
[(2) - (2)].expr
)))
5331 notethat ("CALLa: jump.l pcrel24\n");
5332 (yyval
.instr
) = CALLA ((yyvsp
[(2) - (2)].expr
), 2);
5335 return yyerror ("Bad value for long jump");
5340 #line 2652 "bfin-parse.y"
5342 if (IS_PCREL24 ((yyvsp
[(2) - (2)].expr
)))
5344 notethat ("CALLa: CALL pcrel25m2\n");
5345 (yyval
.instr
) = CALLA ((yyvsp
[(2) - (2)].expr
), 1);
5348 return yyerror ("Bad call address");
5353 #line 2662 "bfin-parse.y"
5355 if (IS_PCREL24 ((yyvsp
[(2) - (2)].expr
)))
5357 notethat ("CALLa: CALL pcrel25m2\n");
5358 (yyval
.instr
) = CALLA ((yyvsp
[(2) - (2)].expr
), 2);
5361 return yyerror ("Bad call address");
5366 #line 2675 "bfin-parse.y"
5368 if (IS_DREG ((yyvsp
[(3) - (6)].reg
)) && IS_DREG ((yyvsp
[(5) - (6)].reg
)))
5369 (yyval
.instr
) = ALU2OP (&(yyvsp
[(3) - (6)].reg
), &(yyvsp
[(5) - (6)].reg
), 8);
5371 return yyerror ("Bad registers for DIVQ");
5376 #line 2683 "bfin-parse.y"
5378 if (IS_DREG ((yyvsp
[(3) - (6)].reg
)) && IS_DREG ((yyvsp
[(5) - (6)].reg
)))
5379 (yyval
.instr
) = ALU2OP (&(yyvsp
[(3) - (6)].reg
), &(yyvsp
[(5) - (6)].reg
), 9);
5381 return yyerror ("Bad registers for DIVS");
5386 #line 2691 "bfin-parse.y"
5388 if (IS_DREG ((yyvsp
[(1) - (5)].reg
)) && IS_DREG ((yyvsp
[(4) - (5)].reg
)))
5390 if ((yyvsp
[(5) - (5)].modcodes
).r0
== 0 && (yyvsp
[(5) - (5)].modcodes
).s0
== 0 && (yyvsp
[(5) - (5)].modcodes
).aop
== 0)
5392 notethat ("ALU2op: dregs = - dregs\n");
5393 (yyval
.instr
) = ALU2OP (&(yyvsp
[(1) - (5)].reg
), &(yyvsp
[(4) - (5)].reg
), 14);
5395 else if ((yyvsp
[(5) - (5)].modcodes
).r0
== 1 && (yyvsp
[(5) - (5)].modcodes
).s0
== 0 && (yyvsp
[(5) - (5)].modcodes
).aop
== 3)
5397 notethat ("dsp32alu: dregs = - dregs (.)\n");
5398 (yyval
.instr
) = DSP32ALU (15, 0, 0, &(yyvsp
[(1) - (5)].reg
), &(yyvsp
[(4) - (5)].reg
), 0, (yyvsp
[(5) - (5)].modcodes
).s0
, 0, 3);
5402 notethat ("dsp32alu: dregs = - dregs (.)\n");
5403 (yyval
.instr
) = DSP32ALU (7, 0, 0, &(yyvsp
[(1) - (5)].reg
), &(yyvsp
[(4) - (5)].reg
), 0, (yyvsp
[(5) - (5)].modcodes
).s0
, 0, 3);
5407 return yyerror ("Dregs expected");
5412 #line 2715 "bfin-parse.y"
5414 if (IS_DREG ((yyvsp
[(1) - (4)].reg
)) && IS_DREG ((yyvsp
[(4) - (4)].reg
)))
5416 notethat ("ALU2op: dregs = ~dregs\n");
5417 (yyval
.instr
) = ALU2OP (&(yyvsp
[(1) - (4)].reg
), &(yyvsp
[(4) - (4)].reg
), 15);
5420 return yyerror ("Dregs expected");
5425 #line 2726 "bfin-parse.y"
5427 if (IS_DREG ((yyvsp
[(1) - (3)].reg
)) && IS_DREG ((yyvsp
[(3) - (3)].reg
)))
5429 notethat ("ALU2op: dregs >>= dregs\n");
5430 (yyval
.instr
) = ALU2OP (&(yyvsp
[(1) - (3)].reg
), &(yyvsp
[(3) - (3)].reg
), 1);
5433 return yyerror ("Dregs expected");
5438 #line 2737 "bfin-parse.y"
5440 if (IS_DREG ((yyvsp
[(1) - (3)].reg
)) && IS_UIMM ((yyvsp
[(3) - (3)].expr
), 5))
5442 notethat ("LOGI2op: dregs >>= uimm5\n");
5443 (yyval
.instr
) = LOGI2OP ((yyvsp
[(1) - (3)].reg
), uimm5 ((yyvsp
[(3) - (3)].expr
)), 6);
5446 return yyerror ("Dregs expected or value error");
5451 #line 2748 "bfin-parse.y"
5453 if (IS_DREG ((yyvsp
[(1) - (3)].reg
)) && IS_DREG ((yyvsp
[(3) - (3)].reg
)))
5455 notethat ("ALU2op: dregs >>>= dregs\n");
5456 (yyval
.instr
) = ALU2OP (&(yyvsp
[(1) - (3)].reg
), &(yyvsp
[(3) - (3)].reg
), 0);
5459 return yyerror ("Dregs expected");
5464 #line 2759 "bfin-parse.y"
5466 if (IS_DREG ((yyvsp
[(1) - (3)].reg
)) && IS_DREG ((yyvsp
[(3) - (3)].reg
)))
5468 notethat ("ALU2op: dregs <<= dregs\n");
5469 (yyval
.instr
) = ALU2OP (&(yyvsp
[(1) - (3)].reg
), &(yyvsp
[(3) - (3)].reg
), 2);
5472 return yyerror ("Dregs expected");
5477 #line 2770 "bfin-parse.y"
5479 if (IS_DREG ((yyvsp
[(1) - (3)].reg
)) && IS_UIMM ((yyvsp
[(3) - (3)].expr
), 5))
5481 notethat ("LOGI2op: dregs <<= uimm5\n");
5482 (yyval
.instr
) = LOGI2OP ((yyvsp
[(1) - (3)].reg
), uimm5 ((yyvsp
[(3) - (3)].expr
)), 7);
5485 return yyerror ("Dregs expected or const value error");
5490 #line 2782 "bfin-parse.y"
5492 if (IS_DREG ((yyvsp
[(1) - (3)].reg
)) && IS_UIMM ((yyvsp
[(3) - (3)].expr
), 5))
5494 notethat ("LOGI2op: dregs >>>= uimm5\n");
5495 (yyval
.instr
) = LOGI2OP ((yyvsp
[(1) - (3)].reg
), uimm5 ((yyvsp
[(3) - (3)].expr
)), 5);
5498 return yyerror ("Dregs expected");
5503 #line 2795 "bfin-parse.y"
5505 notethat ("CaCTRL: FLUSH [ pregs ]\n");
5506 if (IS_PREG ((yyvsp
[(3) - (4)].reg
)))
5507 (yyval
.instr
) = CACTRL (&(yyvsp
[(3) - (4)].reg
), 0, 2);
5509 return yyerror ("Bad register(s) for FLUSH");
5514 #line 2804 "bfin-parse.y"
5516 if (IS_PREG ((yyvsp
[(2) - (2)].reg
)))
5518 notethat ("CaCTRL: FLUSH [ pregs ++ ]\n");
5519 (yyval
.instr
) = CACTRL (&(yyvsp
[(2) - (2)].reg
), 1, 2);
5522 return yyerror ("Bad register(s) for FLUSH");
5527 #line 2815 "bfin-parse.y"
5529 if (IS_PREG ((yyvsp
[(3) - (4)].reg
)))
5531 notethat ("CaCTRL: FLUSHINV [ pregs ]\n");
5532 (yyval
.instr
) = CACTRL (&(yyvsp
[(3) - (4)].reg
), 0, 1);
5535 return yyerror ("Bad register(s) for FLUSH");
5540 #line 2826 "bfin-parse.y"
5542 if (IS_PREG ((yyvsp
[(2) - (2)].reg
)))
5544 notethat ("CaCTRL: FLUSHINV [ pregs ++ ]\n");
5545 (yyval
.instr
) = CACTRL (&(yyvsp
[(2) - (2)].reg
), 1, 1);
5548 return yyerror ("Bad register(s) for FLUSH");
5553 #line 2838 "bfin-parse.y"
5555 if (IS_PREG ((yyvsp
[(3) - (4)].reg
)))
5557 notethat ("CaCTRL: IFLUSH [ pregs ]\n");
5558 (yyval
.instr
) = CACTRL (&(yyvsp
[(3) - (4)].reg
), 0, 3);
5561 return yyerror ("Bad register(s) for FLUSH");
5566 #line 2849 "bfin-parse.y"
5568 if (IS_PREG ((yyvsp
[(2) - (2)].reg
)))
5570 notethat ("CaCTRL: IFLUSH [ pregs ++ ]\n");
5571 (yyval
.instr
) = CACTRL (&(yyvsp
[(2) - (2)].reg
), 1, 3);
5574 return yyerror ("Bad register(s) for FLUSH");
5579 #line 2860 "bfin-parse.y"
5581 if (IS_PREG ((yyvsp
[(3) - (4)].reg
)))
5583 notethat ("CaCTRL: PREFETCH [ pregs ]\n");
5584 (yyval
.instr
) = CACTRL (&(yyvsp
[(3) - (4)].reg
), 0, 0);
5587 return yyerror ("Bad register(s) for PREFETCH");
5592 #line 2871 "bfin-parse.y"
5594 if (IS_PREG ((yyvsp
[(2) - (2)].reg
)))
5596 notethat ("CaCTRL: PREFETCH [ pregs ++ ]\n");
5597 (yyval
.instr
) = CACTRL (&(yyvsp
[(2) - (2)].reg
), 1, 0);
5600 return yyerror ("Bad register(s) for PREFETCH");
5605 #line 2885 "bfin-parse.y"
5607 if (IS_PREG ((yyvsp
[(3) - (7)].reg
)) && IS_DREG ((yyvsp
[(7) - (7)].reg
)))
5609 notethat ("LDST: B [ pregs <post_op> ] = dregs\n");
5610 (yyval
.instr
) = LDST (&(yyvsp
[(3) - (7)].reg
), &(yyvsp
[(7) - (7)].reg
), (yyvsp
[(4) - (7)].modcodes
).x0
, 2, 0, 1);
5613 return yyerror ("Register mismatch");
5618 #line 2897 "bfin-parse.y"
5620 if (IS_PREG ((yyvsp
[(3) - (8)].reg
)) && IS_RANGE(16, (yyvsp
[(5) - (8)].expr
), (yyvsp
[(4) - (8)].r0
).r0
, 1) && IS_DREG ((yyvsp
[(8) - (8)].reg
)))
5622 notethat ("LDST: B [ pregs + imm16 ] = dregs\n");
5623 if ((yyvsp
[(4) - (8)].r0
).r0
)
5624 neg_value ((yyvsp
[(5) - (8)].expr
));
5625 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[(3) - (8)].reg
), &(yyvsp
[(8) - (8)].reg
), 1, 2, 0, (yyvsp
[(5) - (8)].expr
));
5628 return yyerror ("Register mismatch or const size wrong");
5633 #line 2912 "bfin-parse.y"
5635 if (IS_PREG ((yyvsp
[(3) - (8)].reg
)) && IS_URANGE (4, (yyvsp
[(5) - (8)].expr
), (yyvsp
[(4) - (8)].r0
).r0
, 2) && IS_DREG ((yyvsp
[(8) - (8)].reg
)))
5637 notethat ("LDSTii: W [ pregs +- uimm5m2 ] = dregs\n");
5638 (yyval
.instr
) = LDSTII (&(yyvsp
[(3) - (8)].reg
), &(yyvsp
[(8) - (8)].reg
), (yyvsp
[(5) - (8)].expr
), 1, 1);
5640 else if (IS_PREG ((yyvsp
[(3) - (8)].reg
)) && IS_RANGE(16, (yyvsp
[(5) - (8)].expr
), (yyvsp
[(4) - (8)].r0
).r0
, 2) && IS_DREG ((yyvsp
[(8) - (8)].reg
)))
5642 notethat ("LDSTidxI: W [ pregs + imm17m2 ] = dregs\n");
5643 if ((yyvsp
[(4) - (8)].r0
).r0
)
5644 neg_value ((yyvsp
[(5) - (8)].expr
));
5645 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[(3) - (8)].reg
), &(yyvsp
[(8) - (8)].reg
), 1, 1, 0, (yyvsp
[(5) - (8)].expr
));
5648 return yyerror ("Bad register(s) or wrong constant size");
5653 #line 2931 "bfin-parse.y"
5655 if (IS_PREG ((yyvsp
[(3) - (7)].reg
)) && IS_DREG ((yyvsp
[(7) - (7)].reg
)))
5657 notethat ("LDST: W [ pregs <post_op> ] = dregs\n");
5658 (yyval
.instr
) = LDST (&(yyvsp
[(3) - (7)].reg
), &(yyvsp
[(7) - (7)].reg
), (yyvsp
[(4) - (7)].modcodes
).x0
, 1, 0, 1);
5661 return yyerror ("Bad register(s) for STORE");
5666 #line 2942 "bfin-parse.y"
5668 if (IS_IREG ((yyvsp
[(3) - (7)].reg
)))
5670 notethat ("dspLDST: W [ iregs <post_op> ] = dregs_half\n");
5671 (yyval
.instr
) = DSPLDST (&(yyvsp
[(3) - (7)].reg
), 1 + IS_H ((yyvsp
[(7) - (7)].reg
)), &(yyvsp
[(7) - (7)].reg
), (yyvsp
[(4) - (7)].modcodes
).x0
, 1);
5673 else if ((yyvsp
[(4) - (7)].modcodes
).x0
== 2 && IS_PREG ((yyvsp
[(3) - (7)].reg
)) && IS_DREG ((yyvsp
[(7) - (7)].reg
)))
5675 notethat ("LDSTpmod: W [ pregs <post_op>] = dregs_half\n");
5676 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[(3) - (7)].reg
), &(yyvsp
[(7) - (7)].reg
), &(yyvsp
[(3) - (7)].reg
), 1 + IS_H ((yyvsp
[(7) - (7)].reg
)), 1);
5680 return yyerror ("Bad register(s) for STORE");
5685 #line 2960 "bfin-parse.y"
5687 Expr_Node
*tmp
= (yyvsp
[(4) - (7)].expr
);
5688 int ispreg
= IS_PREG ((yyvsp
[(7) - (7)].reg
));
5690 if (!IS_PREG ((yyvsp
[(2) - (7)].reg
)))
5691 return yyerror ("Preg expected for indirect");
5693 if (!IS_DREG ((yyvsp
[(7) - (7)].reg
)) && !ispreg
)
5694 return yyerror ("Bad source register for STORE");
5696 if ((yyvsp
[(3) - (7)].r0
).r0
)
5697 tmp
= unary (Expr_Op_Type_NEG
, tmp
);
5699 if (in_range_p (tmp
, 0, 63, 3))
5701 notethat ("LDSTii: dpregs = [ pregs + uimm6m4 ]\n");
5702 (yyval
.instr
) = LDSTII (&(yyvsp
[(2) - (7)].reg
), &(yyvsp
[(7) - (7)].reg
), tmp
, 1, ispreg
? 3 : 0);
5704 else if ((yyvsp
[(2) - (7)].reg
).regno
== REG_FP
&& in_range_p (tmp
, -128, 0, 3))
5706 notethat ("LDSTiiFP: dpregs = [ FP - uimm7m4 ]\n");
5707 tmp
= unary (Expr_Op_Type_NEG
, tmp
);
5708 (yyval
.instr
) = LDSTIIFP (tmp
, &(yyvsp
[(7) - (7)].reg
), 1);
5710 else if (in_range_p (tmp
, -131072, 131071, 3))
5712 notethat ("LDSTidxI: [ pregs + imm18m4 ] = dpregs\n");
5713 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[(2) - (7)].reg
), &(yyvsp
[(7) - (7)].reg
), 1, 0, ispreg
? 1: 0, tmp
);
5716 return yyerror ("Displacement out of range for store");
5721 #line 2994 "bfin-parse.y"
5723 if (IS_DREG ((yyvsp
[(1) - (9)].reg
)) && IS_PREG ((yyvsp
[(5) - (9)].reg
)) && IS_URANGE (4, (yyvsp
[(7) - (9)].expr
), (yyvsp
[(6) - (9)].r0
).r0
, 2))
5725 notethat ("LDSTii: dregs = W [ pregs + uimm4s2 ] (.)\n");
5726 (yyval
.instr
) = LDSTII (&(yyvsp
[(5) - (9)].reg
), &(yyvsp
[(1) - (9)].reg
), (yyvsp
[(7) - (9)].expr
), 0, 1 << (yyvsp
[(9) - (9)].r0
).r0
);
5728 else if (IS_DREG ((yyvsp
[(1) - (9)].reg
)) && IS_PREG ((yyvsp
[(5) - (9)].reg
)) && IS_RANGE(16, (yyvsp
[(7) - (9)].expr
), (yyvsp
[(6) - (9)].r0
).r0
, 2))
5730 notethat ("LDSTidxI: dregs = W [ pregs + imm17m2 ] (.)\n");
5731 if ((yyvsp
[(6) - (9)].r0
).r0
)
5732 neg_value ((yyvsp
[(7) - (9)].expr
));
5733 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[(5) - (9)].reg
), &(yyvsp
[(1) - (9)].reg
), 0, 1, (yyvsp
[(9) - (9)].r0
).r0
, (yyvsp
[(7) - (9)].expr
));
5736 return yyerror ("Bad register or constant for LOAD");
5741 #line 3012 "bfin-parse.y"
5743 if (IS_IREG ((yyvsp
[(5) - (7)].reg
)))
5745 notethat ("dspLDST: dregs_half = W [ iregs ]\n");
5746 (yyval
.instr
) = DSPLDST(&(yyvsp
[(5) - (7)].reg
), 1 + IS_H ((yyvsp
[(1) - (7)].reg
)), &(yyvsp
[(1) - (7)].reg
), (yyvsp
[(6) - (7)].modcodes
).x0
, 0);
5748 else if ((yyvsp
[(6) - (7)].modcodes
).x0
== 2 && IS_DREG ((yyvsp
[(1) - (7)].reg
)) && IS_PREG ((yyvsp
[(5) - (7)].reg
)))
5750 notethat ("LDSTpmod: dregs_half = W [ pregs ]\n");
5751 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[(5) - (7)].reg
), &(yyvsp
[(1) - (7)].reg
), &(yyvsp
[(5) - (7)].reg
), 1 + IS_H ((yyvsp
[(1) - (7)].reg
)), 0);
5754 return yyerror ("Bad register or post_op for LOAD");
5759 #line 3029 "bfin-parse.y"
5761 if (IS_DREG ((yyvsp
[(1) - (8)].reg
)) && IS_PREG ((yyvsp
[(5) - (8)].reg
)))
5763 notethat ("LDST: dregs = W [ pregs <post_op> ] (.)\n");
5764 (yyval
.instr
) = LDST (&(yyvsp
[(5) - (8)].reg
), &(yyvsp
[(1) - (8)].reg
), (yyvsp
[(6) - (8)].modcodes
).x0
, 1, (yyvsp
[(8) - (8)].r0
).r0
, 0);
5767 return yyerror ("Bad register for LOAD");
5772 #line 3040 "bfin-parse.y"
5774 if (IS_DREG ((yyvsp
[(1) - (9)].reg
)) && IS_PREG ((yyvsp
[(5) - (9)].reg
)) && IS_PREG ((yyvsp
[(7) - (9)].reg
)))
5776 notethat ("LDSTpmod: dregs = W [ pregs ++ pregs ] (.)\n");
5777 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[(5) - (9)].reg
), &(yyvsp
[(1) - (9)].reg
), &(yyvsp
[(7) - (9)].reg
), 3, (yyvsp
[(9) - (9)].r0
).r0
);
5780 return yyerror ("Bad register for LOAD");
5785 #line 3051 "bfin-parse.y"
5787 if (IS_DREG ((yyvsp
[(1) - (8)].reg
)) && IS_PREG ((yyvsp
[(5) - (8)].reg
)) && IS_PREG ((yyvsp
[(7) - (8)].reg
)))
5789 notethat ("LDSTpmod: dregs_half = W [ pregs ++ pregs ]\n");
5790 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[(5) - (8)].reg
), &(yyvsp
[(1) - (8)].reg
), &(yyvsp
[(7) - (8)].reg
), 1 + IS_H ((yyvsp
[(1) - (8)].reg
)), 0);
5793 return yyerror ("Bad register for LOAD");
5798 #line 3062 "bfin-parse.y"
5800 if (IS_IREG ((yyvsp
[(2) - (6)].reg
)) && IS_DREG ((yyvsp
[(6) - (6)].reg
)))
5802 notethat ("dspLDST: [ iregs <post_op> ] = dregs\n");
5803 (yyval
.instr
) = DSPLDST(&(yyvsp
[(2) - (6)].reg
), 0, &(yyvsp
[(6) - (6)].reg
), (yyvsp
[(3) - (6)].modcodes
).x0
, 1);
5805 else if (IS_PREG ((yyvsp
[(2) - (6)].reg
)) && IS_DREG ((yyvsp
[(6) - (6)].reg
)))
5807 notethat ("LDST: [ pregs <post_op> ] = dregs\n");
5808 (yyval
.instr
) = LDST (&(yyvsp
[(2) - (6)].reg
), &(yyvsp
[(6) - (6)].reg
), (yyvsp
[(3) - (6)].modcodes
).x0
, 0, 0, 1);
5810 else if (IS_PREG ((yyvsp
[(2) - (6)].reg
)) && IS_PREG ((yyvsp
[(6) - (6)].reg
)))
5812 notethat ("LDST: [ pregs <post_op> ] = pregs\n");
5813 (yyval
.instr
) = LDST (&(yyvsp
[(2) - (6)].reg
), &(yyvsp
[(6) - (6)].reg
), (yyvsp
[(3) - (6)].modcodes
).x0
, 0, 1, 1);
5816 return yyerror ("Bad register for STORE");
5821 #line 3083 "bfin-parse.y"
5823 if (! IS_DREG ((yyvsp
[(7) - (7)].reg
)))
5824 return yyerror ("Expected Dreg for last argument");
5826 if (IS_IREG ((yyvsp
[(2) - (7)].reg
)) && IS_MREG ((yyvsp
[(4) - (7)].reg
)))
5828 notethat ("dspLDST: [ iregs ++ mregs ] = dregs\n");
5829 (yyval
.instr
) = DSPLDST(&(yyvsp
[(2) - (7)].reg
), (yyvsp
[(4) - (7)].reg
).regno
& CODE_MASK
, &(yyvsp
[(7) - (7)].reg
), 3, 1);
5831 else if (IS_PREG ((yyvsp
[(2) - (7)].reg
)) && IS_PREG ((yyvsp
[(4) - (7)].reg
)))
5833 notethat ("LDSTpmod: [ pregs ++ pregs ] = dregs\n");
5834 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[(2) - (7)].reg
), &(yyvsp
[(7) - (7)].reg
), &(yyvsp
[(4) - (7)].reg
), 0, 1);
5837 return yyerror ("Bad register for STORE");
5842 #line 3102 "bfin-parse.y"
5844 if (!IS_DREG ((yyvsp
[(8) - (8)].reg
)))
5845 return yyerror ("Expect Dreg as last argument");
5846 if (IS_PREG ((yyvsp
[(3) - (8)].reg
)) && IS_PREG ((yyvsp
[(5) - (8)].reg
)))
5848 notethat ("LDSTpmod: W [ pregs ++ pregs ] = dregs_half\n");
5849 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[(3) - (8)].reg
), &(yyvsp
[(8) - (8)].reg
), &(yyvsp
[(5) - (8)].reg
), 1 + IS_H ((yyvsp
[(8) - (8)].reg
)), 1);
5852 return yyerror ("Bad register for STORE");
5857 #line 3115 "bfin-parse.y"
5859 if (IS_DREG ((yyvsp
[(1) - (9)].reg
)) && IS_PREG ((yyvsp
[(5) - (9)].reg
)) && IS_RANGE(16, (yyvsp
[(7) - (9)].expr
), (yyvsp
[(6) - (9)].r0
).r0
, 1))
5861 notethat ("LDSTidxI: dregs = B [ pregs + imm16 ] (%c)\n",
5862 (yyvsp
[(9) - (9)].r0
).r0
? 'X' : 'Z');
5863 if ((yyvsp
[(6) - (9)].r0
).r0
)
5864 neg_value ((yyvsp
[(7) - (9)].expr
));
5865 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[(5) - (9)].reg
), &(yyvsp
[(1) - (9)].reg
), 0, 2, (yyvsp
[(9) - (9)].r0
).r0
, (yyvsp
[(7) - (9)].expr
));
5868 return yyerror ("Bad register or value for LOAD");
5873 #line 3129 "bfin-parse.y"
5875 if (IS_DREG ((yyvsp
[(1) - (8)].reg
)) && IS_PREG ((yyvsp
[(5) - (8)].reg
)))
5877 notethat ("LDST: dregs = B [ pregs <post_op> ] (%c)\n",
5878 (yyvsp
[(8) - (8)].r0
).r0
? 'X' : 'Z');
5879 (yyval
.instr
) = LDST (&(yyvsp
[(5) - (8)].reg
), &(yyvsp
[(1) - (8)].reg
), (yyvsp
[(6) - (8)].modcodes
).x0
, 2, (yyvsp
[(8) - (8)].r0
).r0
, 0);
5882 return yyerror ("Bad register for LOAD");
5887 #line 3141 "bfin-parse.y"
5889 if (IS_DREG ((yyvsp
[(1) - (7)].reg
)) && IS_IREG ((yyvsp
[(4) - (7)].reg
)) && IS_MREG ((yyvsp
[(6) - (7)].reg
)))
5891 notethat ("dspLDST: dregs = [ iregs ++ mregs ]\n");
5892 (yyval
.instr
) = DSPLDST(&(yyvsp
[(4) - (7)].reg
), (yyvsp
[(6) - (7)].reg
).regno
& CODE_MASK
, &(yyvsp
[(1) - (7)].reg
), 3, 0);
5894 else if (IS_DREG ((yyvsp
[(1) - (7)].reg
)) && IS_PREG ((yyvsp
[(4) - (7)].reg
)) && IS_PREG ((yyvsp
[(6) - (7)].reg
)))
5896 notethat ("LDSTpmod: dregs = [ pregs ++ pregs ]\n");
5897 (yyval
.instr
) = LDSTPMOD (&(yyvsp
[(4) - (7)].reg
), &(yyvsp
[(1) - (7)].reg
), &(yyvsp
[(6) - (7)].reg
), 0, 0);
5900 return yyerror ("Bad register for LOAD");
5905 #line 3157 "bfin-parse.y"
5907 Expr_Node
*tmp
= (yyvsp
[(6) - (7)].expr
);
5908 int ispreg
= IS_PREG ((yyvsp
[(1) - (7)].reg
));
5909 int isgot
= IS_RELOC((yyvsp
[(6) - (7)].expr
));
5911 if (!IS_PREG ((yyvsp
[(4) - (7)].reg
)))
5912 return yyerror ("Preg expected for indirect");
5914 if (!IS_DREG ((yyvsp
[(1) - (7)].reg
)) && !ispreg
)
5915 return yyerror ("Bad destination register for LOAD");
5917 if ((yyvsp
[(5) - (7)].r0
).r0
)
5918 tmp
= unary (Expr_Op_Type_NEG
, tmp
);
5921 notethat ("LDSTidxI: dpregs = [ pregs + sym@got ]\n");
5922 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[(4) - (7)].reg
), &(yyvsp
[(1) - (7)].reg
), 0, 0, ispreg
? 1: 0, tmp
);
5924 else if (in_range_p (tmp
, 0, 63, 3))
5926 notethat ("LDSTii: dpregs = [ pregs + uimm7m4 ]\n");
5927 (yyval
.instr
) = LDSTII (&(yyvsp
[(4) - (7)].reg
), &(yyvsp
[(1) - (7)].reg
), tmp
, 0, ispreg
? 3 : 0);
5929 else if ((yyvsp
[(4) - (7)].reg
).regno
== REG_FP
&& in_range_p (tmp
, -128, 0, 3))
5931 notethat ("LDSTiiFP: dpregs = [ FP - uimm7m4 ]\n");
5932 tmp
= unary (Expr_Op_Type_NEG
, tmp
);
5933 (yyval
.instr
) = LDSTIIFP (tmp
, &(yyvsp
[(1) - (7)].reg
), 0);
5935 else if (in_range_p (tmp
, -131072, 131071, 3))
5937 notethat ("LDSTidxI: dpregs = [ pregs + imm18m4 ]\n");
5938 (yyval
.instr
) = LDSTIDXI (&(yyvsp
[(4) - (7)].reg
), &(yyvsp
[(1) - (7)].reg
), 0, 0, ispreg
? 1: 0, tmp
);
5942 return yyerror ("Displacement out of range for load");
5947 #line 3197 "bfin-parse.y"
5949 if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && IS_IREG ((yyvsp
[(4) - (6)].reg
)))
5951 notethat ("dspLDST: dregs = [ iregs <post_op> ]\n");
5952 (yyval
.instr
) = DSPLDST (&(yyvsp
[(4) - (6)].reg
), 0, &(yyvsp
[(1) - (6)].reg
), (yyvsp
[(5) - (6)].modcodes
).x0
, 0);
5954 else if (IS_DREG ((yyvsp
[(1) - (6)].reg
)) && IS_PREG ((yyvsp
[(4) - (6)].reg
)))
5956 notethat ("LDST: dregs = [ pregs <post_op> ]\n");
5957 (yyval
.instr
) = LDST (&(yyvsp
[(4) - (6)].reg
), &(yyvsp
[(1) - (6)].reg
), (yyvsp
[(5) - (6)].modcodes
).x0
, 0, 0, 0);
5959 else if (IS_PREG ((yyvsp
[(1) - (6)].reg
)) && IS_PREG ((yyvsp
[(4) - (6)].reg
)))
5961 if (REG_SAME ((yyvsp
[(1) - (6)].reg
), (yyvsp
[(4) - (6)].reg
)) && (yyvsp
[(5) - (6)].modcodes
).x0
!= 2)
5962 return yyerror ("Pregs can't be same");
5964 notethat ("LDST: pregs = [ pregs <post_op> ]\n");
5965 (yyval
.instr
) = LDST (&(yyvsp
[(4) - (6)].reg
), &(yyvsp
[(1) - (6)].reg
), (yyvsp
[(5) - (6)].modcodes
).x0
, 0, 1, 0);
5967 else if ((yyvsp
[(4) - (6)].reg
).regno
== REG_SP
&& IS_ALLREG ((yyvsp
[(1) - (6)].reg
)) && (yyvsp
[(5) - (6)].modcodes
).x0
== 0)
5969 notethat ("PushPopReg: allregs = [ SP ++ ]\n");
5970 (yyval
.instr
) = PUSHPOPREG (&(yyvsp
[(1) - (6)].reg
), 0);
5973 return yyerror ("Bad register or value");
5978 #line 3228 "bfin-parse.y"
5980 if ((yyvsp
[(1) - (11)].reg
).regno
!= REG_SP
)
5981 yyerror ("Stack Pointer expected");
5982 if ((yyvsp
[(4) - (11)].reg
).regno
== REG_R7
5983 && IN_RANGE ((yyvsp
[(6) - (11)].expr
), 0, 7)
5984 && (yyvsp
[(8) - (11)].reg
).regno
== REG_P5
5985 && IN_RANGE ((yyvsp
[(10) - (11)].expr
), 0, 5))
5987 notethat ("PushPopMultiple: [ -- SP ] = (R7 : reglim , P5 : reglim )\n");
5988 (yyval
.instr
) = PUSHPOPMULTIPLE (imm5 ((yyvsp
[(6) - (11)].expr
)), imm5 ((yyvsp
[(10) - (11)].expr
)), 1, 1, 1);
5991 return yyerror ("Bad register for PushPopMultiple");
5996 #line 3244 "bfin-parse.y"
5998 if ((yyvsp
[(1) - (7)].reg
).regno
!= REG_SP
)
5999 yyerror ("Stack Pointer expected");
6001 if ((yyvsp
[(4) - (7)].reg
).regno
== REG_R7
&& IN_RANGE ((yyvsp
[(6) - (7)].expr
), 0, 7))
6003 notethat ("PushPopMultiple: [ -- SP ] = (R7 : reglim )\n");
6004 (yyval
.instr
) = PUSHPOPMULTIPLE (imm5 ((yyvsp
[(6) - (7)].expr
)), 0, 1, 0, 1);
6006 else if ((yyvsp
[(4) - (7)].reg
).regno
== REG_P5
&& IN_RANGE ((yyvsp
[(6) - (7)].expr
), 0, 6))
6008 notethat ("PushPopMultiple: [ -- SP ] = (P5 : reglim )\n");
6009 (yyval
.instr
) = PUSHPOPMULTIPLE (0, imm5 ((yyvsp
[(6) - (7)].expr
)), 0, 1, 1);
6012 return yyerror ("Bad register for PushPopMultiple");
6017 #line 3263 "bfin-parse.y"
6019 if ((yyvsp
[(11) - (11)].reg
).regno
!= REG_SP
)
6020 yyerror ("Stack Pointer expected");
6021 if ((yyvsp
[(2) - (11)].reg
).regno
== REG_R7
&& (IN_RANGE ((yyvsp
[(4) - (11)].expr
), 0, 7))
6022 && (yyvsp
[(6) - (11)].reg
).regno
== REG_P5
&& (IN_RANGE ((yyvsp
[(8) - (11)].expr
), 0, 6)))
6024 notethat ("PushPopMultiple: (R7 : reglim , P5 : reglim ) = [ SP ++ ]\n");
6025 (yyval
.instr
) = PUSHPOPMULTIPLE (imm5 ((yyvsp
[(4) - (11)].expr
)), imm5 ((yyvsp
[(8) - (11)].expr
)), 1, 1, 0);
6028 return yyerror ("Bad register range for PushPopMultiple");
6033 #line 3277 "bfin-parse.y"
6035 if ((yyvsp
[(7) - (7)].reg
).regno
!= REG_SP
)
6036 yyerror ("Stack Pointer expected");
6038 if ((yyvsp
[(2) - (7)].reg
).regno
== REG_R7
&& IN_RANGE ((yyvsp
[(4) - (7)].expr
), 0, 7))
6040 notethat ("PushPopMultiple: (R7 : reglim ) = [ SP ++ ]\n");
6041 (yyval
.instr
) = PUSHPOPMULTIPLE (imm5 ((yyvsp
[(4) - (7)].expr
)), 0, 1, 0, 0);
6043 else if ((yyvsp
[(2) - (7)].reg
).regno
== REG_P5
&& IN_RANGE ((yyvsp
[(4) - (7)].expr
), 0, 6))
6045 notethat ("PushPopMultiple: (P5 : reglim ) = [ SP ++ ]\n");
6046 (yyval
.instr
) = PUSHPOPMULTIPLE (0, imm5 ((yyvsp
[(4) - (7)].expr
)), 0, 1, 0);
6049 return yyerror ("Bad register range for PushPopMultiple");
6054 #line 3296 "bfin-parse.y"
6056 if ((yyvsp
[(1) - (3)].reg
).regno
!= REG_SP
)
6057 yyerror ("Stack Pointer expected");
6059 if (IS_ALLREG ((yyvsp
[(3) - (3)].reg
)))
6061 notethat ("PushPopReg: [ -- SP ] = allregs\n");
6062 (yyval
.instr
) = PUSHPOPREG (&(yyvsp
[(3) - (3)].reg
), 1);
6065 return yyerror ("Bad register for PushPopReg");
6070 #line 3312 "bfin-parse.y"
6072 if (IS_URANGE (16, (yyvsp
[(2) - (2)].expr
), 0, 4))
6073 (yyval
.instr
) = LINKAGE (0, uimm16s4 ((yyvsp
[(2) - (2)].expr
)));
6075 return yyerror ("Bad constant for LINK");
6080 #line 3320 "bfin-parse.y"
6082 notethat ("linkage: UNLINK\n");
6083 (yyval
.instr
) = LINKAGE (1, 0);
6088 #line 3329 "bfin-parse.y"
6090 if (IS_PCREL4 ((yyvsp
[(3) - (7)].expr
)) && IS_LPPCREL10 ((yyvsp
[(5) - (7)].expr
)) && IS_CREG ((yyvsp
[(7) - (7)].reg
)))
6092 notethat ("LoopSetup: LSETUP (pcrel4 , lppcrel10 ) counters\n");
6093 (yyval
.instr
) = LOOPSETUP ((yyvsp
[(3) - (7)].expr
), &(yyvsp
[(7) - (7)].reg
), 0, (yyvsp
[(5) - (7)].expr
), 0);
6096 return yyerror ("Bad register or values for LSETUP");
6102 #line 3340 "bfin-parse.y"
6104 if (IS_PCREL4 ((yyvsp
[(3) - (9)].expr
)) && IS_LPPCREL10 ((yyvsp
[(5) - (9)].expr
))
6105 && IS_PREG ((yyvsp
[(9) - (9)].reg
)) && IS_CREG ((yyvsp
[(7) - (9)].reg
)))
6107 notethat ("LoopSetup: LSETUP (pcrel4 , lppcrel10 ) counters = pregs\n");
6108 (yyval
.instr
) = LOOPSETUP ((yyvsp
[(3) - (9)].expr
), &(yyvsp
[(7) - (9)].reg
), 1, (yyvsp
[(5) - (9)].expr
), &(yyvsp
[(9) - (9)].reg
));
6111 return yyerror ("Bad register or values for LSETUP");
6116 #line 3352 "bfin-parse.y"
6118 if (IS_PCREL4 ((yyvsp
[(3) - (11)].expr
)) && IS_LPPCREL10 ((yyvsp
[(5) - (11)].expr
))
6119 && IS_PREG ((yyvsp
[(9) - (11)].reg
)) && IS_CREG ((yyvsp
[(7) - (11)].reg
))
6120 && EXPR_VALUE ((yyvsp
[(11) - (11)].expr
)) == 1)
6122 notethat ("LoopSetup: LSETUP (pcrel4 , lppcrel10 ) counters = pregs >> 1\n");
6123 (yyval
.instr
) = LOOPSETUP ((yyvsp
[(3) - (11)].expr
), &(yyvsp
[(7) - (11)].reg
), 3, (yyvsp
[(5) - (11)].expr
), &(yyvsp
[(9) - (11)].reg
));
6126 return yyerror ("Bad register or values for LSETUP");
6131 #line 3366 "bfin-parse.y"
6133 if (!IS_RELOC ((yyvsp
[(2) - (3)].expr
)))
6134 return yyerror ("Invalid expression in loop statement");
6135 if (!IS_CREG ((yyvsp
[(3) - (3)].reg
)))
6136 return yyerror ("Invalid loop counter register");
6137 (yyval
.instr
) = bfin_gen_loop ((yyvsp
[(2) - (3)].expr
), &(yyvsp
[(3) - (3)].reg
), 0, 0);
6142 #line 3374 "bfin-parse.y"
6144 if (IS_RELOC ((yyvsp
[(2) - (5)].expr
)) && IS_PREG ((yyvsp
[(5) - (5)].reg
)) && IS_CREG ((yyvsp
[(3) - (5)].reg
)))
6146 notethat ("Loop: LOOP expr counters = pregs\n");
6147 (yyval
.instr
) = bfin_gen_loop ((yyvsp
[(2) - (5)].expr
), &(yyvsp
[(3) - (5)].reg
), 1, &(yyvsp
[(5) - (5)].reg
));
6150 return yyerror ("Bad register or values for LOOP");
6155 #line 3384 "bfin-parse.y"
6157 if (IS_RELOC ((yyvsp
[(2) - (7)].expr
)) && IS_PREG ((yyvsp
[(5) - (7)].reg
)) && IS_CREG ((yyvsp
[(3) - (7)].reg
)) && EXPR_VALUE ((yyvsp
[(7) - (7)].expr
)) == 1)
6159 notethat ("Loop: LOOP expr counters = pregs >> 1\n");
6160 (yyval
.instr
) = bfin_gen_loop ((yyvsp
[(2) - (7)].expr
), &(yyvsp
[(3) - (7)].reg
), 3, &(yyvsp
[(5) - (7)].reg
));
6163 return yyerror ("Bad register or values for LOOP");
6168 #line 3396 "bfin-parse.y"
6170 notethat ("pseudoDEBUG: DBG\n");
6171 (yyval
.instr
) = bfin_gen_pseudodbg (3, 7, 0);
6176 #line 3401 "bfin-parse.y"
6178 notethat ("pseudoDEBUG: DBG REG_A\n");
6179 (yyval
.instr
) = bfin_gen_pseudodbg (3, IS_A1 ((yyvsp
[(2) - (2)].reg
)), 0);
6184 #line 3406 "bfin-parse.y"
6186 notethat ("pseudoDEBUG: DBG allregs\n");
6187 (yyval
.instr
) = bfin_gen_pseudodbg (0, (yyvsp
[(2) - (2)].reg
).regno
& CODE_MASK
, (yyvsp
[(2) - (2)].reg
).regno
& CLASS_MASK
);
6192 #line 3412 "bfin-parse.y"
6194 if (!IS_DREG ((yyvsp
[(3) - (4)].reg
)))
6195 return yyerror ("Dregs expected");
6196 notethat ("pseudoDEBUG: DBGCMPLX (dregs )\n");
6197 (yyval
.instr
) = bfin_gen_pseudodbg (3, 6, (yyvsp
[(3) - (4)].reg
).regno
& CODE_MASK
);
6202 #line 3420 "bfin-parse.y"
6204 notethat ("psedoDEBUG: DBGHALT\n");
6205 (yyval
.instr
) = bfin_gen_pseudodbg (3, 5, 0);
6210 #line 3426 "bfin-parse.y"
6212 notethat ("pseudodbg_assert: DBGA (dregs_lo , uimm16 )\n");
6213 (yyval
.instr
) = bfin_gen_pseudodbg_assert (IS_H ((yyvsp
[(3) - (6)].reg
)), &(yyvsp
[(3) - (6)].reg
), uimm16 ((yyvsp
[(5) - (6)].expr
)));
6218 #line 3432 "bfin-parse.y"
6220 notethat ("pseudodbg_assert: DBGAH (dregs , uimm16 )\n");
6221 (yyval
.instr
) = bfin_gen_pseudodbg_assert (3, &(yyvsp
[(3) - (6)].reg
), uimm16 ((yyvsp
[(5) - (6)].expr
)));
6226 #line 3438 "bfin-parse.y"
6228 notethat ("psedodbg_assert: DBGAL (dregs , uimm16 )\n");
6229 (yyval
.instr
) = bfin_gen_pseudodbg_assert (2, &(yyvsp
[(3) - (6)].reg
), uimm16 ((yyvsp
[(5) - (6)].expr
)));
6234 #line 3451 "bfin-parse.y"
6236 (yyval
.reg
) = (yyvsp
[(1) - (1)].reg
);
6241 #line 3455 "bfin-parse.y"
6243 (yyval
.reg
) = (yyvsp
[(1) - (1)].reg
);
6248 #line 3464 "bfin-parse.y"
6251 (yyval
.mod
).mod
= 0;
6256 #line 3469 "bfin-parse.y"
6259 (yyval
.mod
).mod
= (yyvsp
[(4) - (5)].value
);
6264 #line 3474 "bfin-parse.y"
6267 (yyval
.mod
).mod
= (yyvsp
[(2) - (5)].value
);
6272 #line 3479 "bfin-parse.y"
6275 (yyval
.mod
).mod
= (yyvsp
[(2) - (3)].value
);
6280 #line 3484 "bfin-parse.y"
6283 (yyval
.mod
).mod
= 0;
6288 #line 3491 "bfin-parse.y"
6295 #line 3495 "bfin-parse.y"
6302 #line 3501 "bfin-parse.y"
6304 (yyval
.modcodes
).s0
= 0;
6305 (yyval
.modcodes
).x0
= 0;
6310 #line 3506 "bfin-parse.y"
6312 (yyval
.modcodes
).s0
= 1;
6313 (yyval
.modcodes
).x0
= 0;
6318 #line 3511 "bfin-parse.y"
6320 (yyval
.modcodes
).s0
= 0;
6321 (yyval
.modcodes
).x0
= 1;
6326 #line 3516 "bfin-parse.y"
6328 (yyval
.modcodes
).s0
= 1;
6329 (yyval
.modcodes
).x0
= 1;
6334 #line 3524 "bfin-parse.y"
6341 #line 3528 "bfin-parse.y"
6348 #line 3534 "bfin-parse.y"
6350 (yyval
.modcodes
).s0
= 0;
6351 (yyval
.modcodes
).x0
= 0;
6356 #line 3539 "bfin-parse.y"
6358 (yyval
.modcodes
).s0
= (yyvsp
[(2) - (3)].modcodes
).s0
;
6359 (yyval
.modcodes
).x0
= (yyvsp
[(2) - (3)].modcodes
).x0
;
6364 #line 3546 "bfin-parse.y"
6366 (yyval
.modcodes
).s0
= 0;
6367 (yyval
.modcodes
).x0
= 0;
6368 (yyval
.modcodes
).aop
= 0;
6373 #line 3552 "bfin-parse.y"
6375 (yyval
.modcodes
).s0
= 0;
6376 (yyval
.modcodes
).x0
= 0;
6377 (yyval
.modcodes
).aop
= 1;
6382 #line 3558 "bfin-parse.y"
6384 (yyval
.modcodes
).s0
= 1;
6385 (yyval
.modcodes
).x0
= 0;
6386 (yyval
.modcodes
).aop
= 1;
6391 #line 3566 "bfin-parse.y"
6393 (yyval
.modcodes
).r0
= 0;
6394 (yyval
.modcodes
).s0
= 0;
6395 (yyval
.modcodes
).x0
= 0;
6400 #line 3572 "bfin-parse.y"
6402 (yyval
.modcodes
).r0
= 2 + (yyvsp
[(2) - (3)].r0
).r0
;
6403 (yyval
.modcodes
).s0
= 0;
6404 (yyval
.modcodes
).x0
= 0;
6409 #line 3578 "bfin-parse.y"
6411 (yyval
.modcodes
).r0
= 0;
6412 (yyval
.modcodes
).s0
= (yyvsp
[(2) - (3)].modcodes
).s0
;
6413 (yyval
.modcodes
).x0
= (yyvsp
[(2) - (3)].modcodes
).x0
;
6418 #line 3584 "bfin-parse.y"
6420 (yyval
.modcodes
).r0
= 2 + (yyvsp
[(2) - (5)].r0
).r0
;
6421 (yyval
.modcodes
).s0
= (yyvsp
[(4) - (5)].modcodes
).s0
;
6422 (yyval
.modcodes
).x0
= (yyvsp
[(4) - (5)].modcodes
).x0
;
6427 #line 3590 "bfin-parse.y"
6429 (yyval
.modcodes
).r0
= 2 + (yyvsp
[(4) - (5)].r0
).r0
;
6430 (yyval
.modcodes
).s0
= (yyvsp
[(2) - (5)].modcodes
).s0
;
6431 (yyval
.modcodes
).x0
= (yyvsp
[(2) - (5)].modcodes
).x0
;
6436 #line 3598 "bfin-parse.y"
6443 #line 3602 "bfin-parse.y"
6450 #line 3606 "bfin-parse.y"
6457 #line 3612 "bfin-parse.y"
6464 #line 3616 "bfin-parse.y"
6471 #line 3620 "bfin-parse.y"
6478 #line 3626 "bfin-parse.y"
6480 (yyval
.modcodes
).r0
= 0;
6481 (yyval
.modcodes
).s0
= 0;
6482 (yyval
.modcodes
).aop
= 0;
6487 #line 3632 "bfin-parse.y"
6489 (yyval
.modcodes
).r0
= 0;
6490 (yyval
.modcodes
).s0
= 0;
6491 (yyval
.modcodes
).aop
= 3;
6496 #line 3638 "bfin-parse.y"
6498 (yyval
.modcodes
).r0
= 0;
6499 (yyval
.modcodes
).s0
= 1;
6500 (yyval
.modcodes
).aop
= 3;
6505 #line 3644 "bfin-parse.y"
6507 (yyval
.modcodes
).r0
= 1;
6508 (yyval
.modcodes
).s0
= 0;
6509 (yyval
.modcodes
).aop
= 3;
6514 #line 3650 "bfin-parse.y"
6516 (yyval
.modcodes
).r0
= 1;
6517 (yyval
.modcodes
).s0
= 1;
6522 #line 3655 "bfin-parse.y"
6524 (yyval
.modcodes
).r0
= 1;
6525 (yyval
.modcodes
).s0
= 1;
6530 #line 3662 "bfin-parse.y"
6537 #line 3666 "bfin-parse.y"
6544 #line 3672 "bfin-parse.y"
6546 (yyval
.modcodes
).s0
= 0;
6551 #line 3676 "bfin-parse.y"
6553 (yyval
.modcodes
).s0
= 1;
6558 #line 3683 "bfin-parse.y"
6565 #line 3687 "bfin-parse.y"
6572 #line 3691 "bfin-parse.y"
6579 #line 3695 "bfin-parse.y"
6586 #line 3701 "bfin-parse.y"
6593 #line 3705 "bfin-parse.y"
6600 #line 3712 "bfin-parse.y"
6602 (yyval
.modcodes
).r0
= 0;
6603 (yyval
.modcodes
).s0
= 1;
6608 #line 3717 "bfin-parse.y"
6610 if ((yyvsp
[(2) - (3)].value
) != M_T
)
6611 return yyerror ("Bad modifier");
6612 (yyval
.modcodes
).r0
= 1;
6613 (yyval
.modcodes
).s0
= 0;
6618 #line 3724 "bfin-parse.y"
6620 if ((yyvsp
[(2) - (5)].value
) != M_T
)
6621 return yyerror ("Bad modifier");
6622 (yyval
.modcodes
).r0
= 1;
6623 (yyval
.modcodes
).s0
= 1;
6628 #line 3731 "bfin-parse.y"
6630 if ((yyvsp
[(4) - (5)].value
) != M_T
)
6631 return yyerror ("Bad modifier");
6632 (yyval
.modcodes
).r0
= 1;
6633 (yyval
.modcodes
).s0
= 1;
6638 #line 3743 "bfin-parse.y"
6645 #line 3747 "bfin-parse.y"
6652 #line 3751 "bfin-parse.y"
6659 #line 3757 "bfin-parse.y"
6666 #line 3761 "bfin-parse.y"
6668 if ((yyvsp
[(2) - (3)].value
) == M_W32
)
6671 return yyerror ("Only (W32) allowed");
6676 #line 3770 "bfin-parse.y"
6683 #line 3774 "bfin-parse.y"
6685 if ((yyvsp
[(2) - (3)].value
) == M_IU
)
6688 return yyerror ("(IU) expected");
6693 #line 3783 "bfin-parse.y"
6695 (yyval
.reg
) = (yyvsp
[(3) - (4)].reg
);
6700 #line 3789 "bfin-parse.y"
6702 (yyval
.reg
) = (yyvsp
[(2) - (4)].reg
);
6707 #line 3798 "bfin-parse.y"
6714 #line 3802 "bfin-parse.y"
6721 #line 3809 "bfin-parse.y"
6728 #line 3813 "bfin-parse.y"
6735 #line 3817 "bfin-parse.y"
6742 #line 3821 "bfin-parse.y"
6749 #line 3828 "bfin-parse.y"
6756 #line 3832 "bfin-parse.y"
6763 #line 3839 "bfin-parse.y"
6765 (yyval
.modcodes
).r0
= 1; /* HL. */
6766 (yyval
.modcodes
).s0
= 0; /* s. */
6767 (yyval
.modcodes
).x0
= 0; /* x. */
6768 (yyval
.modcodes
).aop
= 0; /* aop. */
6773 #line 3847 "bfin-parse.y"
6775 (yyval
.modcodes
).r0
= 1; /* HL. */
6776 (yyval
.modcodes
).s0
= 0; /* s. */
6777 (yyval
.modcodes
).x0
= 0; /* x. */
6778 (yyval
.modcodes
).aop
= 1; /* aop. */
6783 #line 3855 "bfin-parse.y"
6785 (yyval
.modcodes
).r0
= 0; /* HL. */
6786 (yyval
.modcodes
).s0
= 0; /* s. */
6787 (yyval
.modcodes
).x0
= 0; /* x. */
6788 (yyval
.modcodes
).aop
= 0; /* aop. */
6793 #line 3863 "bfin-parse.y"
6795 (yyval
.modcodes
).r0
= 0; /* HL. */
6796 (yyval
.modcodes
).s0
= 0; /* s. */
6797 (yyval
.modcodes
).x0
= 0; /* x. */
6798 (yyval
.modcodes
).aop
= 1;
6803 #line 3871 "bfin-parse.y"
6805 (yyval
.modcodes
).r0
= 1; /* HL. */
6806 (yyval
.modcodes
).s0
= 1; /* s. */
6807 (yyval
.modcodes
).x0
= 0; /* x. */
6808 (yyval
.modcodes
).aop
= 0; /* aop. */
6813 #line 3878 "bfin-parse.y"
6815 (yyval
.modcodes
).r0
= 1; /* HL. */
6816 (yyval
.modcodes
).s0
= 1; /* s. */
6817 (yyval
.modcodes
).x0
= 0; /* x. */
6818 (yyval
.modcodes
).aop
= 1; /* aop. */
6823 #line 3885 "bfin-parse.y"
6825 (yyval
.modcodes
).r0
= 0; /* HL. */
6826 (yyval
.modcodes
).s0
= 1; /* s. */
6827 (yyval
.modcodes
).x0
= 0; /* x. */
6828 (yyval
.modcodes
).aop
= 0; /* aop. */
6833 #line 3893 "bfin-parse.y"
6835 (yyval
.modcodes
).r0
= 0; /* HL. */
6836 (yyval
.modcodes
).s0
= 1; /* s. */
6837 (yyval
.modcodes
).x0
= 0; /* x. */
6838 (yyval
.modcodes
).aop
= 1; /* aop. */
6843 #line 3903 "bfin-parse.y"
6845 (yyval
.modcodes
).s0
= 0; /* s. */
6846 (yyval
.modcodes
).x0
= 0; /* HL. */
6851 #line 3908 "bfin-parse.y"
6853 (yyval
.modcodes
).s0
= 0; /* s. */
6854 (yyval
.modcodes
).x0
= 1; /* HL. */
6859 #line 3913 "bfin-parse.y"
6861 (yyval
.modcodes
).s0
= 1; /* s. */
6862 (yyval
.modcodes
).x0
= 0; /* HL. */
6867 #line 3918 "bfin-parse.y"
6869 (yyval
.modcodes
).s0
= 1; /* s. */
6870 (yyval
.modcodes
).x0
= 1; /* HL. */
6875 #line 3925 "bfin-parse.y"
6877 (yyval
.modcodes
).x0
= 2;
6882 #line 3929 "bfin-parse.y"
6884 (yyval
.modcodes
).x0
= 0;
6889 #line 3933 "bfin-parse.y"
6891 (yyval
.modcodes
).x0
= 1;
6896 #line 3942 "bfin-parse.y"
6898 (yyval
.reg
) = (yyvsp
[(1) - (2)].reg
);
6903 #line 3949 "bfin-parse.y"
6905 (yyval
.reg
) = (yyvsp
[(1) - (2)].reg
);
6910 #line 3956 "bfin-parse.y"
6912 (yyval
.reg
) = (yyvsp
[(1) - (2)].reg
);
6917 #line 3963 "bfin-parse.y"
6919 (yyval
.macfunc
).w
= 1;
6920 (yyval
.macfunc
).P
= 1;
6921 (yyval
.macfunc
).n
= IS_A1 ((yyvsp
[(3) - (3)].reg
));
6922 (yyval
.macfunc
).op
= 3;
6923 (yyval
.macfunc
).dst
= (yyvsp
[(1) - (3)].reg
);
6924 (yyval
.macfunc
).s0
.regno
= 0;
6925 (yyval
.macfunc
).s1
.regno
= 0;
6927 if (IS_A1 ((yyvsp
[(3) - (3)].reg
)) && IS_EVEN ((yyvsp
[(1) - (3)].reg
)))
6928 return yyerror ("Cannot move A1 to even register");
6929 else if (!IS_A1 ((yyvsp
[(3) - (3)].reg
)) && !IS_EVEN ((yyvsp
[(1) - (3)].reg
)))
6930 return yyerror ("Cannot move A0 to odd register");
6935 #line 3978 "bfin-parse.y"
6937 (yyval
.macfunc
) = (yyvsp
[(1) - (1)].macfunc
);
6938 (yyval
.macfunc
).w
= 0; (yyval
.macfunc
).P
= 0;
6939 (yyval
.macfunc
).dst
.regno
= 0;
6944 #line 3984 "bfin-parse.y"
6946 (yyval
.macfunc
) = (yyvsp
[(4) - (5)].macfunc
);
6947 (yyval
.macfunc
).w
= 1;
6948 (yyval
.macfunc
).P
= 1;
6949 (yyval
.macfunc
).dst
= (yyvsp
[(1) - (5)].reg
);
6954 #line 3992 "bfin-parse.y"
6956 (yyval
.macfunc
) = (yyvsp
[(4) - (5)].macfunc
);
6957 (yyval
.macfunc
).w
= 1;
6958 (yyval
.macfunc
).P
= 0;
6959 (yyval
.macfunc
).dst
= (yyvsp
[(1) - (5)].reg
);
6964 #line 4000 "bfin-parse.y"
6966 (yyval
.macfunc
).w
= 1;
6967 (yyval
.macfunc
).P
= 0;
6968 (yyval
.macfunc
).n
= IS_A1 ((yyvsp
[(3) - (3)].reg
));
6969 (yyval
.macfunc
).op
= 3;
6970 (yyval
.macfunc
).dst
= (yyvsp
[(1) - (3)].reg
);
6971 (yyval
.macfunc
).s0
.regno
= 0;
6972 (yyval
.macfunc
).s1
.regno
= 0;
6974 if (IS_A1 ((yyvsp
[(3) - (3)].reg
)) && !IS_H ((yyvsp
[(1) - (3)].reg
)))
6975 return yyerror ("Cannot move A1 to low half of register");
6976 else if (!IS_A1 ((yyvsp
[(3) - (3)].reg
)) && IS_H ((yyvsp
[(1) - (3)].reg
)))
6977 return yyerror ("Cannot move A0 to high half of register");
6982 #line 4018 "bfin-parse.y"
6984 (yyval
.macfunc
).n
= IS_A1 ((yyvsp
[(1) - (2)].reg
));
6985 (yyval
.macfunc
).op
= 0;
6986 (yyval
.macfunc
).s0
= (yyvsp
[(2) - (2)].macfunc
).s0
;
6987 (yyval
.macfunc
).s1
= (yyvsp
[(2) - (2)].macfunc
).s1
;
6992 #line 4025 "bfin-parse.y"
6994 (yyval
.macfunc
).n
= IS_A1 ((yyvsp
[(1) - (2)].reg
));
6995 (yyval
.macfunc
).op
= 1;
6996 (yyval
.macfunc
).s0
= (yyvsp
[(2) - (2)].macfunc
).s0
;
6997 (yyval
.macfunc
).s1
= (yyvsp
[(2) - (2)].macfunc
).s1
;
7002 #line 4032 "bfin-parse.y"
7004 (yyval
.macfunc
).n
= IS_A1 ((yyvsp
[(1) - (2)].reg
));
7005 (yyval
.macfunc
).op
= 2;
7006 (yyval
.macfunc
).s0
= (yyvsp
[(2) - (2)].macfunc
).s0
;
7007 (yyval
.macfunc
).s1
= (yyvsp
[(2) - (2)].macfunc
).s1
;
7012 #line 4042 "bfin-parse.y"
7014 if (IS_DREG ((yyvsp
[(1) - (3)].reg
)) && IS_DREG ((yyvsp
[(3) - (3)].reg
)))
7016 (yyval
.macfunc
).s0
= (yyvsp
[(1) - (3)].reg
);
7017 (yyval
.macfunc
).s1
= (yyvsp
[(3) - (3)].reg
);
7020 return yyerror ("Dregs expected");
7025 #line 4055 "bfin-parse.y"
7032 #line 4059 "bfin-parse.y"
7039 #line 4063 "bfin-parse.y"
7046 #line 4067 "bfin-parse.y"
7053 #line 4074 "bfin-parse.y"
7055 (yyval
.modcodes
).r0
= (yyvsp
[(3) - (3)].reg
).regno
;
7056 (yyval
.modcodes
).x0
= (yyvsp
[(2) - (3)].r0
).r0
;
7057 (yyval
.modcodes
).s0
= 0;
7062 #line 4080 "bfin-parse.y"
7064 (yyval
.modcodes
).r0
= 0x18;
7065 (yyval
.modcodes
).x0
= (yyvsp
[(2) - (3)].r0
).r0
;
7066 (yyval
.modcodes
).s0
= 0;
7071 #line 4086 "bfin-parse.y"
7073 (yyval
.modcodes
).r0
= (yyvsp
[(1) - (3)].reg
).regno
;
7074 (yyval
.modcodes
).x0
= (yyvsp
[(2) - (3)].r0
).r0
;
7075 (yyval
.modcodes
).s0
= 1;
7080 #line 4092 "bfin-parse.y"
7082 (yyval
.modcodes
).r0
= 0x18;
7083 (yyval
.modcodes
).x0
= (yyvsp
[(2) - (3)].r0
).r0
;
7084 (yyval
.modcodes
).s0
= 1;
7089 #line 4102 "bfin-parse.y"
7091 Expr_Node_Value val
;
7092 val
.s_value
= S_GET_NAME((yyvsp
[(1) - (1)].symbol
));
7093 (yyval
.expr
) = Expr_Node_Create (Expr_Node_Reloc
, val
, NULL
, NULL
);
7098 #line 4111 "bfin-parse.y"
7099 { (yyval
.value
) = BFD_RELOC_BFIN_GOT
; }
7103 #line 4113 "bfin-parse.y"
7104 { (yyval
.value
) = BFD_RELOC_BFIN_GOT17M4
; }
7108 #line 4115 "bfin-parse.y"
7109 { (yyval
.value
) = BFD_RELOC_BFIN_FUNCDESC_GOT17M4
; }
7113 #line 4119 "bfin-parse.y"
7115 Expr_Node_Value val
;
7116 val
.i_value
= (yyvsp
[(3) - (3)].value
);
7117 (yyval
.expr
) = Expr_Node_Create (Expr_Node_GOT_Reloc
, val
, (yyvsp
[(1) - (3)].expr
), NULL
);
7122 #line 4127 "bfin-parse.y"
7124 (yyval
.expr
) = (yyvsp
[(1) - (1)].expr
);
7129 #line 4131 "bfin-parse.y"
7131 (yyval
.expr
) = (yyvsp
[(1) - (1)].expr
);
7136 #line 4138 "bfin-parse.y"
7138 (yyval
.expr
) = (yyvsp
[(1) - (3)].expr
);
7143 #line 4144 "bfin-parse.y"
7145 Expr_Node_Value val
;
7146 val
.i_value
= (yyvsp
[(1) - (1)].value
);
7147 (yyval
.expr
) = Expr_Node_Create (Expr_Node_Constant
, val
, NULL
, NULL
);
7152 #line 4150 "bfin-parse.y"
7154 (yyval
.expr
) = (yyvsp
[(1) - (1)].expr
);
7159 #line 4154 "bfin-parse.y"
7161 (yyval
.expr
) = (yyvsp
[(2) - (3)].expr
);
7166 #line 4158 "bfin-parse.y"
7168 (yyval
.expr
) = unary (Expr_Op_Type_COMP
, (yyvsp
[(2) - (2)].expr
));
7173 #line 4162 "bfin-parse.y"
7175 (yyval
.expr
) = unary (Expr_Op_Type_NEG
, (yyvsp
[(2) - (2)].expr
));
7180 #line 4168 "bfin-parse.y"
7182 (yyval
.expr
) = (yyvsp
[(1) - (1)].expr
);
7187 #line 4174 "bfin-parse.y"
7189 (yyval
.expr
) = binary (Expr_Op_Type_Mult
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
));
7194 #line 4178 "bfin-parse.y"
7196 (yyval
.expr
) = binary (Expr_Op_Type_Div
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
));
7201 #line 4182 "bfin-parse.y"
7203 (yyval
.expr
) = binary (Expr_Op_Type_Mod
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
));
7208 #line 4186 "bfin-parse.y"
7210 (yyval
.expr
) = binary (Expr_Op_Type_Add
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
));
7215 #line 4190 "bfin-parse.y"
7217 (yyval
.expr
) = binary (Expr_Op_Type_Sub
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
));
7222 #line 4194 "bfin-parse.y"
7224 (yyval
.expr
) = binary (Expr_Op_Type_Lshift
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
));
7229 #line 4198 "bfin-parse.y"
7231 (yyval
.expr
) = binary (Expr_Op_Type_Rshift
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
));
7236 #line 4202 "bfin-parse.y"
7238 (yyval
.expr
) = binary (Expr_Op_Type_BAND
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
));
7243 #line 4206 "bfin-parse.y"
7245 (yyval
.expr
) = binary (Expr_Op_Type_LOR
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
));
7250 #line 4210 "bfin-parse.y"
7252 (yyval
.expr
) = binary (Expr_Op_Type_BOR
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
));
7257 #line 4214 "bfin-parse.y"
7259 (yyval
.expr
) = (yyvsp
[(1) - (1)].expr
);
7264 /* Line 1267 of yacc.c. */
7265 #line 7266 "bfin-parse.c"
7268 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
7272 YY_STACK_PRINT (yyss
, yyssp
);
7277 /* Now `shift' the result of the reduction. Determine what state
7278 that goes to, based on the state we popped back to and the rule
7279 number reduced by. */
7283 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
7284 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
7285 yystate
= yytable
[yystate
];
7287 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
7292 /*------------------------------------.
7293 | yyerrlab -- here on detecting error |
7294 `------------------------------------*/
7296 /* If not already recovering from an error, report this error. */
7300 #if ! YYERROR_VERBOSE
7301 yyerror (YY_("syntax error"));
7304 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
7305 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
7307 YYSIZE_T yyalloc
= 2 * yysize
;
7308 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
7309 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
7310 if (yymsg
!= yymsgbuf
)
7311 YYSTACK_FREE (yymsg
);
7312 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
7314 yymsg_alloc
= yyalloc
;
7318 yymsg_alloc
= sizeof yymsgbuf
;
7322 if (0 < yysize
&& yysize
<= yymsg_alloc
)
7324 (void) yysyntax_error (yymsg
, yystate
, yychar
);
7329 yyerror (YY_("syntax error"));
7331 goto yyexhaustedlab
;
7339 if (yyerrstatus
== 3)
7341 /* If just tried and failed to reuse look-ahead token after an
7342 error, discard it. */
7344 if (yychar
<= YYEOF
)
7346 /* Return failure if at end of input. */
7347 if (yychar
== YYEOF
)
7352 yydestruct ("Error: discarding",
7358 /* Else will try to reuse look-ahead token after shifting the error
7363 /*---------------------------------------------------.
7364 | yyerrorlab -- error raised explicitly by YYERROR. |
7365 `---------------------------------------------------*/
7368 /* Pacify compilers like GCC when the user code never invokes
7369 YYERROR and the label yyerrorlab therefore never appears in user
7371 if (/*CONSTCOND*/ 0)
7374 /* Do not reclaim the symbols of the rule which action triggered
7378 YY_STACK_PRINT (yyss
, yyssp
);
7383 /*-------------------------------------------------------------.
7384 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7385 `-------------------------------------------------------------*/
7387 yyerrstatus
= 3; /* Each real token shifted decrements this. */
7391 yyn
= yypact
[yystate
];
7392 if (yyn
!= YYPACT_NINF
)
7395 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
7403 /* Pop the current state because it cannot handle the error token. */
7408 yydestruct ("Error: popping",
7409 yystos
[yystate
], yyvsp
);
7412 YY_STACK_PRINT (yyss
, yyssp
);
7421 /* Shift the error token. */
7422 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
7428 /*-------------------------------------.
7429 | yyacceptlab -- YYACCEPT comes here. |
7430 `-------------------------------------*/
7435 /*-----------------------------------.
7436 | yyabortlab -- YYABORT comes here. |
7437 `-----------------------------------*/
7443 /*-------------------------------------------------.
7444 | yyexhaustedlab -- memory exhaustion comes here. |
7445 `-------------------------------------------------*/
7447 yyerror (YY_("memory exhausted"));
7453 if (yychar
!= YYEOF
&& yychar
!= YYEMPTY
)
7454 yydestruct ("Cleanup: discarding lookahead",
7456 /* Do not reclaim the symbols of the rule which action triggered
7457 this YYABORT or YYACCEPT. */
7459 YY_STACK_PRINT (yyss
, yyssp
);
7460 while (yyssp
!= yyss
)
7462 yydestruct ("Cleanup: popping",
7463 yystos
[*yyssp
], yyvsp
);
7468 YYSTACK_FREE (yyss
);
7471 if (yymsg
!= yymsgbuf
)
7472 YYSTACK_FREE (yymsg
);
7474 /* Make sure YYID is used. */
7475 return YYID (yyresult
);
7479 #line 4220 "bfin-parse.y"
7483 mkexpr (int x
, SYMBOL_T s
)
7485 EXPR_T e
= (EXPR_T
) ALLOCATE (sizeof (struct expression_cell
));
7492 value_match (Expr_Node
*expr
, int sz
, int sign
, int mul
, int issigned
)
7494 long umax
= (1L << sz
) - 1;
7495 long min
= -1L << (sz
- 1);
7496 long max
= (1L << (sz
- 1)) - 1;
7498 long v
= EXPR_VALUE (expr
);
7502 error ("%s:%d: Value Error -- Must align to %d\n", __FILE__
, __LINE__
, mul
);
7513 if (v
>= min
&& v
<= max
) return 1;
7516 fprintf(stderr
, "signed value %lx out of range\n", v
* mul
);
7520 if (v
<= umax
&& v
>= 0)
7523 fprintf(stderr
, "unsigned value %lx out of range\n", v
* mul
);
7528 /* Return the expression structure that allows symbol operations.
7529 If the left and right children are constants, do the operation. */
7531 binary (Expr_Op_Type op
, Expr_Node
*x
, Expr_Node
*y
)
7533 Expr_Node_Value val
;
7535 if (x
->type
== Expr_Node_Constant
&& y
->type
== Expr_Node_Constant
)
7539 case Expr_Op_Type_Add
:
7540 x
->value
.i_value
+= y
->value
.i_value
;
7542 case Expr_Op_Type_Sub
:
7543 x
->value
.i_value
-= y
->value
.i_value
;
7545 case Expr_Op_Type_Mult
:
7546 x
->value
.i_value
*= y
->value
.i_value
;
7548 case Expr_Op_Type_Div
:
7549 if (y
->value
.i_value
== 0)
7550 error ("Illegal Expression: Division by zero.");
7552 x
->value
.i_value
/= y
->value
.i_value
;
7554 case Expr_Op_Type_Mod
:
7555 x
->value
.i_value
%= y
->value
.i_value
;
7557 case Expr_Op_Type_Lshift
:
7558 x
->value
.i_value
<<= y
->value
.i_value
;
7560 case Expr_Op_Type_Rshift
:
7561 x
->value
.i_value
>>= y
->value
.i_value
;
7563 case Expr_Op_Type_BAND
:
7564 x
->value
.i_value
&= y
->value
.i_value
;
7566 case Expr_Op_Type_BOR
:
7567 x
->value
.i_value
|= y
->value
.i_value
;
7569 case Expr_Op_Type_BXOR
:
7570 x
->value
.i_value
^= y
->value
.i_value
;
7572 case Expr_Op_Type_LAND
:
7573 x
->value
.i_value
= x
->value
.i_value
&& y
->value
.i_value
;
7575 case Expr_Op_Type_LOR
:
7576 x
->value
.i_value
= x
->value
.i_value
|| y
->value
.i_value
;
7580 error ("%s:%d: Internal compiler error\n", __FILE__
, __LINE__
);
7584 /* Canonicalize order to EXPR OP CONSTANT. */
7585 if (x
->type
== Expr_Node_Constant
)
7591 /* Canonicalize subtraction of const to addition of negated const. */
7592 if (op
== Expr_Op_Type_Sub
&& y
->type
== Expr_Node_Constant
)
7594 op
= Expr_Op_Type_Add
;
7595 y
->value
.i_value
= -y
->value
.i_value
;
7597 if (y
->type
== Expr_Node_Constant
&& x
->type
== Expr_Node_Binop
7598 && x
->Right_Child
->type
== Expr_Node_Constant
)
7600 if (op
== x
->value
.op_value
&& x
->value
.op_value
== Expr_Op_Type_Add
)
7602 x
->Right_Child
->value
.i_value
+= y
->value
.i_value
;
7607 /* Create a new expression structure. */
7609 return Expr_Node_Create (Expr_Node_Binop
, val
, x
, y
);
7613 unary (Expr_Op_Type op
, Expr_Node
*x
)
7615 if (x
->type
== Expr_Node_Constant
)
7619 case Expr_Op_Type_NEG
:
7620 x
->value
.i_value
= -x
->value
.i_value
;
7622 case Expr_Op_Type_COMP
:
7623 x
->value
.i_value
= ~x
->value
.i_value
;
7626 error ("%s:%d: Internal compiler error\n", __FILE__
, __LINE__
);
7632 /* Create a new expression structure. */
7633 Expr_Node_Value val
;
7635 return Expr_Node_Create (Expr_Node_Unop
, val
, x
, NULL
);
7639 int debug_codeselection
= 0;
7641 notethat (char *format
, ...)
7644 va_start (ap
, format
);
7645 if (debug_codeselection
)
7647 vfprintf (errorf
, format
, ap
);
7653 main (int argc
, char **argv
)