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

« back to all changes in this revision

Viewing changes to sim/m32r/decode.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
 
151
152
  { M32R_INSN_BTST, M32RBF_INSN_BTST, M32RBF_SFMT_BTST },
152
153
};
153
154
 
154
 
static const struct insn_sem m32rbf_insn_sem_invalid = {
 
155
static const struct insn_sem m32rbf_insn_sem_invalid =
 
156
{
155
157
  VIRTUAL_INSN_X_INVALID, M32RBF_INSN_X_INVALID, M32RBF_SFMT_EMPTY
156
158
};
157
159
 
215
217
 
216
218
const IDESC *
217
219
m32rbf_decode (SIM_CPU *current_cpu, IADDR pc,
218
 
              CGEN_INSN_INT base_insn, CGEN_INSN_INT entire_insn,
 
220
              CGEN_INSN_WORD base_insn, CGEN_INSN_WORD entire_insn,
219
221
              ARGBUF *abuf)
220
222
{
221
223
  /* Result of decoder.  */
222
224
  M32RBF_INSN_TYPE itype;
223
225
 
224
226
  {
225
 
    CGEN_INSN_INT insn = base_insn;
 
227
    CGEN_INSN_WORD insn = base_insn;
226
228
 
227
229
    {
228
230
      unsigned int val = (((insn >> 8) & (15 << 4)) | ((insn >> 4) & (15 << 0)));
241
243
      case 12 : itype = M32RBF_INSN_AND; goto extract_sfmt_add;
242
244
      case 13 : itype = M32RBF_INSN_XOR; goto extract_sfmt_add;
243
245
      case 14 : itype = M32RBF_INSN_OR; goto extract_sfmt_add;
244
 
      case 15 : itype = M32RBF_INSN_BTST; goto extract_sfmt_btst;
 
246
      case 15 :
 
247
        if ((entire_insn & 0xf8f0) == 0xf0)
 
248
          { itype = M32RBF_INSN_BTST; goto extract_sfmt_btst; }
 
249
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
245
250
      case 16 : itype = M32RBF_INSN_SRL; goto extract_sfmt_add;
246
251
      case 18 : itype = M32RBF_INSN_SRA; goto extract_sfmt_add;
247
252
      case 20 : itype = M32RBF_INSN_SLL; goto extract_sfmt_add;
254
259
          unsigned int val = (((insn >> 8) & (1 << 0)));
255
260
          switch (val)
256
261
          {
257
 
          case 0 : itype = M32RBF_INSN_JL; goto extract_sfmt_jl;
258
 
          case 1 : itype = M32RBF_INSN_JMP; goto extract_sfmt_jmp;
 
262
          case 0 :
 
263
            if ((entire_insn & 0xfff0) == 0x1ec0)
 
264
              { itype = M32RBF_INSN_JL; goto extract_sfmt_jl; }
 
265
            itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
266
          case 1 :
 
267
            if ((entire_insn & 0xfff0) == 0x1fc0)
 
268
              { itype = M32RBF_INSN_JMP; goto extract_sfmt_jmp; }
 
269
            itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
259
270
          default : itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
260
271
          }
261
272
        }
262
 
      case 29 : itype = M32RBF_INSN_RTE; goto extract_sfmt_rte;
263
 
      case 31 : itype = M32RBF_INSN_TRAP; goto extract_sfmt_trap;
 
273
      case 29 :
 
274
        if ((entire_insn & 0xffff) == 0x10d6)
 
275
          { itype = M32RBF_INSN_RTE; goto extract_sfmt_rte; }
 
276
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
277
      case 31 :
 
278
        if ((entire_insn & 0xfff0) == 0x10f0)
 
279
          { itype = M32RBF_INSN_TRAP; goto extract_sfmt_trap; }
 
280
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
264
281
      case 32 : itype = M32RBF_INSN_STB; goto extract_sfmt_stb;
265
282
      case 34 : itype = M32RBF_INSN_STH; goto extract_sfmt_sth;
266
283
      case 36 : itype = M32RBF_INSN_ST; goto extract_sfmt_st;
309
326
          unsigned int val = (((insn >> 0) & (1 << 0)));
310
327
          switch (val)
311
328
          {
312
 
          case 0 : itype = M32RBF_INSN_MVTACHI; goto extract_sfmt_mvtachi;
313
 
          case 1 : itype = M32RBF_INSN_MVTACLO; goto extract_sfmt_mvtachi;
 
329
          case 0 :
 
330
            if ((entire_insn & 0xf0ff) == 0x5070)
 
331
              { itype = M32RBF_INSN_MVTACHI; goto extract_sfmt_mvtachi; }
 
332
            itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
333
          case 1 :
 
334
            if ((entire_insn & 0xf0ff) == 0x5071)
 
335
              { itype = M32RBF_INSN_MVTACLO; goto extract_sfmt_mvtachi; }
 
336
            itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
314
337
          default : itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
315
338
          }
316
339
        }
317
 
      case 88 : itype = M32RBF_INSN_RACH; goto extract_sfmt_rac;
318
 
      case 89 : itype = M32RBF_INSN_RAC; goto extract_sfmt_rac;
 
340
      case 88 :
 
341
        if ((entire_insn & 0xffff) == 0x5080)
 
342
          { itype = M32RBF_INSN_RACH; goto extract_sfmt_rac; }
 
343
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
344
      case 89 :
 
345
        if ((entire_insn & 0xffff) == 0x5090)
 
346
          { itype = M32RBF_INSN_RAC; goto extract_sfmt_rac; }
 
347
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
319
348
      case 95 :
320
349
        {
321
350
          unsigned int val = (((insn >> 0) & (3 << 0)));
322
351
          switch (val)
323
352
          {
324
 
          case 0 : itype = M32RBF_INSN_MVFACHI; goto extract_sfmt_mvfachi;
325
 
          case 1 : itype = M32RBF_INSN_MVFACLO; goto extract_sfmt_mvfachi;
326
 
          case 2 : itype = M32RBF_INSN_MVFACMI; goto extract_sfmt_mvfachi;
 
353
          case 0 :
 
354
            if ((entire_insn & 0xf0ff) == 0x50f0)
 
355
              { itype = M32RBF_INSN_MVFACHI; goto extract_sfmt_mvfachi; }
 
356
            itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
357
          case 1 :
 
358
            if ((entire_insn & 0xf0ff) == 0x50f1)
 
359
              { itype = M32RBF_INSN_MVFACLO; goto extract_sfmt_mvfachi; }
 
360
            itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
361
          case 2 :
 
362
            if ((entire_insn & 0xf0ff) == 0x50f2)
 
363
              { itype = M32RBF_INSN_MVFACMI; goto extract_sfmt_mvfachi; }
 
364
            itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
327
365
          default : itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
328
366
          }
329
367
        }
348
386
          unsigned int val = (((insn >> 8) & (15 << 0)));
349
387
          switch (val)
350
388
          {
351
 
          case 0 : itype = M32RBF_INSN_NOP; goto extract_sfmt_nop;
 
389
          case 0 :
 
390
            if ((entire_insn & 0xffff) == 0x7000)
 
391
              { itype = M32RBF_INSN_NOP; goto extract_sfmt_nop; }
 
392
            itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
352
393
          case 1 : itype = M32RBF_INSN_SETPSW; goto extract_sfmt_setpsw;
353
394
          case 2 : itype = M32RBF_INSN_CLRPSW; goto extract_sfmt_clrpsw;
354
395
          case 12 : itype = M32RBF_INSN_BC8; goto extract_sfmt_bc8;
386
427
          default : itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
387
428
          }
388
429
        }
389
 
      case 132 : itype = M32RBF_INSN_CMPI; goto extract_sfmt_cmpi;
390
 
      case 133 : itype = M32RBF_INSN_CMPUI; goto extract_sfmt_cmpi;
 
430
      case 132 :
 
431
        if ((entire_insn & 0xfff00000) == 0x80400000)
 
432
          { itype = M32RBF_INSN_CMPI; goto extract_sfmt_cmpi; }
 
433
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
434
      case 133 :
 
435
        if ((entire_insn & 0xfff00000) == 0x80500000)
 
436
          { itype = M32RBF_INSN_CMPUI; goto extract_sfmt_cmpi; }
 
437
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
391
438
      case 136 : itype = M32RBF_INSN_ADDV3; goto extract_sfmt_addv3;
392
439
      case 138 : itype = M32RBF_INSN_ADD3; goto extract_sfmt_add3;
393
440
      case 140 : itype = M32RBF_INSN_AND3; goto extract_sfmt_and3;
394
441
      case 141 : itype = M32RBF_INSN_XOR3; goto extract_sfmt_and3;
395
442
      case 142 : itype = M32RBF_INSN_OR3; goto extract_sfmt_or3;
396
 
      case 144 : itype = M32RBF_INSN_DIV; goto extract_sfmt_div;
397
 
      case 145 : itype = M32RBF_INSN_DIVU; goto extract_sfmt_div;
398
 
      case 146 : itype = M32RBF_INSN_REM; goto extract_sfmt_div;
399
 
      case 147 : itype = M32RBF_INSN_REMU; goto extract_sfmt_div;
 
443
      case 144 :
 
444
        if ((entire_insn & 0xf0f0ffff) == 0x90000000)
 
445
          { itype = M32RBF_INSN_DIV; goto extract_sfmt_div; }
 
446
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
447
      case 145 :
 
448
        if ((entire_insn & 0xf0f0ffff) == 0x90100000)
 
449
          { itype = M32RBF_INSN_DIVU; goto extract_sfmt_div; }
 
450
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
451
      case 146 :
 
452
        if ((entire_insn & 0xf0f0ffff) == 0x90200000)
 
453
          { itype = M32RBF_INSN_REM; goto extract_sfmt_div; }
 
454
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
455
      case 147 :
 
456
        if ((entire_insn & 0xf0f0ffff) == 0x90300000)
 
457
          { itype = M32RBF_INSN_REMU; goto extract_sfmt_div; }
 
458
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
400
459
      case 152 : itype = M32RBF_INSN_SRL3; goto extract_sfmt_sll3;
401
460
      case 154 : itype = M32RBF_INSN_SRA3; goto extract_sfmt_sll3;
402
461
      case 156 : itype = M32RBF_INSN_SLL3; goto extract_sfmt_sll3;
403
 
      case 159 : itype = M32RBF_INSN_LDI16; goto extract_sfmt_ldi16;
 
462
      case 159 :
 
463
        if ((entire_insn & 0xf0ff0000) == 0x90f00000)
 
464
          { itype = M32RBF_INSN_LDI16; goto extract_sfmt_ldi16; }
 
465
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
404
466
      case 160 : itype = M32RBF_INSN_STB_D; goto extract_sfmt_stb_d;
405
467
      case 162 : itype = M32RBF_INSN_STH_D; goto extract_sfmt_sth_d;
406
468
      case 164 : itype = M32RBF_INSN_ST_D; goto extract_sfmt_st_d;
407
 
      case 166 : itype = M32RBF_INSN_BSET; goto extract_sfmt_bset;
408
 
      case 167 : itype = M32RBF_INSN_BCLR; goto extract_sfmt_bset;
 
469
      case 166 :
 
470
        if ((entire_insn & 0xf8f00000) == 0xa0600000)
 
471
          { itype = M32RBF_INSN_BSET; goto extract_sfmt_bset; }
 
472
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
473
      case 167 :
 
474
        if ((entire_insn & 0xf8f00000) == 0xa0700000)
 
475
          { itype = M32RBF_INSN_BCLR; goto extract_sfmt_bset; }
 
476
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
409
477
      case 168 : itype = M32RBF_INSN_LDB_D; goto extract_sfmt_ldb_d;
410
478
      case 169 : itype = M32RBF_INSN_LDUB_D; goto extract_sfmt_ldb_d;
411
479
      case 170 : itype = M32RBF_INSN_LDH_D; goto extract_sfmt_ldh_d;
413
481
      case 172 : itype = M32RBF_INSN_LD_D; goto extract_sfmt_ld_d;
414
482
      case 176 : itype = M32RBF_INSN_BEQ; goto extract_sfmt_beq;
415
483
      case 177 : itype = M32RBF_INSN_BNE; goto extract_sfmt_beq;
416
 
      case 184 : itype = M32RBF_INSN_BEQZ; goto extract_sfmt_beqz;
417
 
      case 185 : itype = M32RBF_INSN_BNEZ; goto extract_sfmt_beqz;
418
 
      case 186 : itype = M32RBF_INSN_BLTZ; goto extract_sfmt_beqz;
419
 
      case 187 : itype = M32RBF_INSN_BGEZ; goto extract_sfmt_beqz;
420
 
      case 188 : itype = M32RBF_INSN_BLEZ; goto extract_sfmt_beqz;
421
 
      case 189 : itype = M32RBF_INSN_BGTZ; goto extract_sfmt_beqz;
422
 
      case 220 : itype = M32RBF_INSN_SETH; goto extract_sfmt_seth;
 
484
      case 184 :
 
485
        if ((entire_insn & 0xfff00000) == 0xb0800000)
 
486
          { itype = M32RBF_INSN_BEQZ; goto extract_sfmt_beqz; }
 
487
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
488
      case 185 :
 
489
        if ((entire_insn & 0xfff00000) == 0xb0900000)
 
490
          { itype = M32RBF_INSN_BNEZ; goto extract_sfmt_beqz; }
 
491
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
492
      case 186 :
 
493
        if ((entire_insn & 0xfff00000) == 0xb0a00000)
 
494
          { itype = M32RBF_INSN_BLTZ; goto extract_sfmt_beqz; }
 
495
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
496
      case 187 :
 
497
        if ((entire_insn & 0xfff00000) == 0xb0b00000)
 
498
          { itype = M32RBF_INSN_BGEZ; goto extract_sfmt_beqz; }
 
499
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
500
      case 188 :
 
501
        if ((entire_insn & 0xfff00000) == 0xb0c00000)
 
502
          { itype = M32RBF_INSN_BLEZ; goto extract_sfmt_beqz; }
 
503
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
504
      case 189 :
 
505
        if ((entire_insn & 0xfff00000) == 0xb0d00000)
 
506
          { itype = M32RBF_INSN_BGTZ; goto extract_sfmt_beqz; }
 
507
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
508
      case 220 :
 
509
        if ((entire_insn & 0xf0ff0000) == 0xd0c00000)
 
510
          { itype = M32RBF_INSN_SETH; goto extract_sfmt_seth; }
 
511
        itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
423
512
      case 224 : /* fall through */
424
513
      case 225 : /* fall through */
425
514
      case 226 : /* fall through */
456
545
          unsigned int val = (((insn >> 8) & (3 << 0)));
457
546
          switch (val)
458
547
          {
459
 
          case 0 : itype = M32RBF_INSN_BC24; goto extract_sfmt_bc24;
460
 
          case 1 : itype = M32RBF_INSN_BNC24; goto extract_sfmt_bc24;
461
 
          case 2 : itype = M32RBF_INSN_BL24; goto extract_sfmt_bl24;
462
 
          case 3 : itype = M32RBF_INSN_BRA24; goto extract_sfmt_bra24;
 
548
          case 0 :
 
549
            if ((entire_insn & 0xff000000) == 0xfc000000)
 
550
              { itype = M32RBF_INSN_BC24; goto extract_sfmt_bc24; }
 
551
            itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
552
          case 1 :
 
553
            if ((entire_insn & 0xff000000) == 0xfd000000)
 
554
              { itype = M32RBF_INSN_BNC24; goto extract_sfmt_bc24; }
 
555
            itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
556
          case 2 :
 
557
            if ((entire_insn & 0xff000000) == 0xfe000000)
 
558
              { itype = M32RBF_INSN_BL24; goto extract_sfmt_bl24; }
 
559
            itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
 
560
          case 3 :
 
561
            if ((entire_insn & 0xff000000) == 0xff000000)
 
562
              { itype = M32RBF_INSN_BRA24; goto extract_sfmt_bra24; }
 
563
            itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
463
564
          default : itype = M32RBF_INSN_X_INVALID; goto extract_sfmt_empty;
464
565
          }
465
566
        }
