xref: /netbsd-src/external/gpl3/gdb/dist/sim/m32r/decode2.c (revision 05fa08567a80471fd0eb3843a238392874f2577c)
14e98e3e1Schristos /* Simulator instruction decoder for m32r2f.
24e98e3e1Schristos 
34e98e3e1Schristos THIS FILE IS MACHINE GENERATED WITH CGEN.
44e98e3e1Schristos 
5*05fa0856Schristos Copyright (C) 1996-2024 Free Software Foundation, Inc.
64e98e3e1Schristos 
74e98e3e1Schristos This file is part of the GNU simulators.
84e98e3e1Schristos 
94e98e3e1Schristos    This file is free software; you can redistribute it and/or modify
104e98e3e1Schristos    it under the terms of the GNU General Public License as published by
114e98e3e1Schristos    the Free Software Foundation; either version 3, or (at your option)
124e98e3e1Schristos    any later version.
134e98e3e1Schristos 
144e98e3e1Schristos    It is distributed in the hope that it will be useful, but WITHOUT
154e98e3e1Schristos    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
164e98e3e1Schristos    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
174e98e3e1Schristos    License for more details.
184e98e3e1Schristos 
194e98e3e1Schristos    You should have received a copy of the GNU General Public License along
20*05fa0856Schristos    with this program; if not, write to the Free Software Foundation, Inc.,
21*05fa0856Schristos    51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
224e98e3e1Schristos 
234e98e3e1Schristos */
244e98e3e1Schristos 
254e98e3e1Schristos #define WANT_CPU m32r2f
264e98e3e1Schristos #define WANT_CPU_M32R2F
274e98e3e1Schristos 
284e98e3e1Schristos #include "sim-main.h"
294e98e3e1Schristos #include "sim-assert.h"
30*05fa0856Schristos #include "cgen-mem.h"
31*05fa0856Schristos #include "cgen-ops.h"
324e98e3e1Schristos 
334e98e3e1Schristos /* Insn can't be executed in parallel.
344e98e3e1Schristos    Or is that "do NOt Pass to Air defense Radar"? :-) */
354e98e3e1Schristos #define NOPAR (-1)
364e98e3e1Schristos 
374e98e3e1Schristos /* The instruction descriptor array.
384e98e3e1Schristos    This is computed at runtime.  Space for it is not malloc'd to save a
394e98e3e1Schristos    teensy bit of cpu in the decoder.  Moving it to malloc space is trivial
404e98e3e1Schristos    but won't be done until necessary (we don't currently support the runtime
414e98e3e1Schristos    addition of instructions nor an SMP machine with different cpus).  */
424e98e3e1Schristos static IDESC m32r2f_insn_data[M32R2F_INSN__MAX];
434e98e3e1Schristos 
444e98e3e1Schristos /* Commas between elements are contained in the macros.
454e98e3e1Schristos    Some of these are conditionally compiled out.  */
464e98e3e1Schristos 
474e98e3e1Schristos static const struct insn_sem m32r2f_insn_sem[] =
484e98e3e1Schristos {
494e98e3e1Schristos   { VIRTUAL_INSN_X_INVALID, M32R2F_INSN_X_INVALID, M32R2F_SFMT_EMPTY, NOPAR, NOPAR  },
504e98e3e1Schristos   { VIRTUAL_INSN_X_AFTER, M32R2F_INSN_X_AFTER, M32R2F_SFMT_EMPTY, NOPAR, NOPAR  },
514e98e3e1Schristos   { VIRTUAL_INSN_X_BEFORE, M32R2F_INSN_X_BEFORE, M32R2F_SFMT_EMPTY, NOPAR, NOPAR  },
524e98e3e1Schristos   { VIRTUAL_INSN_X_CTI_CHAIN, M32R2F_INSN_X_CTI_CHAIN, M32R2F_SFMT_EMPTY, NOPAR, NOPAR  },
534e98e3e1Schristos   { VIRTUAL_INSN_X_CHAIN, M32R2F_INSN_X_CHAIN, M32R2F_SFMT_EMPTY, NOPAR, NOPAR  },
544e98e3e1Schristos   { VIRTUAL_INSN_X_BEGIN, M32R2F_INSN_X_BEGIN, M32R2F_SFMT_EMPTY, NOPAR, NOPAR  },
554e98e3e1Schristos   { M32R_INSN_ADD, M32R2F_INSN_ADD, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_ADD, M32R2F_INSN_WRITE_ADD },
564e98e3e1Schristos   { M32R_INSN_ADD3, M32R2F_INSN_ADD3, M32R2F_SFMT_ADD3, NOPAR, NOPAR  },
574e98e3e1Schristos   { M32R_INSN_AND, M32R2F_INSN_AND, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_AND, M32R2F_INSN_WRITE_AND },
584e98e3e1Schristos   { M32R_INSN_AND3, M32R2F_INSN_AND3, M32R2F_SFMT_AND3, NOPAR, NOPAR  },
594e98e3e1Schristos   { M32R_INSN_OR, M32R2F_INSN_OR, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_OR, M32R2F_INSN_WRITE_OR },
604e98e3e1Schristos   { M32R_INSN_OR3, M32R2F_INSN_OR3, M32R2F_SFMT_OR3, NOPAR, NOPAR  },
614e98e3e1Schristos   { M32R_INSN_XOR, M32R2F_INSN_XOR, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_XOR, M32R2F_INSN_WRITE_XOR },
624e98e3e1Schristos   { M32R_INSN_XOR3, M32R2F_INSN_XOR3, M32R2F_SFMT_AND3, NOPAR, NOPAR  },
634e98e3e1Schristos   { M32R_INSN_ADDI, M32R2F_INSN_ADDI, M32R2F_SFMT_ADDI, M32R2F_INSN_PAR_ADDI, M32R2F_INSN_WRITE_ADDI },
644e98e3e1Schristos   { M32R_INSN_ADDV, M32R2F_INSN_ADDV, M32R2F_SFMT_ADDV, M32R2F_INSN_PAR_ADDV, M32R2F_INSN_WRITE_ADDV },
654e98e3e1Schristos   { M32R_INSN_ADDV3, M32R2F_INSN_ADDV3, M32R2F_SFMT_ADDV3, NOPAR, NOPAR  },
664e98e3e1Schristos   { M32R_INSN_ADDX, M32R2F_INSN_ADDX, M32R2F_SFMT_ADDX, M32R2F_INSN_PAR_ADDX, M32R2F_INSN_WRITE_ADDX },
674e98e3e1Schristos   { M32R_INSN_BC8, M32R2F_INSN_BC8, M32R2F_SFMT_BC8, M32R2F_INSN_PAR_BC8, M32R2F_INSN_WRITE_BC8 },
684e98e3e1Schristos   { M32R_INSN_BC24, M32R2F_INSN_BC24, M32R2F_SFMT_BC24, NOPAR, NOPAR  },
694e98e3e1Schristos   { M32R_INSN_BEQ, M32R2F_INSN_BEQ, M32R2F_SFMT_BEQ, NOPAR, NOPAR  },
704e98e3e1Schristos   { M32R_INSN_BEQZ, M32R2F_INSN_BEQZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR  },
714e98e3e1Schristos   { M32R_INSN_BGEZ, M32R2F_INSN_BGEZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR  },
724e98e3e1Schristos   { M32R_INSN_BGTZ, M32R2F_INSN_BGTZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR  },
734e98e3e1Schristos   { M32R_INSN_BLEZ, M32R2F_INSN_BLEZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR  },
744e98e3e1Schristos   { M32R_INSN_BLTZ, M32R2F_INSN_BLTZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR  },
754e98e3e1Schristos   { M32R_INSN_BNEZ, M32R2F_INSN_BNEZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR  },
764e98e3e1Schristos   { M32R_INSN_BL8, M32R2F_INSN_BL8, M32R2F_SFMT_BL8, M32R2F_INSN_PAR_BL8, M32R2F_INSN_WRITE_BL8 },
774e98e3e1Schristos   { M32R_INSN_BL24, M32R2F_INSN_BL24, M32R2F_SFMT_BL24, NOPAR, NOPAR  },
784e98e3e1Schristos   { M32R_INSN_BCL8, M32R2F_INSN_BCL8, M32R2F_SFMT_BCL8, M32R2F_INSN_PAR_BCL8, M32R2F_INSN_WRITE_BCL8 },
794e98e3e1Schristos   { M32R_INSN_BCL24, M32R2F_INSN_BCL24, M32R2F_SFMT_BCL24, NOPAR, NOPAR  },
804e98e3e1Schristos   { M32R_INSN_BNC8, M32R2F_INSN_BNC8, M32R2F_SFMT_BC8, M32R2F_INSN_PAR_BNC8, M32R2F_INSN_WRITE_BNC8 },
814e98e3e1Schristos   { M32R_INSN_BNC24, M32R2F_INSN_BNC24, M32R2F_SFMT_BC24, NOPAR, NOPAR  },
824e98e3e1Schristos   { M32R_INSN_BNE, M32R2F_INSN_BNE, M32R2F_SFMT_BEQ, NOPAR, NOPAR  },
834e98e3e1Schristos   { M32R_INSN_BRA8, M32R2F_INSN_BRA8, M32R2F_SFMT_BRA8, M32R2F_INSN_PAR_BRA8, M32R2F_INSN_WRITE_BRA8 },
844e98e3e1Schristos   { M32R_INSN_BRA24, M32R2F_INSN_BRA24, M32R2F_SFMT_BRA24, NOPAR, NOPAR  },
854e98e3e1Schristos   { M32R_INSN_BNCL8, M32R2F_INSN_BNCL8, M32R2F_SFMT_BCL8, M32R2F_INSN_PAR_BNCL8, M32R2F_INSN_WRITE_BNCL8 },
864e98e3e1Schristos   { M32R_INSN_BNCL24, M32R2F_INSN_BNCL24, M32R2F_SFMT_BCL24, NOPAR, NOPAR  },
874e98e3e1Schristos   { M32R_INSN_CMP, M32R2F_INSN_CMP, M32R2F_SFMT_CMP, M32R2F_INSN_PAR_CMP, M32R2F_INSN_WRITE_CMP },
884e98e3e1Schristos   { M32R_INSN_CMPI, M32R2F_INSN_CMPI, M32R2F_SFMT_CMPI, NOPAR, NOPAR  },
894e98e3e1Schristos   { M32R_INSN_CMPU, M32R2F_INSN_CMPU, M32R2F_SFMT_CMP, M32R2F_INSN_PAR_CMPU, M32R2F_INSN_WRITE_CMPU },
904e98e3e1Schristos   { M32R_INSN_CMPUI, M32R2F_INSN_CMPUI, M32R2F_SFMT_CMPI, NOPAR, NOPAR  },
914e98e3e1Schristos   { M32R_INSN_CMPEQ, M32R2F_INSN_CMPEQ, M32R2F_SFMT_CMP, M32R2F_INSN_PAR_CMPEQ, M32R2F_INSN_WRITE_CMPEQ },
924e98e3e1Schristos   { M32R_INSN_CMPZ, M32R2F_INSN_CMPZ, M32R2F_SFMT_CMPZ, M32R2F_INSN_PAR_CMPZ, M32R2F_INSN_WRITE_CMPZ },
934e98e3e1Schristos   { M32R_INSN_DIV, M32R2F_INSN_DIV, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
944e98e3e1Schristos   { M32R_INSN_DIVU, M32R2F_INSN_DIVU, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
954e98e3e1Schristos   { M32R_INSN_REM, M32R2F_INSN_REM, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
964e98e3e1Schristos   { M32R_INSN_REMU, M32R2F_INSN_REMU, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
974e98e3e1Schristos   { M32R_INSN_REMH, M32R2F_INSN_REMH, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
984e98e3e1Schristos   { M32R_INSN_REMUH, M32R2F_INSN_REMUH, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
994e98e3e1Schristos   { M32R_INSN_REMB, M32R2F_INSN_REMB, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
1004e98e3e1Schristos   { M32R_INSN_REMUB, M32R2F_INSN_REMUB, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
1014e98e3e1Schristos   { M32R_INSN_DIVUH, M32R2F_INSN_DIVUH, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
1024e98e3e1Schristos   { M32R_INSN_DIVB, M32R2F_INSN_DIVB, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
1034e98e3e1Schristos   { M32R_INSN_DIVUB, M32R2F_INSN_DIVUB, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
1044e98e3e1Schristos   { M32R_INSN_DIVH, M32R2F_INSN_DIVH, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
1054e98e3e1Schristos   { M32R_INSN_JC, M32R2F_INSN_JC, M32R2F_SFMT_JC, M32R2F_INSN_PAR_JC, M32R2F_INSN_WRITE_JC },
1064e98e3e1Schristos   { M32R_INSN_JNC, M32R2F_INSN_JNC, M32R2F_SFMT_JC, M32R2F_INSN_PAR_JNC, M32R2F_INSN_WRITE_JNC },
1074e98e3e1Schristos   { M32R_INSN_JL, M32R2F_INSN_JL, M32R2F_SFMT_JL, M32R2F_INSN_PAR_JL, M32R2F_INSN_WRITE_JL },
1084e98e3e1Schristos   { M32R_INSN_JMP, M32R2F_INSN_JMP, M32R2F_SFMT_JMP, M32R2F_INSN_PAR_JMP, M32R2F_INSN_WRITE_JMP },
1094e98e3e1Schristos   { M32R_INSN_LD, M32R2F_INSN_LD, M32R2F_SFMT_LD, M32R2F_INSN_PAR_LD, M32R2F_INSN_WRITE_LD },
1104e98e3e1Schristos   { M32R_INSN_LD_D, M32R2F_INSN_LD_D, M32R2F_SFMT_LD_D, NOPAR, NOPAR  },
1114e98e3e1Schristos   { M32R_INSN_LDB, M32R2F_INSN_LDB, M32R2F_SFMT_LDB, M32R2F_INSN_PAR_LDB, M32R2F_INSN_WRITE_LDB },
1124e98e3e1Schristos   { M32R_INSN_LDB_D, M32R2F_INSN_LDB_D, M32R2F_SFMT_LDB_D, NOPAR, NOPAR  },
1134e98e3e1Schristos   { M32R_INSN_LDH, M32R2F_INSN_LDH, M32R2F_SFMT_LDH, M32R2F_INSN_PAR_LDH, M32R2F_INSN_WRITE_LDH },
1144e98e3e1Schristos   { M32R_INSN_LDH_D, M32R2F_INSN_LDH_D, M32R2F_SFMT_LDH_D, NOPAR, NOPAR  },
1154e98e3e1Schristos   { M32R_INSN_LDUB, M32R2F_INSN_LDUB, M32R2F_SFMT_LDB, M32R2F_INSN_PAR_LDUB, M32R2F_INSN_WRITE_LDUB },
1164e98e3e1Schristos   { M32R_INSN_LDUB_D, M32R2F_INSN_LDUB_D, M32R2F_SFMT_LDB_D, NOPAR, NOPAR  },
1174e98e3e1Schristos   { M32R_INSN_LDUH, M32R2F_INSN_LDUH, M32R2F_SFMT_LDH, M32R2F_INSN_PAR_LDUH, M32R2F_INSN_WRITE_LDUH },
1184e98e3e1Schristos   { M32R_INSN_LDUH_D, M32R2F_INSN_LDUH_D, M32R2F_SFMT_LDH_D, NOPAR, NOPAR  },
1194e98e3e1Schristos   { M32R_INSN_LD_PLUS, M32R2F_INSN_LD_PLUS, M32R2F_SFMT_LD_PLUS, M32R2F_INSN_PAR_LD_PLUS, M32R2F_INSN_WRITE_LD_PLUS },
1204e98e3e1Schristos   { M32R_INSN_LD24, M32R2F_INSN_LD24, M32R2F_SFMT_LD24, NOPAR, NOPAR  },
1214e98e3e1Schristos   { M32R_INSN_LDI8, M32R2F_INSN_LDI8, M32R2F_SFMT_LDI8, M32R2F_INSN_PAR_LDI8, M32R2F_INSN_WRITE_LDI8 },
1224e98e3e1Schristos   { M32R_INSN_LDI16, M32R2F_INSN_LDI16, M32R2F_SFMT_LDI16, NOPAR, NOPAR  },
1234e98e3e1Schristos   { M32R_INSN_LOCK, M32R2F_INSN_LOCK, M32R2F_SFMT_LOCK, M32R2F_INSN_PAR_LOCK, M32R2F_INSN_WRITE_LOCK },
1244e98e3e1Schristos   { M32R_INSN_MACHI_A, M32R2F_INSN_MACHI_A, M32R2F_SFMT_MACHI_A, M32R2F_INSN_PAR_MACHI_A, M32R2F_INSN_WRITE_MACHI_A },
1254e98e3e1Schristos   { M32R_INSN_MACLO_A, M32R2F_INSN_MACLO_A, M32R2F_SFMT_MACHI_A, M32R2F_INSN_PAR_MACLO_A, M32R2F_INSN_WRITE_MACLO_A },
1264e98e3e1Schristos   { M32R_INSN_MACWHI_A, M32R2F_INSN_MACWHI_A, M32R2F_SFMT_MACHI_A, M32R2F_INSN_PAR_MACWHI_A, M32R2F_INSN_WRITE_MACWHI_A },
1274e98e3e1Schristos   { M32R_INSN_MACWLO_A, M32R2F_INSN_MACWLO_A, M32R2F_SFMT_MACHI_A, M32R2F_INSN_PAR_MACWLO_A, M32R2F_INSN_WRITE_MACWLO_A },
1284e98e3e1Schristos   { M32R_INSN_MUL, M32R2F_INSN_MUL, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_MUL, M32R2F_INSN_WRITE_MUL },
1294e98e3e1Schristos   { M32R_INSN_MULHI_A, M32R2F_INSN_MULHI_A, M32R2F_SFMT_MULHI_A, M32R2F_INSN_PAR_MULHI_A, M32R2F_INSN_WRITE_MULHI_A },
1304e98e3e1Schristos   { M32R_INSN_MULLO_A, M32R2F_INSN_MULLO_A, M32R2F_SFMT_MULHI_A, M32R2F_INSN_PAR_MULLO_A, M32R2F_INSN_WRITE_MULLO_A },
1314e98e3e1Schristos   { M32R_INSN_MULWHI_A, M32R2F_INSN_MULWHI_A, M32R2F_SFMT_MULHI_A, M32R2F_INSN_PAR_MULWHI_A, M32R2F_INSN_WRITE_MULWHI_A },
1324e98e3e1Schristos   { M32R_INSN_MULWLO_A, M32R2F_INSN_MULWLO_A, M32R2F_SFMT_MULHI_A, M32R2F_INSN_PAR_MULWLO_A, M32R2F_INSN_WRITE_MULWLO_A },
1334e98e3e1Schristos   { M32R_INSN_MV, M32R2F_INSN_MV, M32R2F_SFMT_MV, M32R2F_INSN_PAR_MV, M32R2F_INSN_WRITE_MV },
1344e98e3e1Schristos   { M32R_INSN_MVFACHI_A, M32R2F_INSN_MVFACHI_A, M32R2F_SFMT_MVFACHI_A, M32R2F_INSN_PAR_MVFACHI_A, M32R2F_INSN_WRITE_MVFACHI_A },
1354e98e3e1Schristos   { M32R_INSN_MVFACLO_A, M32R2F_INSN_MVFACLO_A, M32R2F_SFMT_MVFACHI_A, M32R2F_INSN_PAR_MVFACLO_A, M32R2F_INSN_WRITE_MVFACLO_A },
1364e98e3e1Schristos   { M32R_INSN_MVFACMI_A, M32R2F_INSN_MVFACMI_A, M32R2F_SFMT_MVFACHI_A, M32R2F_INSN_PAR_MVFACMI_A, M32R2F_INSN_WRITE_MVFACMI_A },
1374e98e3e1Schristos   { M32R_INSN_MVFC, M32R2F_INSN_MVFC, M32R2F_SFMT_MVFC, M32R2F_INSN_PAR_MVFC, M32R2F_INSN_WRITE_MVFC },
1384e98e3e1Schristos   { M32R_INSN_MVTACHI_A, M32R2F_INSN_MVTACHI_A, M32R2F_SFMT_MVTACHI_A, M32R2F_INSN_PAR_MVTACHI_A, M32R2F_INSN_WRITE_MVTACHI_A },
1394e98e3e1Schristos   { M32R_INSN_MVTACLO_A, M32R2F_INSN_MVTACLO_A, M32R2F_SFMT_MVTACHI_A, M32R2F_INSN_PAR_MVTACLO_A, M32R2F_INSN_WRITE_MVTACLO_A },
1404e98e3e1Schristos   { M32R_INSN_MVTC, M32R2F_INSN_MVTC, M32R2F_SFMT_MVTC, M32R2F_INSN_PAR_MVTC, M32R2F_INSN_WRITE_MVTC },
1414e98e3e1Schristos   { M32R_INSN_NEG, M32R2F_INSN_NEG, M32R2F_SFMT_MV, M32R2F_INSN_PAR_NEG, M32R2F_INSN_WRITE_NEG },
1424e98e3e1Schristos   { M32R_INSN_NOP, M32R2F_INSN_NOP, M32R2F_SFMT_NOP, M32R2F_INSN_PAR_NOP, M32R2F_INSN_WRITE_NOP },
1434e98e3e1Schristos   { M32R_INSN_NOT, M32R2F_INSN_NOT, M32R2F_SFMT_MV, M32R2F_INSN_PAR_NOT, M32R2F_INSN_WRITE_NOT },
1444e98e3e1Schristos   { M32R_INSN_RAC_DSI, M32R2F_INSN_RAC_DSI, M32R2F_SFMT_RAC_DSI, M32R2F_INSN_PAR_RAC_DSI, M32R2F_INSN_WRITE_RAC_DSI },
1454e98e3e1Schristos   { M32R_INSN_RACH_DSI, M32R2F_INSN_RACH_DSI, M32R2F_SFMT_RAC_DSI, M32R2F_INSN_PAR_RACH_DSI, M32R2F_INSN_WRITE_RACH_DSI },
1464e98e3e1Schristos   { M32R_INSN_RTE, M32R2F_INSN_RTE, M32R2F_SFMT_RTE, M32R2F_INSN_PAR_RTE, M32R2F_INSN_WRITE_RTE },
1474e98e3e1Schristos   { M32R_INSN_SETH, M32R2F_INSN_SETH, M32R2F_SFMT_SETH, NOPAR, NOPAR  },
1484e98e3e1Schristos   { M32R_INSN_SLL, M32R2F_INSN_SLL, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_SLL, M32R2F_INSN_WRITE_SLL },
1494e98e3e1Schristos   { M32R_INSN_SLL3, M32R2F_INSN_SLL3, M32R2F_SFMT_SLL3, NOPAR, NOPAR  },
1504e98e3e1Schristos   { M32R_INSN_SLLI, M32R2F_INSN_SLLI, M32R2F_SFMT_SLLI, M32R2F_INSN_PAR_SLLI, M32R2F_INSN_WRITE_SLLI },
1514e98e3e1Schristos   { M32R_INSN_SRA, M32R2F_INSN_SRA, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_SRA, M32R2F_INSN_WRITE_SRA },
1524e98e3e1Schristos   { M32R_INSN_SRA3, M32R2F_INSN_SRA3, M32R2F_SFMT_SLL3, NOPAR, NOPAR  },
1534e98e3e1Schristos   { M32R_INSN_SRAI, M32R2F_INSN_SRAI, M32R2F_SFMT_SLLI, M32R2F_INSN_PAR_SRAI, M32R2F_INSN_WRITE_SRAI },
1544e98e3e1Schristos   { M32R_INSN_SRL, M32R2F_INSN_SRL, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_SRL, M32R2F_INSN_WRITE_SRL },
1554e98e3e1Schristos   { M32R_INSN_SRL3, M32R2F_INSN_SRL3, M32R2F_SFMT_SLL3, NOPAR, NOPAR  },
1564e98e3e1Schristos   { M32R_INSN_SRLI, M32R2F_INSN_SRLI, M32R2F_SFMT_SLLI, M32R2F_INSN_PAR_SRLI, M32R2F_INSN_WRITE_SRLI },
1574e98e3e1Schristos   { M32R_INSN_ST, M32R2F_INSN_ST, M32R2F_SFMT_ST, M32R2F_INSN_PAR_ST, M32R2F_INSN_WRITE_ST },
1584e98e3e1Schristos   { M32R_INSN_ST_D, M32R2F_INSN_ST_D, M32R2F_SFMT_ST_D, NOPAR, NOPAR  },
1594e98e3e1Schristos   { M32R_INSN_STB, M32R2F_INSN_STB, M32R2F_SFMT_STB, M32R2F_INSN_PAR_STB, M32R2F_INSN_WRITE_STB },
1604e98e3e1Schristos   { M32R_INSN_STB_D, M32R2F_INSN_STB_D, M32R2F_SFMT_STB_D, NOPAR, NOPAR  },
1614e98e3e1Schristos   { M32R_INSN_STH, M32R2F_INSN_STH, M32R2F_SFMT_STH, M32R2F_INSN_PAR_STH, M32R2F_INSN_WRITE_STH },
1624e98e3e1Schristos   { M32R_INSN_STH_D, M32R2F_INSN_STH_D, M32R2F_SFMT_STH_D, NOPAR, NOPAR  },
1634e98e3e1Schristos   { M32R_INSN_ST_PLUS, M32R2F_INSN_ST_PLUS, M32R2F_SFMT_ST_PLUS, M32R2F_INSN_PAR_ST_PLUS, M32R2F_INSN_WRITE_ST_PLUS },
1644e98e3e1Schristos   { M32R_INSN_STH_PLUS, M32R2F_INSN_STH_PLUS, M32R2F_SFMT_STH_PLUS, M32R2F_INSN_PAR_STH_PLUS, M32R2F_INSN_WRITE_STH_PLUS },
1654e98e3e1Schristos   { M32R_INSN_STB_PLUS, M32R2F_INSN_STB_PLUS, M32R2F_SFMT_STB_PLUS, M32R2F_INSN_PAR_STB_PLUS, M32R2F_INSN_WRITE_STB_PLUS },
1664e98e3e1Schristos   { M32R_INSN_ST_MINUS, M32R2F_INSN_ST_MINUS, M32R2F_SFMT_ST_PLUS, M32R2F_INSN_PAR_ST_MINUS, M32R2F_INSN_WRITE_ST_MINUS },
1674e98e3e1Schristos   { M32R_INSN_SUB, M32R2F_INSN_SUB, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_SUB, M32R2F_INSN_WRITE_SUB },
1684e98e3e1Schristos   { M32R_INSN_SUBV, M32R2F_INSN_SUBV, M32R2F_SFMT_ADDV, M32R2F_INSN_PAR_SUBV, M32R2F_INSN_WRITE_SUBV },
1694e98e3e1Schristos   { M32R_INSN_SUBX, M32R2F_INSN_SUBX, M32R2F_SFMT_ADDX, M32R2F_INSN_PAR_SUBX, M32R2F_INSN_WRITE_SUBX },
1704e98e3e1Schristos   { M32R_INSN_TRAP, M32R2F_INSN_TRAP, M32R2F_SFMT_TRAP, M32R2F_INSN_PAR_TRAP, M32R2F_INSN_WRITE_TRAP },
1714e98e3e1Schristos   { M32R_INSN_UNLOCK, M32R2F_INSN_UNLOCK, M32R2F_SFMT_UNLOCK, M32R2F_INSN_PAR_UNLOCK, M32R2F_INSN_WRITE_UNLOCK },
1724e98e3e1Schristos   { M32R_INSN_SATB, M32R2F_INSN_SATB, M32R2F_SFMT_SATB, NOPAR, NOPAR  },
1734e98e3e1Schristos   { M32R_INSN_SATH, M32R2F_INSN_SATH, M32R2F_SFMT_SATB, NOPAR, NOPAR  },
1744e98e3e1Schristos   { M32R_INSN_SAT, M32R2F_INSN_SAT, M32R2F_SFMT_SAT, NOPAR, NOPAR  },
1754e98e3e1Schristos   { M32R_INSN_PCMPBZ, M32R2F_INSN_PCMPBZ, M32R2F_SFMT_CMPZ, M32R2F_INSN_PAR_PCMPBZ, M32R2F_INSN_WRITE_PCMPBZ },
1764e98e3e1Schristos   { M32R_INSN_SADD, M32R2F_INSN_SADD, M32R2F_SFMT_SADD, M32R2F_INSN_PAR_SADD, M32R2F_INSN_WRITE_SADD },
1774e98e3e1Schristos   { M32R_INSN_MACWU1, M32R2F_INSN_MACWU1, M32R2F_SFMT_MACWU1, M32R2F_INSN_PAR_MACWU1, M32R2F_INSN_WRITE_MACWU1 },
1784e98e3e1Schristos   { M32R_INSN_MSBLO, M32R2F_INSN_MSBLO, M32R2F_SFMT_MSBLO, M32R2F_INSN_PAR_MSBLO, M32R2F_INSN_WRITE_MSBLO },
1794e98e3e1Schristos   { M32R_INSN_MULWU1, M32R2F_INSN_MULWU1, M32R2F_SFMT_MULWU1, M32R2F_INSN_PAR_MULWU1, M32R2F_INSN_WRITE_MULWU1 },
1804e98e3e1Schristos   { M32R_INSN_MACLH1, M32R2F_INSN_MACLH1, M32R2F_SFMT_MACWU1, M32R2F_INSN_PAR_MACLH1, M32R2F_INSN_WRITE_MACLH1 },
1814e98e3e1Schristos   { M32R_INSN_SC, M32R2F_INSN_SC, M32R2F_SFMT_SC, M32R2F_INSN_PAR_SC, M32R2F_INSN_WRITE_SC },
1824e98e3e1Schristos   { M32R_INSN_SNC, M32R2F_INSN_SNC, M32R2F_SFMT_SC, M32R2F_INSN_PAR_SNC, M32R2F_INSN_WRITE_SNC },
1834e98e3e1Schristos   { M32R_INSN_CLRPSW, M32R2F_INSN_CLRPSW, M32R2F_SFMT_CLRPSW, M32R2F_INSN_PAR_CLRPSW, M32R2F_INSN_WRITE_CLRPSW },
1844e98e3e1Schristos   { M32R_INSN_SETPSW, M32R2F_INSN_SETPSW, M32R2F_SFMT_SETPSW, M32R2F_INSN_PAR_SETPSW, M32R2F_INSN_WRITE_SETPSW },
1854e98e3e1Schristos   { M32R_INSN_BSET, M32R2F_INSN_BSET, M32R2F_SFMT_BSET, NOPAR, NOPAR  },
1864e98e3e1Schristos   { M32R_INSN_BCLR, M32R2F_INSN_BCLR, M32R2F_SFMT_BSET, NOPAR, NOPAR  },
1874e98e3e1Schristos   { M32R_INSN_BTST, M32R2F_INSN_BTST, M32R2F_SFMT_BTST, M32R2F_INSN_PAR_BTST, M32R2F_INSN_WRITE_BTST },
1884e98e3e1Schristos };
1894e98e3e1Schristos 
1904e98e3e1Schristos static const struct insn_sem m32r2f_insn_sem_invalid =
1914e98e3e1Schristos {
1924e98e3e1Schristos   VIRTUAL_INSN_X_INVALID, M32R2F_INSN_X_INVALID, M32R2F_SFMT_EMPTY, NOPAR, NOPAR
1934e98e3e1Schristos };
1944e98e3e1Schristos 
1954e98e3e1Schristos /* Initialize an IDESC from the compile-time computable parts.  */
1964e98e3e1Schristos 
1974e98e3e1Schristos static INLINE void
1984e98e3e1Schristos init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t)
1994e98e3e1Schristos {
2004e98e3e1Schristos   const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries;
2014e98e3e1Schristos 
2024e98e3e1Schristos   id->num = t->index;
2034e98e3e1Schristos   id->sfmt = t->sfmt;
2044e98e3e1Schristos   if ((int) t->type <= 0)
2054e98e3e1Schristos     id->idata = & cgen_virtual_insn_table[- (int) t->type];
2064e98e3e1Schristos   else
2074e98e3e1Schristos     id->idata = & insn_table[t->type];
2084e98e3e1Schristos   id->attrs = CGEN_INSN_ATTRS (id->idata);
2094e98e3e1Schristos   /* Oh my god, a magic number.  */
2104e98e3e1Schristos   id->length = CGEN_INSN_BITSIZE (id->idata) / 8;
2114e98e3e1Schristos 
2124e98e3e1Schristos #if WITH_PROFILE_MODEL_P
2134e98e3e1Schristos   id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index];
2144e98e3e1Schristos   {
2154e98e3e1Schristos     SIM_DESC sd = CPU_STATE (cpu);
2164e98e3e1Schristos     SIM_ASSERT (t->index == id->timing->num);
2174e98e3e1Schristos   }
2184e98e3e1Schristos #endif
2194e98e3e1Schristos 
2204e98e3e1Schristos   /* Semantic pointers are initialized elsewhere.  */
2214e98e3e1Schristos }
2224e98e3e1Schristos 
2234e98e3e1Schristos /* Initialize the instruction descriptor table.  */
2244e98e3e1Schristos 
2254e98e3e1Schristos void
2264e98e3e1Schristos m32r2f_init_idesc_table (SIM_CPU *cpu)
2274e98e3e1Schristos {
2284e98e3e1Schristos   IDESC *id,*tabend;
2294e98e3e1Schristos   const struct insn_sem *t,*tend;
2304e98e3e1Schristos   int tabsize = M32R2F_INSN__MAX;
2314e98e3e1Schristos   IDESC *table = m32r2f_insn_data;
2324e98e3e1Schristos 
2334e98e3e1Schristos   memset (table, 0, tabsize * sizeof (IDESC));
2344e98e3e1Schristos 
2354e98e3e1Schristos   /* First set all entries to the `invalid insn'.  */
2364e98e3e1Schristos   t = & m32r2f_insn_sem_invalid;
2374e98e3e1Schristos   for (id = table, tabend = table + tabsize; id < tabend; ++id)
2384e98e3e1Schristos     init_idesc (cpu, id, t);
2394e98e3e1Schristos 
2404e98e3e1Schristos   /* Now fill in the values for the chosen cpu.  */
241796c32c9Schristos   for (t = m32r2f_insn_sem, tend = t + ARRAY_SIZE (m32r2f_insn_sem);
2424e98e3e1Schristos        t != tend; ++t)
2434e98e3e1Schristos     {
2444e98e3e1Schristos       init_idesc (cpu, & table[t->index], t);
2454e98e3e1Schristos       if (t->par_index != NOPAR)
2464e98e3e1Schristos 	{
2474e98e3e1Schristos 	  init_idesc (cpu, &table[t->par_index], t);
2484e98e3e1Schristos 	  table[t->index].par_idesc = &table[t->par_index];
2494e98e3e1Schristos 	}
2504e98e3e1Schristos       if (t->par_index != NOPAR)
2514e98e3e1Schristos 	{
2524e98e3e1Schristos 	  init_idesc (cpu, &table[t->write_index], t);
2534e98e3e1Schristos 	  table[t->par_index].par_idesc = &table[t->write_index];
2544e98e3e1Schristos 	}
2554e98e3e1Schristos     }
2564e98e3e1Schristos 
2574e98e3e1Schristos   /* Link the IDESC table into the cpu.  */
2584e98e3e1Schristos   CPU_IDESC (cpu) = table;
2594e98e3e1Schristos }
2604e98e3e1Schristos 
2614e98e3e1Schristos /* Given an instruction, return a pointer to its IDESC entry.  */
2624e98e3e1Schristos 
2634e98e3e1Schristos const IDESC *
2644e98e3e1Schristos m32r2f_decode (SIM_CPU *current_cpu, IADDR pc,
2654e98e3e1Schristos               CGEN_INSN_WORD base_insn, CGEN_INSN_WORD entire_insn,
2664e98e3e1Schristos               ARGBUF *abuf)
2674e98e3e1Schristos {
2684e98e3e1Schristos   /* Result of decoder.  */
2694e98e3e1Schristos   M32R2F_INSN_TYPE itype;
2704e98e3e1Schristos 
2714e98e3e1Schristos   {
2724e98e3e1Schristos     CGEN_INSN_WORD insn = base_insn;
2734e98e3e1Schristos 
2744e98e3e1Schristos     {
275*05fa0856Schristos       unsigned int val0 = (((insn >> 8) & (15 << 4)) | ((insn >> 4) & (15 << 0)));
276*05fa0856Schristos       switch (val0)
2774e98e3e1Schristos       {
2784e98e3e1Schristos       case 0: itype = M32R2F_INSN_SUBV; goto extract_sfmt_addv;
2794e98e3e1Schristos       case 1: itype = M32R2F_INSN_SUBX; goto extract_sfmt_addx;
2804e98e3e1Schristos       case 2: itype = M32R2F_INSN_SUB; goto extract_sfmt_add;
2814e98e3e1Schristos       case 3: itype = M32R2F_INSN_NEG; goto extract_sfmt_mv;
2824e98e3e1Schristos       case 4: itype = M32R2F_INSN_CMP; goto extract_sfmt_cmp;
2834e98e3e1Schristos       case 5: itype = M32R2F_INSN_CMPU; goto extract_sfmt_cmp;
2844e98e3e1Schristos       case 6: itype = M32R2F_INSN_CMPEQ; goto extract_sfmt_cmp;
2854e98e3e1Schristos       case 7:
2864e98e3e1Schristos         {
287*05fa0856Schristos           unsigned int val1 = (((insn >> 8) & (3 << 0)));
288*05fa0856Schristos           switch (val1)
2894e98e3e1Schristos           {
2904e98e3e1Schristos           case 0:
2914e98e3e1Schristos             if ((entire_insn & 0xfff0) == 0x70)
2924e98e3e1Schristos               { itype = M32R2F_INSN_CMPZ; goto extract_sfmt_cmpz; }
2934e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
2944e98e3e1Schristos           case 3:
2954e98e3e1Schristos             if ((entire_insn & 0xfff0) == 0x370)
2964e98e3e1Schristos               { itype = M32R2F_INSN_PCMPBZ; goto extract_sfmt_cmpz; }
2974e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
2984e98e3e1Schristos           default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
2994e98e3e1Schristos           }
3004e98e3e1Schristos         }
3014e98e3e1Schristos       case 8: itype = M32R2F_INSN_ADDV; goto extract_sfmt_addv;
3024e98e3e1Schristos       case 9: itype = M32R2F_INSN_ADDX; goto extract_sfmt_addx;
3034e98e3e1Schristos       case 10: itype = M32R2F_INSN_ADD; goto extract_sfmt_add;
3044e98e3e1Schristos       case 11: itype = M32R2F_INSN_NOT; goto extract_sfmt_mv;
3054e98e3e1Schristos       case 12: itype = M32R2F_INSN_AND; goto extract_sfmt_add;
3064e98e3e1Schristos       case 13: itype = M32R2F_INSN_XOR; goto extract_sfmt_add;
3074e98e3e1Schristos       case 14: itype = M32R2F_INSN_OR; goto extract_sfmt_add;
3084e98e3e1Schristos       case 15:
3094e98e3e1Schristos         if ((entire_insn & 0xf8f0) == 0xf0)
3104e98e3e1Schristos           { itype = M32R2F_INSN_BTST; goto extract_sfmt_btst; }
3114e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
3124e98e3e1Schristos       case 16: itype = M32R2F_INSN_SRL; goto extract_sfmt_add;
3134e98e3e1Schristos       case 18: itype = M32R2F_INSN_SRA; goto extract_sfmt_add;
3144e98e3e1Schristos       case 20: itype = M32R2F_INSN_SLL; goto extract_sfmt_add;
3154e98e3e1Schristos       case 22: itype = M32R2F_INSN_MUL; goto extract_sfmt_add;
3164e98e3e1Schristos       case 24: itype = M32R2F_INSN_MV; goto extract_sfmt_mv;
3174e98e3e1Schristos       case 25: itype = M32R2F_INSN_MVFC; goto extract_sfmt_mvfc;
3184e98e3e1Schristos       case 26: itype = M32R2F_INSN_MVTC; goto extract_sfmt_mvtc;
3194e98e3e1Schristos       case 28:
3204e98e3e1Schristos         {
321*05fa0856Schristos           unsigned int val1 = (((insn >> 8) & (3 << 0)));
322*05fa0856Schristos           switch (val1)
3234e98e3e1Schristos           {
3244e98e3e1Schristos           case 0:
3254e98e3e1Schristos             if ((entire_insn & 0xfff0) == 0x1cc0)
3264e98e3e1Schristos               { itype = M32R2F_INSN_JC; goto extract_sfmt_jc; }
3274e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
3284e98e3e1Schristos           case 1:
3294e98e3e1Schristos             if ((entire_insn & 0xfff0) == 0x1dc0)
3304e98e3e1Schristos               { itype = M32R2F_INSN_JNC; goto extract_sfmt_jc; }
3314e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
3324e98e3e1Schristos           case 2:
3334e98e3e1Schristos             if ((entire_insn & 0xfff0) == 0x1ec0)
3344e98e3e1Schristos               { itype = M32R2F_INSN_JL; goto extract_sfmt_jl; }
3354e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
3364e98e3e1Schristos           case 3:
3374e98e3e1Schristos             if ((entire_insn & 0xfff0) == 0x1fc0)
3384e98e3e1Schristos               { itype = M32R2F_INSN_JMP; goto extract_sfmt_jmp; }
3394e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
3404e98e3e1Schristos           default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
3414e98e3e1Schristos           }
3424e98e3e1Schristos         }
3434e98e3e1Schristos       case 29:
3444e98e3e1Schristos         if ((entire_insn & 0xffff) == 0x10d6)
3454e98e3e1Schristos           { itype = M32R2F_INSN_RTE; goto extract_sfmt_rte; }
3464e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
3474e98e3e1Schristos       case 31:
3484e98e3e1Schristos         if ((entire_insn & 0xfff0) == 0x10f0)
3494e98e3e1Schristos           { itype = M32R2F_INSN_TRAP; goto extract_sfmt_trap; }
3504e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
3514e98e3e1Schristos       case 32: itype = M32R2F_INSN_STB; goto extract_sfmt_stb;
3524e98e3e1Schristos       case 33: itype = M32R2F_INSN_STB_PLUS; goto extract_sfmt_stb_plus;
3534e98e3e1Schristos       case 34: itype = M32R2F_INSN_STH; goto extract_sfmt_sth;
3544e98e3e1Schristos       case 35: itype = M32R2F_INSN_STH_PLUS; goto extract_sfmt_sth_plus;
3554e98e3e1Schristos       case 36: itype = M32R2F_INSN_ST; goto extract_sfmt_st;
3564e98e3e1Schristos       case 37: itype = M32R2F_INSN_UNLOCK; goto extract_sfmt_unlock;
3574e98e3e1Schristos       case 38: itype = M32R2F_INSN_ST_PLUS; goto extract_sfmt_st_plus;
3584e98e3e1Schristos       case 39: itype = M32R2F_INSN_ST_MINUS; goto extract_sfmt_st_plus;
3594e98e3e1Schristos       case 40: itype = M32R2F_INSN_LDB; goto extract_sfmt_ldb;
3604e98e3e1Schristos       case 41: itype = M32R2F_INSN_LDUB; goto extract_sfmt_ldb;
3614e98e3e1Schristos       case 42: itype = M32R2F_INSN_LDH; goto extract_sfmt_ldh;
3624e98e3e1Schristos       case 43: itype = M32R2F_INSN_LDUH; goto extract_sfmt_ldh;
3634e98e3e1Schristos       case 44: itype = M32R2F_INSN_LD; goto extract_sfmt_ld;
3644e98e3e1Schristos       case 45: itype = M32R2F_INSN_LOCK; goto extract_sfmt_lock;
3654e98e3e1Schristos       case 46: itype = M32R2F_INSN_LD_PLUS; goto extract_sfmt_ld_plus;
366*05fa0856Schristos       case 48:
3674e98e3e1Schristos       case 56: itype = M32R2F_INSN_MULHI_A; goto extract_sfmt_mulhi_a;
368*05fa0856Schristos       case 49:
3694e98e3e1Schristos       case 57: itype = M32R2F_INSN_MULLO_A; goto extract_sfmt_mulhi_a;
370*05fa0856Schristos       case 50:
3714e98e3e1Schristos       case 58: itype = M32R2F_INSN_MULWHI_A; goto extract_sfmt_mulhi_a;
372*05fa0856Schristos       case 51:
3734e98e3e1Schristos       case 59: itype = M32R2F_INSN_MULWLO_A; goto extract_sfmt_mulhi_a;
374*05fa0856Schristos       case 52:
3754e98e3e1Schristos       case 60: itype = M32R2F_INSN_MACHI_A; goto extract_sfmt_machi_a;
376*05fa0856Schristos       case 53:
3774e98e3e1Schristos       case 61: itype = M32R2F_INSN_MACLO_A; goto extract_sfmt_machi_a;
378*05fa0856Schristos       case 54:
3794e98e3e1Schristos       case 62: itype = M32R2F_INSN_MACWHI_A; goto extract_sfmt_machi_a;
380*05fa0856Schristos       case 55:
3814e98e3e1Schristos       case 63: itype = M32R2F_INSN_MACWLO_A; goto extract_sfmt_machi_a;
382*05fa0856Schristos       case 64:
383*05fa0856Schristos       case 65:
384*05fa0856Schristos       case 66:
385*05fa0856Schristos       case 67:
386*05fa0856Schristos       case 68:
387*05fa0856Schristos       case 69:
388*05fa0856Schristos       case 70:
389*05fa0856Schristos       case 71:
390*05fa0856Schristos       case 72:
391*05fa0856Schristos       case 73:
392*05fa0856Schristos       case 74:
393*05fa0856Schristos       case 75:
394*05fa0856Schristos       case 76:
395*05fa0856Schristos       case 77:
396*05fa0856Schristos       case 78:
3974e98e3e1Schristos       case 79: itype = M32R2F_INSN_ADDI; goto extract_sfmt_addi;
398*05fa0856Schristos       case 80:
3994e98e3e1Schristos       case 81: itype = M32R2F_INSN_SRLI; goto extract_sfmt_slli;
400*05fa0856Schristos       case 82:
4014e98e3e1Schristos       case 83: itype = M32R2F_INSN_SRAI; goto extract_sfmt_slli;
402*05fa0856Schristos       case 84:
4034e98e3e1Schristos       case 85: itype = M32R2F_INSN_SLLI; goto extract_sfmt_slli;
4044e98e3e1Schristos       case 87:
4054e98e3e1Schristos         {
406*05fa0856Schristos           unsigned int val1 = (((insn >> 0) & (1 << 0)));
407*05fa0856Schristos           switch (val1)
4084e98e3e1Schristos           {
4094e98e3e1Schristos           case 0:
4104e98e3e1Schristos             if ((entire_insn & 0xf0f3) == 0x5070)
4114e98e3e1Schristos               { itype = M32R2F_INSN_MVTACHI_A; goto extract_sfmt_mvtachi_a; }
4124e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
4134e98e3e1Schristos           case 1:
4144e98e3e1Schristos             if ((entire_insn & 0xf0f3) == 0x5071)
4154e98e3e1Schristos               { itype = M32R2F_INSN_MVTACLO_A; goto extract_sfmt_mvtachi_a; }
4164e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
4174e98e3e1Schristos           default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
4184e98e3e1Schristos           }
4194e98e3e1Schristos         }
4204e98e3e1Schristos       case 88:
4214e98e3e1Schristos         if ((entire_insn & 0xf3f2) == 0x5080)
4224e98e3e1Schristos           { itype = M32R2F_INSN_RACH_DSI; goto extract_sfmt_rac_dsi; }
4234e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
4244e98e3e1Schristos       case 89:
4254e98e3e1Schristos         if ((entire_insn & 0xf3f2) == 0x5090)
4264e98e3e1Schristos           { itype = M32R2F_INSN_RAC_DSI; goto extract_sfmt_rac_dsi; }
4274e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
4284e98e3e1Schristos       case 90: itype = M32R2F_INSN_MULWU1; goto extract_sfmt_mulwu1;
4294e98e3e1Schristos       case 91: itype = M32R2F_INSN_MACWU1; goto extract_sfmt_macwu1;
4304e98e3e1Schristos       case 92: itype = M32R2F_INSN_MACLH1; goto extract_sfmt_macwu1;
4314e98e3e1Schristos       case 93: itype = M32R2F_INSN_MSBLO; goto extract_sfmt_msblo;
4324e98e3e1Schristos       case 94:
4334e98e3e1Schristos         if ((entire_insn & 0xffff) == 0x50e4)
4344e98e3e1Schristos           { itype = M32R2F_INSN_SADD; goto extract_sfmt_sadd; }
4354e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
4364e98e3e1Schristos       case 95:
4374e98e3e1Schristos         {
438*05fa0856Schristos           unsigned int val1 = (((insn >> 0) & (3 << 0)));
439*05fa0856Schristos           switch (val1)
4404e98e3e1Schristos           {
4414e98e3e1Schristos           case 0: itype = M32R2F_INSN_MVFACHI_A; goto extract_sfmt_mvfachi_a;
4424e98e3e1Schristos           case 1: itype = M32R2F_INSN_MVFACLO_A; goto extract_sfmt_mvfachi_a;
4434e98e3e1Schristos           case 2: itype = M32R2F_INSN_MVFACMI_A; goto extract_sfmt_mvfachi_a;
4444e98e3e1Schristos           default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
4454e98e3e1Schristos           }
4464e98e3e1Schristos         }
447*05fa0856Schristos       case 96:
448*05fa0856Schristos       case 97:
449*05fa0856Schristos       case 98:
450*05fa0856Schristos       case 99:
451*05fa0856Schristos       case 100:
452*05fa0856Schristos       case 101:
453*05fa0856Schristos       case 102:
454*05fa0856Schristos       case 103:
455*05fa0856Schristos       case 104:
456*05fa0856Schristos       case 105:
457*05fa0856Schristos       case 106:
458*05fa0856Schristos       case 107:
459*05fa0856Schristos       case 108:
460*05fa0856Schristos       case 109:
461*05fa0856Schristos       case 110:
4624e98e3e1Schristos       case 111: itype = M32R2F_INSN_LDI8; goto extract_sfmt_ldi8;
4634e98e3e1Schristos       case 112:
4644e98e3e1Schristos         {
465*05fa0856Schristos           unsigned int val1 = (((insn >> 7) & (15 << 1)) | ((insn >> 0) & (1 << 0)));
466*05fa0856Schristos           switch (val1)
4674e98e3e1Schristos           {
4684e98e3e1Schristos           case 0:
4694e98e3e1Schristos             if ((entire_insn & 0xffff) == 0x7000)
4704e98e3e1Schristos               { itype = M32R2F_INSN_NOP; goto extract_sfmt_nop; }
4714e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
472*05fa0856Schristos           case 2:
4734e98e3e1Schristos           case 3: itype = M32R2F_INSN_SETPSW; goto extract_sfmt_setpsw;
474*05fa0856Schristos           case 4:
4754e98e3e1Schristos           case 5: itype = M32R2F_INSN_CLRPSW; goto extract_sfmt_clrpsw;
4764e98e3e1Schristos           case 9:
4774e98e3e1Schristos             if ((entire_insn & 0xffff) == 0x7401)
4784e98e3e1Schristos               { itype = M32R2F_INSN_SC; goto extract_sfmt_sc; }
4794e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
4804e98e3e1Schristos           case 11:
4814e98e3e1Schristos             if ((entire_insn & 0xffff) == 0x7501)
4824e98e3e1Schristos               { itype = M32R2F_INSN_SNC; goto extract_sfmt_sc; }
4834e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
484*05fa0856Schristos           case 16:
4854e98e3e1Schristos           case 17: itype = M32R2F_INSN_BCL8; goto extract_sfmt_bcl8;
486*05fa0856Schristos           case 18:
4874e98e3e1Schristos           case 19: itype = M32R2F_INSN_BNCL8; goto extract_sfmt_bcl8;
488*05fa0856Schristos           case 24:
4894e98e3e1Schristos           case 25: itype = M32R2F_INSN_BC8; goto extract_sfmt_bc8;
490*05fa0856Schristos           case 26:
4914e98e3e1Schristos           case 27: itype = M32R2F_INSN_BNC8; goto extract_sfmt_bc8;
492*05fa0856Schristos           case 28:
4934e98e3e1Schristos           case 29: itype = M32R2F_INSN_BL8; goto extract_sfmt_bl8;
494*05fa0856Schristos           case 30:
4954e98e3e1Schristos           case 31: itype = M32R2F_INSN_BRA8; goto extract_sfmt_bra8;
4964e98e3e1Schristos           default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
4974e98e3e1Schristos           }
4984e98e3e1Schristos         }
499*05fa0856Schristos       case 113:
500*05fa0856Schristos       case 114:
501*05fa0856Schristos       case 115:
502*05fa0856Schristos       case 116:
503*05fa0856Schristos       case 117:
504*05fa0856Schristos       case 118:
505*05fa0856Schristos       case 119:
506*05fa0856Schristos       case 120:
507*05fa0856Schristos       case 121:
508*05fa0856Schristos       case 122:
509*05fa0856Schristos       case 123:
510*05fa0856Schristos       case 124:
511*05fa0856Schristos       case 125:
512*05fa0856Schristos       case 126:
5134e98e3e1Schristos       case 127:
5144e98e3e1Schristos         {
515*05fa0856Schristos           unsigned int val1 = (((insn >> 8) & (15 << 0)));
516*05fa0856Schristos           switch (val1)
5174e98e3e1Schristos           {
5184e98e3e1Schristos           case 1: itype = M32R2F_INSN_SETPSW; goto extract_sfmt_setpsw;
5194e98e3e1Schristos           case 2: itype = M32R2F_INSN_CLRPSW; goto extract_sfmt_clrpsw;
5204e98e3e1Schristos           case 8: itype = M32R2F_INSN_BCL8; goto extract_sfmt_bcl8;
5214e98e3e1Schristos           case 9: itype = M32R2F_INSN_BNCL8; goto extract_sfmt_bcl8;
5224e98e3e1Schristos           case 12: itype = M32R2F_INSN_BC8; goto extract_sfmt_bc8;
5234e98e3e1Schristos           case 13: itype = M32R2F_INSN_BNC8; goto extract_sfmt_bc8;
5244e98e3e1Schristos           case 14: itype = M32R2F_INSN_BL8; goto extract_sfmt_bl8;
5254e98e3e1Schristos           case 15: itype = M32R2F_INSN_BRA8; goto extract_sfmt_bra8;
5264e98e3e1Schristos           default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5274e98e3e1Schristos           }
5284e98e3e1Schristos         }
5294e98e3e1Schristos       case 132:
5304e98e3e1Schristos         if ((entire_insn & 0xfff00000) == 0x80400000)
5314e98e3e1Schristos           { itype = M32R2F_INSN_CMPI; goto extract_sfmt_cmpi; }
5324e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5334e98e3e1Schristos       case 133:
5344e98e3e1Schristos         if ((entire_insn & 0xfff00000) == 0x80500000)
5354e98e3e1Schristos           { itype = M32R2F_INSN_CMPUI; goto extract_sfmt_cmpi; }
5364e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5374e98e3e1Schristos       case 134:
5384e98e3e1Schristos         {
539*05fa0856Schristos           unsigned int val1 = (((entire_insn >> 8) & (3 << 0)));
540*05fa0856Schristos           switch (val1)
5414e98e3e1Schristos           {
5424e98e3e1Schristos           case 0:
5434e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x80600000)
5444e98e3e1Schristos               { itype = M32R2F_INSN_SAT; goto extract_sfmt_sat; }
5454e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5464e98e3e1Schristos           case 2:
5474e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x80600200)
5484e98e3e1Schristos               { itype = M32R2F_INSN_SATH; goto extract_sfmt_satb; }
5494e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5504e98e3e1Schristos           case 3:
5514e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x80600300)
5524e98e3e1Schristos               { itype = M32R2F_INSN_SATB; goto extract_sfmt_satb; }
5534e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5544e98e3e1Schristos           default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5554e98e3e1Schristos           }
5564e98e3e1Schristos         }
5574e98e3e1Schristos       case 136: itype = M32R2F_INSN_ADDV3; goto extract_sfmt_addv3;
5584e98e3e1Schristos       case 138: itype = M32R2F_INSN_ADD3; goto extract_sfmt_add3;
5594e98e3e1Schristos       case 140: itype = M32R2F_INSN_AND3; goto extract_sfmt_and3;
5604e98e3e1Schristos       case 141: itype = M32R2F_INSN_XOR3; goto extract_sfmt_and3;
5614e98e3e1Schristos       case 142: itype = M32R2F_INSN_OR3; goto extract_sfmt_or3;
5624e98e3e1Schristos       case 144:
5634e98e3e1Schristos         {
564*05fa0856Schristos           unsigned int val1 = (((entire_insn >> 3) & (3 << 0)));
565*05fa0856Schristos           switch (val1)
5664e98e3e1Schristos           {
5674e98e3e1Schristos           case 0:
5684e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x90000000)
5694e98e3e1Schristos               { itype = M32R2F_INSN_DIV; goto extract_sfmt_div; }
5704e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5714e98e3e1Schristos           case 2:
5724e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x90000010)
5734e98e3e1Schristos               { itype = M32R2F_INSN_DIVH; goto extract_sfmt_div; }
5744e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5754e98e3e1Schristos           case 3:
5764e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x90000018)
5774e98e3e1Schristos               { itype = M32R2F_INSN_DIVB; goto extract_sfmt_div; }
5784e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5794e98e3e1Schristos           default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5804e98e3e1Schristos           }
5814e98e3e1Schristos         }
5824e98e3e1Schristos       case 145:
5834e98e3e1Schristos         {
584*05fa0856Schristos           unsigned int val1 = (((entire_insn >> 3) & (3 << 0)));
585*05fa0856Schristos           switch (val1)
5864e98e3e1Schristos           {
5874e98e3e1Schristos           case 0:
5884e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x90100000)
5894e98e3e1Schristos               { itype = M32R2F_INSN_DIVU; goto extract_sfmt_div; }
5904e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5914e98e3e1Schristos           case 2:
5924e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x90100010)
5934e98e3e1Schristos               { itype = M32R2F_INSN_DIVUH; goto extract_sfmt_div; }
5944e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5954e98e3e1Schristos           case 3:
5964e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x90100018)
5974e98e3e1Schristos               { itype = M32R2F_INSN_DIVUB; goto extract_sfmt_div; }
5984e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
5994e98e3e1Schristos           default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6004e98e3e1Schristos           }
6014e98e3e1Schristos         }
6024e98e3e1Schristos       case 146:
6034e98e3e1Schristos         {
604*05fa0856Schristos           unsigned int val1 = (((entire_insn >> 3) & (3 << 0)));
605*05fa0856Schristos           switch (val1)
6064e98e3e1Schristos           {
6074e98e3e1Schristos           case 0:
6084e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x90200000)
6094e98e3e1Schristos               { itype = M32R2F_INSN_REM; goto extract_sfmt_div; }
6104e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6114e98e3e1Schristos           case 2:
6124e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x90200010)
6134e98e3e1Schristos               { itype = M32R2F_INSN_REMH; goto extract_sfmt_div; }
6144e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6154e98e3e1Schristos           case 3:
6164e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x90200018)
6174e98e3e1Schristos               { itype = M32R2F_INSN_REMB; goto extract_sfmt_div; }
6184e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6194e98e3e1Schristos           default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6204e98e3e1Schristos           }
6214e98e3e1Schristos         }
6224e98e3e1Schristos       case 147:
6234e98e3e1Schristos         {
624*05fa0856Schristos           unsigned int val1 = (((entire_insn >> 3) & (3 << 0)));
625*05fa0856Schristos           switch (val1)
6264e98e3e1Schristos           {
6274e98e3e1Schristos           case 0:
6284e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x90300000)
6294e98e3e1Schristos               { itype = M32R2F_INSN_REMU; goto extract_sfmt_div; }
6304e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6314e98e3e1Schristos           case 2:
6324e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x90300010)
6334e98e3e1Schristos               { itype = M32R2F_INSN_REMUH; goto extract_sfmt_div; }
6344e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6354e98e3e1Schristos           case 3:
6364e98e3e1Schristos             if ((entire_insn & 0xf0f0ffff) == 0x90300018)
6374e98e3e1Schristos               { itype = M32R2F_INSN_REMUB; goto extract_sfmt_div; }
6384e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6394e98e3e1Schristos           default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6404e98e3e1Schristos           }
6414e98e3e1Schristos         }
6424e98e3e1Schristos       case 152: itype = M32R2F_INSN_SRL3; goto extract_sfmt_sll3;
6434e98e3e1Schristos       case 154: itype = M32R2F_INSN_SRA3; goto extract_sfmt_sll3;
6444e98e3e1Schristos       case 156: itype = M32R2F_INSN_SLL3; goto extract_sfmt_sll3;
6454e98e3e1Schristos       case 159:
6464e98e3e1Schristos         if ((entire_insn & 0xf0ff0000) == 0x90f00000)
6474e98e3e1Schristos           { itype = M32R2F_INSN_LDI16; goto extract_sfmt_ldi16; }
6484e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6494e98e3e1Schristos       case 160: itype = M32R2F_INSN_STB_D; goto extract_sfmt_stb_d;
6504e98e3e1Schristos       case 162: itype = M32R2F_INSN_STH_D; goto extract_sfmt_sth_d;
6514e98e3e1Schristos       case 164: itype = M32R2F_INSN_ST_D; goto extract_sfmt_st_d;
6524e98e3e1Schristos       case 166:
6534e98e3e1Schristos         if ((entire_insn & 0xf8f00000) == 0xa0600000)
6544e98e3e1Schristos           { itype = M32R2F_INSN_BSET; goto extract_sfmt_bset; }
6554e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6564e98e3e1Schristos       case 167:
6574e98e3e1Schristos         if ((entire_insn & 0xf8f00000) == 0xa0700000)
6584e98e3e1Schristos           { itype = M32R2F_INSN_BCLR; goto extract_sfmt_bset; }
6594e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6604e98e3e1Schristos       case 168: itype = M32R2F_INSN_LDB_D; goto extract_sfmt_ldb_d;
6614e98e3e1Schristos       case 169: itype = M32R2F_INSN_LDUB_D; goto extract_sfmt_ldb_d;
6624e98e3e1Schristos       case 170: itype = M32R2F_INSN_LDH_D; goto extract_sfmt_ldh_d;
6634e98e3e1Schristos       case 171: itype = M32R2F_INSN_LDUH_D; goto extract_sfmt_ldh_d;
6644e98e3e1Schristos       case 172: itype = M32R2F_INSN_LD_D; goto extract_sfmt_ld_d;
6654e98e3e1Schristos       case 176: itype = M32R2F_INSN_BEQ; goto extract_sfmt_beq;
6664e98e3e1Schristos       case 177: itype = M32R2F_INSN_BNE; goto extract_sfmt_beq;
6674e98e3e1Schristos       case 184:
6684e98e3e1Schristos         if ((entire_insn & 0xfff00000) == 0xb0800000)
6694e98e3e1Schristos           { itype = M32R2F_INSN_BEQZ; goto extract_sfmt_beqz; }
6704e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6714e98e3e1Schristos       case 185:
6724e98e3e1Schristos         if ((entire_insn & 0xfff00000) == 0xb0900000)
6734e98e3e1Schristos           { itype = M32R2F_INSN_BNEZ; goto extract_sfmt_beqz; }
6744e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6754e98e3e1Schristos       case 186:
6764e98e3e1Schristos         if ((entire_insn & 0xfff00000) == 0xb0a00000)
6774e98e3e1Schristos           { itype = M32R2F_INSN_BLTZ; goto extract_sfmt_beqz; }
6784e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6794e98e3e1Schristos       case 187:
6804e98e3e1Schristos         if ((entire_insn & 0xfff00000) == 0xb0b00000)
6814e98e3e1Schristos           { itype = M32R2F_INSN_BGEZ; goto extract_sfmt_beqz; }
6824e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6834e98e3e1Schristos       case 188:
6844e98e3e1Schristos         if ((entire_insn & 0xfff00000) == 0xb0c00000)
6854e98e3e1Schristos           { itype = M32R2F_INSN_BLEZ; goto extract_sfmt_beqz; }
6864e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6874e98e3e1Schristos       case 189:
6884e98e3e1Schristos         if ((entire_insn & 0xfff00000) == 0xb0d00000)
6894e98e3e1Schristos           { itype = M32R2F_INSN_BGTZ; goto extract_sfmt_beqz; }
6904e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
6914e98e3e1Schristos       case 220:
6924e98e3e1Schristos         if ((entire_insn & 0xf0ff0000) == 0xd0c00000)
6934e98e3e1Schristos           { itype = M32R2F_INSN_SETH; goto extract_sfmt_seth; }
6944e98e3e1Schristos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
695*05fa0856Schristos       case 224:
696*05fa0856Schristos       case 225:
697*05fa0856Schristos       case 226:
698*05fa0856Schristos       case 227:
699*05fa0856Schristos       case 228:
700*05fa0856Schristos       case 229:
701*05fa0856Schristos       case 230:
702*05fa0856Schristos       case 231:
703*05fa0856Schristos       case 232:
704*05fa0856Schristos       case 233:
705*05fa0856Schristos       case 234:
706*05fa0856Schristos       case 235:
707*05fa0856Schristos       case 236:
708*05fa0856Schristos       case 237:
709*05fa0856Schristos       case 238:
7104e98e3e1Schristos       case 239: itype = M32R2F_INSN_LD24; goto extract_sfmt_ld24;
711*05fa0856Schristos       case 240:
712*05fa0856Schristos       case 241:
713*05fa0856Schristos       case 242:
714*05fa0856Schristos       case 243:
715*05fa0856Schristos       case 244:
716*05fa0856Schristos       case 245:
717*05fa0856Schristos       case 246:
718*05fa0856Schristos       case 247:
719*05fa0856Schristos       case 248:
720*05fa0856Schristos       case 249:
721*05fa0856Schristos       case 250:
722*05fa0856Schristos       case 251:
723*05fa0856Schristos       case 252:
724*05fa0856Schristos       case 253:
725*05fa0856Schristos       case 254:
7264e98e3e1Schristos       case 255:
7274e98e3e1Schristos         {
728*05fa0856Schristos           unsigned int val1 = (((insn >> 8) & (7 << 0)));
729*05fa0856Schristos           switch (val1)
7304e98e3e1Schristos           {
7314e98e3e1Schristos           case 0:
7324e98e3e1Schristos             if ((entire_insn & 0xff000000) == 0xf8000000)
7334e98e3e1Schristos               { itype = M32R2F_INSN_BCL24; goto extract_sfmt_bcl24; }
7344e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
7354e98e3e1Schristos           case 1:
7364e98e3e1Schristos             if ((entire_insn & 0xff000000) == 0xf9000000)
7374e98e3e1Schristos               { itype = M32R2F_INSN_BNCL24; goto extract_sfmt_bcl24; }
7384e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
7394e98e3e1Schristos           case 4:
7404e98e3e1Schristos             if ((entire_insn & 0xff000000) == 0xfc000000)
7414e98e3e1Schristos               { itype = M32R2F_INSN_BC24; goto extract_sfmt_bc24; }
7424e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
7434e98e3e1Schristos           case 5:
7444e98e3e1Schristos             if ((entire_insn & 0xff000000) == 0xfd000000)
7454e98e3e1Schristos               { itype = M32R2F_INSN_BNC24; goto extract_sfmt_bc24; }
7464e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
7474e98e3e1Schristos           case 6:
7484e98e3e1Schristos             if ((entire_insn & 0xff000000) == 0xfe000000)
7494e98e3e1Schristos               { itype = M32R2F_INSN_BL24; goto extract_sfmt_bl24; }
7504e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
7514e98e3e1Schristos           case 7:
7524e98e3e1Schristos             if ((entire_insn & 0xff000000) == 0xff000000)
7534e98e3e1Schristos               { itype = M32R2F_INSN_BRA24; goto extract_sfmt_bra24; }
7544e98e3e1Schristos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
7554e98e3e1Schristos           default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
7564e98e3e1Schristos           }
7574e98e3e1Schristos         }
7584e98e3e1Schristos       default: itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
7594e98e3e1Schristos       }
7604e98e3e1Schristos     }
7614e98e3e1Schristos   }
7624e98e3e1Schristos 
7634e98e3e1Schristos   /* The instruction has been decoded, now extract the fields.  */
7644e98e3e1Schristos 
7654e98e3e1Schristos  extract_sfmt_empty:
7664e98e3e1Schristos   {
7674e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
7684e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_empty.f
7694e98e3e1Schristos 
7704e98e3e1Schristos 
7714e98e3e1Schristos   /* Record the fields for the semantic handler.  */
772212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0));
7734e98e3e1Schristos 
7744e98e3e1Schristos #undef FLD
7754e98e3e1Schristos     return idesc;
7764e98e3e1Schristos   }
7774e98e3e1Schristos 
7784e98e3e1Schristos  extract_sfmt_add:
7794e98e3e1Schristos   {
7804e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
7814e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
7824e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_add.f
7834e98e3e1Schristos     UINT f_r1;
7844e98e3e1Schristos     UINT f_r2;
7854e98e3e1Schristos 
7864e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
7874e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
7884e98e3e1Schristos 
7894e98e3e1Schristos   /* Record the fields for the semantic handler.  */
7904e98e3e1Schristos   FLD (f_r1) = f_r1;
7914e98e3e1Schristos   FLD (f_r2) = f_r2;
7924e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
7934e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
794212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0));
7954e98e3e1Schristos 
7964e98e3e1Schristos #if WITH_PROFILE_MODEL_P
7974e98e3e1Schristos   /* Record the fields for profiling.  */
7984e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
7994e98e3e1Schristos     {
8004e98e3e1Schristos       FLD (in_dr) = f_r1;
8014e98e3e1Schristos       FLD (in_sr) = f_r2;
8024e98e3e1Schristos       FLD (out_dr) = f_r1;
8034e98e3e1Schristos     }
8044e98e3e1Schristos #endif
8054e98e3e1Schristos #undef FLD
8064e98e3e1Schristos     return idesc;
8074e98e3e1Schristos   }
8084e98e3e1Schristos 
8094e98e3e1Schristos  extract_sfmt_add3:
8104e98e3e1Schristos   {
8114e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
8124e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
8134e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_add3.f
8144e98e3e1Schristos     UINT f_r1;
8154e98e3e1Schristos     UINT f_r2;
8164e98e3e1Schristos     INT f_simm16;
8174e98e3e1Schristos 
8184e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
8194e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
8204e98e3e1Schristos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
8214e98e3e1Schristos 
8224e98e3e1Schristos   /* Record the fields for the semantic handler.  */
8234e98e3e1Schristos   FLD (f_simm16) = f_simm16;
8244e98e3e1Schristos   FLD (f_r2) = f_r2;
8254e98e3e1Schristos   FLD (f_r1) = f_r1;
8264e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
8274e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
828212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add3", "f_simm16 0x%x", 'x', f_simm16, "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
8294e98e3e1Schristos 
8304e98e3e1Schristos #if WITH_PROFILE_MODEL_P
8314e98e3e1Schristos   /* Record the fields for profiling.  */
8324e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
8334e98e3e1Schristos     {
8344e98e3e1Schristos       FLD (in_sr) = f_r2;
8354e98e3e1Schristos       FLD (out_dr) = f_r1;
8364e98e3e1Schristos     }
8374e98e3e1Schristos #endif
8384e98e3e1Schristos #undef FLD
8394e98e3e1Schristos     return idesc;
8404e98e3e1Schristos   }
8414e98e3e1Schristos 
8424e98e3e1Schristos  extract_sfmt_and3:
8434e98e3e1Schristos   {
8444e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
8454e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
8464e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_and3.f
8474e98e3e1Schristos     UINT f_r1;
8484e98e3e1Schristos     UINT f_r2;
8494e98e3e1Schristos     UINT f_uimm16;
8504e98e3e1Schristos 
8514e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
8524e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
8534e98e3e1Schristos     f_uimm16 = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
8544e98e3e1Schristos 
8554e98e3e1Schristos   /* Record the fields for the semantic handler.  */
8564e98e3e1Schristos   FLD (f_r2) = f_r2;
8574e98e3e1Schristos   FLD (f_uimm16) = f_uimm16;
8584e98e3e1Schristos   FLD (f_r1) = f_r1;
8594e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
8604e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
861212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and3", "f_r2 0x%x", 'x', f_r2, "f_uimm16 0x%x", 'x', f_uimm16, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
8624e98e3e1Schristos 
8634e98e3e1Schristos #if WITH_PROFILE_MODEL_P
8644e98e3e1Schristos   /* Record the fields for profiling.  */
8654e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
8664e98e3e1Schristos     {
8674e98e3e1Schristos       FLD (in_sr) = f_r2;
8684e98e3e1Schristos       FLD (out_dr) = f_r1;
8694e98e3e1Schristos     }
8704e98e3e1Schristos #endif
8714e98e3e1Schristos #undef FLD
8724e98e3e1Schristos     return idesc;
8734e98e3e1Schristos   }
8744e98e3e1Schristos 
8754e98e3e1Schristos  extract_sfmt_or3:
8764e98e3e1Schristos   {
8774e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
8784e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
8794e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_and3.f
8804e98e3e1Schristos     UINT f_r1;
8814e98e3e1Schristos     UINT f_r2;
8824e98e3e1Schristos     UINT f_uimm16;
8834e98e3e1Schristos 
8844e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
8854e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
8864e98e3e1Schristos     f_uimm16 = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
8874e98e3e1Schristos 
8884e98e3e1Schristos   /* Record the fields for the semantic handler.  */
8894e98e3e1Schristos   FLD (f_r2) = f_r2;
8904e98e3e1Schristos   FLD (f_uimm16) = f_uimm16;
8914e98e3e1Schristos   FLD (f_r1) = f_r1;
8924e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
8934e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
894212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_or3", "f_r2 0x%x", 'x', f_r2, "f_uimm16 0x%x", 'x', f_uimm16, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
8954e98e3e1Schristos 
8964e98e3e1Schristos #if WITH_PROFILE_MODEL_P
8974e98e3e1Schristos   /* Record the fields for profiling.  */
8984e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
8994e98e3e1Schristos     {
9004e98e3e1Schristos       FLD (in_sr) = f_r2;
9014e98e3e1Schristos       FLD (out_dr) = f_r1;
9024e98e3e1Schristos     }
9034e98e3e1Schristos #endif
9044e98e3e1Schristos #undef FLD
9054e98e3e1Schristos     return idesc;
9064e98e3e1Schristos   }
9074e98e3e1Schristos 
9084e98e3e1Schristos  extract_sfmt_addi:
9094e98e3e1Schristos   {
9104e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
9114e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
9124e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_addi.f
9134e98e3e1Schristos     UINT f_r1;
9144e98e3e1Schristos     INT f_simm8;
9154e98e3e1Schristos 
9164e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
9174e98e3e1Schristos     f_simm8 = EXTRACT_MSB0_SINT (insn, 16, 8, 8);
9184e98e3e1Schristos 
9194e98e3e1Schristos   /* Record the fields for the semantic handler.  */
9204e98e3e1Schristos   FLD (f_r1) = f_r1;
9214e98e3e1Schristos   FLD (f_simm8) = f_simm8;
9224e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
923212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi", "f_r1 0x%x", 'x', f_r1, "f_simm8 0x%x", 'x', f_simm8, "dr 0x%x", 'x', f_r1, (char *) 0));
9244e98e3e1Schristos 
9254e98e3e1Schristos #if WITH_PROFILE_MODEL_P
9264e98e3e1Schristos   /* Record the fields for profiling.  */
9274e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
9284e98e3e1Schristos     {
9294e98e3e1Schristos       FLD (in_dr) = f_r1;
9304e98e3e1Schristos       FLD (out_dr) = f_r1;
9314e98e3e1Schristos     }
9324e98e3e1Schristos #endif
9334e98e3e1Schristos #undef FLD
9344e98e3e1Schristos     return idesc;
9354e98e3e1Schristos   }
9364e98e3e1Schristos 
9374e98e3e1Schristos  extract_sfmt_addv:
9384e98e3e1Schristos   {
9394e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
9404e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
9414e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_add.f
9424e98e3e1Schristos     UINT f_r1;
9434e98e3e1Schristos     UINT f_r2;
9444e98e3e1Schristos 
9454e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
9464e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
9474e98e3e1Schristos 
9484e98e3e1Schristos   /* Record the fields for the semantic handler.  */
9494e98e3e1Schristos   FLD (f_r1) = f_r1;
9504e98e3e1Schristos   FLD (f_r2) = f_r2;
9514e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
9524e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
953212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addv", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0));
9544e98e3e1Schristos 
9554e98e3e1Schristos #if WITH_PROFILE_MODEL_P
9564e98e3e1Schristos   /* Record the fields for profiling.  */
9574e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
9584e98e3e1Schristos     {
9594e98e3e1Schristos       FLD (in_dr) = f_r1;
9604e98e3e1Schristos       FLD (in_sr) = f_r2;
9614e98e3e1Schristos       FLD (out_dr) = f_r1;
9624e98e3e1Schristos     }
9634e98e3e1Schristos #endif
9644e98e3e1Schristos #undef FLD
9654e98e3e1Schristos     return idesc;
9664e98e3e1Schristos   }
9674e98e3e1Schristos 
9684e98e3e1Schristos  extract_sfmt_addv3:
9694e98e3e1Schristos   {
9704e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
9714e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
9724e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_add3.f
9734e98e3e1Schristos     UINT f_r1;
9744e98e3e1Schristos     UINT f_r2;
9754e98e3e1Schristos     INT f_simm16;
9764e98e3e1Schristos 
9774e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
9784e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
9794e98e3e1Schristos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
9804e98e3e1Schristos 
9814e98e3e1Schristos   /* Record the fields for the semantic handler.  */
9824e98e3e1Schristos   FLD (f_simm16) = f_simm16;
9834e98e3e1Schristos   FLD (f_r2) = f_r2;
9844e98e3e1Schristos   FLD (f_r1) = f_r1;
9854e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
9864e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
987212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addv3", "f_simm16 0x%x", 'x', f_simm16, "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
9884e98e3e1Schristos 
9894e98e3e1Schristos #if WITH_PROFILE_MODEL_P
9904e98e3e1Schristos   /* Record the fields for profiling.  */
9914e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
9924e98e3e1Schristos     {
9934e98e3e1Schristos       FLD (in_sr) = f_r2;
9944e98e3e1Schristos       FLD (out_dr) = f_r1;
9954e98e3e1Schristos     }
9964e98e3e1Schristos #endif
9974e98e3e1Schristos #undef FLD
9984e98e3e1Schristos     return idesc;
9994e98e3e1Schristos   }
10004e98e3e1Schristos 
10014e98e3e1Schristos  extract_sfmt_addx:
10024e98e3e1Schristos   {
10034e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
10044e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
10054e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_add.f
10064e98e3e1Schristos     UINT f_r1;
10074e98e3e1Schristos     UINT f_r2;
10084e98e3e1Schristos 
10094e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
10104e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
10114e98e3e1Schristos 
10124e98e3e1Schristos   /* Record the fields for the semantic handler.  */
10134e98e3e1Schristos   FLD (f_r1) = f_r1;
10144e98e3e1Schristos   FLD (f_r2) = f_r2;
10154e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
10164e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
1017212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addx", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0));
10184e98e3e1Schristos 
10194e98e3e1Schristos #if WITH_PROFILE_MODEL_P
10204e98e3e1Schristos   /* Record the fields for profiling.  */
10214e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
10224e98e3e1Schristos     {
10234e98e3e1Schristos       FLD (in_dr) = f_r1;
10244e98e3e1Schristos       FLD (in_sr) = f_r2;
10254e98e3e1Schristos       FLD (out_dr) = f_r1;
10264e98e3e1Schristos     }
10274e98e3e1Schristos #endif
10284e98e3e1Schristos #undef FLD
10294e98e3e1Schristos     return idesc;
10304e98e3e1Schristos   }
10314e98e3e1Schristos 
10324e98e3e1Schristos  extract_sfmt_bc8:
10334e98e3e1Schristos   {
10344e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
10354e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
10364e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_bl8.f
10374e98e3e1Schristos     SI f_disp8;
10384e98e3e1Schristos 
1039*05fa0856Schristos     f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) * (4))) + (((pc) & (-4))));
10404e98e3e1Schristos 
10414e98e3e1Schristos   /* Record the fields for the semantic handler.  */
10424e98e3e1Schristos   FLD (i_disp8) = f_disp8;
1043212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bc8", "disp8 0x%x", 'x', f_disp8, (char *) 0));
10444e98e3e1Schristos 
10454e98e3e1Schristos #if WITH_PROFILE_MODEL_P
10464e98e3e1Schristos   /* Record the fields for profiling.  */
10474e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
10484e98e3e1Schristos     {
10494e98e3e1Schristos     }
10504e98e3e1Schristos #endif
10514e98e3e1Schristos #undef FLD
10524e98e3e1Schristos     return idesc;
10534e98e3e1Schristos   }
10544e98e3e1Schristos 
10554e98e3e1Schristos  extract_sfmt_bc24:
10564e98e3e1Schristos   {
10574e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
10584e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
10594e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_bl24.f
10604e98e3e1Schristos     SI f_disp24;
10614e98e3e1Schristos 
1062*05fa0856Schristos     f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) * (4))) + (pc));
10634e98e3e1Schristos 
10644e98e3e1Schristos   /* Record the fields for the semantic handler.  */
10654e98e3e1Schristos   FLD (i_disp24) = f_disp24;
1066212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bc24", "disp24 0x%x", 'x', f_disp24, (char *) 0));
10674e98e3e1Schristos 
10684e98e3e1Schristos #if WITH_PROFILE_MODEL_P
10694e98e3e1Schristos   /* Record the fields for profiling.  */
10704e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
10714e98e3e1Schristos     {
10724e98e3e1Schristos     }
10734e98e3e1Schristos #endif
10744e98e3e1Schristos #undef FLD
10754e98e3e1Schristos     return idesc;
10764e98e3e1Schristos   }
10774e98e3e1Schristos 
10784e98e3e1Schristos  extract_sfmt_beq:
10794e98e3e1Schristos   {
10804e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
10814e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
10824e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_beq.f
10834e98e3e1Schristos     UINT f_r1;
10844e98e3e1Schristos     UINT f_r2;
10854e98e3e1Schristos     SI f_disp16;
10864e98e3e1Schristos 
10874e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
10884e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1089*05fa0856Schristos     f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 16, 16)) * (4))) + (pc));
10904e98e3e1Schristos 
10914e98e3e1Schristos   /* Record the fields for the semantic handler.  */
10924e98e3e1Schristos   FLD (f_r1) = f_r1;
10934e98e3e1Schristos   FLD (f_r2) = f_r2;
10944e98e3e1Schristos   FLD (i_disp16) = f_disp16;
10954e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
10964e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
1097212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_beq", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "disp16 0x%x", 'x', f_disp16, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
10984e98e3e1Schristos 
10994e98e3e1Schristos #if WITH_PROFILE_MODEL_P
11004e98e3e1Schristos   /* Record the fields for profiling.  */
11014e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
11024e98e3e1Schristos     {
11034e98e3e1Schristos       FLD (in_src1) = f_r1;
11044e98e3e1Schristos       FLD (in_src2) = f_r2;
11054e98e3e1Schristos     }
11064e98e3e1Schristos #endif
11074e98e3e1Schristos #undef FLD
11084e98e3e1Schristos     return idesc;
11094e98e3e1Schristos   }
11104e98e3e1Schristos 
11114e98e3e1Schristos  extract_sfmt_beqz:
11124e98e3e1Schristos   {
11134e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
11144e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
11154e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_beq.f
11164e98e3e1Schristos     UINT f_r2;
11174e98e3e1Schristos     SI f_disp16;
11184e98e3e1Schristos 
11194e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1120*05fa0856Schristos     f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 16, 16)) * (4))) + (pc));
11214e98e3e1Schristos 
11224e98e3e1Schristos   /* Record the fields for the semantic handler.  */
11234e98e3e1Schristos   FLD (f_r2) = f_r2;
11244e98e3e1Schristos   FLD (i_disp16) = f_disp16;
11254e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
1126212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_beqz", "f_r2 0x%x", 'x', f_r2, "disp16 0x%x", 'x', f_disp16, "src2 0x%x", 'x', f_r2, (char *) 0));
11274e98e3e1Schristos 
11284e98e3e1Schristos #if WITH_PROFILE_MODEL_P
11294e98e3e1Schristos   /* Record the fields for profiling.  */
11304e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
11314e98e3e1Schristos     {
11324e98e3e1Schristos       FLD (in_src2) = f_r2;
11334e98e3e1Schristos     }
11344e98e3e1Schristos #endif
11354e98e3e1Schristos #undef FLD
11364e98e3e1Schristos     return idesc;
11374e98e3e1Schristos   }
11384e98e3e1Schristos 
11394e98e3e1Schristos  extract_sfmt_bl8:
11404e98e3e1Schristos   {
11414e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
11424e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
11434e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_bl8.f
11444e98e3e1Schristos     SI f_disp8;
11454e98e3e1Schristos 
1146*05fa0856Schristos     f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) * (4))) + (((pc) & (-4))));
11474e98e3e1Schristos 
11484e98e3e1Schristos   /* Record the fields for the semantic handler.  */
11494e98e3e1Schristos   FLD (i_disp8) = f_disp8;
1150212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bl8", "disp8 0x%x", 'x', f_disp8, (char *) 0));
11514e98e3e1Schristos 
11524e98e3e1Schristos #if WITH_PROFILE_MODEL_P
11534e98e3e1Schristos   /* Record the fields for profiling.  */
11544e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
11554e98e3e1Schristos     {
11564e98e3e1Schristos       FLD (out_h_gr_SI_14) = 14;
11574e98e3e1Schristos     }
11584e98e3e1Schristos #endif
11594e98e3e1Schristos #undef FLD
11604e98e3e1Schristos     return idesc;
11614e98e3e1Schristos   }
11624e98e3e1Schristos 
11634e98e3e1Schristos  extract_sfmt_bl24:
11644e98e3e1Schristos   {
11654e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
11664e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
11674e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_bl24.f
11684e98e3e1Schristos     SI f_disp24;
11694e98e3e1Schristos 
1170*05fa0856Schristos     f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) * (4))) + (pc));
11714e98e3e1Schristos 
11724e98e3e1Schristos   /* Record the fields for the semantic handler.  */
11734e98e3e1Schristos   FLD (i_disp24) = f_disp24;
1174212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bl24", "disp24 0x%x", 'x', f_disp24, (char *) 0));
11754e98e3e1Schristos 
11764e98e3e1Schristos #if WITH_PROFILE_MODEL_P
11774e98e3e1Schristos   /* Record the fields for profiling.  */
11784e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
11794e98e3e1Schristos     {
11804e98e3e1Schristos       FLD (out_h_gr_SI_14) = 14;
11814e98e3e1Schristos     }
11824e98e3e1Schristos #endif
11834e98e3e1Schristos #undef FLD
11844e98e3e1Schristos     return idesc;
11854e98e3e1Schristos   }
11864e98e3e1Schristos 
11874e98e3e1Schristos  extract_sfmt_bcl8:
11884e98e3e1Schristos   {
11894e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
11904e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
11914e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_bl8.f
11924e98e3e1Schristos     SI f_disp8;
11934e98e3e1Schristos 
1194*05fa0856Schristos     f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) * (4))) + (((pc) & (-4))));
11954e98e3e1Schristos 
11964e98e3e1Schristos   /* Record the fields for the semantic handler.  */
11974e98e3e1Schristos   FLD (i_disp8) = f_disp8;
1198212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcl8", "disp8 0x%x", 'x', f_disp8, (char *) 0));
11994e98e3e1Schristos 
12004e98e3e1Schristos #if WITH_PROFILE_MODEL_P
12014e98e3e1Schristos   /* Record the fields for profiling.  */
12024e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
12034e98e3e1Schristos     {
12044e98e3e1Schristos       FLD (out_h_gr_SI_14) = 14;
12054e98e3e1Schristos     }
12064e98e3e1Schristos #endif
12074e98e3e1Schristos #undef FLD
12084e98e3e1Schristos     return idesc;
12094e98e3e1Schristos   }
12104e98e3e1Schristos 
12114e98e3e1Schristos  extract_sfmt_bcl24:
12124e98e3e1Schristos   {
12134e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
12144e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
12154e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_bl24.f
12164e98e3e1Schristos     SI f_disp24;
12174e98e3e1Schristos 
1218*05fa0856Schristos     f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) * (4))) + (pc));
12194e98e3e1Schristos 
12204e98e3e1Schristos   /* Record the fields for the semantic handler.  */
12214e98e3e1Schristos   FLD (i_disp24) = f_disp24;
1222212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcl24", "disp24 0x%x", 'x', f_disp24, (char *) 0));
12234e98e3e1Schristos 
12244e98e3e1Schristos #if WITH_PROFILE_MODEL_P
12254e98e3e1Schristos   /* Record the fields for profiling.  */
12264e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
12274e98e3e1Schristos     {
12284e98e3e1Schristos       FLD (out_h_gr_SI_14) = 14;
12294e98e3e1Schristos     }
12304e98e3e1Schristos #endif
12314e98e3e1Schristos #undef FLD
12324e98e3e1Schristos     return idesc;
12334e98e3e1Schristos   }
12344e98e3e1Schristos 
12354e98e3e1Schristos  extract_sfmt_bra8:
12364e98e3e1Schristos   {
12374e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
12384e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
12394e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_bl8.f
12404e98e3e1Schristos     SI f_disp8;
12414e98e3e1Schristos 
1242*05fa0856Schristos     f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) * (4))) + (((pc) & (-4))));
12434e98e3e1Schristos 
12444e98e3e1Schristos   /* Record the fields for the semantic handler.  */
12454e98e3e1Schristos   FLD (i_disp8) = f_disp8;
1246212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bra8", "disp8 0x%x", 'x', f_disp8, (char *) 0));
12474e98e3e1Schristos 
12484e98e3e1Schristos #if WITH_PROFILE_MODEL_P
12494e98e3e1Schristos   /* Record the fields for profiling.  */
12504e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
12514e98e3e1Schristos     {
12524e98e3e1Schristos     }
12534e98e3e1Schristos #endif
12544e98e3e1Schristos #undef FLD
12554e98e3e1Schristos     return idesc;
12564e98e3e1Schristos   }
12574e98e3e1Schristos 
12584e98e3e1Schristos  extract_sfmt_bra24:
12594e98e3e1Schristos   {
12604e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
12614e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
12624e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_bl24.f
12634e98e3e1Schristos     SI f_disp24;
12644e98e3e1Schristos 
1265*05fa0856Schristos     f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) * (4))) + (pc));
12664e98e3e1Schristos 
12674e98e3e1Schristos   /* Record the fields for the semantic handler.  */
12684e98e3e1Schristos   FLD (i_disp24) = f_disp24;
1269212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bra24", "disp24 0x%x", 'x', f_disp24, (char *) 0));
12704e98e3e1Schristos 
12714e98e3e1Schristos #if WITH_PROFILE_MODEL_P
12724e98e3e1Schristos   /* Record the fields for profiling.  */
12734e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
12744e98e3e1Schristos     {
12754e98e3e1Schristos     }
12764e98e3e1Schristos #endif
12774e98e3e1Schristos #undef FLD
12784e98e3e1Schristos     return idesc;
12794e98e3e1Schristos   }
12804e98e3e1Schristos 
12814e98e3e1Schristos  extract_sfmt_cmp:
12824e98e3e1Schristos   {
12834e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
12844e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
12854e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_plus.f
12864e98e3e1Schristos     UINT f_r1;
12874e98e3e1Schristos     UINT f_r2;
12884e98e3e1Schristos 
12894e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
12904e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
12914e98e3e1Schristos 
12924e98e3e1Schristos   /* Record the fields for the semantic handler.  */
12934e98e3e1Schristos   FLD (f_r1) = f_r1;
12944e98e3e1Schristos   FLD (f_r2) = f_r2;
12954e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
12964e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
1297212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
12984e98e3e1Schristos 
12994e98e3e1Schristos #if WITH_PROFILE_MODEL_P
13004e98e3e1Schristos   /* Record the fields for profiling.  */
13014e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
13024e98e3e1Schristos     {
13034e98e3e1Schristos       FLD (in_src1) = f_r1;
13044e98e3e1Schristos       FLD (in_src2) = f_r2;
13054e98e3e1Schristos     }
13064e98e3e1Schristos #endif
13074e98e3e1Schristos #undef FLD
13084e98e3e1Schristos     return idesc;
13094e98e3e1Schristos   }
13104e98e3e1Schristos 
13114e98e3e1Schristos  extract_sfmt_cmpi:
13124e98e3e1Schristos   {
13134e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
13144e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
13154e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_d.f
13164e98e3e1Schristos     UINT f_r2;
13174e98e3e1Schristos     INT f_simm16;
13184e98e3e1Schristos 
13194e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
13204e98e3e1Schristos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
13214e98e3e1Schristos 
13224e98e3e1Schristos   /* Record the fields for the semantic handler.  */
13234e98e3e1Schristos   FLD (f_simm16) = f_simm16;
13244e98e3e1Schristos   FLD (f_r2) = f_r2;
13254e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
1326212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpi", "f_simm16 0x%x", 'x', f_simm16, "f_r2 0x%x", 'x', f_r2, "src2 0x%x", 'x', f_r2, (char *) 0));
13274e98e3e1Schristos 
13284e98e3e1Schristos #if WITH_PROFILE_MODEL_P
13294e98e3e1Schristos   /* Record the fields for profiling.  */
13304e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
13314e98e3e1Schristos     {
13324e98e3e1Schristos       FLD (in_src2) = f_r2;
13334e98e3e1Schristos     }
13344e98e3e1Schristos #endif
13354e98e3e1Schristos #undef FLD
13364e98e3e1Schristos     return idesc;
13374e98e3e1Schristos   }
13384e98e3e1Schristos 
13394e98e3e1Schristos  extract_sfmt_cmpz:
13404e98e3e1Schristos   {
13414e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
13424e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
13434e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_plus.f
13444e98e3e1Schristos     UINT f_r2;
13454e98e3e1Schristos 
13464e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
13474e98e3e1Schristos 
13484e98e3e1Schristos   /* Record the fields for the semantic handler.  */
13494e98e3e1Schristos   FLD (f_r2) = f_r2;
13504e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
1351212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpz", "f_r2 0x%x", 'x', f_r2, "src2 0x%x", 'x', f_r2, (char *) 0));
13524e98e3e1Schristos 
13534e98e3e1Schristos #if WITH_PROFILE_MODEL_P
13544e98e3e1Schristos   /* Record the fields for profiling.  */
13554e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
13564e98e3e1Schristos     {
13574e98e3e1Schristos       FLD (in_src2) = f_r2;
13584e98e3e1Schristos     }
13594e98e3e1Schristos #endif
13604e98e3e1Schristos #undef FLD
13614e98e3e1Schristos     return idesc;
13624e98e3e1Schristos   }
13634e98e3e1Schristos 
13644e98e3e1Schristos  extract_sfmt_div:
13654e98e3e1Schristos   {
13664e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
13674e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
13684e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_add.f
13694e98e3e1Schristos     UINT f_r1;
13704e98e3e1Schristos     UINT f_r2;
13714e98e3e1Schristos 
13724e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
13734e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
13744e98e3e1Schristos 
13754e98e3e1Schristos   /* Record the fields for the semantic handler.  */
13764e98e3e1Schristos   FLD (f_r1) = f_r1;
13774e98e3e1Schristos   FLD (f_r2) = f_r2;
13784e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
13794e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
1380212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0));
13814e98e3e1Schristos 
13824e98e3e1Schristos #if WITH_PROFILE_MODEL_P
13834e98e3e1Schristos   /* Record the fields for profiling.  */
13844e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
13854e98e3e1Schristos     {
13864e98e3e1Schristos       FLD (in_dr) = f_r1;
13874e98e3e1Schristos       FLD (in_sr) = f_r2;
13884e98e3e1Schristos       FLD (out_dr) = f_r1;
13894e98e3e1Schristos     }
13904e98e3e1Schristos #endif
13914e98e3e1Schristos #undef FLD
13924e98e3e1Schristos     return idesc;
13934e98e3e1Schristos   }
13944e98e3e1Schristos 
13954e98e3e1Schristos  extract_sfmt_jc:
13964e98e3e1Schristos   {
13974e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
13984e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
13994e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_jl.f
14004e98e3e1Schristos     UINT f_r2;
14014e98e3e1Schristos 
14024e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
14034e98e3e1Schristos 
14044e98e3e1Schristos   /* Record the fields for the semantic handler.  */
14054e98e3e1Schristos   FLD (f_r2) = f_r2;
14064e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
1407212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jc", "f_r2 0x%x", 'x', f_r2, "sr 0x%x", 'x', f_r2, (char *) 0));
14084e98e3e1Schristos 
14094e98e3e1Schristos #if WITH_PROFILE_MODEL_P
14104e98e3e1Schristos   /* Record the fields for profiling.  */
14114e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
14124e98e3e1Schristos     {
14134e98e3e1Schristos       FLD (in_sr) = f_r2;
14144e98e3e1Schristos     }
14154e98e3e1Schristos #endif
14164e98e3e1Schristos #undef FLD
14174e98e3e1Schristos     return idesc;
14184e98e3e1Schristos   }
14194e98e3e1Schristos 
14204e98e3e1Schristos  extract_sfmt_jl:
14214e98e3e1Schristos   {
14224e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
14234e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
14244e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_jl.f
14254e98e3e1Schristos     UINT f_r2;
14264e98e3e1Schristos 
14274e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
14284e98e3e1Schristos 
14294e98e3e1Schristos   /* Record the fields for the semantic handler.  */
14304e98e3e1Schristos   FLD (f_r2) = f_r2;
14314e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
1432212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jl", "f_r2 0x%x", 'x', f_r2, "sr 0x%x", 'x', f_r2, (char *) 0));
14334e98e3e1Schristos 
14344e98e3e1Schristos #if WITH_PROFILE_MODEL_P
14354e98e3e1Schristos   /* Record the fields for profiling.  */
14364e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
14374e98e3e1Schristos     {
14384e98e3e1Schristos       FLD (in_sr) = f_r2;
14394e98e3e1Schristos       FLD (out_h_gr_SI_14) = 14;
14404e98e3e1Schristos     }
14414e98e3e1Schristos #endif
14424e98e3e1Schristos #undef FLD
14434e98e3e1Schristos     return idesc;
14444e98e3e1Schristos   }
14454e98e3e1Schristos 
14464e98e3e1Schristos  extract_sfmt_jmp:
14474e98e3e1Schristos   {
14484e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
14494e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
14504e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_jl.f
14514e98e3e1Schristos     UINT f_r2;
14524e98e3e1Schristos 
14534e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
14544e98e3e1Schristos 
14554e98e3e1Schristos   /* Record the fields for the semantic handler.  */
14564e98e3e1Schristos   FLD (f_r2) = f_r2;
14574e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
1458212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jmp", "f_r2 0x%x", 'x', f_r2, "sr 0x%x", 'x', f_r2, (char *) 0));
14594e98e3e1Schristos 
14604e98e3e1Schristos #if WITH_PROFILE_MODEL_P
14614e98e3e1Schristos   /* Record the fields for profiling.  */
14624e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
14634e98e3e1Schristos     {
14644e98e3e1Schristos       FLD (in_sr) = f_r2;
14654e98e3e1Schristos     }
14664e98e3e1Schristos #endif
14674e98e3e1Schristos #undef FLD
14684e98e3e1Schristos     return idesc;
14694e98e3e1Schristos   }
14704e98e3e1Schristos 
14714e98e3e1Schristos  extract_sfmt_ld:
14724e98e3e1Schristos   {
14734e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
14744e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
14754e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_ld_plus.f
14764e98e3e1Schristos     UINT f_r1;
14774e98e3e1Schristos     UINT f_r2;
14784e98e3e1Schristos 
14794e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
14804e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
14814e98e3e1Schristos 
14824e98e3e1Schristos   /* Record the fields for the semantic handler.  */
14834e98e3e1Schristos   FLD (f_r2) = f_r2;
14844e98e3e1Schristos   FLD (f_r1) = f_r1;
14854e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
14864e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1487212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ld", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
14884e98e3e1Schristos 
14894e98e3e1Schristos #if WITH_PROFILE_MODEL_P
14904e98e3e1Schristos   /* Record the fields for profiling.  */
14914e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
14924e98e3e1Schristos     {
14934e98e3e1Schristos       FLD (in_sr) = f_r2;
14944e98e3e1Schristos       FLD (out_dr) = f_r1;
14954e98e3e1Schristos     }
14964e98e3e1Schristos #endif
14974e98e3e1Schristos #undef FLD
14984e98e3e1Schristos     return idesc;
14994e98e3e1Schristos   }
15004e98e3e1Schristos 
15014e98e3e1Schristos  extract_sfmt_ld_d:
15024e98e3e1Schristos   {
15034e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
15044e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
15054e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_add3.f
15064e98e3e1Schristos     UINT f_r1;
15074e98e3e1Schristos     UINT f_r2;
15084e98e3e1Schristos     INT f_simm16;
15094e98e3e1Schristos 
15104e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
15114e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
15124e98e3e1Schristos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
15134e98e3e1Schristos 
15144e98e3e1Schristos   /* Record the fields for the semantic handler.  */
15154e98e3e1Schristos   FLD (f_simm16) = f_simm16;
15164e98e3e1Schristos   FLD (f_r2) = f_r2;
15174e98e3e1Schristos   FLD (f_r1) = f_r1;
15184e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
15194e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1520212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ld_d", "f_simm16 0x%x", 'x', f_simm16, "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
15214e98e3e1Schristos 
15224e98e3e1Schristos #if WITH_PROFILE_MODEL_P
15234e98e3e1Schristos   /* Record the fields for profiling.  */
15244e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
15254e98e3e1Schristos     {
15264e98e3e1Schristos       FLD (in_sr) = f_r2;
15274e98e3e1Schristos       FLD (out_dr) = f_r1;
15284e98e3e1Schristos     }
15294e98e3e1Schristos #endif
15304e98e3e1Schristos #undef FLD
15314e98e3e1Schristos     return idesc;
15324e98e3e1Schristos   }
15334e98e3e1Schristos 
15344e98e3e1Schristos  extract_sfmt_ldb:
15354e98e3e1Schristos   {
15364e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
15374e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
15384e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_ld_plus.f
15394e98e3e1Schristos     UINT f_r1;
15404e98e3e1Schristos     UINT f_r2;
15414e98e3e1Schristos 
15424e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
15434e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
15444e98e3e1Schristos 
15454e98e3e1Schristos   /* Record the fields for the semantic handler.  */
15464e98e3e1Schristos   FLD (f_r2) = f_r2;
15474e98e3e1Schristos   FLD (f_r1) = f_r1;
15484e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
15494e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1550212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldb", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
15514e98e3e1Schristos 
15524e98e3e1Schristos #if WITH_PROFILE_MODEL_P
15534e98e3e1Schristos   /* Record the fields for profiling.  */
15544e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
15554e98e3e1Schristos     {
15564e98e3e1Schristos       FLD (in_sr) = f_r2;
15574e98e3e1Schristos       FLD (out_dr) = f_r1;
15584e98e3e1Schristos     }
15594e98e3e1Schristos #endif
15604e98e3e1Schristos #undef FLD
15614e98e3e1Schristos     return idesc;
15624e98e3e1Schristos   }
15634e98e3e1Schristos 
15644e98e3e1Schristos  extract_sfmt_ldb_d:
15654e98e3e1Schristos   {
15664e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
15674e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
15684e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_add3.f
15694e98e3e1Schristos     UINT f_r1;
15704e98e3e1Schristos     UINT f_r2;
15714e98e3e1Schristos     INT f_simm16;
15724e98e3e1Schristos 
15734e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
15744e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
15754e98e3e1Schristos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
15764e98e3e1Schristos 
15774e98e3e1Schristos   /* Record the fields for the semantic handler.  */
15784e98e3e1Schristos   FLD (f_simm16) = f_simm16;
15794e98e3e1Schristos   FLD (f_r2) = f_r2;
15804e98e3e1Schristos   FLD (f_r1) = f_r1;
15814e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
15824e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1583212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldb_d", "f_simm16 0x%x", 'x', f_simm16, "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
15844e98e3e1Schristos 
15854e98e3e1Schristos #if WITH_PROFILE_MODEL_P
15864e98e3e1Schristos   /* Record the fields for profiling.  */
15874e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
15884e98e3e1Schristos     {
15894e98e3e1Schristos       FLD (in_sr) = f_r2;
15904e98e3e1Schristos       FLD (out_dr) = f_r1;
15914e98e3e1Schristos     }
15924e98e3e1Schristos #endif
15934e98e3e1Schristos #undef FLD
15944e98e3e1Schristos     return idesc;
15954e98e3e1Schristos   }
15964e98e3e1Schristos 
15974e98e3e1Schristos  extract_sfmt_ldh:
15984e98e3e1Schristos   {
15994e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
16004e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
16014e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_ld_plus.f
16024e98e3e1Schristos     UINT f_r1;
16034e98e3e1Schristos     UINT f_r2;
16044e98e3e1Schristos 
16054e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
16064e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
16074e98e3e1Schristos 
16084e98e3e1Schristos   /* Record the fields for the semantic handler.  */
16094e98e3e1Schristos   FLD (f_r2) = f_r2;
16104e98e3e1Schristos   FLD (f_r1) = f_r1;
16114e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
16124e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1613212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldh", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
16144e98e3e1Schristos 
16154e98e3e1Schristos #if WITH_PROFILE_MODEL_P
16164e98e3e1Schristos   /* Record the fields for profiling.  */
16174e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
16184e98e3e1Schristos     {
16194e98e3e1Schristos       FLD (in_sr) = f_r2;
16204e98e3e1Schristos       FLD (out_dr) = f_r1;
16214e98e3e1Schristos     }
16224e98e3e1Schristos #endif
16234e98e3e1Schristos #undef FLD
16244e98e3e1Schristos     return idesc;
16254e98e3e1Schristos   }
16264e98e3e1Schristos 
16274e98e3e1Schristos  extract_sfmt_ldh_d:
16284e98e3e1Schristos   {
16294e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
16304e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
16314e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_add3.f
16324e98e3e1Schristos     UINT f_r1;
16334e98e3e1Schristos     UINT f_r2;
16344e98e3e1Schristos     INT f_simm16;
16354e98e3e1Schristos 
16364e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
16374e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
16384e98e3e1Schristos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
16394e98e3e1Schristos 
16404e98e3e1Schristos   /* Record the fields for the semantic handler.  */
16414e98e3e1Schristos   FLD (f_simm16) = f_simm16;
16424e98e3e1Schristos   FLD (f_r2) = f_r2;
16434e98e3e1Schristos   FLD (f_r1) = f_r1;
16444e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
16454e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1646212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldh_d", "f_simm16 0x%x", 'x', f_simm16, "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
16474e98e3e1Schristos 
16484e98e3e1Schristos #if WITH_PROFILE_MODEL_P
16494e98e3e1Schristos   /* Record the fields for profiling.  */
16504e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
16514e98e3e1Schristos     {
16524e98e3e1Schristos       FLD (in_sr) = f_r2;
16534e98e3e1Schristos       FLD (out_dr) = f_r1;
16544e98e3e1Schristos     }
16554e98e3e1Schristos #endif
16564e98e3e1Schristos #undef FLD
16574e98e3e1Schristos     return idesc;
16584e98e3e1Schristos   }
16594e98e3e1Schristos 
16604e98e3e1Schristos  extract_sfmt_ld_plus:
16614e98e3e1Schristos   {
16624e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
16634e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
16644e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_ld_plus.f
16654e98e3e1Schristos     UINT f_r1;
16664e98e3e1Schristos     UINT f_r2;
16674e98e3e1Schristos 
16684e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
16694e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
16704e98e3e1Schristos 
16714e98e3e1Schristos   /* Record the fields for the semantic handler.  */
16724e98e3e1Schristos   FLD (f_r2) = f_r2;
16734e98e3e1Schristos   FLD (f_r1) = f_r1;
16744e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
16754e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1676212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ld_plus", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
16774e98e3e1Schristos 
16784e98e3e1Schristos #if WITH_PROFILE_MODEL_P
16794e98e3e1Schristos   /* Record the fields for profiling.  */
16804e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
16814e98e3e1Schristos     {
16824e98e3e1Schristos       FLD (in_sr) = f_r2;
16834e98e3e1Schristos       FLD (out_dr) = f_r1;
16844e98e3e1Schristos       FLD (out_sr) = f_r2;
16854e98e3e1Schristos     }
16864e98e3e1Schristos #endif
16874e98e3e1Schristos #undef FLD
16884e98e3e1Schristos     return idesc;
16894e98e3e1Schristos   }
16904e98e3e1Schristos 
16914e98e3e1Schristos  extract_sfmt_ld24:
16924e98e3e1Schristos   {
16934e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
16944e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
16954e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_ld24.f
16964e98e3e1Schristos     UINT f_r1;
16974e98e3e1Schristos     UINT f_uimm24;
16984e98e3e1Schristos 
16994e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
17004e98e3e1Schristos     f_uimm24 = EXTRACT_MSB0_UINT (insn, 32, 8, 24);
17014e98e3e1Schristos 
17024e98e3e1Schristos   /* Record the fields for the semantic handler.  */
17034e98e3e1Schristos   FLD (f_r1) = f_r1;
17044e98e3e1Schristos   FLD (i_uimm24) = f_uimm24;
17054e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1706212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ld24", "f_r1 0x%x", 'x', f_r1, "uimm24 0x%x", 'x', f_uimm24, "dr 0x%x", 'x', f_r1, (char *) 0));
17074e98e3e1Schristos 
17084e98e3e1Schristos #if WITH_PROFILE_MODEL_P
17094e98e3e1Schristos   /* Record the fields for profiling.  */
17104e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
17114e98e3e1Schristos     {
17124e98e3e1Schristos       FLD (out_dr) = f_r1;
17134e98e3e1Schristos     }
17144e98e3e1Schristos #endif
17154e98e3e1Schristos #undef FLD
17164e98e3e1Schristos     return idesc;
17174e98e3e1Schristos   }
17184e98e3e1Schristos 
17194e98e3e1Schristos  extract_sfmt_ldi8:
17204e98e3e1Schristos   {
17214e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
17224e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
17234e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_addi.f
17244e98e3e1Schristos     UINT f_r1;
17254e98e3e1Schristos     INT f_simm8;
17264e98e3e1Schristos 
17274e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
17284e98e3e1Schristos     f_simm8 = EXTRACT_MSB0_SINT (insn, 16, 8, 8);
17294e98e3e1Schristos 
17304e98e3e1Schristos   /* Record the fields for the semantic handler.  */
17314e98e3e1Schristos   FLD (f_simm8) = f_simm8;
17324e98e3e1Schristos   FLD (f_r1) = f_r1;
17334e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1734212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi8", "f_simm8 0x%x", 'x', f_simm8, "f_r1 0x%x", 'x', f_r1, "dr 0x%x", 'x', f_r1, (char *) 0));
17354e98e3e1Schristos 
17364e98e3e1Schristos #if WITH_PROFILE_MODEL_P
17374e98e3e1Schristos   /* Record the fields for profiling.  */
17384e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
17394e98e3e1Schristos     {
17404e98e3e1Schristos       FLD (out_dr) = f_r1;
17414e98e3e1Schristos     }
17424e98e3e1Schristos #endif
17434e98e3e1Schristos #undef FLD
17444e98e3e1Schristos     return idesc;
17454e98e3e1Schristos   }
17464e98e3e1Schristos 
17474e98e3e1Schristos  extract_sfmt_ldi16:
17484e98e3e1Schristos   {
17494e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
17504e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
17514e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_add3.f
17524e98e3e1Schristos     UINT f_r1;
17534e98e3e1Schristos     INT f_simm16;
17544e98e3e1Schristos 
17554e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
17564e98e3e1Schristos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
17574e98e3e1Schristos 
17584e98e3e1Schristos   /* Record the fields for the semantic handler.  */
17594e98e3e1Schristos   FLD (f_simm16) = f_simm16;
17604e98e3e1Schristos   FLD (f_r1) = f_r1;
17614e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1762212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi16", "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, "dr 0x%x", 'x', f_r1, (char *) 0));
17634e98e3e1Schristos 
17644e98e3e1Schristos #if WITH_PROFILE_MODEL_P
17654e98e3e1Schristos   /* Record the fields for profiling.  */
17664e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
17674e98e3e1Schristos     {
17684e98e3e1Schristos       FLD (out_dr) = f_r1;
17694e98e3e1Schristos     }
17704e98e3e1Schristos #endif
17714e98e3e1Schristos #undef FLD
17724e98e3e1Schristos     return idesc;
17734e98e3e1Schristos   }
17744e98e3e1Schristos 
17754e98e3e1Schristos  extract_sfmt_lock:
17764e98e3e1Schristos   {
17774e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
17784e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
17794e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_ld_plus.f
17804e98e3e1Schristos     UINT f_r1;
17814e98e3e1Schristos     UINT f_r2;
17824e98e3e1Schristos 
17834e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
17844e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
17854e98e3e1Schristos 
17864e98e3e1Schristos   /* Record the fields for the semantic handler.  */
17874e98e3e1Schristos   FLD (f_r2) = f_r2;
17884e98e3e1Schristos   FLD (f_r1) = f_r1;
17894e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
17904e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1791212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lock", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
17924e98e3e1Schristos 
17934e98e3e1Schristos #if WITH_PROFILE_MODEL_P
17944e98e3e1Schristos   /* Record the fields for profiling.  */
17954e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
17964e98e3e1Schristos     {
17974e98e3e1Schristos       FLD (in_sr) = f_r2;
17984e98e3e1Schristos       FLD (out_dr) = f_r1;
17994e98e3e1Schristos     }
18004e98e3e1Schristos #endif
18014e98e3e1Schristos #undef FLD
18024e98e3e1Schristos     return idesc;
18034e98e3e1Schristos   }
18044e98e3e1Schristos 
18054e98e3e1Schristos  extract_sfmt_machi_a:
18064e98e3e1Schristos   {
18074e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
18084e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
18094e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_machi_a.f
18104e98e3e1Schristos     UINT f_r1;
18114e98e3e1Schristos     UINT f_acc;
18124e98e3e1Schristos     UINT f_r2;
18134e98e3e1Schristos 
18144e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
18154e98e3e1Schristos     f_acc = EXTRACT_MSB0_UINT (insn, 16, 8, 1);
18164e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
18174e98e3e1Schristos 
18184e98e3e1Schristos   /* Record the fields for the semantic handler.  */
18194e98e3e1Schristos   FLD (f_acc) = f_acc;
18204e98e3e1Schristos   FLD (f_r1) = f_r1;
18214e98e3e1Schristos   FLD (f_r2) = f_r2;
18224e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
18234e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
1824212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_machi_a", "f_acc 0x%x", 'x', f_acc, "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
18254e98e3e1Schristos 
18264e98e3e1Schristos #if WITH_PROFILE_MODEL_P
18274e98e3e1Schristos   /* Record the fields for profiling.  */
18284e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
18294e98e3e1Schristos     {
18304e98e3e1Schristos       FLD (in_src1) = f_r1;
18314e98e3e1Schristos       FLD (in_src2) = f_r2;
18324e98e3e1Schristos     }
18334e98e3e1Schristos #endif
18344e98e3e1Schristos #undef FLD
18354e98e3e1Schristos     return idesc;
18364e98e3e1Schristos   }
18374e98e3e1Schristos 
18384e98e3e1Schristos  extract_sfmt_mulhi_a:
18394e98e3e1Schristos   {
18404e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
18414e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
18424e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_machi_a.f
18434e98e3e1Schristos     UINT f_r1;
18444e98e3e1Schristos     UINT f_acc;
18454e98e3e1Schristos     UINT f_r2;
18464e98e3e1Schristos 
18474e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
18484e98e3e1Schristos     f_acc = EXTRACT_MSB0_UINT (insn, 16, 8, 1);
18494e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
18504e98e3e1Schristos 
18514e98e3e1Schristos   /* Record the fields for the semantic handler.  */
18524e98e3e1Schristos   FLD (f_r1) = f_r1;
18534e98e3e1Schristos   FLD (f_r2) = f_r2;
18544e98e3e1Schristos   FLD (f_acc) = f_acc;
18554e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
18564e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
1857212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mulhi_a", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "f_acc 0x%x", 'x', f_acc, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
18584e98e3e1Schristos 
18594e98e3e1Schristos #if WITH_PROFILE_MODEL_P
18604e98e3e1Schristos   /* Record the fields for profiling.  */
18614e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
18624e98e3e1Schristos     {
18634e98e3e1Schristos       FLD (in_src1) = f_r1;
18644e98e3e1Schristos       FLD (in_src2) = f_r2;
18654e98e3e1Schristos     }
18664e98e3e1Schristos #endif
18674e98e3e1Schristos #undef FLD
18684e98e3e1Schristos     return idesc;
18694e98e3e1Schristos   }
18704e98e3e1Schristos 
18714e98e3e1Schristos  extract_sfmt_mv:
18724e98e3e1Schristos   {
18734e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
18744e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
18754e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_ld_plus.f
18764e98e3e1Schristos     UINT f_r1;
18774e98e3e1Schristos     UINT f_r2;
18784e98e3e1Schristos 
18794e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
18804e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
18814e98e3e1Schristos 
18824e98e3e1Schristos   /* Record the fields for the semantic handler.  */
18834e98e3e1Schristos   FLD (f_r2) = f_r2;
18844e98e3e1Schristos   FLD (f_r1) = f_r1;
18854e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
18864e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1887212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mv", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
18884e98e3e1Schristos 
18894e98e3e1Schristos #if WITH_PROFILE_MODEL_P
18904e98e3e1Schristos   /* Record the fields for profiling.  */
18914e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
18924e98e3e1Schristos     {
18934e98e3e1Schristos       FLD (in_sr) = f_r2;
18944e98e3e1Schristos       FLD (out_dr) = f_r1;
18954e98e3e1Schristos     }
18964e98e3e1Schristos #endif
18974e98e3e1Schristos #undef FLD
18984e98e3e1Schristos     return idesc;
18994e98e3e1Schristos   }
19004e98e3e1Schristos 
19014e98e3e1Schristos  extract_sfmt_mvfachi_a:
19024e98e3e1Schristos   {
19034e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
19044e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
19054e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
19064e98e3e1Schristos     UINT f_r1;
19074e98e3e1Schristos     UINT f_accs;
19084e98e3e1Schristos 
19094e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
19104e98e3e1Schristos     f_accs = EXTRACT_MSB0_UINT (insn, 16, 12, 2);
19114e98e3e1Schristos 
19124e98e3e1Schristos   /* Record the fields for the semantic handler.  */
19134e98e3e1Schristos   FLD (f_accs) = f_accs;
19144e98e3e1Schristos   FLD (f_r1) = f_r1;
19154e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1916212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mvfachi_a", "f_accs 0x%x", 'x', f_accs, "f_r1 0x%x", 'x', f_r1, "dr 0x%x", 'x', f_r1, (char *) 0));
19174e98e3e1Schristos 
19184e98e3e1Schristos #if WITH_PROFILE_MODEL_P
19194e98e3e1Schristos   /* Record the fields for profiling.  */
19204e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
19214e98e3e1Schristos     {
19224e98e3e1Schristos       FLD (out_dr) = f_r1;
19234e98e3e1Schristos     }
19244e98e3e1Schristos #endif
19254e98e3e1Schristos #undef FLD
19264e98e3e1Schristos     return idesc;
19274e98e3e1Schristos   }
19284e98e3e1Schristos 
19294e98e3e1Schristos  extract_sfmt_mvfc:
19304e98e3e1Schristos   {
19314e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
19324e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
19334e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_ld_plus.f
19344e98e3e1Schristos     UINT f_r1;
19354e98e3e1Schristos     UINT f_r2;
19364e98e3e1Schristos 
19374e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
19384e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
19394e98e3e1Schristos 
19404e98e3e1Schristos   /* Record the fields for the semantic handler.  */
19414e98e3e1Schristos   FLD (f_r2) = f_r2;
19424e98e3e1Schristos   FLD (f_r1) = f_r1;
19434e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
1944212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mvfc", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "dr 0x%x", 'x', f_r1, (char *) 0));
19454e98e3e1Schristos 
19464e98e3e1Schristos #if WITH_PROFILE_MODEL_P
19474e98e3e1Schristos   /* Record the fields for profiling.  */
19484e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
19494e98e3e1Schristos     {
19504e98e3e1Schristos       FLD (out_dr) = f_r1;
19514e98e3e1Schristos     }
19524e98e3e1Schristos #endif
19534e98e3e1Schristos #undef FLD
19544e98e3e1Schristos     return idesc;
19554e98e3e1Schristos   }
19564e98e3e1Schristos 
19574e98e3e1Schristos  extract_sfmt_mvtachi_a:
19584e98e3e1Schristos   {
19594e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
19604e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
19614e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
19624e98e3e1Schristos     UINT f_r1;
19634e98e3e1Schristos     UINT f_accs;
19644e98e3e1Schristos 
19654e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
19664e98e3e1Schristos     f_accs = EXTRACT_MSB0_UINT (insn, 16, 12, 2);
19674e98e3e1Schristos 
19684e98e3e1Schristos   /* Record the fields for the semantic handler.  */
19694e98e3e1Schristos   FLD (f_accs) = f_accs;
19704e98e3e1Schristos   FLD (f_r1) = f_r1;
19714e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
1972212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mvtachi_a", "f_accs 0x%x", 'x', f_accs, "f_r1 0x%x", 'x', f_r1, "src1 0x%x", 'x', f_r1, (char *) 0));
19734e98e3e1Schristos 
19744e98e3e1Schristos #if WITH_PROFILE_MODEL_P
19754e98e3e1Schristos   /* Record the fields for profiling.  */
19764e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
19774e98e3e1Schristos     {
19784e98e3e1Schristos       FLD (in_src1) = f_r1;
19794e98e3e1Schristos     }
19804e98e3e1Schristos #endif
19814e98e3e1Schristos #undef FLD
19824e98e3e1Schristos     return idesc;
19834e98e3e1Schristos   }
19844e98e3e1Schristos 
19854e98e3e1Schristos  extract_sfmt_mvtc:
19864e98e3e1Schristos   {
19874e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
19884e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
19894e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_ld_plus.f
19904e98e3e1Schristos     UINT f_r1;
19914e98e3e1Schristos     UINT f_r2;
19924e98e3e1Schristos 
19934e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
19944e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
19954e98e3e1Schristos 
19964e98e3e1Schristos   /* Record the fields for the semantic handler.  */
19974e98e3e1Schristos   FLD (f_r2) = f_r2;
19984e98e3e1Schristos   FLD (f_r1) = f_r1;
19994e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
2000212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mvtc", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, (char *) 0));
20014e98e3e1Schristos 
20024e98e3e1Schristos #if WITH_PROFILE_MODEL_P
20034e98e3e1Schristos   /* Record the fields for profiling.  */
20044e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
20054e98e3e1Schristos     {
20064e98e3e1Schristos       FLD (in_sr) = f_r2;
20074e98e3e1Schristos     }
20084e98e3e1Schristos #endif
20094e98e3e1Schristos #undef FLD
20104e98e3e1Schristos     return idesc;
20114e98e3e1Schristos   }
20124e98e3e1Schristos 
20134e98e3e1Schristos  extract_sfmt_nop:
20144e98e3e1Schristos   {
20154e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
20164e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_empty.f
20174e98e3e1Schristos 
20184e98e3e1Schristos 
20194e98e3e1Schristos   /* Record the fields for the semantic handler.  */
2020212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_nop", (char *) 0));
20214e98e3e1Schristos 
20224e98e3e1Schristos #undef FLD
20234e98e3e1Schristos     return idesc;
20244e98e3e1Schristos   }
20254e98e3e1Schristos 
20264e98e3e1Schristos  extract_sfmt_rac_dsi:
20274e98e3e1Schristos   {
20284e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
20294e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
20304e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_rac_dsi.f
20314e98e3e1Schristos     UINT f_accd;
20324e98e3e1Schristos     UINT f_accs;
20334e98e3e1Schristos     SI f_imm1;
20344e98e3e1Schristos 
20354e98e3e1Schristos     f_accd = EXTRACT_MSB0_UINT (insn, 16, 4, 2);
20364e98e3e1Schristos     f_accs = EXTRACT_MSB0_UINT (insn, 16, 12, 2);
20374e98e3e1Schristos     f_imm1 = ((EXTRACT_MSB0_UINT (insn, 16, 15, 1)) + (1));
20384e98e3e1Schristos 
20394e98e3e1Schristos   /* Record the fields for the semantic handler.  */
20404e98e3e1Schristos   FLD (f_accs) = f_accs;
20414e98e3e1Schristos   FLD (f_imm1) = f_imm1;
20424e98e3e1Schristos   FLD (f_accd) = f_accd;
2043212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_rac_dsi", "f_accs 0x%x", 'x', f_accs, "f_imm1 0x%x", 'x', f_imm1, "f_accd 0x%x", 'x', f_accd, (char *) 0));
20444e98e3e1Schristos 
20454e98e3e1Schristos #undef FLD
20464e98e3e1Schristos     return idesc;
20474e98e3e1Schristos   }
20484e98e3e1Schristos 
20494e98e3e1Schristos  extract_sfmt_rte:
20504e98e3e1Schristos   {
20514e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
20524e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_empty.f
20534e98e3e1Schristos 
20544e98e3e1Schristos 
20554e98e3e1Schristos   /* Record the fields for the semantic handler.  */
2056212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_rte", (char *) 0));
20574e98e3e1Schristos 
20584e98e3e1Schristos #if WITH_PROFILE_MODEL_P
20594e98e3e1Schristos   /* Record the fields for profiling.  */
20604e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
20614e98e3e1Schristos     {
20624e98e3e1Schristos     }
20634e98e3e1Schristos #endif
20644e98e3e1Schristos #undef FLD
20654e98e3e1Schristos     return idesc;
20664e98e3e1Schristos   }
20674e98e3e1Schristos 
20684e98e3e1Schristos  extract_sfmt_seth:
20694e98e3e1Schristos   {
20704e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
20714e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
20724e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_seth.f
20734e98e3e1Schristos     UINT f_r1;
20744e98e3e1Schristos     UINT f_hi16;
20754e98e3e1Schristos 
20764e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
20774e98e3e1Schristos     f_hi16 = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
20784e98e3e1Schristos 
20794e98e3e1Schristos   /* Record the fields for the semantic handler.  */
20804e98e3e1Schristos   FLD (f_hi16) = f_hi16;
20814e98e3e1Schristos   FLD (f_r1) = f_r1;
20824e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
2083212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_seth", "f_hi16 0x%x", 'x', f_hi16, "f_r1 0x%x", 'x', f_r1, "dr 0x%x", 'x', f_r1, (char *) 0));
20844e98e3e1Schristos 
20854e98e3e1Schristos #if WITH_PROFILE_MODEL_P
20864e98e3e1Schristos   /* Record the fields for profiling.  */
20874e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
20884e98e3e1Schristos     {
20894e98e3e1Schristos       FLD (out_dr) = f_r1;
20904e98e3e1Schristos     }
20914e98e3e1Schristos #endif
20924e98e3e1Schristos #undef FLD
20934e98e3e1Schristos     return idesc;
20944e98e3e1Schristos   }
20954e98e3e1Schristos 
20964e98e3e1Schristos  extract_sfmt_sll3:
20974e98e3e1Schristos   {
20984e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
20994e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
21004e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_add3.f
21014e98e3e1Schristos     UINT f_r1;
21024e98e3e1Schristos     UINT f_r2;
21034e98e3e1Schristos     INT f_simm16;
21044e98e3e1Schristos 
21054e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
21064e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
21074e98e3e1Schristos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
21084e98e3e1Schristos 
21094e98e3e1Schristos   /* Record the fields for the semantic handler.  */
21104e98e3e1Schristos   FLD (f_simm16) = f_simm16;
21114e98e3e1Schristos   FLD (f_r2) = f_r2;
21124e98e3e1Schristos   FLD (f_r1) = f_r1;
21134e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
21144e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
2115212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sll3", "f_simm16 0x%x", 'x', f_simm16, "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
21164e98e3e1Schristos 
21174e98e3e1Schristos #if WITH_PROFILE_MODEL_P
21184e98e3e1Schristos   /* Record the fields for profiling.  */
21194e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
21204e98e3e1Schristos     {
21214e98e3e1Schristos       FLD (in_sr) = f_r2;
21224e98e3e1Schristos       FLD (out_dr) = f_r1;
21234e98e3e1Schristos     }
21244e98e3e1Schristos #endif
21254e98e3e1Schristos #undef FLD
21264e98e3e1Schristos     return idesc;
21274e98e3e1Schristos   }
21284e98e3e1Schristos 
21294e98e3e1Schristos  extract_sfmt_slli:
21304e98e3e1Schristos   {
21314e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
21324e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
21334e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_slli.f
21344e98e3e1Schristos     UINT f_r1;
21354e98e3e1Schristos     UINT f_uimm5;
21364e98e3e1Schristos 
21374e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
21384e98e3e1Schristos     f_uimm5 = EXTRACT_MSB0_UINT (insn, 16, 11, 5);
21394e98e3e1Schristos 
21404e98e3e1Schristos   /* Record the fields for the semantic handler.  */
21414e98e3e1Schristos   FLD (f_r1) = f_r1;
21424e98e3e1Schristos   FLD (f_uimm5) = f_uimm5;
21434e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
2144212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_slli", "f_r1 0x%x", 'x', f_r1, "f_uimm5 0x%x", 'x', f_uimm5, "dr 0x%x", 'x', f_r1, (char *) 0));
21454e98e3e1Schristos 
21464e98e3e1Schristos #if WITH_PROFILE_MODEL_P
21474e98e3e1Schristos   /* Record the fields for profiling.  */
21484e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
21494e98e3e1Schristos     {
21504e98e3e1Schristos       FLD (in_dr) = f_r1;
21514e98e3e1Schristos       FLD (out_dr) = f_r1;
21524e98e3e1Schristos     }
21534e98e3e1Schristos #endif
21544e98e3e1Schristos #undef FLD
21554e98e3e1Schristos     return idesc;
21564e98e3e1Schristos   }
21574e98e3e1Schristos 
21584e98e3e1Schristos  extract_sfmt_st:
21594e98e3e1Schristos   {
21604e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
21614e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
21624e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_plus.f
21634e98e3e1Schristos     UINT f_r1;
21644e98e3e1Schristos     UINT f_r2;
21654e98e3e1Schristos 
21664e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
21674e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
21684e98e3e1Schristos 
21694e98e3e1Schristos   /* Record the fields for the semantic handler.  */
21704e98e3e1Schristos   FLD (f_r1) = f_r1;
21714e98e3e1Schristos   FLD (f_r2) = f_r2;
21724e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
21734e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2174212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_st", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
21754e98e3e1Schristos 
21764e98e3e1Schristos #if WITH_PROFILE_MODEL_P
21774e98e3e1Schristos   /* Record the fields for profiling.  */
21784e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
21794e98e3e1Schristos     {
21804e98e3e1Schristos       FLD (in_src1) = f_r1;
21814e98e3e1Schristos       FLD (in_src2) = f_r2;
21824e98e3e1Schristos     }
21834e98e3e1Schristos #endif
21844e98e3e1Schristos #undef FLD
21854e98e3e1Schristos     return idesc;
21864e98e3e1Schristos   }
21874e98e3e1Schristos 
21884e98e3e1Schristos  extract_sfmt_st_d:
21894e98e3e1Schristos   {
21904e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
21914e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
21924e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_d.f
21934e98e3e1Schristos     UINT f_r1;
21944e98e3e1Schristos     UINT f_r2;
21954e98e3e1Schristos     INT f_simm16;
21964e98e3e1Schristos 
21974e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
21984e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
21994e98e3e1Schristos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
22004e98e3e1Schristos 
22014e98e3e1Schristos   /* Record the fields for the semantic handler.  */
22024e98e3e1Schristos   FLD (f_simm16) = f_simm16;
22034e98e3e1Schristos   FLD (f_r1) = f_r1;
22044e98e3e1Schristos   FLD (f_r2) = f_r2;
22054e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
22064e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2207212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_st_d", "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
22084e98e3e1Schristos 
22094e98e3e1Schristos #if WITH_PROFILE_MODEL_P
22104e98e3e1Schristos   /* Record the fields for profiling.  */
22114e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
22124e98e3e1Schristos     {
22134e98e3e1Schristos       FLD (in_src1) = f_r1;
22144e98e3e1Schristos       FLD (in_src2) = f_r2;
22154e98e3e1Schristos     }
22164e98e3e1Schristos #endif
22174e98e3e1Schristos #undef FLD
22184e98e3e1Schristos     return idesc;
22194e98e3e1Schristos   }
22204e98e3e1Schristos 
22214e98e3e1Schristos  extract_sfmt_stb:
22224e98e3e1Schristos   {
22234e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
22244e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
22254e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_plus.f
22264e98e3e1Schristos     UINT f_r1;
22274e98e3e1Schristos     UINT f_r2;
22284e98e3e1Schristos 
22294e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
22304e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
22314e98e3e1Schristos 
22324e98e3e1Schristos   /* Record the fields for the semantic handler.  */
22334e98e3e1Schristos   FLD (f_r1) = f_r1;
22344e98e3e1Schristos   FLD (f_r2) = f_r2;
22354e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
22364e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2237212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stb", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
22384e98e3e1Schristos 
22394e98e3e1Schristos #if WITH_PROFILE_MODEL_P
22404e98e3e1Schristos   /* Record the fields for profiling.  */
22414e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
22424e98e3e1Schristos     {
22434e98e3e1Schristos       FLD (in_src1) = f_r1;
22444e98e3e1Schristos       FLD (in_src2) = f_r2;
22454e98e3e1Schristos     }
22464e98e3e1Schristos #endif
22474e98e3e1Schristos #undef FLD
22484e98e3e1Schristos     return idesc;
22494e98e3e1Schristos   }
22504e98e3e1Schristos 
22514e98e3e1Schristos  extract_sfmt_stb_d:
22524e98e3e1Schristos   {
22534e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
22544e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
22554e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_d.f
22564e98e3e1Schristos     UINT f_r1;
22574e98e3e1Schristos     UINT f_r2;
22584e98e3e1Schristos     INT f_simm16;
22594e98e3e1Schristos 
22604e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
22614e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
22624e98e3e1Schristos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
22634e98e3e1Schristos 
22644e98e3e1Schristos   /* Record the fields for the semantic handler.  */
22654e98e3e1Schristos   FLD (f_simm16) = f_simm16;
22664e98e3e1Schristos   FLD (f_r1) = f_r1;
22674e98e3e1Schristos   FLD (f_r2) = f_r2;
22684e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
22694e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2270212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stb_d", "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
22714e98e3e1Schristos 
22724e98e3e1Schristos #if WITH_PROFILE_MODEL_P
22734e98e3e1Schristos   /* Record the fields for profiling.  */
22744e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
22754e98e3e1Schristos     {
22764e98e3e1Schristos       FLD (in_src1) = f_r1;
22774e98e3e1Schristos       FLD (in_src2) = f_r2;
22784e98e3e1Schristos     }
22794e98e3e1Schristos #endif
22804e98e3e1Schristos #undef FLD
22814e98e3e1Schristos     return idesc;
22824e98e3e1Schristos   }
22834e98e3e1Schristos 
22844e98e3e1Schristos  extract_sfmt_sth:
22854e98e3e1Schristos   {
22864e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
22874e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
22884e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_plus.f
22894e98e3e1Schristos     UINT f_r1;
22904e98e3e1Schristos     UINT f_r2;
22914e98e3e1Schristos 
22924e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
22934e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
22944e98e3e1Schristos 
22954e98e3e1Schristos   /* Record the fields for the semantic handler.  */
22964e98e3e1Schristos   FLD (f_r1) = f_r1;
22974e98e3e1Schristos   FLD (f_r2) = f_r2;
22984e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
22994e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2300212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sth", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
23014e98e3e1Schristos 
23024e98e3e1Schristos #if WITH_PROFILE_MODEL_P
23034e98e3e1Schristos   /* Record the fields for profiling.  */
23044e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
23054e98e3e1Schristos     {
23064e98e3e1Schristos       FLD (in_src1) = f_r1;
23074e98e3e1Schristos       FLD (in_src2) = f_r2;
23084e98e3e1Schristos     }
23094e98e3e1Schristos #endif
23104e98e3e1Schristos #undef FLD
23114e98e3e1Schristos     return idesc;
23124e98e3e1Schristos   }
23134e98e3e1Schristos 
23144e98e3e1Schristos  extract_sfmt_sth_d:
23154e98e3e1Schristos   {
23164e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
23174e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
23184e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_d.f
23194e98e3e1Schristos     UINT f_r1;
23204e98e3e1Schristos     UINT f_r2;
23214e98e3e1Schristos     INT f_simm16;
23224e98e3e1Schristos 
23234e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
23244e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
23254e98e3e1Schristos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
23264e98e3e1Schristos 
23274e98e3e1Schristos   /* Record the fields for the semantic handler.  */
23284e98e3e1Schristos   FLD (f_simm16) = f_simm16;
23294e98e3e1Schristos   FLD (f_r1) = f_r1;
23304e98e3e1Schristos   FLD (f_r2) = f_r2;
23314e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
23324e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2333212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sth_d", "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
23344e98e3e1Schristos 
23354e98e3e1Schristos #if WITH_PROFILE_MODEL_P
23364e98e3e1Schristos   /* Record the fields for profiling.  */
23374e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
23384e98e3e1Schristos     {
23394e98e3e1Schristos       FLD (in_src1) = f_r1;
23404e98e3e1Schristos       FLD (in_src2) = f_r2;
23414e98e3e1Schristos     }
23424e98e3e1Schristos #endif
23434e98e3e1Schristos #undef FLD
23444e98e3e1Schristos     return idesc;
23454e98e3e1Schristos   }
23464e98e3e1Schristos 
23474e98e3e1Schristos  extract_sfmt_st_plus:
23484e98e3e1Schristos   {
23494e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
23504e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
23514e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_plus.f
23524e98e3e1Schristos     UINT f_r1;
23534e98e3e1Schristos     UINT f_r2;
23544e98e3e1Schristos 
23554e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
23564e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
23574e98e3e1Schristos 
23584e98e3e1Schristos   /* Record the fields for the semantic handler.  */
23594e98e3e1Schristos   FLD (f_r1) = f_r1;
23604e98e3e1Schristos   FLD (f_r2) = f_r2;
23614e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
23624e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2363212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_st_plus", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
23644e98e3e1Schristos 
23654e98e3e1Schristos #if WITH_PROFILE_MODEL_P
23664e98e3e1Schristos   /* Record the fields for profiling.  */
23674e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
23684e98e3e1Schristos     {
23694e98e3e1Schristos       FLD (in_src1) = f_r1;
23704e98e3e1Schristos       FLD (in_src2) = f_r2;
23714e98e3e1Schristos       FLD (out_src2) = f_r2;
23724e98e3e1Schristos     }
23734e98e3e1Schristos #endif
23744e98e3e1Schristos #undef FLD
23754e98e3e1Schristos     return idesc;
23764e98e3e1Schristos   }
23774e98e3e1Schristos 
23784e98e3e1Schristos  extract_sfmt_sth_plus:
23794e98e3e1Schristos   {
23804e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
23814e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
23824e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_plus.f
23834e98e3e1Schristos     UINT f_r1;
23844e98e3e1Schristos     UINT f_r2;
23854e98e3e1Schristos 
23864e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
23874e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
23884e98e3e1Schristos 
23894e98e3e1Schristos   /* Record the fields for the semantic handler.  */
23904e98e3e1Schristos   FLD (f_r1) = f_r1;
23914e98e3e1Schristos   FLD (f_r2) = f_r2;
23924e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
23934e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2394212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sth_plus", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
23954e98e3e1Schristos 
23964e98e3e1Schristos #if WITH_PROFILE_MODEL_P
23974e98e3e1Schristos   /* Record the fields for profiling.  */
23984e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
23994e98e3e1Schristos     {
24004e98e3e1Schristos       FLD (in_src1) = f_r1;
24014e98e3e1Schristos       FLD (in_src2) = f_r2;
24024e98e3e1Schristos       FLD (out_src2) = f_r2;
24034e98e3e1Schristos     }
24044e98e3e1Schristos #endif
24054e98e3e1Schristos #undef FLD
24064e98e3e1Schristos     return idesc;
24074e98e3e1Schristos   }
24084e98e3e1Schristos 
24094e98e3e1Schristos  extract_sfmt_stb_plus:
24104e98e3e1Schristos   {
24114e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
24124e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
24134e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_plus.f
24144e98e3e1Schristos     UINT f_r1;
24154e98e3e1Schristos     UINT f_r2;
24164e98e3e1Schristos 
24174e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
24184e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
24194e98e3e1Schristos 
24204e98e3e1Schristos   /* Record the fields for the semantic handler.  */
24214e98e3e1Schristos   FLD (f_r1) = f_r1;
24224e98e3e1Schristos   FLD (f_r2) = f_r2;
24234e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
24244e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2425212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stb_plus", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
24264e98e3e1Schristos 
24274e98e3e1Schristos #if WITH_PROFILE_MODEL_P
24284e98e3e1Schristos   /* Record the fields for profiling.  */
24294e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
24304e98e3e1Schristos     {
24314e98e3e1Schristos       FLD (in_src1) = f_r1;
24324e98e3e1Schristos       FLD (in_src2) = f_r2;
24334e98e3e1Schristos       FLD (out_src2) = f_r2;
24344e98e3e1Schristos     }
24354e98e3e1Schristos #endif
24364e98e3e1Schristos #undef FLD
24374e98e3e1Schristos     return idesc;
24384e98e3e1Schristos   }
24394e98e3e1Schristos 
24404e98e3e1Schristos  extract_sfmt_trap:
24414e98e3e1Schristos   {
24424e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
24434e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
24444e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_trap.f
24454e98e3e1Schristos     UINT f_uimm4;
24464e98e3e1Schristos 
24474e98e3e1Schristos     f_uimm4 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
24484e98e3e1Schristos 
24494e98e3e1Schristos   /* Record the fields for the semantic handler.  */
24504e98e3e1Schristos   FLD (f_uimm4) = f_uimm4;
2451212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_trap", "f_uimm4 0x%x", 'x', f_uimm4, (char *) 0));
24524e98e3e1Schristos 
24534e98e3e1Schristos #if WITH_PROFILE_MODEL_P
24544e98e3e1Schristos   /* Record the fields for profiling.  */
24554e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
24564e98e3e1Schristos     {
24574e98e3e1Schristos     }
24584e98e3e1Schristos #endif
24594e98e3e1Schristos #undef FLD
24604e98e3e1Schristos     return idesc;
24614e98e3e1Schristos   }
24624e98e3e1Schristos 
24634e98e3e1Schristos  extract_sfmt_unlock:
24644e98e3e1Schristos   {
24654e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
24664e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
24674e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_plus.f
24684e98e3e1Schristos     UINT f_r1;
24694e98e3e1Schristos     UINT f_r2;
24704e98e3e1Schristos 
24714e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
24724e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
24734e98e3e1Schristos 
24744e98e3e1Schristos   /* Record the fields for the semantic handler.  */
24754e98e3e1Schristos   FLD (f_r1) = f_r1;
24764e98e3e1Schristos   FLD (f_r2) = f_r2;
24774e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
24784e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2479212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_unlock", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
24804e98e3e1Schristos 
24814e98e3e1Schristos #if WITH_PROFILE_MODEL_P
24824e98e3e1Schristos   /* Record the fields for profiling.  */
24834e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
24844e98e3e1Schristos     {
24854e98e3e1Schristos       FLD (in_src1) = f_r1;
24864e98e3e1Schristos       FLD (in_src2) = f_r2;
24874e98e3e1Schristos     }
24884e98e3e1Schristos #endif
24894e98e3e1Schristos #undef FLD
24904e98e3e1Schristos     return idesc;
24914e98e3e1Schristos   }
24924e98e3e1Schristos 
24934e98e3e1Schristos  extract_sfmt_satb:
24944e98e3e1Schristos   {
24954e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
24964e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
24974e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_ld_plus.f
24984e98e3e1Schristos     UINT f_r1;
24994e98e3e1Schristos     UINT f_r2;
25004e98e3e1Schristos 
25014e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
25024e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
25034e98e3e1Schristos 
25044e98e3e1Schristos   /* Record the fields for the semantic handler.  */
25054e98e3e1Schristos   FLD (f_r2) = f_r2;
25064e98e3e1Schristos   FLD (f_r1) = f_r1;
25074e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
25084e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
2509212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_satb", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
25104e98e3e1Schristos 
25114e98e3e1Schristos #if WITH_PROFILE_MODEL_P
25124e98e3e1Schristos   /* Record the fields for profiling.  */
25134e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
25144e98e3e1Schristos     {
25154e98e3e1Schristos       FLD (in_sr) = f_r2;
25164e98e3e1Schristos       FLD (out_dr) = f_r1;
25174e98e3e1Schristos     }
25184e98e3e1Schristos #endif
25194e98e3e1Schristos #undef FLD
25204e98e3e1Schristos     return idesc;
25214e98e3e1Schristos   }
25224e98e3e1Schristos 
25234e98e3e1Schristos  extract_sfmt_sat:
25244e98e3e1Schristos   {
25254e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
25264e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
25274e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_ld_plus.f
25284e98e3e1Schristos     UINT f_r1;
25294e98e3e1Schristos     UINT f_r2;
25304e98e3e1Schristos 
25314e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
25324e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
25334e98e3e1Schristos 
25344e98e3e1Schristos   /* Record the fields for the semantic handler.  */
25354e98e3e1Schristos   FLD (f_r2) = f_r2;
25364e98e3e1Schristos   FLD (f_r1) = f_r1;
25374e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
25384e98e3e1Schristos   FLD (i_dr) = & CPU (h_gr)[f_r1];
2539212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sat", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, "sr 0x%x", 'x', f_r2, "dr 0x%x", 'x', f_r1, (char *) 0));
25404e98e3e1Schristos 
25414e98e3e1Schristos #if WITH_PROFILE_MODEL_P
25424e98e3e1Schristos   /* Record the fields for profiling.  */
25434e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
25444e98e3e1Schristos     {
25454e98e3e1Schristos       FLD (in_sr) = f_r2;
25464e98e3e1Schristos       FLD (out_dr) = f_r1;
25474e98e3e1Schristos     }
25484e98e3e1Schristos #endif
25494e98e3e1Schristos #undef FLD
25504e98e3e1Schristos     return idesc;
25514e98e3e1Schristos   }
25524e98e3e1Schristos 
25534e98e3e1Schristos  extract_sfmt_sadd:
25544e98e3e1Schristos   {
25554e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
25564e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_empty.f
25574e98e3e1Schristos 
25584e98e3e1Schristos 
25594e98e3e1Schristos   /* Record the fields for the semantic handler.  */
2560212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sadd", (char *) 0));
25614e98e3e1Schristos 
25624e98e3e1Schristos #undef FLD
25634e98e3e1Schristos     return idesc;
25644e98e3e1Schristos   }
25654e98e3e1Schristos 
25664e98e3e1Schristos  extract_sfmt_macwu1:
25674e98e3e1Schristos   {
25684e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
25694e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
25704e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_plus.f
25714e98e3e1Schristos     UINT f_r1;
25724e98e3e1Schristos     UINT f_r2;
25734e98e3e1Schristos 
25744e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
25754e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
25764e98e3e1Schristos 
25774e98e3e1Schristos   /* Record the fields for the semantic handler.  */
25784e98e3e1Schristos   FLD (f_r1) = f_r1;
25794e98e3e1Schristos   FLD (f_r2) = f_r2;
25804e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
25814e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2582212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_macwu1", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
25834e98e3e1Schristos 
25844e98e3e1Schristos #if WITH_PROFILE_MODEL_P
25854e98e3e1Schristos   /* Record the fields for profiling.  */
25864e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
25874e98e3e1Schristos     {
25884e98e3e1Schristos       FLD (in_src1) = f_r1;
25894e98e3e1Schristos       FLD (in_src2) = f_r2;
25904e98e3e1Schristos     }
25914e98e3e1Schristos #endif
25924e98e3e1Schristos #undef FLD
25934e98e3e1Schristos     return idesc;
25944e98e3e1Schristos   }
25954e98e3e1Schristos 
25964e98e3e1Schristos  extract_sfmt_msblo:
25974e98e3e1Schristos   {
25984e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
25994e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
26004e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_plus.f
26014e98e3e1Schristos     UINT f_r1;
26024e98e3e1Schristos     UINT f_r2;
26034e98e3e1Schristos 
26044e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
26054e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
26064e98e3e1Schristos 
26074e98e3e1Schristos   /* Record the fields for the semantic handler.  */
26084e98e3e1Schristos   FLD (f_r1) = f_r1;
26094e98e3e1Schristos   FLD (f_r2) = f_r2;
26104e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
26114e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2612212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_msblo", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
26134e98e3e1Schristos 
26144e98e3e1Schristos #if WITH_PROFILE_MODEL_P
26154e98e3e1Schristos   /* Record the fields for profiling.  */
26164e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
26174e98e3e1Schristos     {
26184e98e3e1Schristos       FLD (in_src1) = f_r1;
26194e98e3e1Schristos       FLD (in_src2) = f_r2;
26204e98e3e1Schristos     }
26214e98e3e1Schristos #endif
26224e98e3e1Schristos #undef FLD
26234e98e3e1Schristos     return idesc;
26244e98e3e1Schristos   }
26254e98e3e1Schristos 
26264e98e3e1Schristos  extract_sfmt_mulwu1:
26274e98e3e1Schristos   {
26284e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
26294e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
26304e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_st_plus.f
26314e98e3e1Schristos     UINT f_r1;
26324e98e3e1Schristos     UINT f_r2;
26334e98e3e1Schristos 
26344e98e3e1Schristos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
26354e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
26364e98e3e1Schristos 
26374e98e3e1Schristos   /* Record the fields for the semantic handler.  */
26384e98e3e1Schristos   FLD (f_r1) = f_r1;
26394e98e3e1Schristos   FLD (f_r2) = f_r2;
26404e98e3e1Schristos   FLD (i_src1) = & CPU (h_gr)[f_r1];
26414e98e3e1Schristos   FLD (i_src2) = & CPU (h_gr)[f_r2];
2642212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mulwu1", "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, "src1 0x%x", 'x', f_r1, "src2 0x%x", 'x', f_r2, (char *) 0));
26434e98e3e1Schristos 
26444e98e3e1Schristos #if WITH_PROFILE_MODEL_P
26454e98e3e1Schristos   /* Record the fields for profiling.  */
26464e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
26474e98e3e1Schristos     {
26484e98e3e1Schristos       FLD (in_src1) = f_r1;
26494e98e3e1Schristos       FLD (in_src2) = f_r2;
26504e98e3e1Schristos     }
26514e98e3e1Schristos #endif
26524e98e3e1Schristos #undef FLD
26534e98e3e1Schristos     return idesc;
26544e98e3e1Schristos   }
26554e98e3e1Schristos 
26564e98e3e1Schristos  extract_sfmt_sc:
26574e98e3e1Schristos   {
26584e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
26594e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_empty.f
26604e98e3e1Schristos 
26614e98e3e1Schristos 
26624e98e3e1Schristos   /* Record the fields for the semantic handler.  */
2663212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sc", (char *) 0));
26644e98e3e1Schristos 
26654e98e3e1Schristos #undef FLD
26664e98e3e1Schristos     return idesc;
26674e98e3e1Schristos   }
26684e98e3e1Schristos 
26694e98e3e1Schristos  extract_sfmt_clrpsw:
26704e98e3e1Schristos   {
26714e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
26724e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
26734e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_clrpsw.f
26744e98e3e1Schristos     UINT f_uimm8;
26754e98e3e1Schristos 
26764e98e3e1Schristos     f_uimm8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
26774e98e3e1Schristos 
26784e98e3e1Schristos   /* Record the fields for the semantic handler.  */
26794e98e3e1Schristos   FLD (f_uimm8) = f_uimm8;
2680212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_clrpsw", "f_uimm8 0x%x", 'x', f_uimm8, (char *) 0));
26814e98e3e1Schristos 
26824e98e3e1Schristos #undef FLD
26834e98e3e1Schristos     return idesc;
26844e98e3e1Schristos   }
26854e98e3e1Schristos 
26864e98e3e1Schristos  extract_sfmt_setpsw:
26874e98e3e1Schristos   {
26884e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
26894e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
26904e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_clrpsw.f
26914e98e3e1Schristos     UINT f_uimm8;
26924e98e3e1Schristos 
26934e98e3e1Schristos     f_uimm8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
26944e98e3e1Schristos 
26954e98e3e1Schristos   /* Record the fields for the semantic handler.  */
26964e98e3e1Schristos   FLD (f_uimm8) = f_uimm8;
2697212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_setpsw", "f_uimm8 0x%x", 'x', f_uimm8, (char *) 0));
26984e98e3e1Schristos 
26994e98e3e1Schristos #undef FLD
27004e98e3e1Schristos     return idesc;
27014e98e3e1Schristos   }
27024e98e3e1Schristos 
27034e98e3e1Schristos  extract_sfmt_bset:
27044e98e3e1Schristos   {
27054e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
27064e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
27074e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_bset.f
27084e98e3e1Schristos     UINT f_uimm3;
27094e98e3e1Schristos     UINT f_r2;
27104e98e3e1Schristos     INT f_simm16;
27114e98e3e1Schristos 
27124e98e3e1Schristos     f_uimm3 = EXTRACT_MSB0_UINT (insn, 32, 5, 3);
27134e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
27144e98e3e1Schristos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
27154e98e3e1Schristos 
27164e98e3e1Schristos   /* Record the fields for the semantic handler.  */
27174e98e3e1Schristos   FLD (f_simm16) = f_simm16;
27184e98e3e1Schristos   FLD (f_r2) = f_r2;
27194e98e3e1Schristos   FLD (f_uimm3) = f_uimm3;
27204e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
2721212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bset", "f_simm16 0x%x", 'x', f_simm16, "f_r2 0x%x", 'x', f_r2, "f_uimm3 0x%x", 'x', f_uimm3, "sr 0x%x", 'x', f_r2, (char *) 0));
27224e98e3e1Schristos 
27234e98e3e1Schristos #if WITH_PROFILE_MODEL_P
27244e98e3e1Schristos   /* Record the fields for profiling.  */
27254e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
27264e98e3e1Schristos     {
27274e98e3e1Schristos       FLD (in_sr) = f_r2;
27284e98e3e1Schristos     }
27294e98e3e1Schristos #endif
27304e98e3e1Schristos #undef FLD
27314e98e3e1Schristos     return idesc;
27324e98e3e1Schristos   }
27334e98e3e1Schristos 
27344e98e3e1Schristos  extract_sfmt_btst:
27354e98e3e1Schristos   {
27364e98e3e1Schristos     const IDESC *idesc = &m32r2f_insn_data[itype];
27374e98e3e1Schristos     CGEN_INSN_WORD insn = entire_insn;
27384e98e3e1Schristos #define FLD(f) abuf->fields.sfmt_bset.f
27394e98e3e1Schristos     UINT f_uimm3;
27404e98e3e1Schristos     UINT f_r2;
27414e98e3e1Schristos 
27424e98e3e1Schristos     f_uimm3 = EXTRACT_MSB0_UINT (insn, 16, 5, 3);
27434e98e3e1Schristos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
27444e98e3e1Schristos 
27454e98e3e1Schristos   /* Record the fields for the semantic handler.  */
27464e98e3e1Schristos   FLD (f_r2) = f_r2;
27474e98e3e1Schristos   FLD (f_uimm3) = f_uimm3;
27484e98e3e1Schristos   FLD (i_sr) = & CPU (h_gr)[f_r2];
2749212397c6Schristos   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_btst", "f_r2 0x%x", 'x', f_r2, "f_uimm3 0x%x", 'x', f_uimm3, "sr 0x%x", 'x', f_r2, (char *) 0));
27504e98e3e1Schristos 
27514e98e3e1Schristos #if WITH_PROFILE_MODEL_P
27524e98e3e1Schristos   /* Record the fields for profiling.  */
27534e98e3e1Schristos   if (PROFILE_MODEL_P (current_cpu))
27544e98e3e1Schristos     {
27554e98e3e1Schristos       FLD (in_sr) = f_r2;
27564e98e3e1Schristos     }
27574e98e3e1Schristos #endif
27584e98e3e1Schristos #undef FLD
27594e98e3e1Schristos     return idesc;
27604e98e3e1Schristos   }
27614e98e3e1Schristos 
27624e98e3e1Schristos }
2763