3
3
THIS FILE IS MACHINE GENERATED WITH CGEN.
5
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
5
Copyright 1996-2010 Free Software Foundation, Inc.
7
7
This file is part of the GNU simulators.
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.
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.
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)
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.
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.
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,
221
223
/* Result of decoder. */
222
224
M32RBF_INSN_TYPE itype;
225
CGEN_INSN_INT insn = base_insn;
227
CGEN_INSN_WORD insn = base_insn;
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;
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)));
257
case 0 : itype = M32RBF_INSN_JL; goto extract_sfmt_jl;
258
case 1 : itype = M32RBF_INSN_JMP; goto extract_sfmt_jmp;
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;
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;
262
case 29 : itype = M32RBF_INSN_RTE; goto extract_sfmt_rte;
263
case 31 : itype = M32RBF_INSN_TRAP; goto extract_sfmt_trap;
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;
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)));
312
case 0 : itype = M32RBF_INSN_MVTACHI; goto extract_sfmt_mvtachi;
313
case 1 : itype = M32RBF_INSN_MVTACLO; goto extract_sfmt_mvtachi;
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;
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;
317
case 88 : itype = M32RBF_INSN_RACH; goto extract_sfmt_rac;
318
case 89 : itype = M32RBF_INSN_RAC; goto extract_sfmt_rac;
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;
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;
321
350
unsigned int val = (((insn >> 0) & (3 << 0)));
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;
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;
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;
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;
348
386
unsigned int val = (((insn >> 8) & (15 << 0)));
351
case 0 : itype = M32RBF_INSN_NOP; goto extract_sfmt_nop;
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;
389
case 132 : itype = M32RBF_INSN_CMPI; goto extract_sfmt_cmpi;
390
case 133 : itype = M32RBF_INSN_CMPUI; goto extract_sfmt_cmpi;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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)));
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;
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;
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;
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;
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;
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);
530
631
/* Record the fields for the semantic handler. */
531
632
FLD (f_simm16) = f_simm16;
616
717
extract_sfmt_addi:
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
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);
627
728
/* Record the fields for the semantic handler. */
628
729
FLD (f_r1) = f_r1;
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);
689
790
/* Record the fields for the semantic handler. */
690
791
FLD (f_simm16) = f_simm16;
740
841
extract_sfmt_bc8:
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
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))));
749
850
/* Record the fields for the semantic handler. */
750
851
FLD (i_disp8) = f_disp8;
763
864
extract_sfmt_bc24:
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
770
f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
871
f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
772
873
/* Record the fields for the semantic handler. */
773
874
FLD (i_disp24) = f_disp24;
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));
799
900
/* Record the fields for the semantic handler. */
800
901
FLD (f_r1) = f_r1;
819
920
extract_sfmt_beqz:
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
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));
830
931
/* Record the fields for the semantic handler. */
831
932
FLD (f_r2) = f_r2;
847
948
extract_sfmt_bl8:
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
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))));
856
957
/* Record the fields for the semantic handler. */
857
958
FLD (i_disp8) = f_disp8;
871
972
extract_sfmt_bl24:
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
878
f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
979
f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
880
981
/* Record the fields for the semantic handler. */
881
982
FLD (i_disp24) = f_disp24;
895
996
extract_sfmt_bra8:
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
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))));
904
1005
/* Record the fields for the semantic handler. */
905
1006
FLD (i_disp8) = f_disp8;
918
1019
extract_sfmt_bra24:
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
925
f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
1026
f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
927
1028
/* Record the fields for the semantic handler. */
928
1029
FLD (i_disp24) = f_disp24;
971
1072
extract_sfmt_cmpi:
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
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);
982
1083
/* Record the fields for the semantic handler. */
983
1084
FLD (f_simm16) = f_simm16;
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);
1124
1225
/* Record the fields for the semantic handler. */
1125
1226
FLD (f_simm16) = f_simm16;
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);
1187
1288
/* Record the fields for the semantic handler. */
1188
1289
FLD (f_simm16) = f_simm16;
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);
1250
1351
/* Record the fields for the semantic handler. */
1251
1352
FLD (f_simm16) = f_simm16;
1329
1430
extract_sfmt_ldi8:
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
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);
1340
1441
/* Record the fields for the semantic handler. */
1341
1442
FLD (f_simm8) = f_simm8;
1357
1458
extract_sfmt_ldi16:
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
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);
1368
1469
/* Record the fields for the semantic handler. */
1369
1470
FLD (f_simm16) = f_simm16;
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);
1697
1798
/* Record the fields for the semantic handler. */
1698
1799
FLD (f_simm16) = f_simm16;
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);
1789
1890
/* Record the fields for the semantic handler. */
1790
1891
FLD (f_simm16) = f_simm16;
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);
1852
1953
/* Record the fields for the semantic handler. */
1853
1954
FLD (f_simm16) = f_simm16;
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);
1915
2016
/* Record the fields for the semantic handler. */
1916
2017
FLD (f_simm16) = f_simm16;
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);
2066
2167
/* Record the fields for the semantic handler. */
2067
2168
FLD (f_simm16) = f_simm16;