~ubuntu-branches/debian/jessie/gdb/jessie

« back to all changes in this revision

Viewing changes to sim/m32r/decodex.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Jacobowitz
  • Date: 2010-03-20 01:21:29 UTC
  • mfrom: (1.3.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100320012129-t7h25y8zgr8c2369
Tags: 7.1-1
* New upstream release, including:
  - PIE support (Closes: #346409).
  - C++ improvements, including static_cast<> et al, namespace imports,
    and bug fixes in printing virtual base classes.
  - Multi-program debugging.  One GDB can now debug multiple programs
    at the same time.
  - Python scripting improvements, including gdb.parse_and_eval.
  - Updated MIPS Linux signal frame layout (Closes: #570875).
  - No internal error stepping over _dl_debug_state (Closes: #569551).
* Update to Standards-Version: 3.8.4 (no changes required).
* Include more relevant (and smaller) docs in the gdbserver package
  (Closes: #571132).
* Do not duplicate documentation in gdb64, gdb-source, and libgdb-dev.
* Fix crash when switching into TUI mode (Closes: #568489).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
THIS FILE IS MACHINE GENERATED WITH CGEN.
4
4
 
5
 
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
5
Copyright 1996-2010 Free Software Foundation, Inc.
6
6
 
7
7
This file is part of the GNU simulators.
8
8
 
9
 
This program is free software; you can redistribute it and/or modify
10
 
it under the terms of the GNU General Public License as published by
11
 
the Free Software Foundation; either version 3 of the License, or
12
 
(at your option) any later version.
13
 
 
14
 
This program is distributed in the hope that it will be useful,
15
 
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
GNU General Public License for more details.
18
 
 
19
 
You should have received a copy of the GNU General Public License
20
 
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
9
   This file is free software; you can redistribute it and/or modify
 
10
   it under the terms of the GNU General Public License as published by
 
11
   the Free Software Foundation; either version 3, or (at your option)
 
12
   any later version.
 
13
 
 
14
   It is distributed in the hope that it will be useful, but WITHOUT
 
15
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 
16
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
 
17
   License for more details.
 
18
 
 
19
   You should have received a copy of the GNU General Public License along
 
20
   with this program; if not, write to the Free Software Foundation, Inc.,
 
21
   51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
21
22
 
22
23
*/
23
24
 
177
178
  { M32R_INSN_BTST, M32RXF_INSN_BTST, M32RXF_SFMT_BTST, M32RXF_INSN_PAR_BTST, M32RXF_INSN_WRITE_BTST },
178
179
};
179
180
 
180
 
static const struct insn_sem m32rxf_insn_sem_invalid = {
 
181
static const struct insn_sem m32rxf_insn_sem_invalid =
 
182
{
181
183
  VIRTUAL_INSN_X_INVALID, M32RXF_INSN_X_INVALID, M32RXF_SFMT_EMPTY, NOPAR, NOPAR
182
184
};
183
185
 
251
253
 
252
254
const IDESC *
253
255
m32rxf_decode (SIM_CPU *current_cpu, IADDR pc,
254
 
              CGEN_INSN_INT base_insn, CGEN_INSN_INT entire_insn,
 
256
              CGEN_INSN_WORD base_insn, CGEN_INSN_WORD entire_insn,
255
257
              ARGBUF *abuf)
256
258
{
257
259
  /* Result of decoder.  */
258
260
  M32RXF_INSN_TYPE itype;
259
261
 
260
262
  {
261
 
    CGEN_INSN_INT insn = base_insn;
 
263
    CGEN_INSN_WORD insn = base_insn;
262
264
 
263
265
    {
264
266
      unsigned int val = (((insn >> 8) & (15 << 4)) | ((insn >> 4) & (15 << 0)));
276
278
          unsigned int val = (((insn >> 8) & (3 << 0)));
277
279
          switch (val)
278
280
          {
279
 
          case 0 : itype = M32RXF_INSN_CMPZ; goto extract_sfmt_cmpz;
280
 
          case 3 : itype = M32RXF_INSN_PCMPBZ; goto extract_sfmt_cmpz;
 
281
          case 0 :
 
282
            if ((entire_insn & 0xfff0) == 0x70)
 
283
              { itype = M32RXF_INSN_CMPZ; goto extract_sfmt_cmpz; }
 
284
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
285
          case 3 :
 
286
            if ((entire_insn & 0xfff0) == 0x370)
 
287
              { itype = M32RXF_INSN_PCMPBZ; goto extract_sfmt_cmpz; }
 
288
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
281
289
          default : itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
282
290
          }
283
291
        }
288
296
      case 12 : itype = M32RXF_INSN_AND; goto extract_sfmt_add;
289
297
      case 13 : itype = M32RXF_INSN_XOR; goto extract_sfmt_add;
290
298
      case 14 : itype = M32RXF_INSN_OR; goto extract_sfmt_add;
291
 
      case 15 : itype = M32RXF_INSN_BTST; goto extract_sfmt_btst;
 
299
      case 15 :
 
300
        if ((entire_insn & 0xf8f0) == 0xf0)
 
301
          { itype = M32RXF_INSN_BTST; goto extract_sfmt_btst; }
 
302
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
292
303
      case 16 : itype = M32RXF_INSN_SRL; goto extract_sfmt_add;
293
304
      case 18 : itype = M32RXF_INSN_SRA; goto extract_sfmt_add;
294
305
      case 20 : itype = M32RXF_INSN_SLL; goto extract_sfmt_add;
301
312
          unsigned int val = (((insn >> 8) & (3 << 0)));
302
313
          switch (val)
303
314
          {
304
 
          case 0 : itype = M32RXF_INSN_JC; goto extract_sfmt_jc;
305
 
          case 1 : itype = M32RXF_INSN_JNC; goto extract_sfmt_jc;
306
 
          case 2 : itype = M32RXF_INSN_JL; goto extract_sfmt_jl;
307
 
          case 3 : itype = M32RXF_INSN_JMP; goto extract_sfmt_jmp;
 
315
          case 0 :
 
316
            if ((entire_insn & 0xfff0) == 0x1cc0)
 
317
              { itype = M32RXF_INSN_JC; goto extract_sfmt_jc; }
 
318
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
319
          case 1 :
 
320
            if ((entire_insn & 0xfff0) == 0x1dc0)
 
321
              { itype = M32RXF_INSN_JNC; goto extract_sfmt_jc; }
 
322
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
323
          case 2 :
 
324
            if ((entire_insn & 0xfff0) == 0x1ec0)
 
325
              { itype = M32RXF_INSN_JL; goto extract_sfmt_jl; }
 
326
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
327
          case 3 :
 
328
            if ((entire_insn & 0xfff0) == 0x1fc0)
 
329
              { itype = M32RXF_INSN_JMP; goto extract_sfmt_jmp; }
 
330
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
308
331
          default : itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
309
332
          }
310
333
        }
311
 
      case 29 : itype = M32RXF_INSN_RTE; goto extract_sfmt_rte;
312
 
      case 31 : itype = M32RXF_INSN_TRAP; goto extract_sfmt_trap;
 
334
      case 29 :
 
335
        if ((entire_insn & 0xffff) == 0x10d6)
 
336
          { itype = M32RXF_INSN_RTE; goto extract_sfmt_rte; }
 
337
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
338
      case 31 :
 
339
        if ((entire_insn & 0xfff0) == 0x10f0)
 
340
          { itype = M32RXF_INSN_TRAP; goto extract_sfmt_trap; }
 
341
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
313
342
      case 32 : itype = M32RXF_INSN_STB; goto extract_sfmt_stb;
314
343
      case 33 : itype = M32RXF_INSN_STB_PLUS; goto extract_sfmt_stb_plus;
315
344
      case 34 : itype = M32RXF_INSN_STH; goto extract_sfmt_sth;
368
397
          unsigned int val = (((insn >> 0) & (1 << 0)));
369
398
          switch (val)
370
399
          {
371
 
          case 0 : itype = M32RXF_INSN_MVTACHI_A; goto extract_sfmt_mvtachi_a;
372
 
          case 1 : itype = M32RXF_INSN_MVTACLO_A; goto extract_sfmt_mvtachi_a;
 
400
          case 0 :
 
401
            if ((entire_insn & 0xf0f3) == 0x5070)
 
402
              { itype = M32RXF_INSN_MVTACHI_A; goto extract_sfmt_mvtachi_a; }
 
403
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
404
          case 1 :
 
405
            if ((entire_insn & 0xf0f3) == 0x5071)
 
406
              { itype = M32RXF_INSN_MVTACLO_A; goto extract_sfmt_mvtachi_a; }
 
407
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
373
408
          default : itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
374
409
          }
375
410
        }
376
 
      case 88 : itype = M32RXF_INSN_RACH_DSI; goto extract_sfmt_rac_dsi;
377
 
      case 89 : itype = M32RXF_INSN_RAC_DSI; goto extract_sfmt_rac_dsi;
 
411
      case 88 :
 
412
        if ((entire_insn & 0xf3f2) == 0x5080)
 
413
          { itype = M32RXF_INSN_RACH_DSI; goto extract_sfmt_rac_dsi; }
 
414
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
415
      case 89 :
 
416
        if ((entire_insn & 0xf3f2) == 0x5090)
 
417
          { itype = M32RXF_INSN_RAC_DSI; goto extract_sfmt_rac_dsi; }
 
418
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
378
419
      case 90 : itype = M32RXF_INSN_MULWU1; goto extract_sfmt_mulwu1;
379
420
      case 91 : itype = M32RXF_INSN_MACWU1; goto extract_sfmt_macwu1;
380
421
      case 92 : itype = M32RXF_INSN_MACLH1; goto extract_sfmt_macwu1;
381
422
      case 93 : itype = M32RXF_INSN_MSBLO; goto extract_sfmt_msblo;
382
 
      case 94 : itype = M32RXF_INSN_SADD; goto extract_sfmt_sadd;
 
423
      case 94 :
 
424
        if ((entire_insn & 0xffff) == 0x50e4)
 
425
          { itype = M32RXF_INSN_SADD; goto extract_sfmt_sadd; }
 
426
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
383
427
      case 95 :
384
428
        {
385
429
          unsigned int val = (((insn >> 0) & (3 << 0)));
412
456
          unsigned int val = (((insn >> 7) & (15 << 1)) | ((insn >> 0) & (1 << 0)));
413
457
          switch (val)
414
458
          {
415
 
          case 0 : itype = M32RXF_INSN_NOP; goto extract_sfmt_nop;
 
459
          case 0 :
 
460
            if ((entire_insn & 0xffff) == 0x7000)
 
461
              { itype = M32RXF_INSN_NOP; goto extract_sfmt_nop; }
 
462
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
416
463
          case 2 : /* fall through */
417
464
          case 3 : itype = M32RXF_INSN_SETPSW; goto extract_sfmt_setpsw;
418
465
          case 4 : /* fall through */
419
466
          case 5 : itype = M32RXF_INSN_CLRPSW; goto extract_sfmt_clrpsw;
420
 
          case 9 : itype = M32RXF_INSN_SC; goto extract_sfmt_sc;
421
 
          case 11 : itype = M32RXF_INSN_SNC; goto extract_sfmt_sc;
 
467
          case 9 :
 
468
            if ((entire_insn & 0xffff) == 0x7401)
 
469
              { itype = M32RXF_INSN_SC; goto extract_sfmt_sc; }
 
470
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
471
          case 11 :
 
472
            if ((entire_insn & 0xffff) == 0x7501)
 
473
              { itype = M32RXF_INSN_SNC; goto extract_sfmt_sc; }
 
474
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
422
475
          case 16 : /* fall through */
423
476
          case 17 : itype = M32RXF_INSN_BCL8; goto extract_sfmt_bcl8;
424
477
          case 18 : /* fall through */
464
517
          default : itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
465
518
          }
466
519
        }
467
 
      case 132 : itype = M32RXF_INSN_CMPI; goto extract_sfmt_cmpi;
468
 
      case 133 : itype = M32RXF_INSN_CMPUI; goto extract_sfmt_cmpi;
 
520
      case 132 :
 
521
        if ((entire_insn & 0xfff00000) == 0x80400000)
 
522
          { itype = M32RXF_INSN_CMPI; goto extract_sfmt_cmpi; }
 
523
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
524
      case 133 :
 
525
        if ((entire_insn & 0xfff00000) == 0x80500000)
 
526
          { itype = M32RXF_INSN_CMPUI; goto extract_sfmt_cmpi; }
 
527
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
469
528
      case 134 :
470
529
        {
471
 
          unsigned int val = (((insn >> -8) & (3 << 0)));
 
530
          unsigned int val = (((entire_insn >> 8) & (3 << 0)));
472
531
          switch (val)
473
532
          {
474
 
          case 0 : itype = M32RXF_INSN_SAT; goto extract_sfmt_sat;
475
 
          case 2 : itype = M32RXF_INSN_SATH; goto extract_sfmt_satb;
476
 
          case 3 : itype = M32RXF_INSN_SATB; goto extract_sfmt_satb;
 
533
          case 0 :
 
534
            if ((entire_insn & 0xf0f0ffff) == 0x80600000)
 
535
              { itype = M32RXF_INSN_SAT; goto extract_sfmt_sat; }
 
536
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
537
          case 2 :
 
538
            if ((entire_insn & 0xf0f0ffff) == 0x80600200)
 
539
              { itype = M32RXF_INSN_SATH; goto extract_sfmt_satb; }
 
540
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
541
          case 3 :
 
542
            if ((entire_insn & 0xf0f0ffff) == 0x80600300)
 
543
              { itype = M32RXF_INSN_SATB; goto extract_sfmt_satb; }
 
544
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
477
545
          default : itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
478
546
          }
479
547
        }
484
552
      case 142 : itype = M32RXF_INSN_OR3; goto extract_sfmt_or3;
485
553
      case 144 :
486
554
        {
487
 
          unsigned int val = (((insn >> -12) & (1 << 0)));
 
555
          unsigned int val = (((entire_insn >> 4) & (1 << 0)));
488
556
          switch (val)
489
557
          {
490
 
          case 0 : itype = M32RXF_INSN_DIV; goto extract_sfmt_div;
491
 
          case 1 : itype = M32RXF_INSN_DIVH; goto extract_sfmt_div;
 
558
          case 0 :
 
559
            if ((entire_insn & 0xf0f0ffff) == 0x90000000)
 
560
              { itype = M32RXF_INSN_DIV; goto extract_sfmt_div; }
 
561
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
562
          case 1 :
 
563
            if ((entire_insn & 0xf0f0ffff) == 0x90000010)
 
564
              { itype = M32RXF_INSN_DIVH; goto extract_sfmt_div; }
 
565
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
492
566
          default : itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
493
567
          }
494
568
        }
495
 
      case 145 : itype = M32RXF_INSN_DIVU; goto extract_sfmt_div;
496
 
      case 146 : itype = M32RXF_INSN_REM; goto extract_sfmt_div;
497
 
      case 147 : itype = M32RXF_INSN_REMU; goto extract_sfmt_div;
 
569
      case 145 :
 
570
        if ((entire_insn & 0xf0f0ffff) == 0x90100000)
 
571
          { itype = M32RXF_INSN_DIVU; goto extract_sfmt_div; }
 
572
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
573
      case 146 :
 
574
        if ((entire_insn & 0xf0f0ffff) == 0x90200000)
 
575
          { itype = M32RXF_INSN_REM; goto extract_sfmt_div; }
 
576
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
577
      case 147 :
 
578
        if ((entire_insn & 0xf0f0ffff) == 0x90300000)
 
579
          { itype = M32RXF_INSN_REMU; goto extract_sfmt_div; }
 
580
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
498
581
      case 152 : itype = M32RXF_INSN_SRL3; goto extract_sfmt_sll3;
499
582
      case 154 : itype = M32RXF_INSN_SRA3; goto extract_sfmt_sll3;
500
583
      case 156 : itype = M32RXF_INSN_SLL3; goto extract_sfmt_sll3;
501
 
      case 159 : itype = M32RXF_INSN_LDI16; goto extract_sfmt_ldi16;
 
584
      case 159 :
 
585
        if ((entire_insn & 0xf0ff0000) == 0x90f00000)
 
586
          { itype = M32RXF_INSN_LDI16; goto extract_sfmt_ldi16; }
 
587
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
502
588
      case 160 : itype = M32RXF_INSN_STB_D; goto extract_sfmt_stb_d;
503
589
      case 162 : itype = M32RXF_INSN_STH_D; goto extract_sfmt_sth_d;
504
590
      case 164 : itype = M32RXF_INSN_ST_D; goto extract_sfmt_st_d;
505
 
      case 166 : itype = M32RXF_INSN_BSET; goto extract_sfmt_bset;
506
 
      case 167 : itype = M32RXF_INSN_BCLR; goto extract_sfmt_bset;
 
591
      case 166 :
 
592
        if ((entire_insn & 0xf8f00000) == 0xa0600000)
 
593
          { itype = M32RXF_INSN_BSET; goto extract_sfmt_bset; }
 
594
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
595
      case 167 :
 
596
        if ((entire_insn & 0xf8f00000) == 0xa0700000)
 
597
          { itype = M32RXF_INSN_BCLR; goto extract_sfmt_bset; }
 
598
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
507
599
      case 168 : itype = M32RXF_INSN_LDB_D; goto extract_sfmt_ldb_d;
508
600
      case 169 : itype = M32RXF_INSN_LDUB_D; goto extract_sfmt_ldb_d;
509
601
      case 170 : itype = M32RXF_INSN_LDH_D; goto extract_sfmt_ldh_d;
511
603
      case 172 : itype = M32RXF_INSN_LD_D; goto extract_sfmt_ld_d;
512
604
      case 176 : itype = M32RXF_INSN_BEQ; goto extract_sfmt_beq;
513
605
      case 177 : itype = M32RXF_INSN_BNE; goto extract_sfmt_beq;
514
 
      case 184 : itype = M32RXF_INSN_BEQZ; goto extract_sfmt_beqz;
515
 
      case 185 : itype = M32RXF_INSN_BNEZ; goto extract_sfmt_beqz;
516
 
      case 186 : itype = M32RXF_INSN_BLTZ; goto extract_sfmt_beqz;
517
 
      case 187 : itype = M32RXF_INSN_BGEZ; goto extract_sfmt_beqz;
518
 
      case 188 : itype = M32RXF_INSN_BLEZ; goto extract_sfmt_beqz;
519
 
      case 189 : itype = M32RXF_INSN_BGTZ; goto extract_sfmt_beqz;
520
 
      case 220 : itype = M32RXF_INSN_SETH; goto extract_sfmt_seth;
 
606
      case 184 :
 
607
        if ((entire_insn & 0xfff00000) == 0xb0800000)
 
608
          { itype = M32RXF_INSN_BEQZ; goto extract_sfmt_beqz; }
 
609
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
610
      case 185 :
 
611
        if ((entire_insn & 0xfff00000) == 0xb0900000)
 
612
          { itype = M32RXF_INSN_BNEZ; goto extract_sfmt_beqz; }
 
613
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
614
      case 186 :
 
615
        if ((entire_insn & 0xfff00000) == 0xb0a00000)
 
616
          { itype = M32RXF_INSN_BLTZ; goto extract_sfmt_beqz; }
 
617
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
618
      case 187 :
 
619
        if ((entire_insn & 0xfff00000) == 0xb0b00000)
 
620
          { itype = M32RXF_INSN_BGEZ; goto extract_sfmt_beqz; }
 
621
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
622
      case 188 :
 
623
        if ((entire_insn & 0xfff00000) == 0xb0c00000)
 
624
          { itype = M32RXF_INSN_BLEZ; goto extract_sfmt_beqz; }
 
625
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
626
      case 189 :
 
627
        if ((entire_insn & 0xfff00000) == 0xb0d00000)
 
628
          { itype = M32RXF_INSN_BGTZ; goto extract_sfmt_beqz; }
 
629
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
630
      case 220 :
 
631
        if ((entire_insn & 0xf0ff0000) == 0xd0c00000)
 
632
          { itype = M32RXF_INSN_SETH; goto extract_sfmt_seth; }
 
633
        itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
521
634
      case 224 : /* fall through */
522
635
      case 225 : /* fall through */
523
636
      case 226 : /* fall through */
554
667
          unsigned int val = (((insn >> 8) & (7 << 0)));
555
668
          switch (val)
556
669
          {
557
 
          case 0 : itype = M32RXF_INSN_BCL24; goto extract_sfmt_bcl24;
558
 
          case 1 : itype = M32RXF_INSN_BNCL24; goto extract_sfmt_bcl24;
559
 
          case 4 : itype = M32RXF_INSN_BC24; goto extract_sfmt_bc24;
560
 
          case 5 : itype = M32RXF_INSN_BNC24; goto extract_sfmt_bc24;
561
 
          case 6 : itype = M32RXF_INSN_BL24; goto extract_sfmt_bl24;
562
 
          case 7 : itype = M32RXF_INSN_BRA24; goto extract_sfmt_bra24;
 
670
          case 0 :
 
671
            if ((entire_insn & 0xff000000) == 0xf8000000)
 
672
              { itype = M32RXF_INSN_BCL24; goto extract_sfmt_bcl24; }
 
673
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
674
          case 1 :
 
675
            if ((entire_insn & 0xff000000) == 0xf9000000)
 
676
              { itype = M32RXF_INSN_BNCL24; goto extract_sfmt_bcl24; }
 
677
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
678
          case 4 :
 
679
            if ((entire_insn & 0xff000000) == 0xfc000000)
 
680
              { itype = M32RXF_INSN_BC24; goto extract_sfmt_bc24; }
 
681
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
682
          case 5 :
 
683
            if ((entire_insn & 0xff000000) == 0xfd000000)
 
684
              { itype = M32RXF_INSN_BNC24; goto extract_sfmt_bc24; }
 
685
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
686
          case 6 :
 
687
            if ((entire_insn & 0xff000000) == 0xfe000000)
 
688
              { itype = M32RXF_INSN_BL24; goto extract_sfmt_bl24; }
 
689
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
 
690
          case 7 :
 
691
            if ((entire_insn & 0xff000000) == 0xff000000)
 
692
              { itype = M32RXF_INSN_BRA24; goto extract_sfmt_bra24; }
 
693
            itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
563
694
          default : itype = M32RXF_INSN_X_INVALID; goto extract_sfmt_empty;
564
695
          }
565
696
        }
573
704
 extract_sfmt_empty:
574
705
  {
575
706
    const IDESC *idesc = &m32rxf_insn_data[itype];
576
 
#define FLD(f) abuf->fields.fmt_empty.f
 
707
#define FLD(f) abuf->fields.sfmt_empty.f
577
708
 
578
709
 
579
710
  /* Record the fields for the semantic handler.  */
586
717
 extract_sfmt_add:
587
718
  {
588
719
    const IDESC *idesc = &m32rxf_insn_data[itype];
589
 
    CGEN_INSN_INT insn = entire_insn;
 
720
    CGEN_INSN_WORD insn = entire_insn;
590
721
#define FLD(f) abuf->fields.sfmt_add.f
591
722
    UINT f_r1;
592
723
    UINT f_r2;
617
748
 extract_sfmt_add3:
618
749
  {
619
750
    const IDESC *idesc = &m32rxf_insn_data[itype];
620
 
    CGEN_INSN_INT insn = entire_insn;
 
751
    CGEN_INSN_WORD insn = entire_insn;
621
752
#define FLD(f) abuf->fields.sfmt_add3.f
622
753
    UINT f_r1;
623
754
    UINT f_r2;
625
756
 
626
757
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
627
758
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
628
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
759
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
629
760
 
630
761
  /* Record the fields for the semantic handler.  */
631
762
  FLD (f_simm16) = f_simm16;
650
781
 extract_sfmt_and3:
651
782
  {
652
783
    const IDESC *idesc = &m32rxf_insn_data[itype];
653
 
    CGEN_INSN_INT insn = entire_insn;
 
784
    CGEN_INSN_WORD insn = entire_insn;
654
785
#define FLD(f) abuf->fields.sfmt_and3.f
655
786
    UINT f_r1;
656
787
    UINT f_r2;
683
814
 extract_sfmt_or3:
684
815
  {
685
816
    const IDESC *idesc = &m32rxf_insn_data[itype];
686
 
    CGEN_INSN_INT insn = entire_insn;
 
817
    CGEN_INSN_WORD insn = entire_insn;
687
818
#define FLD(f) abuf->fields.sfmt_and3.f
688
819
    UINT f_r1;
689
820
    UINT f_r2;
716
847
 extract_sfmt_addi:
717
848
  {
718
849
    const IDESC *idesc = &m32rxf_insn_data[itype];
719
 
    CGEN_INSN_INT insn = entire_insn;
 
850
    CGEN_INSN_WORD insn = entire_insn;
720
851
#define FLD(f) abuf->fields.sfmt_addi.f
721
852
    UINT f_r1;
722
853
    INT f_simm8;
723
854
 
724
855
    f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
725
 
    f_simm8 = EXTRACT_MSB0_INT (insn, 16, 8, 8);
 
856
    f_simm8 = EXTRACT_MSB0_SINT (insn, 16, 8, 8);
726
857
 
727
858
  /* Record the fields for the semantic handler.  */
728
859
  FLD (f_r1) = f_r1;
745
876
 extract_sfmt_addv:
746
877
  {
747
878
    const IDESC *idesc = &m32rxf_insn_data[itype];
748
 
    CGEN_INSN_INT insn = entire_insn;
 
879
    CGEN_INSN_WORD insn = entire_insn;
749
880
#define FLD(f) abuf->fields.sfmt_add.f
750
881
    UINT f_r1;
751
882
    UINT f_r2;
776
907
 extract_sfmt_addv3:
777
908
  {
778
909
    const IDESC *idesc = &m32rxf_insn_data[itype];
779
 
    CGEN_INSN_INT insn = entire_insn;
 
910
    CGEN_INSN_WORD insn = entire_insn;
780
911
#define FLD(f) abuf->fields.sfmt_add3.f
781
912
    UINT f_r1;
782
913
    UINT f_r2;
784
915
 
785
916
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
786
917
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
787
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
918
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
788
919
 
789
920
  /* Record the fields for the semantic handler.  */
790
921
  FLD (f_simm16) = f_simm16;
809
940
 extract_sfmt_addx:
810
941
  {
811
942
    const IDESC *idesc = &m32rxf_insn_data[itype];
812
 
    CGEN_INSN_INT insn = entire_insn;
 
943
    CGEN_INSN_WORD insn = entire_insn;
813
944
#define FLD(f) abuf->fields.sfmt_add.f
814
945
    UINT f_r1;
815
946
    UINT f_r2;
840
971
 extract_sfmt_bc8:
841
972
  {
842
973
    const IDESC *idesc = &m32rxf_insn_data[itype];
843
 
    CGEN_INSN_INT insn = entire_insn;
 
974
    CGEN_INSN_WORD insn = entire_insn;
844
975
#define FLD(f) abuf->fields.sfmt_bl8.f
845
976
    SI f_disp8;
846
977
 
847
 
    f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
 
978
    f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
848
979
 
849
980
  /* Record the fields for the semantic handler.  */
850
981
  FLD (i_disp8) = f_disp8;
863
994
 extract_sfmt_bc24:
864
995
  {
865
996
    const IDESC *idesc = &m32rxf_insn_data[itype];
866
 
    CGEN_INSN_INT insn = entire_insn;
 
997
    CGEN_INSN_WORD insn = entire_insn;
867
998
#define FLD(f) abuf->fields.sfmt_bl24.f
868
999
    SI f_disp24;
869
1000
 
870
 
    f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
 
1001
    f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
871
1002
 
872
1003
  /* Record the fields for the semantic handler.  */
873
1004
  FLD (i_disp24) = f_disp24;
886
1017
 extract_sfmt_beq:
887
1018
  {
888
1019
    const IDESC *idesc = &m32rxf_insn_data[itype];
889
 
    CGEN_INSN_INT insn = entire_insn;
 
1020
    CGEN_INSN_WORD insn = entire_insn;
890
1021
#define FLD(f) abuf->fields.sfmt_beq.f
891
1022
    UINT f_r1;
892
1023
    UINT f_r2;
894
1025
 
895
1026
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
896
1027
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
897
 
    f_disp16 = ((((EXTRACT_MSB0_INT (insn, 32, 16, 16)) << (2))) + (pc));
 
1028
    f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 16, 16)) << (2))) + (pc));
898
1029
 
899
1030
  /* Record the fields for the semantic handler.  */
900
1031
  FLD (f_r1) = f_r1;
919
1050
 extract_sfmt_beqz:
920
1051
  {
921
1052
    const IDESC *idesc = &m32rxf_insn_data[itype];
922
 
    CGEN_INSN_INT insn = entire_insn;
 
1053
    CGEN_INSN_WORD insn = entire_insn;
923
1054
#define FLD(f) abuf->fields.sfmt_beq.f
924
1055
    UINT f_r2;
925
1056
    SI f_disp16;
926
1057
 
927
1058
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
928
 
    f_disp16 = ((((EXTRACT_MSB0_INT (insn, 32, 16, 16)) << (2))) + (pc));
 
1059
    f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 16, 16)) << (2))) + (pc));
929
1060
 
930
1061
  /* Record the fields for the semantic handler.  */
931
1062
  FLD (f_r2) = f_r2;
947
1078
 extract_sfmt_bl8:
948
1079
  {
949
1080
    const IDESC *idesc = &m32rxf_insn_data[itype];
950
 
    CGEN_INSN_INT insn = entire_insn;
 
1081
    CGEN_INSN_WORD insn = entire_insn;
951
1082
#define FLD(f) abuf->fields.sfmt_bl8.f
952
1083
    SI f_disp8;
953
1084
 
954
 
    f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
 
1085
    f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
955
1086
 
956
1087
  /* Record the fields for the semantic handler.  */
957
1088
  FLD (i_disp8) = f_disp8;
971
1102
 extract_sfmt_bl24:
972
1103
  {
973
1104
    const IDESC *idesc = &m32rxf_insn_data[itype];
974
 
    CGEN_INSN_INT insn = entire_insn;
 
1105
    CGEN_INSN_WORD insn = entire_insn;
975
1106
#define FLD(f) abuf->fields.sfmt_bl24.f
976
1107
    SI f_disp24;
977
1108
 
978
 
    f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
 
1109
    f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
979
1110
 
980
1111
  /* Record the fields for the semantic handler.  */
981
1112
  FLD (i_disp24) = f_disp24;
995
1126
 extract_sfmt_bcl8:
996
1127
  {
997
1128
    const IDESC *idesc = &m32rxf_insn_data[itype];
998
 
    CGEN_INSN_INT insn = entire_insn;
 
1129
    CGEN_INSN_WORD insn = entire_insn;
999
1130
#define FLD(f) abuf->fields.sfmt_bl8.f
1000
1131
    SI f_disp8;
1001
1132
 
1002
 
    f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
 
1133
    f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
1003
1134
 
1004
1135
  /* Record the fields for the semantic handler.  */
1005
1136
  FLD (i_disp8) = f_disp8;
1019
1150
 extract_sfmt_bcl24:
1020
1151
  {
1021
1152
    const IDESC *idesc = &m32rxf_insn_data[itype];
1022
 
    CGEN_INSN_INT insn = entire_insn;
 
1153
    CGEN_INSN_WORD insn = entire_insn;
1023
1154
#define FLD(f) abuf->fields.sfmt_bl24.f
1024
1155
    SI f_disp24;
1025
1156
 
1026
 
    f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
 
1157
    f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
1027
1158
 
1028
1159
  /* Record the fields for the semantic handler.  */
1029
1160
  FLD (i_disp24) = f_disp24;
1043
1174
 extract_sfmt_bra8:
1044
1175
  {
1045
1176
    const IDESC *idesc = &m32rxf_insn_data[itype];
1046
 
    CGEN_INSN_INT insn = entire_insn;
 
1177
    CGEN_INSN_WORD insn = entire_insn;
1047
1178
#define FLD(f) abuf->fields.sfmt_bl8.f
1048
1179
    SI f_disp8;
1049
1180
 
1050
 
    f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
 
1181
    f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
1051
1182
 
1052
1183
  /* Record the fields for the semantic handler.  */
1053
1184
  FLD (i_disp8) = f_disp8;
1066
1197
 extract_sfmt_bra24:
1067
1198
  {
1068
1199
    const IDESC *idesc = &m32rxf_insn_data[itype];
1069
 
    CGEN_INSN_INT insn = entire_insn;
 
1200
    CGEN_INSN_WORD insn = entire_insn;
1070
1201
#define FLD(f) abuf->fields.sfmt_bl24.f
1071
1202
    SI f_disp24;
1072
1203
 
1073
 
    f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
 
1204
    f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
1074
1205
 
1075
1206
  /* Record the fields for the semantic handler.  */
1076
1207
  FLD (i_disp24) = f_disp24;
1089
1220
 extract_sfmt_cmp:
1090
1221
  {
1091
1222
    const IDESC *idesc = &m32rxf_insn_data[itype];
1092
 
    CGEN_INSN_INT insn = entire_insn;
 
1223
    CGEN_INSN_WORD insn = entire_insn;
1093
1224
#define FLD(f) abuf->fields.sfmt_st_plus.f
1094
1225
    UINT f_r1;
1095
1226
    UINT f_r2;
1119
1250
 extract_sfmt_cmpi:
1120
1251
  {
1121
1252
    const IDESC *idesc = &m32rxf_insn_data[itype];
1122
 
    CGEN_INSN_INT insn = entire_insn;
 
1253
    CGEN_INSN_WORD insn = entire_insn;
1123
1254
#define FLD(f) abuf->fields.sfmt_st_d.f
1124
1255
    UINT f_r2;
1125
1256
    INT f_simm16;
1126
1257
 
1127
1258
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1128
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1259
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1129
1260
 
1130
1261
  /* Record the fields for the semantic handler.  */
1131
1262
  FLD (f_simm16) = f_simm16;
1147
1278
 extract_sfmt_cmpz:
1148
1279
  {
1149
1280
    const IDESC *idesc = &m32rxf_insn_data[itype];
1150
 
    CGEN_INSN_INT insn = entire_insn;
 
1281
    CGEN_INSN_WORD insn = entire_insn;
1151
1282
#define FLD(f) abuf->fields.sfmt_st_plus.f
1152
1283
    UINT f_r2;
1153
1284
 
1172
1303
 extract_sfmt_div:
1173
1304
  {
1174
1305
    const IDESC *idesc = &m32rxf_insn_data[itype];
1175
 
    CGEN_INSN_INT insn = entire_insn;
 
1306
    CGEN_INSN_WORD insn = entire_insn;
1176
1307
#define FLD(f) abuf->fields.sfmt_add.f
1177
1308
    UINT f_r1;
1178
1309
    UINT f_r2;
1203
1334
 extract_sfmt_jc:
1204
1335
  {
1205
1336
    const IDESC *idesc = &m32rxf_insn_data[itype];
1206
 
    CGEN_INSN_INT insn = entire_insn;
 
1337
    CGEN_INSN_WORD insn = entire_insn;
1207
1338
#define FLD(f) abuf->fields.sfmt_jl.f
1208
1339
    UINT f_r2;
1209
1340
 
1228
1359
 extract_sfmt_jl:
1229
1360
  {
1230
1361
    const IDESC *idesc = &m32rxf_insn_data[itype];
1231
 
    CGEN_INSN_INT insn = entire_insn;
 
1362
    CGEN_INSN_WORD insn = entire_insn;
1232
1363
#define FLD(f) abuf->fields.sfmt_jl.f
1233
1364
    UINT f_r2;
1234
1365
 
1254
1385
 extract_sfmt_jmp:
1255
1386
  {
1256
1387
    const IDESC *idesc = &m32rxf_insn_data[itype];
1257
 
    CGEN_INSN_INT insn = entire_insn;
 
1388
    CGEN_INSN_WORD insn = entire_insn;
1258
1389
#define FLD(f) abuf->fields.sfmt_jl.f
1259
1390
    UINT f_r2;
1260
1391
 
1279
1410
 extract_sfmt_ld:
1280
1411
  {
1281
1412
    const IDESC *idesc = &m32rxf_insn_data[itype];
1282
 
    CGEN_INSN_INT insn = entire_insn;
 
1413
    CGEN_INSN_WORD insn = entire_insn;
1283
1414
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1284
1415
    UINT f_r1;
1285
1416
    UINT f_r2;
1309
1440
 extract_sfmt_ld_d:
1310
1441
  {
1311
1442
    const IDESC *idesc = &m32rxf_insn_data[itype];
1312
 
    CGEN_INSN_INT insn = entire_insn;
 
1443
    CGEN_INSN_WORD insn = entire_insn;
1313
1444
#define FLD(f) abuf->fields.sfmt_add3.f
1314
1445
    UINT f_r1;
1315
1446
    UINT f_r2;
1317
1448
 
1318
1449
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1319
1450
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1320
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1451
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1321
1452
 
1322
1453
  /* Record the fields for the semantic handler.  */
1323
1454
  FLD (f_simm16) = f_simm16;
1342
1473
 extract_sfmt_ldb:
1343
1474
  {
1344
1475
    const IDESC *idesc = &m32rxf_insn_data[itype];
1345
 
    CGEN_INSN_INT insn = entire_insn;
 
1476
    CGEN_INSN_WORD insn = entire_insn;
1346
1477
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1347
1478
    UINT f_r1;
1348
1479
    UINT f_r2;
1372
1503
 extract_sfmt_ldb_d:
1373
1504
  {
1374
1505
    const IDESC *idesc = &m32rxf_insn_data[itype];
1375
 
    CGEN_INSN_INT insn = entire_insn;
 
1506
    CGEN_INSN_WORD insn = entire_insn;
1376
1507
#define FLD(f) abuf->fields.sfmt_add3.f
1377
1508
    UINT f_r1;
1378
1509
    UINT f_r2;
1380
1511
 
1381
1512
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1382
1513
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1383
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1514
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1384
1515
 
1385
1516
  /* Record the fields for the semantic handler.  */
1386
1517
  FLD (f_simm16) = f_simm16;
1405
1536
 extract_sfmt_ldh:
1406
1537
  {
1407
1538
    const IDESC *idesc = &m32rxf_insn_data[itype];
1408
 
    CGEN_INSN_INT insn = entire_insn;
 
1539
    CGEN_INSN_WORD insn = entire_insn;
1409
1540
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1410
1541
    UINT f_r1;
1411
1542
    UINT f_r2;
1435
1566
 extract_sfmt_ldh_d:
1436
1567
  {
1437
1568
    const IDESC *idesc = &m32rxf_insn_data[itype];
1438
 
    CGEN_INSN_INT insn = entire_insn;
 
1569
    CGEN_INSN_WORD insn = entire_insn;
1439
1570
#define FLD(f) abuf->fields.sfmt_add3.f
1440
1571
    UINT f_r1;
1441
1572
    UINT f_r2;
1443
1574
 
1444
1575
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1445
1576
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1446
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1577
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1447
1578
 
1448
1579
  /* Record the fields for the semantic handler.  */
1449
1580
  FLD (f_simm16) = f_simm16;
1468
1599
 extract_sfmt_ld_plus:
1469
1600
  {
1470
1601
    const IDESC *idesc = &m32rxf_insn_data[itype];
1471
 
    CGEN_INSN_INT insn = entire_insn;
 
1602
    CGEN_INSN_WORD insn = entire_insn;
1472
1603
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1473
1604
    UINT f_r1;
1474
1605
    UINT f_r2;
1499
1630
 extract_sfmt_ld24:
1500
1631
  {
1501
1632
    const IDESC *idesc = &m32rxf_insn_data[itype];
1502
 
    CGEN_INSN_INT insn = entire_insn;
 
1633
    CGEN_INSN_WORD insn = entire_insn;
1503
1634
#define FLD(f) abuf->fields.sfmt_ld24.f
1504
1635
    UINT f_r1;
1505
1636
    UINT f_uimm24;
1527
1658
 extract_sfmt_ldi8:
1528
1659
  {
1529
1660
    const IDESC *idesc = &m32rxf_insn_data[itype];
1530
 
    CGEN_INSN_INT insn = entire_insn;
 
1661
    CGEN_INSN_WORD insn = entire_insn;
1531
1662
#define FLD(f) abuf->fields.sfmt_addi.f
1532
1663
    UINT f_r1;
1533
1664
    INT f_simm8;
1534
1665
 
1535
1666
    f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1536
 
    f_simm8 = EXTRACT_MSB0_INT (insn, 16, 8, 8);
 
1667
    f_simm8 = EXTRACT_MSB0_SINT (insn, 16, 8, 8);
1537
1668
 
1538
1669
  /* Record the fields for the semantic handler.  */
1539
1670
  FLD (f_simm8) = f_simm8;
1555
1686
 extract_sfmt_ldi16:
1556
1687
  {
1557
1688
    const IDESC *idesc = &m32rxf_insn_data[itype];
1558
 
    CGEN_INSN_INT insn = entire_insn;
 
1689
    CGEN_INSN_WORD insn = entire_insn;
1559
1690
#define FLD(f) abuf->fields.sfmt_add3.f
1560
1691
    UINT f_r1;
1561
1692
    INT f_simm16;
1562
1693
 
1563
1694
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1564
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1695
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1565
1696
 
1566
1697
  /* Record the fields for the semantic handler.  */
1567
1698
  FLD (f_simm16) = f_simm16;
1583
1714
 extract_sfmt_lock:
1584
1715
  {
1585
1716
    const IDESC *idesc = &m32rxf_insn_data[itype];
1586
 
    CGEN_INSN_INT insn = entire_insn;
 
1717
    CGEN_INSN_WORD insn = entire_insn;
1587
1718
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1588
1719
    UINT f_r1;
1589
1720
    UINT f_r2;
1613
1744
 extract_sfmt_machi_a:
1614
1745
  {
1615
1746
    const IDESC *idesc = &m32rxf_insn_data[itype];
1616
 
    CGEN_INSN_INT insn = entire_insn;
 
1747
    CGEN_INSN_WORD insn = entire_insn;
1617
1748
#define FLD(f) abuf->fields.sfmt_machi_a.f
1618
1749
    UINT f_r1;
1619
1750
    UINT f_acc;
1646
1777
 extract_sfmt_mulhi_a:
1647
1778
  {
1648
1779
    const IDESC *idesc = &m32rxf_insn_data[itype];
1649
 
    CGEN_INSN_INT insn = entire_insn;
 
1780
    CGEN_INSN_WORD insn = entire_insn;
1650
1781
#define FLD(f) abuf->fields.sfmt_machi_a.f
1651
1782
    UINT f_r1;
1652
1783
    UINT f_acc;
1679
1810
 extract_sfmt_mv:
1680
1811
  {
1681
1812
    const IDESC *idesc = &m32rxf_insn_data[itype];
1682
 
    CGEN_INSN_INT insn = entire_insn;
 
1813
    CGEN_INSN_WORD insn = entire_insn;
1683
1814
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1684
1815
    UINT f_r1;
1685
1816
    UINT f_r2;
1709
1840
 extract_sfmt_mvfachi_a:
1710
1841
  {
1711
1842
    const IDESC *idesc = &m32rxf_insn_data[itype];
1712
 
    CGEN_INSN_INT insn = entire_insn;
 
1843
    CGEN_INSN_WORD insn = entire_insn;
1713
1844
#define FLD(f) abuf->fields.sfmt_mvfachi_a.f
1714
1845
    UINT f_r1;
1715
1846
    UINT f_accs;
1737
1868
 extract_sfmt_mvfc:
1738
1869
  {
1739
1870
    const IDESC *idesc = &m32rxf_insn_data[itype];
1740
 
    CGEN_INSN_INT insn = entire_insn;
 
1871
    CGEN_INSN_WORD insn = entire_insn;
1741
1872
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1742
1873
    UINT f_r1;
1743
1874
    UINT f_r2;
1765
1896
 extract_sfmt_mvtachi_a:
1766
1897
  {
1767
1898
    const IDESC *idesc = &m32rxf_insn_data[itype];
1768
 
    CGEN_INSN_INT insn = entire_insn;
 
1899
    CGEN_INSN_WORD insn = entire_insn;
1769
1900
#define FLD(f) abuf->fields.sfmt_mvtachi_a.f
1770
1901
    UINT f_r1;
1771
1902
    UINT f_accs;
1793
1924
 extract_sfmt_mvtc:
1794
1925
  {
1795
1926
    const IDESC *idesc = &m32rxf_insn_data[itype];
1796
 
    CGEN_INSN_INT insn = entire_insn;
 
1927
    CGEN_INSN_WORD insn = entire_insn;
1797
1928
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1798
1929
    UINT f_r1;
1799
1930
    UINT f_r2;
1821
1952
 extract_sfmt_nop:
1822
1953
  {
1823
1954
    const IDESC *idesc = &m32rxf_insn_data[itype];
1824
 
#define FLD(f) abuf->fields.fmt_empty.f
 
1955
#define FLD(f) abuf->fields.sfmt_empty.f
1825
1956
 
1826
1957
 
1827
1958
  /* Record the fields for the semantic handler.  */
1834
1965
 extract_sfmt_rac_dsi:
1835
1966
  {
1836
1967
    const IDESC *idesc = &m32rxf_insn_data[itype];
1837
 
    CGEN_INSN_INT insn = entire_insn;
 
1968
    CGEN_INSN_WORD insn = entire_insn;
1838
1969
#define FLD(f) abuf->fields.sfmt_rac_dsi.f
1839
1970
    UINT f_accd;
1840
1971
    UINT f_accs;
1857
1988
 extract_sfmt_rte:
1858
1989
  {
1859
1990
    const IDESC *idesc = &m32rxf_insn_data[itype];
1860
 
#define FLD(f) abuf->fields.fmt_empty.f
 
1991
#define FLD(f) abuf->fields.sfmt_empty.f
1861
1992
 
1862
1993
 
1863
1994
  /* Record the fields for the semantic handler.  */
1876
2007
 extract_sfmt_seth:
1877
2008
  {
1878
2009
    const IDESC *idesc = &m32rxf_insn_data[itype];
1879
 
    CGEN_INSN_INT insn = entire_insn;
 
2010
    CGEN_INSN_WORD insn = entire_insn;
1880
2011
#define FLD(f) abuf->fields.sfmt_seth.f
1881
2012
    UINT f_r1;
1882
2013
    UINT f_hi16;
1904
2035
 extract_sfmt_sll3:
1905
2036
  {
1906
2037
    const IDESC *idesc = &m32rxf_insn_data[itype];
1907
 
    CGEN_INSN_INT insn = entire_insn;
 
2038
    CGEN_INSN_WORD insn = entire_insn;
1908
2039
#define FLD(f) abuf->fields.sfmt_add3.f
1909
2040
    UINT f_r1;
1910
2041
    UINT f_r2;
1912
2043
 
1913
2044
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1914
2045
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1915
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
2046
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1916
2047
 
1917
2048
  /* Record the fields for the semantic handler.  */
1918
2049
  FLD (f_simm16) = f_simm16;
1937
2068
 extract_sfmt_slli:
1938
2069
  {
1939
2070
    const IDESC *idesc = &m32rxf_insn_data[itype];
1940
 
    CGEN_INSN_INT insn = entire_insn;
 
2071
    CGEN_INSN_WORD insn = entire_insn;
1941
2072
#define FLD(f) abuf->fields.sfmt_slli.f
1942
2073
    UINT f_r1;
1943
2074
    UINT f_uimm5;
1966
2097
 extract_sfmt_st:
1967
2098
  {
1968
2099
    const IDESC *idesc = &m32rxf_insn_data[itype];
1969
 
    CGEN_INSN_INT insn = entire_insn;
 
2100
    CGEN_INSN_WORD insn = entire_insn;
1970
2101
#define FLD(f) abuf->fields.sfmt_st_plus.f
1971
2102
    UINT f_r1;
1972
2103
    UINT f_r2;
1996
2127
 extract_sfmt_st_d:
1997
2128
  {
1998
2129
    const IDESC *idesc = &m32rxf_insn_data[itype];
1999
 
    CGEN_INSN_INT insn = entire_insn;
 
2130
    CGEN_INSN_WORD insn = entire_insn;
2000
2131
#define FLD(f) abuf->fields.sfmt_st_d.f
2001
2132
    UINT f_r1;
2002
2133
    UINT f_r2;
2004
2135
 
2005
2136
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
2006
2137
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2007
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
2138
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
2008
2139
 
2009
2140
  /* Record the fields for the semantic handler.  */
2010
2141
  FLD (f_simm16) = f_simm16;
2029
2160
 extract_sfmt_stb:
2030
2161
  {
2031
2162
    const IDESC *idesc = &m32rxf_insn_data[itype];
2032
 
    CGEN_INSN_INT insn = entire_insn;
 
2163
    CGEN_INSN_WORD insn = entire_insn;
2033
2164
#define FLD(f) abuf->fields.sfmt_st_plus.f
2034
2165
    UINT f_r1;
2035
2166
    UINT f_r2;
2059
2190
 extract_sfmt_stb_d:
2060
2191
  {
2061
2192
    const IDESC *idesc = &m32rxf_insn_data[itype];
2062
 
    CGEN_INSN_INT insn = entire_insn;
 
2193
    CGEN_INSN_WORD insn = entire_insn;
2063
2194
#define FLD(f) abuf->fields.sfmt_st_d.f
2064
2195
    UINT f_r1;
2065
2196
    UINT f_r2;
2067
2198
 
2068
2199
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
2069
2200
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2070
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
2201
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
2071
2202
 
2072
2203
  /* Record the fields for the semantic handler.  */
2073
2204
  FLD (f_simm16) = f_simm16;
2092
2223
 extract_sfmt_sth:
2093
2224
  {
2094
2225
    const IDESC *idesc = &m32rxf_insn_data[itype];
2095
 
    CGEN_INSN_INT insn = entire_insn;
 
2226
    CGEN_INSN_WORD insn = entire_insn;
2096
2227
#define FLD(f) abuf->fields.sfmt_st_plus.f
2097
2228
    UINT f_r1;
2098
2229
    UINT f_r2;
2122
2253
 extract_sfmt_sth_d:
2123
2254
  {
2124
2255
    const IDESC *idesc = &m32rxf_insn_data[itype];
2125
 
    CGEN_INSN_INT insn = entire_insn;
 
2256
    CGEN_INSN_WORD insn = entire_insn;
2126
2257
#define FLD(f) abuf->fields.sfmt_st_d.f
2127
2258
    UINT f_r1;
2128
2259
    UINT f_r2;
2130
2261
 
2131
2262
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
2132
2263
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2133
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
2264
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
2134
2265
 
2135
2266
  /* Record the fields for the semantic handler.  */
2136
2267
  FLD (f_simm16) = f_simm16;
2155
2286
 extract_sfmt_st_plus:
2156
2287
  {
2157
2288
    const IDESC *idesc = &m32rxf_insn_data[itype];
2158
 
    CGEN_INSN_INT insn = entire_insn;
 
2289
    CGEN_INSN_WORD insn = entire_insn;
2159
2290
#define FLD(f) abuf->fields.sfmt_st_plus.f
2160
2291
    UINT f_r1;
2161
2292
    UINT f_r2;
2186
2317
 extract_sfmt_sth_plus:
2187
2318
  {
2188
2319
    const IDESC *idesc = &m32rxf_insn_data[itype];
2189
 
    CGEN_INSN_INT insn = entire_insn;
 
2320
    CGEN_INSN_WORD insn = entire_insn;
2190
2321
#define FLD(f) abuf->fields.sfmt_st_plus.f
2191
2322
    UINT f_r1;
2192
2323
    UINT f_r2;
2217
2348
 extract_sfmt_stb_plus:
2218
2349
  {
2219
2350
    const IDESC *idesc = &m32rxf_insn_data[itype];
2220
 
    CGEN_INSN_INT insn = entire_insn;
 
2351
    CGEN_INSN_WORD insn = entire_insn;
2221
2352
#define FLD(f) abuf->fields.sfmt_st_plus.f
2222
2353
    UINT f_r1;
2223
2354
    UINT f_r2;
2248
2379
 extract_sfmt_trap:
2249
2380
  {
2250
2381
    const IDESC *idesc = &m32rxf_insn_data[itype];
2251
 
    CGEN_INSN_INT insn = entire_insn;
 
2382
    CGEN_INSN_WORD insn = entire_insn;
2252
2383
#define FLD(f) abuf->fields.sfmt_trap.f
2253
2384
    UINT f_uimm4;
2254
2385
 
2271
2402
 extract_sfmt_unlock:
2272
2403
  {
2273
2404
    const IDESC *idesc = &m32rxf_insn_data[itype];
2274
 
    CGEN_INSN_INT insn = entire_insn;
 
2405
    CGEN_INSN_WORD insn = entire_insn;
2275
2406
#define FLD(f) abuf->fields.sfmt_st_plus.f
2276
2407
    UINT f_r1;
2277
2408
    UINT f_r2;
2301
2432
 extract_sfmt_satb:
2302
2433
  {
2303
2434
    const IDESC *idesc = &m32rxf_insn_data[itype];
2304
 
    CGEN_INSN_INT insn = entire_insn;
 
2435
    CGEN_INSN_WORD insn = entire_insn;
2305
2436
#define FLD(f) abuf->fields.sfmt_ld_plus.f
2306
2437
    UINT f_r1;
2307
2438
    UINT f_r2;
2331
2462
 extract_sfmt_sat:
2332
2463
  {
2333
2464
    const IDESC *idesc = &m32rxf_insn_data[itype];
2334
 
    CGEN_INSN_INT insn = entire_insn;
 
2465
    CGEN_INSN_WORD insn = entire_insn;
2335
2466
#define FLD(f) abuf->fields.sfmt_ld_plus.f
2336
2467
    UINT f_r1;
2337
2468
    UINT f_r2;
2361
2492
 extract_sfmt_sadd:
2362
2493
  {
2363
2494
    const IDESC *idesc = &m32rxf_insn_data[itype];
2364
 
#define FLD(f) abuf->fields.fmt_empty.f
 
2495
#define FLD(f) abuf->fields.sfmt_empty.f
2365
2496
 
2366
2497
 
2367
2498
  /* Record the fields for the semantic handler.  */
2374
2505
 extract_sfmt_macwu1:
2375
2506
  {
2376
2507
    const IDESC *idesc = &m32rxf_insn_data[itype];
2377
 
    CGEN_INSN_INT insn = entire_insn;
 
2508
    CGEN_INSN_WORD insn = entire_insn;
2378
2509
#define FLD(f) abuf->fields.sfmt_st_plus.f
2379
2510
    UINT f_r1;
2380
2511
    UINT f_r2;
2404
2535
 extract_sfmt_msblo:
2405
2536
  {
2406
2537
    const IDESC *idesc = &m32rxf_insn_data[itype];
2407
 
    CGEN_INSN_INT insn = entire_insn;
 
2538
    CGEN_INSN_WORD insn = entire_insn;
2408
2539
#define FLD(f) abuf->fields.sfmt_st_plus.f
2409
2540
    UINT f_r1;
2410
2541
    UINT f_r2;
2434
2565
 extract_sfmt_mulwu1:
2435
2566
  {
2436
2567
    const IDESC *idesc = &m32rxf_insn_data[itype];
2437
 
    CGEN_INSN_INT insn = entire_insn;
 
2568
    CGEN_INSN_WORD insn = entire_insn;
2438
2569
#define FLD(f) abuf->fields.sfmt_st_plus.f
2439
2570
    UINT f_r1;
2440
2571
    UINT f_r2;
2464
2595
 extract_sfmt_sc:
2465
2596
  {
2466
2597
    const IDESC *idesc = &m32rxf_insn_data[itype];
2467
 
#define FLD(f) abuf->fields.fmt_empty.f
 
2598
#define FLD(f) abuf->fields.sfmt_empty.f
2468
2599
 
2469
2600
 
2470
2601
  /* Record the fields for the semantic handler.  */
2477
2608
 extract_sfmt_clrpsw:
2478
2609
  {
2479
2610
    const IDESC *idesc = &m32rxf_insn_data[itype];
2480
 
    CGEN_INSN_INT insn = entire_insn;
 
2611
    CGEN_INSN_WORD insn = entire_insn;
2481
2612
#define FLD(f) abuf->fields.sfmt_clrpsw.f
2482
2613
    UINT f_uimm8;
2483
2614
 
2494
2625
 extract_sfmt_setpsw:
2495
2626
  {
2496
2627
    const IDESC *idesc = &m32rxf_insn_data[itype];
2497
 
    CGEN_INSN_INT insn = entire_insn;
 
2628
    CGEN_INSN_WORD insn = entire_insn;
2498
2629
#define FLD(f) abuf->fields.sfmt_clrpsw.f
2499
2630
    UINT f_uimm8;
2500
2631
 
2511
2642
 extract_sfmt_bset:
2512
2643
  {
2513
2644
    const IDESC *idesc = &m32rxf_insn_data[itype];
2514
 
    CGEN_INSN_INT insn = entire_insn;
 
2645
    CGEN_INSN_WORD insn = entire_insn;
2515
2646
#define FLD(f) abuf->fields.sfmt_bset.f
2516
2647
    UINT f_uimm3;
2517
2648
    UINT f_r2;
2519
2650
 
2520
2651
    f_uimm3 = EXTRACT_MSB0_UINT (insn, 32, 5, 3);
2521
2652
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2522
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
2653
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
2523
2654
 
2524
2655
  /* Record the fields for the semantic handler.  */
2525
2656
  FLD (f_simm16) = f_simm16;
2542
2673
 extract_sfmt_btst:
2543
2674
  {
2544
2675
    const IDESC *idesc = &m32rxf_insn_data[itype];
2545
 
    CGEN_INSN_INT insn = entire_insn;
 
2676
    CGEN_INSN_WORD insn = entire_insn;
2546
2677
#define FLD(f) abuf->fields.sfmt_bset.f
2547
2678
    UINT f_uimm3;
2548
2679
    UINT f_r2;