473
574
 extract_sfmt_empty:
474
575
  {
475
576
    const IDESC *idesc = &m32rbf_insn_data[itype];
476
 
#define FLD(f) abuf->fields.fmt_empty.f
 
577
#define FLD(f) abuf->fields.sfmt_empty.f
477
578
 
478
579
 
479
580
  /* Record the fields for the semantic handler.  */
486
587
 extract_sfmt_add:
487
588
  {
488
589
    const IDESC *idesc = &m32rbf_insn_data[itype];
489
 
    CGEN_INSN_INT insn = entire_insn;
 
590
    CGEN_INSN_WORD insn = entire_insn;
490
591
#define FLD(f) abuf->fields.sfmt_add.f
491
592
    UINT f_r1;
492
593
    UINT f_r2;
517
618
 extract_sfmt_add3:
518
619
  {
519
620
    const IDESC *idesc = &m32rbf_insn_data[itype];
520
 
    CGEN_INSN_INT insn = entire_insn;
 
621
    CGEN_INSN_WORD insn = entire_insn;
521
622
#define FLD(f) abuf->fields.sfmt_add3.f
522
623
    UINT f_r1;
523
624
    UINT f_r2;
525
626
 
526
627
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
527
628
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
528
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
629
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
529
630
 
530
631
  /* Record the fields for the semantic handler.  */
531
632
  FLD (f_simm16) = f_simm16;
550
651
 extract_sfmt_and3:
551
652
  {
552
653
    const IDESC *idesc = &m32rbf_insn_data[itype];
553
 
    CGEN_INSN_INT insn = entire_insn;
 
654
    CGEN_INSN_WORD insn = entire_insn;
554
655
#define FLD(f) abuf->fields.sfmt_and3.f
555
656
    UINT f_r1;
556
657
    UINT f_r2;
583
684
 extract_sfmt_or3:
584
685
  {
585
686
    const IDESC *idesc = &m32rbf_insn_data[itype];
586
 
    CGEN_INSN_INT insn = entire_insn;
 
687
    CGEN_INSN_WORD insn = entire_insn;
587
688
#define FLD(f) abuf->fields.sfmt_and3.f
588
689
    UINT f_r1;
589
690
    UINT f_r2;
616
717
 extract_sfmt_addi:
617
718
  {
618
719
    const IDESC *idesc = &m32rbf_insn_data[itype];
619
 
    CGEN_INSN_INT insn = entire_insn;
 
720
    CGEN_INSN_WORD insn = entire_insn;
620
721
#define FLD(f) abuf->fields.sfmt_addi.f
621
722
    UINT f_r1;
622
723
    INT f_simm8;
623
724
 
624
725
    f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
625
 
    f_simm8 = EXTRACT_MSB0_INT (insn, 16, 8, 8);
 
726
    f_simm8 = EXTRACT_MSB0_SINT (insn, 16, 8, 8);
626
727
 
627
728
  /* Record the fields for the semantic handler.  */
628
729
  FLD (f_r1) = f_r1;
645
746
 extract_sfmt_addv:
646
747
  {
647
748
    const IDESC *idesc = &m32rbf_insn_data[itype];
648
 
    CGEN_INSN_INT insn = entire_insn;
 
749
    CGEN_INSN_WORD insn = entire_insn;
649
750
#define FLD(f) abuf->fields.sfmt_add.f
650
751
    UINT f_r1;
651
752
    UINT f_r2;
676
777
 extract_sfmt_addv3:
677
778
  {
678
779
    const IDESC *idesc = &m32rbf_insn_data[itype];
679
 
    CGEN_INSN_INT insn = entire_insn;
 
780
    CGEN_INSN_WORD insn = entire_insn;
680
781
#define FLD(f) abuf->fields.sfmt_add3.f
681
782
    UINT f_r1;
682
783
    UINT f_r2;
684
785
 
685
786
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
686
787
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
687
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
788
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
688
789
 
689
790
  /* Record the fields for the semantic handler.  */
690
791
  FLD (f_simm16) = f_simm16;
709
810
 extract_sfmt_addx:
710
811
  {
711
812
    const IDESC *idesc = &m32rbf_insn_data[itype];
712
 
    CGEN_INSN_INT insn = entire_insn;
 
813
    CGEN_INSN_WORD insn = entire_insn;
713
814
#define FLD(f) abuf->fields.sfmt_add.f
714
815
    UINT f_r1;
715
816
    UINT f_r2;
740
841
 extract_sfmt_bc8:
741
842
  {
742
843
    const IDESC *idesc = &m32rbf_insn_data[itype];
743
 
    CGEN_INSN_INT insn = entire_insn;
 
844
    CGEN_INSN_WORD insn = entire_insn;
744
845
#define FLD(f) abuf->fields.sfmt_bl8.f
745
846
    SI f_disp8;
746
847
 
747
 
    f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
 
848
    f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
748
849
 
749
850
  /* Record the fields for the semantic handler.  */
750
851
  FLD (i_disp8) = f_disp8;
763
864
 extract_sfmt_bc24:
764
865
  {
765
866
    const IDESC *idesc = &m32rbf_insn_data[itype];
766
 
    CGEN_INSN_INT insn = entire_insn;
 
867
    CGEN_INSN_WORD insn = entire_insn;
767
868
#define FLD(f) abuf->fields.sfmt_bl24.f
768
869
    SI f_disp24;
769
870
 
770
 
    f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
 
871
    f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
771
872
 
772
873
  /* Record the fields for the semantic handler.  */
773
874
  FLD (i_disp24) = f_disp24;
786
887
 extract_sfmt_beq:
787
888
  {
788
889
    const IDESC *idesc = &m32rbf_insn_data[itype];
789
 
    CGEN_INSN_INT insn = entire_insn;
 
890
    CGEN_INSN_WORD insn = entire_insn;
790
891
#define FLD(f) abuf->fields.sfmt_beq.f
791
892
    UINT f_r1;
792
893
    UINT f_r2;
794
895
 
795
896
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
796
897
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
797
 
    f_disp16 = ((((EXTRACT_MSB0_INT (insn, 32, 16, 16)) << (2))) + (pc));
 
898
    f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 16, 16)) << (2))) + (pc));
798
899
 
799
900
  /* Record the fields for the semantic handler.  */
800
901
  FLD (f_r1) = f_r1;
819
920
 extract_sfmt_beqz:
820
921
  {
821
922
    const IDESC *idesc = &m32rbf_insn_data[itype];
822
 
    CGEN_INSN_INT insn = entire_insn;
 
923
    CGEN_INSN_WORD insn = entire_insn;
823
924
#define FLD(f) abuf->fields.sfmt_beq.f
824
925
    UINT f_r2;
825
926
    SI f_disp16;
826
927
 
827
928
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
828
 
    f_disp16 = ((((EXTRACT_MSB0_INT (insn, 32, 16, 16)) << (2))) + (pc));
 
929
    f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 16, 16)) << (2))) + (pc));
829
930
 
830
931
  /* Record the fields for the semantic handler.  */
831
932
  FLD (f_r2) = f_r2;
847
948
 extract_sfmt_bl8:
848
949
  {
849
950
    const IDESC *idesc = &m32rbf_insn_data[itype];
850
 
    CGEN_INSN_INT insn = entire_insn;
 
951
    CGEN_INSN_WORD insn = entire_insn;
851
952
#define FLD(f) abuf->fields.sfmt_bl8.f
852
953
    SI f_disp8;
853
954
 
854
 
    f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
 
955
    f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
855
956
 
856
957
  /* Record the fields for the semantic handler.  */
857
958
  FLD (i_disp8) = f_disp8;
871
972
 extract_sfmt_bl24:
872
973
  {
873
974
    const IDESC *idesc = &m32rbf_insn_data[itype];
874
 
    CGEN_INSN_INT insn = entire_insn;
 
975
    CGEN_INSN_WORD insn = entire_insn;
875
976
#define FLD(f) abuf->fields.sfmt_bl24.f
876
977
    SI f_disp24;
877
978
 
878
 
    f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
 
979
    f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
879
980
 
880
981
  /* Record the fields for the semantic handler.  */
881
982
  FLD (i_disp24) = f_disp24;
895
996
 extract_sfmt_bra8:
896
997
  {
897
998
    const IDESC *idesc = &m32rbf_insn_data[itype];
898
 
    CGEN_INSN_INT insn = entire_insn;
 
999
    CGEN_INSN_WORD insn = entire_insn;
899
1000
#define FLD(f) abuf->fields.sfmt_bl8.f
900
1001
    SI f_disp8;
901
1002
 
902
 
    f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
 
1003
    f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
903
1004
 
904
1005
  /* Record the fields for the semantic handler.  */
905
1006
  FLD (i_disp8) = f_disp8;
918
1019
 extract_sfmt_bra24:
919
1020
  {
920
1021
    const IDESC *idesc = &m32rbf_insn_data[itype];
921
 
    CGEN_INSN_INT insn = entire_insn;
 
1022
    CGEN_INSN_WORD insn = entire_insn;
922
1023
#define FLD(f) abuf->fields.sfmt_bl24.f
923
1024
    SI f_disp24;
924
1025
 
925
 
    f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
 
1026
    f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
926
1027
 
927
1028
  /* Record the fields for the semantic handler.  */
928
1029
  FLD (i_disp24) = f_disp24;
941
1042
 extract_sfmt_cmp:
942
1043
  {
943
1044
    const IDESC *idesc = &m32rbf_insn_data[itype];
944
 
    CGEN_INSN_INT insn = entire_insn;
 
1045
    CGEN_INSN_WORD insn = entire_insn;
945
1046
#define FLD(f) abuf->fields.sfmt_st_plus.f
946
1047
    UINT f_r1;
947
1048
    UINT f_r2;
971
1072
 extract_sfmt_cmpi:
972
1073
  {
973
1074
    const IDESC *idesc = &m32rbf_insn_data[itype];
974
 
    CGEN_INSN_INT insn = entire_insn;
 
1075
    CGEN_INSN_WORD insn = entire_insn;
975
1076
#define FLD(f) abuf->fields.sfmt_st_d.f
976
1077
    UINT f_r2;
977
1078
    INT f_simm16;
978
1079
 
979
1080
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
980
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1081
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
981
1082
 
982
1083
  /* Record the fields for the semantic handler.  */
983
1084
  FLD (f_simm16) = f_simm16;
999
1100
 extract_sfmt_div:
1000
1101
  {
1001
1102
    const IDESC *idesc = &m32rbf_insn_data[itype];
1002
 
    CGEN_INSN_INT insn = entire_insn;
 
1103
    CGEN_INSN_WORD insn = entire_insn;
1003
1104
#define FLD(f) abuf->fields.sfmt_add.f
1004
1105
    UINT f_r1;
1005
1106
    UINT f_r2;
1030
1131
 extract_sfmt_jl:
1031
1132
  {
1032
1133
    const IDESC *idesc = &m32rbf_insn_data[itype];
1033
 
    CGEN_INSN_INT insn = entire_insn;
 
1134
    CGEN_INSN_WORD insn = entire_insn;
1034
1135
#define FLD(f) abuf->fields.sfmt_jl.f
1035
1136
    UINT f_r2;
1036
1137
 
1056
1157
 extract_sfmt_jmp:
1057
1158
  {
1058
1159
    const IDESC *idesc = &m32rbf_insn_data[itype];
1059
 
    CGEN_INSN_INT insn = entire_insn;
 
1160
    CGEN_INSN_WORD insn = entire_insn;
1060
1161
#define FLD(f) abuf->fields.sfmt_jl.f
1061
1162
    UINT f_r2;
1062
1163
 
1081
1182
 extract_sfmt_ld:
1082
1183
  {
1083
1184
    const IDESC *idesc = &m32rbf_insn_data[itype];
1084
 
    CGEN_INSN_INT insn = entire_insn;
 
1185
    CGEN_INSN_WORD insn = entire_insn;
1085
1186
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1086
1187
    UINT f_r1;
1087
1188
    UINT f_r2;
1111
1212
 extract_sfmt_ld_d:
1112
1213
  {
1113
1214
    const IDESC *idesc = &m32rbf_insn_data[itype];
1114
 
    CGEN_INSN_INT insn = entire_insn;
 
1215
    CGEN_INSN_WORD insn = entire_insn;
1115
1216
#define FLD(f) abuf->fields.sfmt_add3.f
1116
1217
    UINT f_r1;
1117
1218
    UINT f_r2;
1119
1220
 
1120
1221
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1121
1222
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1122
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1223
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1123
1224
 
1124
1225
  /* Record the fields for the semantic handler.  */
1125
1226
  FLD (f_simm16) = f_simm16;
1144
1245
 extract_sfmt_ldb:
1145
1246
  {
1146
1247
    const IDESC *idesc = &m32rbf_insn_data[itype];
1147
 
    CGEN_INSN_INT insn = entire_insn;
 
1248
    CGEN_INSN_WORD insn = entire_insn;
1148
1249
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1149
1250
    UINT f_r1;
1150
1251
    UINT f_r2;
1174
1275
 extract_sfmt_ldb_d:
1175
1276
  {
1176
1277
    const IDESC *idesc = &m32rbf_insn_data[itype];
1177
 
    CGEN_INSN_INT insn = entire_insn;
 
1278
    CGEN_INSN_WORD insn = entire_insn;
1178
1279
#define FLD(f) abuf->fields.sfmt_add3.f
1179
1280
    UINT f_r1;
1180
1281
    UINT f_r2;
1182
1283
 
1183
1284
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1184
1285
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1185
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1286
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1186
1287
 
1187
1288
  /* Record the fields for the semantic handler.  */
1188
1289
  FLD (f_simm16) = f_simm16;
1207
1308
 extract_sfmt_ldh:
1208
1309
  {
1209
1310
    const IDESC *idesc = &m32rbf_insn_data[itype];
1210
 
    CGEN_INSN_INT insn = entire_insn;
 
1311
    CGEN_INSN_WORD insn = entire_insn;
1211
1312
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1212
1313
    UINT f_r1;
1213
1314
    UINT f_r2;
1237
1338
 extract_sfmt_ldh_d:
1238
1339
  {
1239
1340
    const IDESC *idesc = &m32rbf_insn_data[itype];
1240
 
    CGEN_INSN_INT insn = entire_insn;
 
1341
    CGEN_INSN_WORD insn = entire_insn;
1241
1342
#define FLD(f) abuf->fields.sfmt_add3.f
1242
1343
    UINT f_r1;
1243
1344
    UINT f_r2;
1245
1346
 
1246
1347
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1247
1348
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1248
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1349
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1249
1350
 
1250
1351
  /* Record the fields for the semantic handler.  */
1251
1352
  FLD (f_simm16) = f_simm16;
1270
1371
 extract_sfmt_ld_plus:
1271
1372
  {
1272
1373
    const IDESC *idesc = &m32rbf_insn_data[itype];
1273
 
    CGEN_INSN_INT insn = entire_insn;
 
1374
    CGEN_INSN_WORD insn = entire_insn;
1274
1375
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1275
1376
    UINT f_r1;
1276
1377
    UINT f_r2;
1301
1402
 extract_sfmt_ld24:
1302
1403
  {
1303
1404
    const IDESC *idesc = &m32rbf_insn_data[itype];
1304
 
    CGEN_INSN_INT insn = entire_insn;
 
1405
    CGEN_INSN_WORD insn = entire_insn;
1305
1406
#define FLD(f) abuf->fields.sfmt_ld24.f
1306
1407
    UINT f_r1;
1307
1408
    UINT f_uimm24;
1329
1430
 extract_sfmt_ldi8:
1330
1431
  {
1331
1432
    const IDESC *idesc = &m32rbf_insn_data[itype];
1332
 
    CGEN_INSN_INT insn = entire_insn;
 
1433
    CGEN_INSN_WORD insn = entire_insn;
1333
1434
#define FLD(f) abuf->fields.sfmt_addi.f
1334
1435
    UINT f_r1;
1335
1436
    INT f_simm8;
1336
1437
 
1337
1438
    f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1338
 
    f_simm8 = EXTRACT_MSB0_INT (insn, 16, 8, 8);
 
1439
    f_simm8 = EXTRACT_MSB0_SINT (insn, 16, 8, 8);
1339
1440
 
1340
1441
  /* Record the fields for the semantic handler.  */
1341
1442
  FLD (f_simm8) = f_simm8;
1357
1458
 extract_sfmt_ldi16:
1358
1459
  {
1359
1460
    const IDESC *idesc = &m32rbf_insn_data[itype];
1360
 
    CGEN_INSN_INT insn = entire_insn;
 
1461
    CGEN_INSN_WORD insn = entire_insn;
1361
1462
#define FLD(f) abuf->fields.sfmt_add3.f
1362
1463
    UINT f_r1;
1363
1464
    INT f_simm16;
1364
1465
 
1365
1466
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1366
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1467
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1367
1468
 
1368
1469
  /* Record the fields for the semantic handler.  */
1369
1470
  FLD (f_simm16) = f_simm16;
1385
1486
 extract_sfmt_lock:
1386
1487
  {
1387
1488
    const IDESC *idesc = &m32rbf_insn_data[itype];
1388
 
    CGEN_INSN_INT insn = entire_insn;
 
1489
    CGEN_INSN_WORD insn = entire_insn;
1389
1490
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1390
1491
    UINT f_r1;
1391
1492
    UINT f_r2;
1415
1516
 extract_sfmt_machi:
1416
1517
  {
1417
1518
    const IDESC *idesc = &m32rbf_insn_data[itype];
1418
 
    CGEN_INSN_INT insn = entire_insn;
 
1519
    CGEN_INSN_WORD insn = entire_insn;
1419
1520
#define FLD(f) abuf->fields.sfmt_st_plus.f
1420
1521
    UINT f_r1;
1421
1522
    UINT f_r2;
1445
1546
 extract_sfmt_mulhi:
1446
1547
  {
1447
1548
    const IDESC *idesc = &m32rbf_insn_data[itype];
1448
 
    CGEN_INSN_INT insn = entire_insn;
 
1549
    CGEN_INSN_WORD insn = entire_insn;
1449
1550
#define FLD(f) abuf->fields.sfmt_st_plus.f
1450
1551
    UINT f_r1;
1451
1552
    UINT f_r2;
1475
1576
 extract_sfmt_mv:
1476
1577
  {
1477
1578
    const IDESC *idesc = &m32rbf_insn_data[itype];
1478
 
    CGEN_INSN_INT insn = entire_insn;
 
1579
    CGEN_INSN_WORD insn = entire_insn;
1479
1580
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1480
1581
    UINT f_r1;
1481
1582
    UINT f_r2;
1505
1606
 extract_sfmt_mvfachi:
1506
1607
  {
1507
1608
    const IDESC *idesc = &m32rbf_insn_data[itype];
1508
 
    CGEN_INSN_INT insn = entire_insn;
 
1609
    CGEN_INSN_WORD insn = entire_insn;
1509
1610
#define FLD(f) abuf->fields.sfmt_seth.f
1510
1611
    UINT f_r1;
1511
1612
 
1530
1631
 extract_sfmt_mvfc:
1531
1632
  {
1532
1633
    const IDESC *idesc = &m32rbf_insn_data[itype];
1533
 
    CGEN_INSN_INT insn = entire_insn;
 
1634
    CGEN_INSN_WORD insn = entire_insn;
1534
1635
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1535
1636
    UINT f_r1;
1536
1637
    UINT f_r2;
1558
1659
 extract_sfmt_mvtachi:
1559
1660
  {
1560
1661
    const IDESC *idesc = &m32rbf_insn_data[itype];
1561
 
    CGEN_INSN_INT insn = entire_insn;
 
1662
    CGEN_INSN_WORD insn = entire_insn;
1562
1663
#define FLD(f) abuf->fields.sfmt_st_plus.f
1563
1664
    UINT f_r1;
1564
1665
 
1583
1684
 extract_sfmt_mvtc:
1584
1685
  {
1585
1686
    const IDESC *idesc = &m32rbf_insn_data[itype];
1586
 
    CGEN_INSN_INT insn = entire_insn;
 
1687
    CGEN_INSN_WORD insn = entire_insn;
1587
1688
#define FLD(f) abuf->fields.sfmt_ld_plus.f
1588
1689
    UINT f_r1;
1589
1690
    UINT f_r2;
1611
1712
 extract_sfmt_nop:
1612
1713
  {
1613
1714
    const IDESC *idesc = &m32rbf_insn_data[itype];
1614
 
#define FLD(f) abuf->fields.fmt_empty.f
 
1715
#define FLD(f) abuf->fields.sfmt_empty.f
1615
1716
 
1616
1717
 
1617
1718
  /* Record the fields for the semantic handler.  */
1624
1725
 extract_sfmt_rac:
1625
1726
  {
1626
1727
    const IDESC *idesc = &m32rbf_insn_data[itype];
1627
 
#define FLD(f) abuf->fields.fmt_empty.f
 
1728
#define FLD(f) abuf->fields.sfmt_empty.f
1628
1729
 
1629
1730
 
1630
1731
  /* Record the fields for the semantic handler.  */
1637
1738
 extract_sfmt_rte:
1638
1739
  {
1639
1740
    const IDESC *idesc = &m32rbf_insn_data[itype];
1640
 
#define FLD(f) abuf->fields.fmt_empty.f
 
1741
#define FLD(f) abuf->fields.sfmt_empty.f
1641
1742
 
1642
1743
 
1643
1744
  /* Record the fields for the semantic handler.  */
1656
1757
 extract_sfmt_seth:
1657
1758
  {
1658
1759
    const IDESC *idesc = &m32rbf_insn_data[itype];
1659
 
    CGEN_INSN_INT insn = entire_insn;
 
1760
    CGEN_INSN_WORD insn = entire_insn;
1660
1761
#define FLD(f) abuf->fields.sfmt_seth.f
1661
1762
    UINT f_r1;
1662
1763
    UINT f_hi16;
1684
1785
 extract_sfmt_sll3:
1685
1786
  {
1686
1787
    const IDESC *idesc = &m32rbf_insn_data[itype];
1687
 
    CGEN_INSN_INT insn = entire_insn;
 
1788
    CGEN_INSN_WORD insn = entire_insn;
1688
1789
#define FLD(f) abuf->fields.sfmt_add3.f
1689
1790
    UINT f_r1;
1690
1791
    UINT f_r2;
1692
1793
 
1693
1794
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1694
1795
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1695
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1796
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1696
1797
 
1697
1798
  /* Record the fields for the semantic handler.  */
1698
1799
  FLD (f_simm16) = f_simm16;
1717
1818
 extract_sfmt_slli:
1718
1819
  {
1719
1820
    const IDESC *idesc = &m32rbf_insn_data[itype];
1720
 
    CGEN_INSN_INT insn = entire_insn;
 
1821
    CGEN_INSN_WORD insn = entire_insn;
1721
1822
#define FLD(f) abuf->fields.sfmt_slli.f
1722
1823
    UINT f_r1;
1723
1824
    UINT f_uimm5;
1746
1847
 extract_sfmt_st:
1747
1848
  {
1748
1849
    const IDESC *idesc = &m32rbf_insn_data[itype];
1749
 
    CGEN_INSN_INT insn = entire_insn;
 
1850
    CGEN_INSN_WORD insn = entire_insn;
1750
1851
#define FLD(f) abuf->fields.sfmt_st_plus.f
1751
1852
    UINT f_r1;
1752
1853
    UINT f_r2;
1776
1877
 extract_sfmt_st_d:
1777
1878
  {
1778
1879
    const IDESC *idesc = &m32rbf_insn_data[itype];
1779
 
    CGEN_INSN_INT insn = entire_insn;
 
1880
    CGEN_INSN_WORD insn = entire_insn;
1780
1881
#define FLD(f) abuf->fields.sfmt_st_d.f
1781
1882
    UINT f_r1;
1782
1883
    UINT f_r2;
1784
1885
 
1785
1886
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1786
1887
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1787
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1888
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1788
1889
 
1789
1890
  /* Record the fields for the semantic handler.  */
1790
1891
  FLD (f_simm16) = f_simm16;
1809
1910
 extract_sfmt_stb:
1810
1911
  {
1811
1912
    const IDESC *idesc = &m32rbf_insn_data[itype];
1812
 
    CGEN_INSN_INT insn = entire_insn;
 
1913
    CGEN_INSN_WORD insn = entire_insn;
1813
1914
#define FLD(f) abuf->fields.sfmt_st_plus.f
1814
1915
    UINT f_r1;
1815
1916
    UINT f_r2;
1839
1940
 extract_sfmt_stb_d:
1840
1941
  {
1841
1942
    const IDESC *idesc = &m32rbf_insn_data[itype];
1842
 
    CGEN_INSN_INT insn = entire_insn;
 
1943
    CGEN_INSN_WORD insn = entire_insn;
1843
1944
#define FLD(f) abuf->fields.sfmt_st_d.f
1844
1945
    UINT f_r1;
1845
1946
    UINT f_r2;
1847
1948
 
1848
1949
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1849
1950
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1850
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
1951
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1851
1952
 
1852
1953
  /* Record the fields for the semantic handler.  */
1853
1954
  FLD (f_simm16) = f_simm16;
1872
1973
 extract_sfmt_sth:
1873
1974
  {
1874
1975
    const IDESC *idesc = &m32rbf_insn_data[itype];
1875
 
    CGEN_INSN_INT insn = entire_insn;
 
1976
    CGEN_INSN_WORD insn = entire_insn;
1876
1977
#define FLD(f) abuf->fields.sfmt_st_plus.f
1877
1978
    UINT f_r1;
1878
1979
    UINT f_r2;
1902
2003
 extract_sfmt_sth_d:
1903
2004
  {
1904
2005
    const IDESC *idesc = &m32rbf_insn_data[itype];
1905
 
    CGEN_INSN_INT insn = entire_insn;
 
2006
    CGEN_INSN_WORD insn = entire_insn;
1906
2007
#define FLD(f) abuf->fields.sfmt_st_d.f
1907
2008
    UINT f_r1;
1908
2009
    UINT f_r2;
1910
2011
 
1911
2012
    f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1912
2013
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1913
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
2014
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1914
2015
 
1915
2016
  /* Record the fields for the semantic handler.  */
1916
2017
  FLD (f_simm16) = f_simm16;
1935
2036
 extract_sfmt_st_plus:
1936
2037
  {
1937
2038
    const IDESC *idesc = &m32rbf_insn_data[itype];
1938
 
    CGEN_INSN_INT insn = entire_insn;
 
2039
    CGEN_INSN_WORD insn = entire_insn;
1939
2040
#define FLD(f) abuf->fields.sfmt_st_plus.f
1940
2041
    UINT f_r1;
1941
2042
    UINT f_r2;
1966
2067
 extract_sfmt_trap:
1967
2068
  {
1968
2069
    const IDESC *idesc = &m32rbf_insn_data[itype];
1969
 
    CGEN_INSN_INT insn = entire_insn;
 
2070
    CGEN_INSN_WORD insn = entire_insn;
1970
2071
#define FLD(f) abuf->fields.sfmt_trap.f
1971
2072
    UINT f_uimm4;
1972
2073
 
1989
2090
 extract_sfmt_unlock:
1990
2091
  {
1991
2092
    const IDESC *idesc = &m32rbf_insn_data[itype];
1992
 
    CGEN_INSN_INT insn = entire_insn;
 
2093
    CGEN_INSN_WORD insn = entire_insn;
1993
2094
#define FLD(f) abuf->fields.sfmt_st_plus.f
1994
2095
    UINT f_r1;
1995
2096
    UINT f_r2;
2019
2120
 extract_sfmt_clrpsw:
2020
2121
  {
2021
2122
    const IDESC *idesc = &m32rbf_insn_data[itype];
2022
 
    CGEN_INSN_INT insn = entire_insn;
 
2123
    CGEN_INSN_WORD insn = entire_insn;
2023
2124
#define FLD(f) abuf->fields.sfmt_clrpsw.f
2024
2125
    UINT f_uimm8;
2025
2126
 
2036
2137
 extract_sfmt_setpsw:
2037
2138
  {
2038
2139
    const IDESC *idesc = &m32rbf_insn_data[itype];
2039
 
    CGEN_INSN_INT insn = entire_insn;
 
2140
    CGEN_INSN_WORD insn = entire_insn;
2040
2141
#define FLD(f) abuf->fields.sfmt_clrpsw.f
2041
2142
    UINT f_uimm8;
2042
2143
 
2053
2154
 extract_sfmt_bset:
2054
2155
  {
2055
2156
    const IDESC *idesc = &m32rbf_insn_data[itype];
2056
 
    CGEN_INSN_INT insn = entire_insn;
 
2157
    CGEN_INSN_WORD insn = entire_insn;
2057
2158
#define FLD(f) abuf->fields.sfmt_bset.f
2058
2159
    UINT f_uimm3;
2059
2160
    UINT f_r2;
2061
2162
 
2062
2163
    f_uimm3 = EXTRACT_MSB0_UINT (insn, 32, 5, 3);
2063
2164
    f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2064
 
    f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
 
2165
    f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
2065
2166
 
2066
2167
  /* Record the fields for the semantic handler.  */
2067
2168
  FLD (f_simm16) = f_simm16;
2084
2185
 extract_sfmt_btst:
2085
2186
  {
2086
2187
    const IDESC *idesc = &m32rbf_insn_data[itype];
2087
 
    CGEN_INSN_INT insn = entire_insn;
 
2188
    CGEN_INSN_WORD insn = entire_insn;
2088
2189
#define FLD(f) abuf->fields.sfmt_bset.f
2089
2190
    UINT f_uimm3;
2090
2191
    UINT f_r2;