OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [gas/] [bfin-parse.c] - Blame information for rev 299

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.