Home | History | Annotate | Line # | Download | only in m32r
decode2.c revision 1.1
      1  1.1  christos /* Simulator instruction decoder for m32r2f.
      2  1.1  christos 
      3  1.1  christos THIS FILE IS MACHINE GENERATED WITH CGEN.
      4  1.1  christos 
      5  1.1  christos Copyright 1996-2010 Free Software Foundation, Inc.
      6  1.1  christos 
      7  1.1  christos This file is part of the GNU simulators.
      8  1.1  christos 
      9  1.1  christos    This file is free software; you can redistribute it and/or modify
     10  1.1  christos    it under the terms of the GNU General Public License as published by
     11  1.1  christos    the Free Software Foundation; either version 3, or (at your option)
     12  1.1  christos    any later version.
     13  1.1  christos 
     14  1.1  christos    It is distributed in the hope that it will be useful, but WITHOUT
     15  1.1  christos    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     16  1.1  christos    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
     17  1.1  christos    License for more details.
     18  1.1  christos 
     19  1.1  christos    You should have received a copy of the GNU General Public License along
     20  1.1  christos    with this program; if not, write to the Free Software Foundation, Inc.,
     21  1.1  christos    51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
     22  1.1  christos 
     23  1.1  christos */
     24  1.1  christos 
     25  1.1  christos #define WANT_CPU m32r2f
     26  1.1  christos #define WANT_CPU_M32R2F
     27  1.1  christos 
     28  1.1  christos #include "sim-main.h"
     29  1.1  christos #include "sim-assert.h"
     30  1.1  christos 
     31  1.1  christos /* Insn can't be executed in parallel.
     32  1.1  christos    Or is that "do NOt Pass to Air defense Radar"? :-) */
     33  1.1  christos #define NOPAR (-1)
     34  1.1  christos 
     35  1.1  christos /* The instruction descriptor array.
     36  1.1  christos    This is computed at runtime.  Space for it is not malloc'd to save a
     37  1.1  christos    teensy bit of cpu in the decoder.  Moving it to malloc space is trivial
     38  1.1  christos    but won't be done until necessary (we don't currently support the runtime
     39  1.1  christos    addition of instructions nor an SMP machine with different cpus).  */
     40  1.1  christos static IDESC m32r2f_insn_data[M32R2F_INSN__MAX];
     41  1.1  christos 
     42  1.1  christos /* Commas between elements are contained in the macros.
     43  1.1  christos    Some of these are conditionally compiled out.  */
     44  1.1  christos 
     45  1.1  christos static const struct insn_sem m32r2f_insn_sem[] =
     46  1.1  christos {
     47  1.1  christos   { VIRTUAL_INSN_X_INVALID, M32R2F_INSN_X_INVALID, M32R2F_SFMT_EMPTY, NOPAR, NOPAR  },
     48  1.1  christos   { VIRTUAL_INSN_X_AFTER, M32R2F_INSN_X_AFTER, M32R2F_SFMT_EMPTY, NOPAR, NOPAR  },
     49  1.1  christos   { VIRTUAL_INSN_X_BEFORE, M32R2F_INSN_X_BEFORE, M32R2F_SFMT_EMPTY, NOPAR, NOPAR  },
     50  1.1  christos   { VIRTUAL_INSN_X_CTI_CHAIN, M32R2F_INSN_X_CTI_CHAIN, M32R2F_SFMT_EMPTY, NOPAR, NOPAR  },
     51  1.1  christos   { VIRTUAL_INSN_X_CHAIN, M32R2F_INSN_X_CHAIN, M32R2F_SFMT_EMPTY, NOPAR, NOPAR  },
     52  1.1  christos   { VIRTUAL_INSN_X_BEGIN, M32R2F_INSN_X_BEGIN, M32R2F_SFMT_EMPTY, NOPAR, NOPAR  },
     53  1.1  christos   { M32R_INSN_ADD, M32R2F_INSN_ADD, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_ADD, M32R2F_INSN_WRITE_ADD },
     54  1.1  christos   { M32R_INSN_ADD3, M32R2F_INSN_ADD3, M32R2F_SFMT_ADD3, NOPAR, NOPAR  },
     55  1.1  christos   { M32R_INSN_AND, M32R2F_INSN_AND, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_AND, M32R2F_INSN_WRITE_AND },
     56  1.1  christos   { M32R_INSN_AND3, M32R2F_INSN_AND3, M32R2F_SFMT_AND3, NOPAR, NOPAR  },
     57  1.1  christos   { M32R_INSN_OR, M32R2F_INSN_OR, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_OR, M32R2F_INSN_WRITE_OR },
     58  1.1  christos   { M32R_INSN_OR3, M32R2F_INSN_OR3, M32R2F_SFMT_OR3, NOPAR, NOPAR  },
     59  1.1  christos   { M32R_INSN_XOR, M32R2F_INSN_XOR, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_XOR, M32R2F_INSN_WRITE_XOR },
     60  1.1  christos   { M32R_INSN_XOR3, M32R2F_INSN_XOR3, M32R2F_SFMT_AND3, NOPAR, NOPAR  },
     61  1.1  christos   { M32R_INSN_ADDI, M32R2F_INSN_ADDI, M32R2F_SFMT_ADDI, M32R2F_INSN_PAR_ADDI, M32R2F_INSN_WRITE_ADDI },
     62  1.1  christos   { M32R_INSN_ADDV, M32R2F_INSN_ADDV, M32R2F_SFMT_ADDV, M32R2F_INSN_PAR_ADDV, M32R2F_INSN_WRITE_ADDV },
     63  1.1  christos   { M32R_INSN_ADDV3, M32R2F_INSN_ADDV3, M32R2F_SFMT_ADDV3, NOPAR, NOPAR  },
     64  1.1  christos   { M32R_INSN_ADDX, M32R2F_INSN_ADDX, M32R2F_SFMT_ADDX, M32R2F_INSN_PAR_ADDX, M32R2F_INSN_WRITE_ADDX },
     65  1.1  christos   { M32R_INSN_BC8, M32R2F_INSN_BC8, M32R2F_SFMT_BC8, M32R2F_INSN_PAR_BC8, M32R2F_INSN_WRITE_BC8 },
     66  1.1  christos   { M32R_INSN_BC24, M32R2F_INSN_BC24, M32R2F_SFMT_BC24, NOPAR, NOPAR  },
     67  1.1  christos   { M32R_INSN_BEQ, M32R2F_INSN_BEQ, M32R2F_SFMT_BEQ, NOPAR, NOPAR  },
     68  1.1  christos   { M32R_INSN_BEQZ, M32R2F_INSN_BEQZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR  },
     69  1.1  christos   { M32R_INSN_BGEZ, M32R2F_INSN_BGEZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR  },
     70  1.1  christos   { M32R_INSN_BGTZ, M32R2F_INSN_BGTZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR  },
     71  1.1  christos   { M32R_INSN_BLEZ, M32R2F_INSN_BLEZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR  },
     72  1.1  christos   { M32R_INSN_BLTZ, M32R2F_INSN_BLTZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR  },
     73  1.1  christos   { M32R_INSN_BNEZ, M32R2F_INSN_BNEZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR  },
     74  1.1  christos   { M32R_INSN_BL8, M32R2F_INSN_BL8, M32R2F_SFMT_BL8, M32R2F_INSN_PAR_BL8, M32R2F_INSN_WRITE_BL8 },
     75  1.1  christos   { M32R_INSN_BL24, M32R2F_INSN_BL24, M32R2F_SFMT_BL24, NOPAR, NOPAR  },
     76  1.1  christos   { M32R_INSN_BCL8, M32R2F_INSN_BCL8, M32R2F_SFMT_BCL8, M32R2F_INSN_PAR_BCL8, M32R2F_INSN_WRITE_BCL8 },
     77  1.1  christos   { M32R_INSN_BCL24, M32R2F_INSN_BCL24, M32R2F_SFMT_BCL24, NOPAR, NOPAR  },
     78  1.1  christos   { M32R_INSN_BNC8, M32R2F_INSN_BNC8, M32R2F_SFMT_BC8, M32R2F_INSN_PAR_BNC8, M32R2F_INSN_WRITE_BNC8 },
     79  1.1  christos   { M32R_INSN_BNC24, M32R2F_INSN_BNC24, M32R2F_SFMT_BC24, NOPAR, NOPAR  },
     80  1.1  christos   { M32R_INSN_BNE, M32R2F_INSN_BNE, M32R2F_SFMT_BEQ, NOPAR, NOPAR  },
     81  1.1  christos   { M32R_INSN_BRA8, M32R2F_INSN_BRA8, M32R2F_SFMT_BRA8, M32R2F_INSN_PAR_BRA8, M32R2F_INSN_WRITE_BRA8 },
     82  1.1  christos   { M32R_INSN_BRA24, M32R2F_INSN_BRA24, M32R2F_SFMT_BRA24, NOPAR, NOPAR  },
     83  1.1  christos   { M32R_INSN_BNCL8, M32R2F_INSN_BNCL8, M32R2F_SFMT_BCL8, M32R2F_INSN_PAR_BNCL8, M32R2F_INSN_WRITE_BNCL8 },
     84  1.1  christos   { M32R_INSN_BNCL24, M32R2F_INSN_BNCL24, M32R2F_SFMT_BCL24, NOPAR, NOPAR  },
     85  1.1  christos   { M32R_INSN_CMP, M32R2F_INSN_CMP, M32R2F_SFMT_CMP, M32R2F_INSN_PAR_CMP, M32R2F_INSN_WRITE_CMP },
     86  1.1  christos   { M32R_INSN_CMPI, M32R2F_INSN_CMPI, M32R2F_SFMT_CMPI, NOPAR, NOPAR  },
     87  1.1  christos   { M32R_INSN_CMPU, M32R2F_INSN_CMPU, M32R2F_SFMT_CMP, M32R2F_INSN_PAR_CMPU, M32R2F_INSN_WRITE_CMPU },
     88  1.1  christos   { M32R_INSN_CMPUI, M32R2F_INSN_CMPUI, M32R2F_SFMT_CMPI, NOPAR, NOPAR  },
     89  1.1  christos   { M32R_INSN_CMPEQ, M32R2F_INSN_CMPEQ, M32R2F_SFMT_CMP, M32R2F_INSN_PAR_CMPEQ, M32R2F_INSN_WRITE_CMPEQ },
     90  1.1  christos   { M32R_INSN_CMPZ, M32R2F_INSN_CMPZ, M32R2F_SFMT_CMPZ, M32R2F_INSN_PAR_CMPZ, M32R2F_INSN_WRITE_CMPZ },
     91  1.1  christos   { M32R_INSN_DIV, M32R2F_INSN_DIV, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
     92  1.1  christos   { M32R_INSN_DIVU, M32R2F_INSN_DIVU, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
     93  1.1  christos   { M32R_INSN_REM, M32R2F_INSN_REM, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
     94  1.1  christos   { M32R_INSN_REMU, M32R2F_INSN_REMU, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
     95  1.1  christos   { M32R_INSN_REMH, M32R2F_INSN_REMH, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
     96  1.1  christos   { M32R_INSN_REMUH, M32R2F_INSN_REMUH, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
     97  1.1  christos   { M32R_INSN_REMB, M32R2F_INSN_REMB, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
     98  1.1  christos   { M32R_INSN_REMUB, M32R2F_INSN_REMUB, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
     99  1.1  christos   { M32R_INSN_DIVUH, M32R2F_INSN_DIVUH, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
    100  1.1  christos   { M32R_INSN_DIVB, M32R2F_INSN_DIVB, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
    101  1.1  christos   { M32R_INSN_DIVUB, M32R2F_INSN_DIVUB, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
    102  1.1  christos   { M32R_INSN_DIVH, M32R2F_INSN_DIVH, M32R2F_SFMT_DIV, NOPAR, NOPAR  },
    103  1.1  christos   { M32R_INSN_JC, M32R2F_INSN_JC, M32R2F_SFMT_JC, M32R2F_INSN_PAR_JC, M32R2F_INSN_WRITE_JC },
    104  1.1  christos   { M32R_INSN_JNC, M32R2F_INSN_JNC, M32R2F_SFMT_JC, M32R2F_INSN_PAR_JNC, M32R2F_INSN_WRITE_JNC },
    105  1.1  christos   { M32R_INSN_JL, M32R2F_INSN_JL, M32R2F_SFMT_JL, M32R2F_INSN_PAR_JL, M32R2F_INSN_WRITE_JL },
    106  1.1  christos   { M32R_INSN_JMP, M32R2F_INSN_JMP, M32R2F_SFMT_JMP, M32R2F_INSN_PAR_JMP, M32R2F_INSN_WRITE_JMP },
    107  1.1  christos   { M32R_INSN_LD, M32R2F_INSN_LD, M32R2F_SFMT_LD, M32R2F_INSN_PAR_LD, M32R2F_INSN_WRITE_LD },
    108  1.1  christos   { M32R_INSN_LD_D, M32R2F_INSN_LD_D, M32R2F_SFMT_LD_D, NOPAR, NOPAR  },
    109  1.1  christos   { M32R_INSN_LDB, M32R2F_INSN_LDB, M32R2F_SFMT_LDB, M32R2F_INSN_PAR_LDB, M32R2F_INSN_WRITE_LDB },
    110  1.1  christos   { M32R_INSN_LDB_D, M32R2F_INSN_LDB_D, M32R2F_SFMT_LDB_D, NOPAR, NOPAR  },
    111  1.1  christos   { M32R_INSN_LDH, M32R2F_INSN_LDH, M32R2F_SFMT_LDH, M32R2F_INSN_PAR_LDH, M32R2F_INSN_WRITE_LDH },
    112  1.1  christos   { M32R_INSN_LDH_D, M32R2F_INSN_LDH_D, M32R2F_SFMT_LDH_D, NOPAR, NOPAR  },
    113  1.1  christos   { M32R_INSN_LDUB, M32R2F_INSN_LDUB, M32R2F_SFMT_LDB, M32R2F_INSN_PAR_LDUB, M32R2F_INSN_WRITE_LDUB },
    114  1.1  christos   { M32R_INSN_LDUB_D, M32R2F_INSN_LDUB_D, M32R2F_SFMT_LDB_D, NOPAR, NOPAR  },
    115  1.1  christos   { M32R_INSN_LDUH, M32R2F_INSN_LDUH, M32R2F_SFMT_LDH, M32R2F_INSN_PAR_LDUH, M32R2F_INSN_WRITE_LDUH },
    116  1.1  christos   { M32R_INSN_LDUH_D, M32R2F_INSN_LDUH_D, M32R2F_SFMT_LDH_D, NOPAR, NOPAR  },
    117  1.1  christos   { M32R_INSN_LD_PLUS, M32R2F_INSN_LD_PLUS, M32R2F_SFMT_LD_PLUS, M32R2F_INSN_PAR_LD_PLUS, M32R2F_INSN_WRITE_LD_PLUS },
    118  1.1  christos   { M32R_INSN_LD24, M32R2F_INSN_LD24, M32R2F_SFMT_LD24, NOPAR, NOPAR  },
    119  1.1  christos   { M32R_INSN_LDI8, M32R2F_INSN_LDI8, M32R2F_SFMT_LDI8, M32R2F_INSN_PAR_LDI8, M32R2F_INSN_WRITE_LDI8 },
    120  1.1  christos   { M32R_INSN_LDI16, M32R2F_INSN_LDI16, M32R2F_SFMT_LDI16, NOPAR, NOPAR  },
    121  1.1  christos   { M32R_INSN_LOCK, M32R2F_INSN_LOCK, M32R2F_SFMT_LOCK, M32R2F_INSN_PAR_LOCK, M32R2F_INSN_WRITE_LOCK },
    122  1.1  christos   { M32R_INSN_MACHI_A, M32R2F_INSN_MACHI_A, M32R2F_SFMT_MACHI_A, M32R2F_INSN_PAR_MACHI_A, M32R2F_INSN_WRITE_MACHI_A },
    123  1.1  christos   { M32R_INSN_MACLO_A, M32R2F_INSN_MACLO_A, M32R2F_SFMT_MACHI_A, M32R2F_INSN_PAR_MACLO_A, M32R2F_INSN_WRITE_MACLO_A },
    124  1.1  christos   { M32R_INSN_MACWHI_A, M32R2F_INSN_MACWHI_A, M32R2F_SFMT_MACHI_A, M32R2F_INSN_PAR_MACWHI_A, M32R2F_INSN_WRITE_MACWHI_A },
    125  1.1  christos   { M32R_INSN_MACWLO_A, M32R2F_INSN_MACWLO_A, M32R2F_SFMT_MACHI_A, M32R2F_INSN_PAR_MACWLO_A, M32R2F_INSN_WRITE_MACWLO_A },
    126  1.1  christos   { M32R_INSN_MUL, M32R2F_INSN_MUL, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_MUL, M32R2F_INSN_WRITE_MUL },
    127  1.1  christos   { M32R_INSN_MULHI_A, M32R2F_INSN_MULHI_A, M32R2F_SFMT_MULHI_A, M32R2F_INSN_PAR_MULHI_A, M32R2F_INSN_WRITE_MULHI_A },
    128  1.1  christos   { M32R_INSN_MULLO_A, M32R2F_INSN_MULLO_A, M32R2F_SFMT_MULHI_A, M32R2F_INSN_PAR_MULLO_A, M32R2F_INSN_WRITE_MULLO_A },
    129  1.1  christos   { M32R_INSN_MULWHI_A, M32R2F_INSN_MULWHI_A, M32R2F_SFMT_MULHI_A, M32R2F_INSN_PAR_MULWHI_A, M32R2F_INSN_WRITE_MULWHI_A },
    130  1.1  christos   { M32R_INSN_MULWLO_A, M32R2F_INSN_MULWLO_A, M32R2F_SFMT_MULHI_A, M32R2F_INSN_PAR_MULWLO_A, M32R2F_INSN_WRITE_MULWLO_A },
    131  1.1  christos   { M32R_INSN_MV, M32R2F_INSN_MV, M32R2F_SFMT_MV, M32R2F_INSN_PAR_MV, M32R2F_INSN_WRITE_MV },
    132  1.1  christos   { M32R_INSN_MVFACHI_A, M32R2F_INSN_MVFACHI_A, M32R2F_SFMT_MVFACHI_A, M32R2F_INSN_PAR_MVFACHI_A, M32R2F_INSN_WRITE_MVFACHI_A },
    133  1.1  christos   { M32R_INSN_MVFACLO_A, M32R2F_INSN_MVFACLO_A, M32R2F_SFMT_MVFACHI_A, M32R2F_INSN_PAR_MVFACLO_A, M32R2F_INSN_WRITE_MVFACLO_A },
    134  1.1  christos   { M32R_INSN_MVFACMI_A, M32R2F_INSN_MVFACMI_A, M32R2F_SFMT_MVFACHI_A, M32R2F_INSN_PAR_MVFACMI_A, M32R2F_INSN_WRITE_MVFACMI_A },
    135  1.1  christos   { M32R_INSN_MVFC, M32R2F_INSN_MVFC, M32R2F_SFMT_MVFC, M32R2F_INSN_PAR_MVFC, M32R2F_INSN_WRITE_MVFC },
    136  1.1  christos   { M32R_INSN_MVTACHI_A, M32R2F_INSN_MVTACHI_A, M32R2F_SFMT_MVTACHI_A, M32R2F_INSN_PAR_MVTACHI_A, M32R2F_INSN_WRITE_MVTACHI_A },
    137  1.1  christos   { M32R_INSN_MVTACLO_A, M32R2F_INSN_MVTACLO_A, M32R2F_SFMT_MVTACHI_A, M32R2F_INSN_PAR_MVTACLO_A, M32R2F_INSN_WRITE_MVTACLO_A },
    138  1.1  christos   { M32R_INSN_MVTC, M32R2F_INSN_MVTC, M32R2F_SFMT_MVTC, M32R2F_INSN_PAR_MVTC, M32R2F_INSN_WRITE_MVTC },
    139  1.1  christos   { M32R_INSN_NEG, M32R2F_INSN_NEG, M32R2F_SFMT_MV, M32R2F_INSN_PAR_NEG, M32R2F_INSN_WRITE_NEG },
    140  1.1  christos   { M32R_INSN_NOP, M32R2F_INSN_NOP, M32R2F_SFMT_NOP, M32R2F_INSN_PAR_NOP, M32R2F_INSN_WRITE_NOP },
    141  1.1  christos   { M32R_INSN_NOT, M32R2F_INSN_NOT, M32R2F_SFMT_MV, M32R2F_INSN_PAR_NOT, M32R2F_INSN_WRITE_NOT },
    142  1.1  christos   { M32R_INSN_RAC_DSI, M32R2F_INSN_RAC_DSI, M32R2F_SFMT_RAC_DSI, M32R2F_INSN_PAR_RAC_DSI, M32R2F_INSN_WRITE_RAC_DSI },
    143  1.1  christos   { M32R_INSN_RACH_DSI, M32R2F_INSN_RACH_DSI, M32R2F_SFMT_RAC_DSI, M32R2F_INSN_PAR_RACH_DSI, M32R2F_INSN_WRITE_RACH_DSI },
    144  1.1  christos   { M32R_INSN_RTE, M32R2F_INSN_RTE, M32R2F_SFMT_RTE, M32R2F_INSN_PAR_RTE, M32R2F_INSN_WRITE_RTE },
    145  1.1  christos   { M32R_INSN_SETH, M32R2F_INSN_SETH, M32R2F_SFMT_SETH, NOPAR, NOPAR  },
    146  1.1  christos   { M32R_INSN_SLL, M32R2F_INSN_SLL, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_SLL, M32R2F_INSN_WRITE_SLL },
    147  1.1  christos   { M32R_INSN_SLL3, M32R2F_INSN_SLL3, M32R2F_SFMT_SLL3, NOPAR, NOPAR  },
    148  1.1  christos   { M32R_INSN_SLLI, M32R2F_INSN_SLLI, M32R2F_SFMT_SLLI, M32R2F_INSN_PAR_SLLI, M32R2F_INSN_WRITE_SLLI },
    149  1.1  christos   { M32R_INSN_SRA, M32R2F_INSN_SRA, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_SRA, M32R2F_INSN_WRITE_SRA },
    150  1.1  christos   { M32R_INSN_SRA3, M32R2F_INSN_SRA3, M32R2F_SFMT_SLL3, NOPAR, NOPAR  },
    151  1.1  christos   { M32R_INSN_SRAI, M32R2F_INSN_SRAI, M32R2F_SFMT_SLLI, M32R2F_INSN_PAR_SRAI, M32R2F_INSN_WRITE_SRAI },
    152  1.1  christos   { M32R_INSN_SRL, M32R2F_INSN_SRL, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_SRL, M32R2F_INSN_WRITE_SRL },
    153  1.1  christos   { M32R_INSN_SRL3, M32R2F_INSN_SRL3, M32R2F_SFMT_SLL3, NOPAR, NOPAR  },
    154  1.1  christos   { M32R_INSN_SRLI, M32R2F_INSN_SRLI, M32R2F_SFMT_SLLI, M32R2F_INSN_PAR_SRLI, M32R2F_INSN_WRITE_SRLI },
    155  1.1  christos   { M32R_INSN_ST, M32R2F_INSN_ST, M32R2F_SFMT_ST, M32R2F_INSN_PAR_ST, M32R2F_INSN_WRITE_ST },
    156  1.1  christos   { M32R_INSN_ST_D, M32R2F_INSN_ST_D, M32R2F_SFMT_ST_D, NOPAR, NOPAR  },
    157  1.1  christos   { M32R_INSN_STB, M32R2F_INSN_STB, M32R2F_SFMT_STB, M32R2F_INSN_PAR_STB, M32R2F_INSN_WRITE_STB },
    158  1.1  christos   { M32R_INSN_STB_D, M32R2F_INSN_STB_D, M32R2F_SFMT_STB_D, NOPAR, NOPAR  },
    159  1.1  christos   { M32R_INSN_STH, M32R2F_INSN_STH, M32R2F_SFMT_STH, M32R2F_INSN_PAR_STH, M32R2F_INSN_WRITE_STH },
    160  1.1  christos   { M32R_INSN_STH_D, M32R2F_INSN_STH_D, M32R2F_SFMT_STH_D, NOPAR, NOPAR  },
    161  1.1  christos   { M32R_INSN_ST_PLUS, M32R2F_INSN_ST_PLUS, M32R2F_SFMT_ST_PLUS, M32R2F_INSN_PAR_ST_PLUS, M32R2F_INSN_WRITE_ST_PLUS },
    162  1.1  christos   { M32R_INSN_STH_PLUS, M32R2F_INSN_STH_PLUS, M32R2F_SFMT_STH_PLUS, M32R2F_INSN_PAR_STH_PLUS, M32R2F_INSN_WRITE_STH_PLUS },
    163  1.1  christos   { M32R_INSN_STB_PLUS, M32R2F_INSN_STB_PLUS, M32R2F_SFMT_STB_PLUS, M32R2F_INSN_PAR_STB_PLUS, M32R2F_INSN_WRITE_STB_PLUS },
    164  1.1  christos   { M32R_INSN_ST_MINUS, M32R2F_INSN_ST_MINUS, M32R2F_SFMT_ST_PLUS, M32R2F_INSN_PAR_ST_MINUS, M32R2F_INSN_WRITE_ST_MINUS },
    165  1.1  christos   { M32R_INSN_SUB, M32R2F_INSN_SUB, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_SUB, M32R2F_INSN_WRITE_SUB },
    166  1.1  christos   { M32R_INSN_SUBV, M32R2F_INSN_SUBV, M32R2F_SFMT_ADDV, M32R2F_INSN_PAR_SUBV, M32R2F_INSN_WRITE_SUBV },
    167  1.1  christos   { M32R_INSN_SUBX, M32R2F_INSN_SUBX, M32R2F_SFMT_ADDX, M32R2F_INSN_PAR_SUBX, M32R2F_INSN_WRITE_SUBX },
    168  1.1  christos   { M32R_INSN_TRAP, M32R2F_INSN_TRAP, M32R2F_SFMT_TRAP, M32R2F_INSN_PAR_TRAP, M32R2F_INSN_WRITE_TRAP },
    169  1.1  christos   { M32R_INSN_UNLOCK, M32R2F_INSN_UNLOCK, M32R2F_SFMT_UNLOCK, M32R2F_INSN_PAR_UNLOCK, M32R2F_INSN_WRITE_UNLOCK },
    170  1.1  christos   { M32R_INSN_SATB, M32R2F_INSN_SATB, M32R2F_SFMT_SATB, NOPAR, NOPAR  },
    171  1.1  christos   { M32R_INSN_SATH, M32R2F_INSN_SATH, M32R2F_SFMT_SATB, NOPAR, NOPAR  },
    172  1.1  christos   { M32R_INSN_SAT, M32R2F_INSN_SAT, M32R2F_SFMT_SAT, NOPAR, NOPAR  },
    173  1.1  christos   { M32R_INSN_PCMPBZ, M32R2F_INSN_PCMPBZ, M32R2F_SFMT_CMPZ, M32R2F_INSN_PAR_PCMPBZ, M32R2F_INSN_WRITE_PCMPBZ },
    174  1.1  christos   { M32R_INSN_SADD, M32R2F_INSN_SADD, M32R2F_SFMT_SADD, M32R2F_INSN_PAR_SADD, M32R2F_INSN_WRITE_SADD },
    175  1.1  christos   { M32R_INSN_MACWU1, M32R2F_INSN_MACWU1, M32R2F_SFMT_MACWU1, M32R2F_INSN_PAR_MACWU1, M32R2F_INSN_WRITE_MACWU1 },
    176  1.1  christos   { M32R_INSN_MSBLO, M32R2F_INSN_MSBLO, M32R2F_SFMT_MSBLO, M32R2F_INSN_PAR_MSBLO, M32R2F_INSN_WRITE_MSBLO },
    177  1.1  christos   { M32R_INSN_MULWU1, M32R2F_INSN_MULWU1, M32R2F_SFMT_MULWU1, M32R2F_INSN_PAR_MULWU1, M32R2F_INSN_WRITE_MULWU1 },
    178  1.1  christos   { M32R_INSN_MACLH1, M32R2F_INSN_MACLH1, M32R2F_SFMT_MACWU1, M32R2F_INSN_PAR_MACLH1, M32R2F_INSN_WRITE_MACLH1 },
    179  1.1  christos   { M32R_INSN_SC, M32R2F_INSN_SC, M32R2F_SFMT_SC, M32R2F_INSN_PAR_SC, M32R2F_INSN_WRITE_SC },
    180  1.1  christos   { M32R_INSN_SNC, M32R2F_INSN_SNC, M32R2F_SFMT_SC, M32R2F_INSN_PAR_SNC, M32R2F_INSN_WRITE_SNC },
    181  1.1  christos   { M32R_INSN_CLRPSW, M32R2F_INSN_CLRPSW, M32R2F_SFMT_CLRPSW, M32R2F_INSN_PAR_CLRPSW, M32R2F_INSN_WRITE_CLRPSW },
    182  1.1  christos   { M32R_INSN_SETPSW, M32R2F_INSN_SETPSW, M32R2F_SFMT_SETPSW, M32R2F_INSN_PAR_SETPSW, M32R2F_INSN_WRITE_SETPSW },
    183  1.1  christos   { M32R_INSN_BSET, M32R2F_INSN_BSET, M32R2F_SFMT_BSET, NOPAR, NOPAR  },
    184  1.1  christos   { M32R_INSN_BCLR, M32R2F_INSN_BCLR, M32R2F_SFMT_BSET, NOPAR, NOPAR  },
    185  1.1  christos   { M32R_INSN_BTST, M32R2F_INSN_BTST, M32R2F_SFMT_BTST, M32R2F_INSN_PAR_BTST, M32R2F_INSN_WRITE_BTST },
    186  1.1  christos };
    187  1.1  christos 
    188  1.1  christos static const struct insn_sem m32r2f_insn_sem_invalid =
    189  1.1  christos {
    190  1.1  christos   VIRTUAL_INSN_X_INVALID, M32R2F_INSN_X_INVALID, M32R2F_SFMT_EMPTY, NOPAR, NOPAR
    191  1.1  christos };
    192  1.1  christos 
    193  1.1  christos /* Initialize an IDESC from the compile-time computable parts.  */
    194  1.1  christos 
    195  1.1  christos static INLINE void
    196  1.1  christos init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t)
    197  1.1  christos {
    198  1.1  christos   const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries;
    199  1.1  christos 
    200  1.1  christos   id->num = t->index;
    201  1.1  christos   id->sfmt = t->sfmt;
    202  1.1  christos   if ((int) t->type <= 0)
    203  1.1  christos     id->idata = & cgen_virtual_insn_table[- (int) t->type];
    204  1.1  christos   else
    205  1.1  christos     id->idata = & insn_table[t->type];
    206  1.1  christos   id->attrs = CGEN_INSN_ATTRS (id->idata);
    207  1.1  christos   /* Oh my god, a magic number.  */
    208  1.1  christos   id->length = CGEN_INSN_BITSIZE (id->idata) / 8;
    209  1.1  christos 
    210  1.1  christos #if WITH_PROFILE_MODEL_P
    211  1.1  christos   id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index];
    212  1.1  christos   {
    213  1.1  christos     SIM_DESC sd = CPU_STATE (cpu);
    214  1.1  christos     SIM_ASSERT (t->index == id->timing->num);
    215  1.1  christos   }
    216  1.1  christos #endif
    217  1.1  christos 
    218  1.1  christos   /* Semantic pointers are initialized elsewhere.  */
    219  1.1  christos }
    220  1.1  christos 
    221  1.1  christos /* Initialize the instruction descriptor table.  */
    222  1.1  christos 
    223  1.1  christos void
    224  1.1  christos m32r2f_init_idesc_table (SIM_CPU *cpu)
    225  1.1  christos {
    226  1.1  christos   IDESC *id,*tabend;
    227  1.1  christos   const struct insn_sem *t,*tend;
    228  1.1  christos   int tabsize = M32R2F_INSN__MAX;
    229  1.1  christos   IDESC *table = m32r2f_insn_data;
    230  1.1  christos 
    231  1.1  christos   memset (table, 0, tabsize * sizeof (IDESC));
    232  1.1  christos 
    233  1.1  christos   /* First set all entries to the `invalid insn'.  */
    234  1.1  christos   t = & m32r2f_insn_sem_invalid;
    235  1.1  christos   for (id = table, tabend = table + tabsize; id < tabend; ++id)
    236  1.1  christos     init_idesc (cpu, id, t);
    237  1.1  christos 
    238  1.1  christos   /* Now fill in the values for the chosen cpu.  */
    239  1.1  christos   for (t = m32r2f_insn_sem, tend = t + sizeof (m32r2f_insn_sem) / sizeof (*t);
    240  1.1  christos        t != tend; ++t)
    241  1.1  christos     {
    242  1.1  christos       init_idesc (cpu, & table[t->index], t);
    243  1.1  christos       if (t->par_index != NOPAR)
    244  1.1  christos 	{
    245  1.1  christos 	  init_idesc (cpu, &table[t->par_index], t);
    246  1.1  christos 	  table[t->index].par_idesc = &table[t->par_index];
    247  1.1  christos 	}
    248  1.1  christos       if (t->par_index != NOPAR)
    249  1.1  christos 	{
    250  1.1  christos 	  init_idesc (cpu, &table[t->write_index], t);
    251  1.1  christos 	  table[t->par_index].par_idesc = &table[t->write_index];
    252  1.1  christos 	}
    253  1.1  christos     }
    254  1.1  christos 
    255  1.1  christos   /* Link the IDESC table into the cpu.  */
    256  1.1  christos   CPU_IDESC (cpu) = table;
    257  1.1  christos }
    258  1.1  christos 
    259  1.1  christos /* Given an instruction, return a pointer to its IDESC entry.  */
    260  1.1  christos 
    261  1.1  christos const IDESC *
    262  1.1  christos m32r2f_decode (SIM_CPU *current_cpu, IADDR pc,
    263  1.1  christos               CGEN_INSN_WORD base_insn, CGEN_INSN_WORD entire_insn,
    264  1.1  christos               ARGBUF *abuf)
    265  1.1  christos {
    266  1.1  christos   /* Result of decoder.  */
    267  1.1  christos   M32R2F_INSN_TYPE itype;
    268  1.1  christos 
    269  1.1  christos   {
    270  1.1  christos     CGEN_INSN_WORD insn = base_insn;
    271  1.1  christos 
    272  1.1  christos     {
    273  1.1  christos       unsigned int val = (((insn >> 8) & (15 << 4)) | ((insn >> 4) & (15 << 0)));
    274  1.1  christos       switch (val)
    275  1.1  christos       {
    276  1.1  christos       case 0 : itype = M32R2F_INSN_SUBV; goto extract_sfmt_addv;
    277  1.1  christos       case 1 : itype = M32R2F_INSN_SUBX; goto extract_sfmt_addx;
    278  1.1  christos       case 2 : itype = M32R2F_INSN_SUB; goto extract_sfmt_add;
    279  1.1  christos       case 3 : itype = M32R2F_INSN_NEG; goto extract_sfmt_mv;
    280  1.1  christos       case 4 : itype = M32R2F_INSN_CMP; goto extract_sfmt_cmp;
    281  1.1  christos       case 5 : itype = M32R2F_INSN_CMPU; goto extract_sfmt_cmp;
    282  1.1  christos       case 6 : itype = M32R2F_INSN_CMPEQ; goto extract_sfmt_cmp;
    283  1.1  christos       case 7 :
    284  1.1  christos         {
    285  1.1  christos           unsigned int val = (((insn >> 8) & (3 << 0)));
    286  1.1  christos           switch (val)
    287  1.1  christos           {
    288  1.1  christos           case 0 :
    289  1.1  christos             if ((entire_insn & 0xfff0) == 0x70)
    290  1.1  christos               { itype = M32R2F_INSN_CMPZ; goto extract_sfmt_cmpz; }
    291  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    292  1.1  christos           case 3 :
    293  1.1  christos             if ((entire_insn & 0xfff0) == 0x370)
    294  1.1  christos               { itype = M32R2F_INSN_PCMPBZ; goto extract_sfmt_cmpz; }
    295  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    296  1.1  christos           default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    297  1.1  christos           }
    298  1.1  christos         }
    299  1.1  christos       case 8 : itype = M32R2F_INSN_ADDV; goto extract_sfmt_addv;
    300  1.1  christos       case 9 : itype = M32R2F_INSN_ADDX; goto extract_sfmt_addx;
    301  1.1  christos       case 10 : itype = M32R2F_INSN_ADD; goto extract_sfmt_add;
    302  1.1  christos       case 11 : itype = M32R2F_INSN_NOT; goto extract_sfmt_mv;
    303  1.1  christos       case 12 : itype = M32R2F_INSN_AND; goto extract_sfmt_add;
    304  1.1  christos       case 13 : itype = M32R2F_INSN_XOR; goto extract_sfmt_add;
    305  1.1  christos       case 14 : itype = M32R2F_INSN_OR; goto extract_sfmt_add;
    306  1.1  christos       case 15 :
    307  1.1  christos         if ((entire_insn & 0xf8f0) == 0xf0)
    308  1.1  christos           { itype = M32R2F_INSN_BTST; goto extract_sfmt_btst; }
    309  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    310  1.1  christos       case 16 : itype = M32R2F_INSN_SRL; goto extract_sfmt_add;
    311  1.1  christos       case 18 : itype = M32R2F_INSN_SRA; goto extract_sfmt_add;
    312  1.1  christos       case 20 : itype = M32R2F_INSN_SLL; goto extract_sfmt_add;
    313  1.1  christos       case 22 : itype = M32R2F_INSN_MUL; goto extract_sfmt_add;
    314  1.1  christos       case 24 : itype = M32R2F_INSN_MV; goto extract_sfmt_mv;
    315  1.1  christos       case 25 : itype = M32R2F_INSN_MVFC; goto extract_sfmt_mvfc;
    316  1.1  christos       case 26 : itype = M32R2F_INSN_MVTC; goto extract_sfmt_mvtc;
    317  1.1  christos       case 28 :
    318  1.1  christos         {
    319  1.1  christos           unsigned int val = (((insn >> 8) & (3 << 0)));
    320  1.1  christos           switch (val)
    321  1.1  christos           {
    322  1.1  christos           case 0 :
    323  1.1  christos             if ((entire_insn & 0xfff0) == 0x1cc0)
    324  1.1  christos               { itype = M32R2F_INSN_JC; goto extract_sfmt_jc; }
    325  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    326  1.1  christos           case 1 :
    327  1.1  christos             if ((entire_insn & 0xfff0) == 0x1dc0)
    328  1.1  christos               { itype = M32R2F_INSN_JNC; goto extract_sfmt_jc; }
    329  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    330  1.1  christos           case 2 :
    331  1.1  christos             if ((entire_insn & 0xfff0) == 0x1ec0)
    332  1.1  christos               { itype = M32R2F_INSN_JL; goto extract_sfmt_jl; }
    333  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    334  1.1  christos           case 3 :
    335  1.1  christos             if ((entire_insn & 0xfff0) == 0x1fc0)
    336  1.1  christos               { itype = M32R2F_INSN_JMP; goto extract_sfmt_jmp; }
    337  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    338  1.1  christos           default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    339  1.1  christos           }
    340  1.1  christos         }
    341  1.1  christos       case 29 :
    342  1.1  christos         if ((entire_insn & 0xffff) == 0x10d6)
    343  1.1  christos           { itype = M32R2F_INSN_RTE; goto extract_sfmt_rte; }
    344  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    345  1.1  christos       case 31 :
    346  1.1  christos         if ((entire_insn & 0xfff0) == 0x10f0)
    347  1.1  christos           { itype = M32R2F_INSN_TRAP; goto extract_sfmt_trap; }
    348  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    349  1.1  christos       case 32 : itype = M32R2F_INSN_STB; goto extract_sfmt_stb;
    350  1.1  christos       case 33 : itype = M32R2F_INSN_STB_PLUS; goto extract_sfmt_stb_plus;
    351  1.1  christos       case 34 : itype = M32R2F_INSN_STH; goto extract_sfmt_sth;
    352  1.1  christos       case 35 : itype = M32R2F_INSN_STH_PLUS; goto extract_sfmt_sth_plus;
    353  1.1  christos       case 36 : itype = M32R2F_INSN_ST; goto extract_sfmt_st;
    354  1.1  christos       case 37 : itype = M32R2F_INSN_UNLOCK; goto extract_sfmt_unlock;
    355  1.1  christos       case 38 : itype = M32R2F_INSN_ST_PLUS; goto extract_sfmt_st_plus;
    356  1.1  christos       case 39 : itype = M32R2F_INSN_ST_MINUS; goto extract_sfmt_st_plus;
    357  1.1  christos       case 40 : itype = M32R2F_INSN_LDB; goto extract_sfmt_ldb;
    358  1.1  christos       case 41 : itype = M32R2F_INSN_LDUB; goto extract_sfmt_ldb;
    359  1.1  christos       case 42 : itype = M32R2F_INSN_LDH; goto extract_sfmt_ldh;
    360  1.1  christos       case 43 : itype = M32R2F_INSN_LDUH; goto extract_sfmt_ldh;
    361  1.1  christos       case 44 : itype = M32R2F_INSN_LD; goto extract_sfmt_ld;
    362  1.1  christos       case 45 : itype = M32R2F_INSN_LOCK; goto extract_sfmt_lock;
    363  1.1  christos       case 46 : itype = M32R2F_INSN_LD_PLUS; goto extract_sfmt_ld_plus;
    364  1.1  christos       case 48 : /* fall through */
    365  1.1  christos       case 56 : itype = M32R2F_INSN_MULHI_A; goto extract_sfmt_mulhi_a;
    366  1.1  christos       case 49 : /* fall through */
    367  1.1  christos       case 57 : itype = M32R2F_INSN_MULLO_A; goto extract_sfmt_mulhi_a;
    368  1.1  christos       case 50 : /* fall through */
    369  1.1  christos       case 58 : itype = M32R2F_INSN_MULWHI_A; goto extract_sfmt_mulhi_a;
    370  1.1  christos       case 51 : /* fall through */
    371  1.1  christos       case 59 : itype = M32R2F_INSN_MULWLO_A; goto extract_sfmt_mulhi_a;
    372  1.1  christos       case 52 : /* fall through */
    373  1.1  christos       case 60 : itype = M32R2F_INSN_MACHI_A; goto extract_sfmt_machi_a;
    374  1.1  christos       case 53 : /* fall through */
    375  1.1  christos       case 61 : itype = M32R2F_INSN_MACLO_A; goto extract_sfmt_machi_a;
    376  1.1  christos       case 54 : /* fall through */
    377  1.1  christos       case 62 : itype = M32R2F_INSN_MACWHI_A; goto extract_sfmt_machi_a;
    378  1.1  christos       case 55 : /* fall through */
    379  1.1  christos       case 63 : itype = M32R2F_INSN_MACWLO_A; goto extract_sfmt_machi_a;
    380  1.1  christos       case 64 : /* fall through */
    381  1.1  christos       case 65 : /* fall through */
    382  1.1  christos       case 66 : /* fall through */
    383  1.1  christos       case 67 : /* fall through */
    384  1.1  christos       case 68 : /* fall through */
    385  1.1  christos       case 69 : /* fall through */
    386  1.1  christos       case 70 : /* fall through */
    387  1.1  christos       case 71 : /* fall through */
    388  1.1  christos       case 72 : /* fall through */
    389  1.1  christos       case 73 : /* fall through */
    390  1.1  christos       case 74 : /* fall through */
    391  1.1  christos       case 75 : /* fall through */
    392  1.1  christos       case 76 : /* fall through */
    393  1.1  christos       case 77 : /* fall through */
    394  1.1  christos       case 78 : /* fall through */
    395  1.1  christos       case 79 : itype = M32R2F_INSN_ADDI; goto extract_sfmt_addi;
    396  1.1  christos       case 80 : /* fall through */
    397  1.1  christos       case 81 : itype = M32R2F_INSN_SRLI; goto extract_sfmt_slli;
    398  1.1  christos       case 82 : /* fall through */
    399  1.1  christos       case 83 : itype = M32R2F_INSN_SRAI; goto extract_sfmt_slli;
    400  1.1  christos       case 84 : /* fall through */
    401  1.1  christos       case 85 : itype = M32R2F_INSN_SLLI; goto extract_sfmt_slli;
    402  1.1  christos       case 87 :
    403  1.1  christos         {
    404  1.1  christos           unsigned int val = (((insn >> 0) & (1 << 0)));
    405  1.1  christos           switch (val)
    406  1.1  christos           {
    407  1.1  christos           case 0 :
    408  1.1  christos             if ((entire_insn & 0xf0f3) == 0x5070)
    409  1.1  christos               { itype = M32R2F_INSN_MVTACHI_A; goto extract_sfmt_mvtachi_a; }
    410  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    411  1.1  christos           case 1 :
    412  1.1  christos             if ((entire_insn & 0xf0f3) == 0x5071)
    413  1.1  christos               { itype = M32R2F_INSN_MVTACLO_A; goto extract_sfmt_mvtachi_a; }
    414  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    415  1.1  christos           default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    416  1.1  christos           }
    417  1.1  christos         }
    418  1.1  christos       case 88 :
    419  1.1  christos         if ((entire_insn & 0xf3f2) == 0x5080)
    420  1.1  christos           { itype = M32R2F_INSN_RACH_DSI; goto extract_sfmt_rac_dsi; }
    421  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    422  1.1  christos       case 89 :
    423  1.1  christos         if ((entire_insn & 0xf3f2) == 0x5090)
    424  1.1  christos           { itype = M32R2F_INSN_RAC_DSI; goto extract_sfmt_rac_dsi; }
    425  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    426  1.1  christos       case 90 : itype = M32R2F_INSN_MULWU1; goto extract_sfmt_mulwu1;
    427  1.1  christos       case 91 : itype = M32R2F_INSN_MACWU1; goto extract_sfmt_macwu1;
    428  1.1  christos       case 92 : itype = M32R2F_INSN_MACLH1; goto extract_sfmt_macwu1;
    429  1.1  christos       case 93 : itype = M32R2F_INSN_MSBLO; goto extract_sfmt_msblo;
    430  1.1  christos       case 94 :
    431  1.1  christos         if ((entire_insn & 0xffff) == 0x50e4)
    432  1.1  christos           { itype = M32R2F_INSN_SADD; goto extract_sfmt_sadd; }
    433  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    434  1.1  christos       case 95 :
    435  1.1  christos         {
    436  1.1  christos           unsigned int val = (((insn >> 0) & (3 << 0)));
    437  1.1  christos           switch (val)
    438  1.1  christos           {
    439  1.1  christos           case 0 : itype = M32R2F_INSN_MVFACHI_A; goto extract_sfmt_mvfachi_a;
    440  1.1  christos           case 1 : itype = M32R2F_INSN_MVFACLO_A; goto extract_sfmt_mvfachi_a;
    441  1.1  christos           case 2 : itype = M32R2F_INSN_MVFACMI_A; goto extract_sfmt_mvfachi_a;
    442  1.1  christos           default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    443  1.1  christos           }
    444  1.1  christos         }
    445  1.1  christos       case 96 : /* fall through */
    446  1.1  christos       case 97 : /* fall through */
    447  1.1  christos       case 98 : /* fall through */
    448  1.1  christos       case 99 : /* fall through */
    449  1.1  christos       case 100 : /* fall through */
    450  1.1  christos       case 101 : /* fall through */
    451  1.1  christos       case 102 : /* fall through */
    452  1.1  christos       case 103 : /* fall through */
    453  1.1  christos       case 104 : /* fall through */
    454  1.1  christos       case 105 : /* fall through */
    455  1.1  christos       case 106 : /* fall through */
    456  1.1  christos       case 107 : /* fall through */
    457  1.1  christos       case 108 : /* fall through */
    458  1.1  christos       case 109 : /* fall through */
    459  1.1  christos       case 110 : /* fall through */
    460  1.1  christos       case 111 : itype = M32R2F_INSN_LDI8; goto extract_sfmt_ldi8;
    461  1.1  christos       case 112 :
    462  1.1  christos         {
    463  1.1  christos           unsigned int val = (((insn >> 7) & (15 << 1)) | ((insn >> 0) & (1 << 0)));
    464  1.1  christos           switch (val)
    465  1.1  christos           {
    466  1.1  christos           case 0 :
    467  1.1  christos             if ((entire_insn & 0xffff) == 0x7000)
    468  1.1  christos               { itype = M32R2F_INSN_NOP; goto extract_sfmt_nop; }
    469  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    470  1.1  christos           case 2 : /* fall through */
    471  1.1  christos           case 3 : itype = M32R2F_INSN_SETPSW; goto extract_sfmt_setpsw;
    472  1.1  christos           case 4 : /* fall through */
    473  1.1  christos           case 5 : itype = M32R2F_INSN_CLRPSW; goto extract_sfmt_clrpsw;
    474  1.1  christos           case 9 :
    475  1.1  christos             if ((entire_insn & 0xffff) == 0x7401)
    476  1.1  christos               { itype = M32R2F_INSN_SC; goto extract_sfmt_sc; }
    477  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    478  1.1  christos           case 11 :
    479  1.1  christos             if ((entire_insn & 0xffff) == 0x7501)
    480  1.1  christos               { itype = M32R2F_INSN_SNC; goto extract_sfmt_sc; }
    481  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    482  1.1  christos           case 16 : /* fall through */
    483  1.1  christos           case 17 : itype = M32R2F_INSN_BCL8; goto extract_sfmt_bcl8;
    484  1.1  christos           case 18 : /* fall through */
    485  1.1  christos           case 19 : itype = M32R2F_INSN_BNCL8; goto extract_sfmt_bcl8;
    486  1.1  christos           case 24 : /* fall through */
    487  1.1  christos           case 25 : itype = M32R2F_INSN_BC8; goto extract_sfmt_bc8;
    488  1.1  christos           case 26 : /* fall through */
    489  1.1  christos           case 27 : itype = M32R2F_INSN_BNC8; goto extract_sfmt_bc8;
    490  1.1  christos           case 28 : /* fall through */
    491  1.1  christos           case 29 : itype = M32R2F_INSN_BL8; goto extract_sfmt_bl8;
    492  1.1  christos           case 30 : /* fall through */
    493  1.1  christos           case 31 : itype = M32R2F_INSN_BRA8; goto extract_sfmt_bra8;
    494  1.1  christos           default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    495  1.1  christos           }
    496  1.1  christos         }
    497  1.1  christos       case 113 : /* fall through */
    498  1.1  christos       case 114 : /* fall through */
    499  1.1  christos       case 115 : /* fall through */
    500  1.1  christos       case 116 : /* fall through */
    501  1.1  christos       case 117 : /* fall through */
    502  1.1  christos       case 118 : /* fall through */
    503  1.1  christos       case 119 : /* fall through */
    504  1.1  christos       case 120 : /* fall through */
    505  1.1  christos       case 121 : /* fall through */
    506  1.1  christos       case 122 : /* fall through */
    507  1.1  christos       case 123 : /* fall through */
    508  1.1  christos       case 124 : /* fall through */
    509  1.1  christos       case 125 : /* fall through */
    510  1.1  christos       case 126 : /* fall through */
    511  1.1  christos       case 127 :
    512  1.1  christos         {
    513  1.1  christos           unsigned int val = (((insn >> 8) & (15 << 0)));
    514  1.1  christos           switch (val)
    515  1.1  christos           {
    516  1.1  christos           case 1 : itype = M32R2F_INSN_SETPSW; goto extract_sfmt_setpsw;
    517  1.1  christos           case 2 : itype = M32R2F_INSN_CLRPSW; goto extract_sfmt_clrpsw;
    518  1.1  christos           case 8 : itype = M32R2F_INSN_BCL8; goto extract_sfmt_bcl8;
    519  1.1  christos           case 9 : itype = M32R2F_INSN_BNCL8; goto extract_sfmt_bcl8;
    520  1.1  christos           case 12 : itype = M32R2F_INSN_BC8; goto extract_sfmt_bc8;
    521  1.1  christos           case 13 : itype = M32R2F_INSN_BNC8; goto extract_sfmt_bc8;
    522  1.1  christos           case 14 : itype = M32R2F_INSN_BL8; goto extract_sfmt_bl8;
    523  1.1  christos           case 15 : itype = M32R2F_INSN_BRA8; goto extract_sfmt_bra8;
    524  1.1  christos           default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    525  1.1  christos           }
    526  1.1  christos         }
    527  1.1  christos       case 132 :
    528  1.1  christos         if ((entire_insn & 0xfff00000) == 0x80400000)
    529  1.1  christos           { itype = M32R2F_INSN_CMPI; goto extract_sfmt_cmpi; }
    530  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    531  1.1  christos       case 133 :
    532  1.1  christos         if ((entire_insn & 0xfff00000) == 0x80500000)
    533  1.1  christos           { itype = M32R2F_INSN_CMPUI; goto extract_sfmt_cmpi; }
    534  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    535  1.1  christos       case 134 :
    536  1.1  christos         {
    537  1.1  christos           unsigned int val = (((entire_insn >> 8) & (3 << 0)));
    538  1.1  christos           switch (val)
    539  1.1  christos           {
    540  1.1  christos           case 0 :
    541  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x80600000)
    542  1.1  christos               { itype = M32R2F_INSN_SAT; goto extract_sfmt_sat; }
    543  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    544  1.1  christos           case 2 :
    545  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x80600200)
    546  1.1  christos               { itype = M32R2F_INSN_SATH; goto extract_sfmt_satb; }
    547  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    548  1.1  christos           case 3 :
    549  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x80600300)
    550  1.1  christos               { itype = M32R2F_INSN_SATB; goto extract_sfmt_satb; }
    551  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    552  1.1  christos           default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    553  1.1  christos           }
    554  1.1  christos         }
    555  1.1  christos       case 136 : itype = M32R2F_INSN_ADDV3; goto extract_sfmt_addv3;
    556  1.1  christos       case 138 : itype = M32R2F_INSN_ADD3; goto extract_sfmt_add3;
    557  1.1  christos       case 140 : itype = M32R2F_INSN_AND3; goto extract_sfmt_and3;
    558  1.1  christos       case 141 : itype = M32R2F_INSN_XOR3; goto extract_sfmt_and3;
    559  1.1  christos       case 142 : itype = M32R2F_INSN_OR3; goto extract_sfmt_or3;
    560  1.1  christos       case 144 :
    561  1.1  christos         {
    562  1.1  christos           unsigned int val = (((entire_insn >> 3) & (3 << 0)));
    563  1.1  christos           switch (val)
    564  1.1  christos           {
    565  1.1  christos           case 0 :
    566  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x90000000)
    567  1.1  christos               { itype = M32R2F_INSN_DIV; goto extract_sfmt_div; }
    568  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    569  1.1  christos           case 2 :
    570  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x90000010)
    571  1.1  christos               { itype = M32R2F_INSN_DIVH; goto extract_sfmt_div; }
    572  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    573  1.1  christos           case 3 :
    574  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x90000018)
    575  1.1  christos               { itype = M32R2F_INSN_DIVB; goto extract_sfmt_div; }
    576  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    577  1.1  christos           default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    578  1.1  christos           }
    579  1.1  christos         }
    580  1.1  christos       case 145 :
    581  1.1  christos         {
    582  1.1  christos           unsigned int val = (((entire_insn >> 3) & (3 << 0)));
    583  1.1  christos           switch (val)
    584  1.1  christos           {
    585  1.1  christos           case 0 :
    586  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x90100000)
    587  1.1  christos               { itype = M32R2F_INSN_DIVU; goto extract_sfmt_div; }
    588  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    589  1.1  christos           case 2 :
    590  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x90100010)
    591  1.1  christos               { itype = M32R2F_INSN_DIVUH; goto extract_sfmt_div; }
    592  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    593  1.1  christos           case 3 :
    594  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x90100018)
    595  1.1  christos               { itype = M32R2F_INSN_DIVUB; goto extract_sfmt_div; }
    596  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    597  1.1  christos           default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    598  1.1  christos           }
    599  1.1  christos         }
    600  1.1  christos       case 146 :
    601  1.1  christos         {
    602  1.1  christos           unsigned int val = (((entire_insn >> 3) & (3 << 0)));
    603  1.1  christos           switch (val)
    604  1.1  christos           {
    605  1.1  christos           case 0 :
    606  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x90200000)
    607  1.1  christos               { itype = M32R2F_INSN_REM; goto extract_sfmt_div; }
    608  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    609  1.1  christos           case 2 :
    610  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x90200010)
    611  1.1  christos               { itype = M32R2F_INSN_REMH; goto extract_sfmt_div; }
    612  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    613  1.1  christos           case 3 :
    614  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x90200018)
    615  1.1  christos               { itype = M32R2F_INSN_REMB; goto extract_sfmt_div; }
    616  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    617  1.1  christos           default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    618  1.1  christos           }
    619  1.1  christos         }
    620  1.1  christos       case 147 :
    621  1.1  christos         {
    622  1.1  christos           unsigned int val = (((entire_insn >> 3) & (3 << 0)));
    623  1.1  christos           switch (val)
    624  1.1  christos           {
    625  1.1  christos           case 0 :
    626  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x90300000)
    627  1.1  christos               { itype = M32R2F_INSN_REMU; goto extract_sfmt_div; }
    628  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    629  1.1  christos           case 2 :
    630  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x90300010)
    631  1.1  christos               { itype = M32R2F_INSN_REMUH; goto extract_sfmt_div; }
    632  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    633  1.1  christos           case 3 :
    634  1.1  christos             if ((entire_insn & 0xf0f0ffff) == 0x90300018)
    635  1.1  christos               { itype = M32R2F_INSN_REMUB; goto extract_sfmt_div; }
    636  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    637  1.1  christos           default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    638  1.1  christos           }
    639  1.1  christos         }
    640  1.1  christos       case 152 : itype = M32R2F_INSN_SRL3; goto extract_sfmt_sll3;
    641  1.1  christos       case 154 : itype = M32R2F_INSN_SRA3; goto extract_sfmt_sll3;
    642  1.1  christos       case 156 : itype = M32R2F_INSN_SLL3; goto extract_sfmt_sll3;
    643  1.1  christos       case 159 :
    644  1.1  christos         if ((entire_insn & 0xf0ff0000) == 0x90f00000)
    645  1.1  christos           { itype = M32R2F_INSN_LDI16; goto extract_sfmt_ldi16; }
    646  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    647  1.1  christos       case 160 : itype = M32R2F_INSN_STB_D; goto extract_sfmt_stb_d;
    648  1.1  christos       case 162 : itype = M32R2F_INSN_STH_D; goto extract_sfmt_sth_d;
    649  1.1  christos       case 164 : itype = M32R2F_INSN_ST_D; goto extract_sfmt_st_d;
    650  1.1  christos       case 166 :
    651  1.1  christos         if ((entire_insn & 0xf8f00000) == 0xa0600000)
    652  1.1  christos           { itype = M32R2F_INSN_BSET; goto extract_sfmt_bset; }
    653  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    654  1.1  christos       case 167 :
    655  1.1  christos         if ((entire_insn & 0xf8f00000) == 0xa0700000)
    656  1.1  christos           { itype = M32R2F_INSN_BCLR; goto extract_sfmt_bset; }
    657  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    658  1.1  christos       case 168 : itype = M32R2F_INSN_LDB_D; goto extract_sfmt_ldb_d;
    659  1.1  christos       case 169 : itype = M32R2F_INSN_LDUB_D; goto extract_sfmt_ldb_d;
    660  1.1  christos       case 170 : itype = M32R2F_INSN_LDH_D; goto extract_sfmt_ldh_d;
    661  1.1  christos       case 171 : itype = M32R2F_INSN_LDUH_D; goto extract_sfmt_ldh_d;
    662  1.1  christos       case 172 : itype = M32R2F_INSN_LD_D; goto extract_sfmt_ld_d;
    663  1.1  christos       case 176 : itype = M32R2F_INSN_BEQ; goto extract_sfmt_beq;
    664  1.1  christos       case 177 : itype = M32R2F_INSN_BNE; goto extract_sfmt_beq;
    665  1.1  christos       case 184 :
    666  1.1  christos         if ((entire_insn & 0xfff00000) == 0xb0800000)
    667  1.1  christos           { itype = M32R2F_INSN_BEQZ; goto extract_sfmt_beqz; }
    668  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    669  1.1  christos       case 185 :
    670  1.1  christos         if ((entire_insn & 0xfff00000) == 0xb0900000)
    671  1.1  christos           { itype = M32R2F_INSN_BNEZ; goto extract_sfmt_beqz; }
    672  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    673  1.1  christos       case 186 :
    674  1.1  christos         if ((entire_insn & 0xfff00000) == 0xb0a00000)
    675  1.1  christos           { itype = M32R2F_INSN_BLTZ; goto extract_sfmt_beqz; }
    676  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    677  1.1  christos       case 187 :
    678  1.1  christos         if ((entire_insn & 0xfff00000) == 0xb0b00000)
    679  1.1  christos           { itype = M32R2F_INSN_BGEZ; goto extract_sfmt_beqz; }
    680  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    681  1.1  christos       case 188 :
    682  1.1  christos         if ((entire_insn & 0xfff00000) == 0xb0c00000)
    683  1.1  christos           { itype = M32R2F_INSN_BLEZ; goto extract_sfmt_beqz; }
    684  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    685  1.1  christos       case 189 :
    686  1.1  christos         if ((entire_insn & 0xfff00000) == 0xb0d00000)
    687  1.1  christos           { itype = M32R2F_INSN_BGTZ; goto extract_sfmt_beqz; }
    688  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    689  1.1  christos       case 220 :
    690  1.1  christos         if ((entire_insn & 0xf0ff0000) == 0xd0c00000)
    691  1.1  christos           { itype = M32R2F_INSN_SETH; goto extract_sfmt_seth; }
    692  1.1  christos         itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    693  1.1  christos       case 224 : /* fall through */
    694  1.1  christos       case 225 : /* fall through */
    695  1.1  christos       case 226 : /* fall through */
    696  1.1  christos       case 227 : /* fall through */
    697  1.1  christos       case 228 : /* fall through */
    698  1.1  christos       case 229 : /* fall through */
    699  1.1  christos       case 230 : /* fall through */
    700  1.1  christos       case 231 : /* fall through */
    701  1.1  christos       case 232 : /* fall through */
    702  1.1  christos       case 233 : /* fall through */
    703  1.1  christos       case 234 : /* fall through */
    704  1.1  christos       case 235 : /* fall through */
    705  1.1  christos       case 236 : /* fall through */
    706  1.1  christos       case 237 : /* fall through */
    707  1.1  christos       case 238 : /* fall through */
    708  1.1  christos       case 239 : itype = M32R2F_INSN_LD24; goto extract_sfmt_ld24;
    709  1.1  christos       case 240 : /* fall through */
    710  1.1  christos       case 241 : /* fall through */
    711  1.1  christos       case 242 : /* fall through */
    712  1.1  christos       case 243 : /* fall through */
    713  1.1  christos       case 244 : /* fall through */
    714  1.1  christos       case 245 : /* fall through */
    715  1.1  christos       case 246 : /* fall through */
    716  1.1  christos       case 247 : /* fall through */
    717  1.1  christos       case 248 : /* fall through */
    718  1.1  christos       case 249 : /* fall through */
    719  1.1  christos       case 250 : /* fall through */
    720  1.1  christos       case 251 : /* fall through */
    721  1.1  christos       case 252 : /* fall through */
    722  1.1  christos       case 253 : /* fall through */
    723  1.1  christos       case 254 : /* fall through */
    724  1.1  christos       case 255 :
    725  1.1  christos         {
    726  1.1  christos           unsigned int val = (((insn >> 8) & (7 << 0)));
    727  1.1  christos           switch (val)
    728  1.1  christos           {
    729  1.1  christos           case 0 :
    730  1.1  christos             if ((entire_insn & 0xff000000) == 0xf8000000)
    731  1.1  christos               { itype = M32R2F_INSN_BCL24; goto extract_sfmt_bcl24; }
    732  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    733  1.1  christos           case 1 :
    734  1.1  christos             if ((entire_insn & 0xff000000) == 0xf9000000)
    735  1.1  christos               { itype = M32R2F_INSN_BNCL24; goto extract_sfmt_bcl24; }
    736  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    737  1.1  christos           case 4 :
    738  1.1  christos             if ((entire_insn & 0xff000000) == 0xfc000000)
    739  1.1  christos               { itype = M32R2F_INSN_BC24; goto extract_sfmt_bc24; }
    740  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    741  1.1  christos           case 5 :
    742  1.1  christos             if ((entire_insn & 0xff000000) == 0xfd000000)
    743  1.1  christos               { itype = M32R2F_INSN_BNC24; goto extract_sfmt_bc24; }
    744  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    745  1.1  christos           case 6 :
    746  1.1  christos             if ((entire_insn & 0xff000000) == 0xfe000000)
    747  1.1  christos               { itype = M32R2F_INSN_BL24; goto extract_sfmt_bl24; }
    748  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    749  1.1  christos           case 7 :
    750  1.1  christos             if ((entire_insn & 0xff000000) == 0xff000000)
    751  1.1  christos               { itype = M32R2F_INSN_BRA24; goto extract_sfmt_bra24; }
    752  1.1  christos             itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    753  1.1  christos           default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    754  1.1  christos           }
    755  1.1  christos         }
    756  1.1  christos       default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
    757  1.1  christos       }
    758  1.1  christos     }
    759  1.1  christos   }
    760  1.1  christos 
    761  1.1  christos   /* The instruction has been decoded, now extract the fields.  */
    762  1.1  christos 
    763  1.1  christos  extract_sfmt_empty:
    764  1.1  christos   {
    765  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
    766  1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
    767  1.1  christos 
    768  1.1  christos 
    769  1.1  christos   /* Record the fields for the semantic handler.  */
    770  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0));
    771  1.1  christos 
    772  1.1  christos #undef FLD
    773  1.1  christos     return idesc;
    774  1.1  christos   }
    775  1.1  christos 
    776  1.1  christos  extract_sfmt_add:
    777  1.1  christos   {
    778  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
    779  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
    780  1.1  christos #define FLD(f) abuf->fields.sfmt_add.f
    781  1.1  christos     UINT f_r1;
    782  1.1  christos     UINT f_r2;
    783  1.1  christos 
    784  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
    785  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
    786  1.1  christos 
    787  1.1  christos   /* Record the fields for the semantic handler.  */
    788  1.1  christos   FLD (f_r1) = f_r1;
    789  1.1  christos   FLD (f_r2) = f_r2;
    790  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
    791  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
    792  1.1  christos   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));
    793  1.1  christos 
    794  1.1  christos #if WITH_PROFILE_MODEL_P
    795  1.1  christos   /* Record the fields for profiling.  */
    796  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
    797  1.1  christos     {
    798  1.1  christos       FLD (in_dr) = f_r1;
    799  1.1  christos       FLD (in_sr) = f_r2;
    800  1.1  christos       FLD (out_dr) = f_r1;
    801  1.1  christos     }
    802  1.1  christos #endif
    803  1.1  christos #undef FLD
    804  1.1  christos     return idesc;
    805  1.1  christos   }
    806  1.1  christos 
    807  1.1  christos  extract_sfmt_add3:
    808  1.1  christos   {
    809  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
    810  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
    811  1.1  christos #define FLD(f) abuf->fields.sfmt_add3.f
    812  1.1  christos     UINT f_r1;
    813  1.1  christos     UINT f_r2;
    814  1.1  christos     INT f_simm16;
    815  1.1  christos 
    816  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
    817  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
    818  1.1  christos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
    819  1.1  christos 
    820  1.1  christos   /* Record the fields for the semantic handler.  */
    821  1.1  christos   FLD (f_simm16) = f_simm16;
    822  1.1  christos   FLD (f_r2) = f_r2;
    823  1.1  christos   FLD (f_r1) = f_r1;
    824  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
    825  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
    826  1.1  christos   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));
    827  1.1  christos 
    828  1.1  christos #if WITH_PROFILE_MODEL_P
    829  1.1  christos   /* Record the fields for profiling.  */
    830  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
    831  1.1  christos     {
    832  1.1  christos       FLD (in_sr) = f_r2;
    833  1.1  christos       FLD (out_dr) = f_r1;
    834  1.1  christos     }
    835  1.1  christos #endif
    836  1.1  christos #undef FLD
    837  1.1  christos     return idesc;
    838  1.1  christos   }
    839  1.1  christos 
    840  1.1  christos  extract_sfmt_and3:
    841  1.1  christos   {
    842  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
    843  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
    844  1.1  christos #define FLD(f) abuf->fields.sfmt_and3.f
    845  1.1  christos     UINT f_r1;
    846  1.1  christos     UINT f_r2;
    847  1.1  christos     UINT f_uimm16;
    848  1.1  christos 
    849  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
    850  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
    851  1.1  christos     f_uimm16 = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
    852  1.1  christos 
    853  1.1  christos   /* Record the fields for the semantic handler.  */
    854  1.1  christos   FLD (f_r2) = f_r2;
    855  1.1  christos   FLD (f_uimm16) = f_uimm16;
    856  1.1  christos   FLD (f_r1) = f_r1;
    857  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
    858  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
    859  1.1  christos   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));
    860  1.1  christos 
    861  1.1  christos #if WITH_PROFILE_MODEL_P
    862  1.1  christos   /* Record the fields for profiling.  */
    863  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
    864  1.1  christos     {
    865  1.1  christos       FLD (in_sr) = f_r2;
    866  1.1  christos       FLD (out_dr) = f_r1;
    867  1.1  christos     }
    868  1.1  christos #endif
    869  1.1  christos #undef FLD
    870  1.1  christos     return idesc;
    871  1.1  christos   }
    872  1.1  christos 
    873  1.1  christos  extract_sfmt_or3:
    874  1.1  christos   {
    875  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
    876  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
    877  1.1  christos #define FLD(f) abuf->fields.sfmt_and3.f
    878  1.1  christos     UINT f_r1;
    879  1.1  christos     UINT f_r2;
    880  1.1  christos     UINT f_uimm16;
    881  1.1  christos 
    882  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
    883  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
    884  1.1  christos     f_uimm16 = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
    885  1.1  christos 
    886  1.1  christos   /* Record the fields for the semantic handler.  */
    887  1.1  christos   FLD (f_r2) = f_r2;
    888  1.1  christos   FLD (f_uimm16) = f_uimm16;
    889  1.1  christos   FLD (f_r1) = f_r1;
    890  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
    891  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
    892  1.1  christos   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));
    893  1.1  christos 
    894  1.1  christos #if WITH_PROFILE_MODEL_P
    895  1.1  christos   /* Record the fields for profiling.  */
    896  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
    897  1.1  christos     {
    898  1.1  christos       FLD (in_sr) = f_r2;
    899  1.1  christos       FLD (out_dr) = f_r1;
    900  1.1  christos     }
    901  1.1  christos #endif
    902  1.1  christos #undef FLD
    903  1.1  christos     return idesc;
    904  1.1  christos   }
    905  1.1  christos 
    906  1.1  christos  extract_sfmt_addi:
    907  1.1  christos   {
    908  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
    909  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
    910  1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    911  1.1  christos     UINT f_r1;
    912  1.1  christos     INT f_simm8;
    913  1.1  christos 
    914  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
    915  1.1  christos     f_simm8 = EXTRACT_MSB0_SINT (insn, 16, 8, 8);
    916  1.1  christos 
    917  1.1  christos   /* Record the fields for the semantic handler.  */
    918  1.1  christos   FLD (f_r1) = f_r1;
    919  1.1  christos   FLD (f_simm8) = f_simm8;
    920  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
    921  1.1  christos   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));
    922  1.1  christos 
    923  1.1  christos #if WITH_PROFILE_MODEL_P
    924  1.1  christos   /* Record the fields for profiling.  */
    925  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
    926  1.1  christos     {
    927  1.1  christos       FLD (in_dr) = f_r1;
    928  1.1  christos       FLD (out_dr) = f_r1;
    929  1.1  christos     }
    930  1.1  christos #endif
    931  1.1  christos #undef FLD
    932  1.1  christos     return idesc;
    933  1.1  christos   }
    934  1.1  christos 
    935  1.1  christos  extract_sfmt_addv:
    936  1.1  christos   {
    937  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
    938  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
    939  1.1  christos #define FLD(f) abuf->fields.sfmt_add.f
    940  1.1  christos     UINT f_r1;
    941  1.1  christos     UINT f_r2;
    942  1.1  christos 
    943  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
    944  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
    945  1.1  christos 
    946  1.1  christos   /* Record the fields for the semantic handler.  */
    947  1.1  christos   FLD (f_r1) = f_r1;
    948  1.1  christos   FLD (f_r2) = f_r2;
    949  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
    950  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
    951  1.1  christos   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));
    952  1.1  christos 
    953  1.1  christos #if WITH_PROFILE_MODEL_P
    954  1.1  christos   /* Record the fields for profiling.  */
    955  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
    956  1.1  christos     {
    957  1.1  christos       FLD (in_dr) = f_r1;
    958  1.1  christos       FLD (in_sr) = f_r2;
    959  1.1  christos       FLD (out_dr) = f_r1;
    960  1.1  christos     }
    961  1.1  christos #endif
    962  1.1  christos #undef FLD
    963  1.1  christos     return idesc;
    964  1.1  christos   }
    965  1.1  christos 
    966  1.1  christos  extract_sfmt_addv3:
    967  1.1  christos   {
    968  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
    969  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
    970  1.1  christos #define FLD(f) abuf->fields.sfmt_add3.f
    971  1.1  christos     UINT f_r1;
    972  1.1  christos     UINT f_r2;
    973  1.1  christos     INT f_simm16;
    974  1.1  christos 
    975  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
    976  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
    977  1.1  christos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
    978  1.1  christos 
    979  1.1  christos   /* Record the fields for the semantic handler.  */
    980  1.1  christos   FLD (f_simm16) = f_simm16;
    981  1.1  christos   FLD (f_r2) = f_r2;
    982  1.1  christos   FLD (f_r1) = f_r1;
    983  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
    984  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
    985  1.1  christos   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));
    986  1.1  christos 
    987  1.1  christos #if WITH_PROFILE_MODEL_P
    988  1.1  christos   /* Record the fields for profiling.  */
    989  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
    990  1.1  christos     {
    991  1.1  christos       FLD (in_sr) = f_r2;
    992  1.1  christos       FLD (out_dr) = f_r1;
    993  1.1  christos     }
    994  1.1  christos #endif
    995  1.1  christos #undef FLD
    996  1.1  christos     return idesc;
    997  1.1  christos   }
    998  1.1  christos 
    999  1.1  christos  extract_sfmt_addx:
   1000  1.1  christos   {
   1001  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1002  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1003  1.1  christos #define FLD(f) abuf->fields.sfmt_add.f
   1004  1.1  christos     UINT f_r1;
   1005  1.1  christos     UINT f_r2;
   1006  1.1  christos 
   1007  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1008  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1009  1.1  christos 
   1010  1.1  christos   /* Record the fields for the semantic handler.  */
   1011  1.1  christos   FLD (f_r1) = f_r1;
   1012  1.1  christos   FLD (f_r2) = f_r2;
   1013  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1014  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1015  1.1  christos   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));
   1016  1.1  christos 
   1017  1.1  christos #if WITH_PROFILE_MODEL_P
   1018  1.1  christos   /* Record the fields for profiling.  */
   1019  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1020  1.1  christos     {
   1021  1.1  christos       FLD (in_dr) = f_r1;
   1022  1.1  christos       FLD (in_sr) = f_r2;
   1023  1.1  christos       FLD (out_dr) = f_r1;
   1024  1.1  christos     }
   1025  1.1  christos #endif
   1026  1.1  christos #undef FLD
   1027  1.1  christos     return idesc;
   1028  1.1  christos   }
   1029  1.1  christos 
   1030  1.1  christos  extract_sfmt_bc8:
   1031  1.1  christos   {
   1032  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1033  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1034  1.1  christos #define FLD(f) abuf->fields.sfmt_bl8.f
   1035  1.1  christos     SI f_disp8;
   1036  1.1  christos 
   1037  1.1  christos     f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
   1038  1.1  christos 
   1039  1.1  christos   /* Record the fields for the semantic handler.  */
   1040  1.1  christos   FLD (i_disp8) = f_disp8;
   1041  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bc8", "disp8 0x%x", 'x', f_disp8, (char *) 0));
   1042  1.1  christos 
   1043  1.1  christos #if WITH_PROFILE_MODEL_P
   1044  1.1  christos   /* Record the fields for profiling.  */
   1045  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1046  1.1  christos     {
   1047  1.1  christos     }
   1048  1.1  christos #endif
   1049  1.1  christos #undef FLD
   1050  1.1  christos     return idesc;
   1051  1.1  christos   }
   1052  1.1  christos 
   1053  1.1  christos  extract_sfmt_bc24:
   1054  1.1  christos   {
   1055  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1056  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1057  1.1  christos #define FLD(f) abuf->fields.sfmt_bl24.f
   1058  1.1  christos     SI f_disp24;
   1059  1.1  christos 
   1060  1.1  christos     f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
   1061  1.1  christos 
   1062  1.1  christos   /* Record the fields for the semantic handler.  */
   1063  1.1  christos   FLD (i_disp24) = f_disp24;
   1064  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bc24", "disp24 0x%x", 'x', f_disp24, (char *) 0));
   1065  1.1  christos 
   1066  1.1  christos #if WITH_PROFILE_MODEL_P
   1067  1.1  christos   /* Record the fields for profiling.  */
   1068  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1069  1.1  christos     {
   1070  1.1  christos     }
   1071  1.1  christos #endif
   1072  1.1  christos #undef FLD
   1073  1.1  christos     return idesc;
   1074  1.1  christos   }
   1075  1.1  christos 
   1076  1.1  christos  extract_sfmt_beq:
   1077  1.1  christos   {
   1078  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1079  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1080  1.1  christos #define FLD(f) abuf->fields.sfmt_beq.f
   1081  1.1  christos     UINT f_r1;
   1082  1.1  christos     UINT f_r2;
   1083  1.1  christos     SI f_disp16;
   1084  1.1  christos 
   1085  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   1086  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   1087  1.1  christos     f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 16, 16)) << (2))) + (pc));
   1088  1.1  christos 
   1089  1.1  christos   /* Record the fields for the semantic handler.  */
   1090  1.1  christos   FLD (f_r1) = f_r1;
   1091  1.1  christos   FLD (f_r2) = f_r2;
   1092  1.1  christos   FLD (i_disp16) = f_disp16;
   1093  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   1094  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   1095  1.1  christos   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));
   1096  1.1  christos 
   1097  1.1  christos #if WITH_PROFILE_MODEL_P
   1098  1.1  christos   /* Record the fields for profiling.  */
   1099  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1100  1.1  christos     {
   1101  1.1  christos       FLD (in_src1) = f_r1;
   1102  1.1  christos       FLD (in_src2) = f_r2;
   1103  1.1  christos     }
   1104  1.1  christos #endif
   1105  1.1  christos #undef FLD
   1106  1.1  christos     return idesc;
   1107  1.1  christos   }
   1108  1.1  christos 
   1109  1.1  christos  extract_sfmt_beqz:
   1110  1.1  christos   {
   1111  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1112  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1113  1.1  christos #define FLD(f) abuf->fields.sfmt_beq.f
   1114  1.1  christos     UINT f_r2;
   1115  1.1  christos     SI f_disp16;
   1116  1.1  christos 
   1117  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   1118  1.1  christos     f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 16, 16)) << (2))) + (pc));
   1119  1.1  christos 
   1120  1.1  christos   /* Record the fields for the semantic handler.  */
   1121  1.1  christos   FLD (f_r2) = f_r2;
   1122  1.1  christos   FLD (i_disp16) = f_disp16;
   1123  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   1124  1.1  christos   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));
   1125  1.1  christos 
   1126  1.1  christos #if WITH_PROFILE_MODEL_P
   1127  1.1  christos   /* Record the fields for profiling.  */
   1128  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1129  1.1  christos     {
   1130  1.1  christos       FLD (in_src2) = f_r2;
   1131  1.1  christos     }
   1132  1.1  christos #endif
   1133  1.1  christos #undef FLD
   1134  1.1  christos     return idesc;
   1135  1.1  christos   }
   1136  1.1  christos 
   1137  1.1  christos  extract_sfmt_bl8:
   1138  1.1  christos   {
   1139  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1140  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1141  1.1  christos #define FLD(f) abuf->fields.sfmt_bl8.f
   1142  1.1  christos     SI f_disp8;
   1143  1.1  christos 
   1144  1.1  christos     f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
   1145  1.1  christos 
   1146  1.1  christos   /* Record the fields for the semantic handler.  */
   1147  1.1  christos   FLD (i_disp8) = f_disp8;
   1148  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bl8", "disp8 0x%x", 'x', f_disp8, (char *) 0));
   1149  1.1  christos 
   1150  1.1  christos #if WITH_PROFILE_MODEL_P
   1151  1.1  christos   /* Record the fields for profiling.  */
   1152  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1153  1.1  christos     {
   1154  1.1  christos       FLD (out_h_gr_SI_14) = 14;
   1155  1.1  christos     }
   1156  1.1  christos #endif
   1157  1.1  christos #undef FLD
   1158  1.1  christos     return idesc;
   1159  1.1  christos   }
   1160  1.1  christos 
   1161  1.1  christos  extract_sfmt_bl24:
   1162  1.1  christos   {
   1163  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1164  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1165  1.1  christos #define FLD(f) abuf->fields.sfmt_bl24.f
   1166  1.1  christos     SI f_disp24;
   1167  1.1  christos 
   1168  1.1  christos     f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
   1169  1.1  christos 
   1170  1.1  christos   /* Record the fields for the semantic handler.  */
   1171  1.1  christos   FLD (i_disp24) = f_disp24;
   1172  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bl24", "disp24 0x%x", 'x', f_disp24, (char *) 0));
   1173  1.1  christos 
   1174  1.1  christos #if WITH_PROFILE_MODEL_P
   1175  1.1  christos   /* Record the fields for profiling.  */
   1176  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1177  1.1  christos     {
   1178  1.1  christos       FLD (out_h_gr_SI_14) = 14;
   1179  1.1  christos     }
   1180  1.1  christos #endif
   1181  1.1  christos #undef FLD
   1182  1.1  christos     return idesc;
   1183  1.1  christos   }
   1184  1.1  christos 
   1185  1.1  christos  extract_sfmt_bcl8:
   1186  1.1  christos   {
   1187  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1188  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1189  1.1  christos #define FLD(f) abuf->fields.sfmt_bl8.f
   1190  1.1  christos     SI f_disp8;
   1191  1.1  christos 
   1192  1.1  christos     f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
   1193  1.1  christos 
   1194  1.1  christos   /* Record the fields for the semantic handler.  */
   1195  1.1  christos   FLD (i_disp8) = f_disp8;
   1196  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcl8", "disp8 0x%x", 'x', f_disp8, (char *) 0));
   1197  1.1  christos 
   1198  1.1  christos #if WITH_PROFILE_MODEL_P
   1199  1.1  christos   /* Record the fields for profiling.  */
   1200  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1201  1.1  christos     {
   1202  1.1  christos       FLD (out_h_gr_SI_14) = 14;
   1203  1.1  christos     }
   1204  1.1  christos #endif
   1205  1.1  christos #undef FLD
   1206  1.1  christos     return idesc;
   1207  1.1  christos   }
   1208  1.1  christos 
   1209  1.1  christos  extract_sfmt_bcl24:
   1210  1.1  christos   {
   1211  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1212  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1213  1.1  christos #define FLD(f) abuf->fields.sfmt_bl24.f
   1214  1.1  christos     SI f_disp24;
   1215  1.1  christos 
   1216  1.1  christos     f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
   1217  1.1  christos 
   1218  1.1  christos   /* Record the fields for the semantic handler.  */
   1219  1.1  christos   FLD (i_disp24) = f_disp24;
   1220  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcl24", "disp24 0x%x", 'x', f_disp24, (char *) 0));
   1221  1.1  christos 
   1222  1.1  christos #if WITH_PROFILE_MODEL_P
   1223  1.1  christos   /* Record the fields for profiling.  */
   1224  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1225  1.1  christos     {
   1226  1.1  christos       FLD (out_h_gr_SI_14) = 14;
   1227  1.1  christos     }
   1228  1.1  christos #endif
   1229  1.1  christos #undef FLD
   1230  1.1  christos     return idesc;
   1231  1.1  christos   }
   1232  1.1  christos 
   1233  1.1  christos  extract_sfmt_bra8:
   1234  1.1  christos   {
   1235  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1236  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1237  1.1  christos #define FLD(f) abuf->fields.sfmt_bl8.f
   1238  1.1  christos     SI f_disp8;
   1239  1.1  christos 
   1240  1.1  christos     f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
   1241  1.1  christos 
   1242  1.1  christos   /* Record the fields for the semantic handler.  */
   1243  1.1  christos   FLD (i_disp8) = f_disp8;
   1244  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bra8", "disp8 0x%x", 'x', f_disp8, (char *) 0));
   1245  1.1  christos 
   1246  1.1  christos #if WITH_PROFILE_MODEL_P
   1247  1.1  christos   /* Record the fields for profiling.  */
   1248  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1249  1.1  christos     {
   1250  1.1  christos     }
   1251  1.1  christos #endif
   1252  1.1  christos #undef FLD
   1253  1.1  christos     return idesc;
   1254  1.1  christos   }
   1255  1.1  christos 
   1256  1.1  christos  extract_sfmt_bra24:
   1257  1.1  christos   {
   1258  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1259  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1260  1.1  christos #define FLD(f) abuf->fields.sfmt_bl24.f
   1261  1.1  christos     SI f_disp24;
   1262  1.1  christos 
   1263  1.1  christos     f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
   1264  1.1  christos 
   1265  1.1  christos   /* Record the fields for the semantic handler.  */
   1266  1.1  christos   FLD (i_disp24) = f_disp24;
   1267  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bra24", "disp24 0x%x", 'x', f_disp24, (char *) 0));
   1268  1.1  christos 
   1269  1.1  christos #if WITH_PROFILE_MODEL_P
   1270  1.1  christos   /* Record the fields for profiling.  */
   1271  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1272  1.1  christos     {
   1273  1.1  christos     }
   1274  1.1  christos #endif
   1275  1.1  christos #undef FLD
   1276  1.1  christos     return idesc;
   1277  1.1  christos   }
   1278  1.1  christos 
   1279  1.1  christos  extract_sfmt_cmp:
   1280  1.1  christos   {
   1281  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1282  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1283  1.1  christos #define FLD(f) abuf->fields.sfmt_st_plus.f
   1284  1.1  christos     UINT f_r1;
   1285  1.1  christos     UINT f_r2;
   1286  1.1  christos 
   1287  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1288  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1289  1.1  christos 
   1290  1.1  christos   /* Record the fields for the semantic handler.  */
   1291  1.1  christos   FLD (f_r1) = f_r1;
   1292  1.1  christos   FLD (f_r2) = f_r2;
   1293  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   1294  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   1295  1.1  christos   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));
   1296  1.1  christos 
   1297  1.1  christos #if WITH_PROFILE_MODEL_P
   1298  1.1  christos   /* Record the fields for profiling.  */
   1299  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1300  1.1  christos     {
   1301  1.1  christos       FLD (in_src1) = f_r1;
   1302  1.1  christos       FLD (in_src2) = f_r2;
   1303  1.1  christos     }
   1304  1.1  christos #endif
   1305  1.1  christos #undef FLD
   1306  1.1  christos     return idesc;
   1307  1.1  christos   }
   1308  1.1  christos 
   1309  1.1  christos  extract_sfmt_cmpi:
   1310  1.1  christos   {
   1311  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1312  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1313  1.1  christos #define FLD(f) abuf->fields.sfmt_st_d.f
   1314  1.1  christos     UINT f_r2;
   1315  1.1  christos     INT f_simm16;
   1316  1.1  christos 
   1317  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   1318  1.1  christos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
   1319  1.1  christos 
   1320  1.1  christos   /* Record the fields for the semantic handler.  */
   1321  1.1  christos   FLD (f_simm16) = f_simm16;
   1322  1.1  christos   FLD (f_r2) = f_r2;
   1323  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   1324  1.1  christos   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));
   1325  1.1  christos 
   1326  1.1  christos #if WITH_PROFILE_MODEL_P
   1327  1.1  christos   /* Record the fields for profiling.  */
   1328  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1329  1.1  christos     {
   1330  1.1  christos       FLD (in_src2) = f_r2;
   1331  1.1  christos     }
   1332  1.1  christos #endif
   1333  1.1  christos #undef FLD
   1334  1.1  christos     return idesc;
   1335  1.1  christos   }
   1336  1.1  christos 
   1337  1.1  christos  extract_sfmt_cmpz:
   1338  1.1  christos   {
   1339  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1340  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1341  1.1  christos #define FLD(f) abuf->fields.sfmt_st_plus.f
   1342  1.1  christos     UINT f_r2;
   1343  1.1  christos 
   1344  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1345  1.1  christos 
   1346  1.1  christos   /* Record the fields for the semantic handler.  */
   1347  1.1  christos   FLD (f_r2) = f_r2;
   1348  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   1349  1.1  christos   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));
   1350  1.1  christos 
   1351  1.1  christos #if WITH_PROFILE_MODEL_P
   1352  1.1  christos   /* Record the fields for profiling.  */
   1353  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1354  1.1  christos     {
   1355  1.1  christos       FLD (in_src2) = f_r2;
   1356  1.1  christos     }
   1357  1.1  christos #endif
   1358  1.1  christos #undef FLD
   1359  1.1  christos     return idesc;
   1360  1.1  christos   }
   1361  1.1  christos 
   1362  1.1  christos  extract_sfmt_div:
   1363  1.1  christos   {
   1364  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1365  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1366  1.1  christos #define FLD(f) abuf->fields.sfmt_add.f
   1367  1.1  christos     UINT f_r1;
   1368  1.1  christos     UINT f_r2;
   1369  1.1  christos 
   1370  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   1371  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   1372  1.1  christos 
   1373  1.1  christos   /* Record the fields for the semantic handler.  */
   1374  1.1  christos   FLD (f_r1) = f_r1;
   1375  1.1  christos   FLD (f_r2) = f_r2;
   1376  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1377  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1378  1.1  christos   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));
   1379  1.1  christos 
   1380  1.1  christos #if WITH_PROFILE_MODEL_P
   1381  1.1  christos   /* Record the fields for profiling.  */
   1382  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1383  1.1  christos     {
   1384  1.1  christos       FLD (in_dr) = f_r1;
   1385  1.1  christos       FLD (in_sr) = f_r2;
   1386  1.1  christos       FLD (out_dr) = f_r1;
   1387  1.1  christos     }
   1388  1.1  christos #endif
   1389  1.1  christos #undef FLD
   1390  1.1  christos     return idesc;
   1391  1.1  christos   }
   1392  1.1  christos 
   1393  1.1  christos  extract_sfmt_jc:
   1394  1.1  christos   {
   1395  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1396  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1397  1.1  christos #define FLD(f) abuf->fields.sfmt_jl.f
   1398  1.1  christos     UINT f_r2;
   1399  1.1  christos 
   1400  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1401  1.1  christos 
   1402  1.1  christos   /* Record the fields for the semantic handler.  */
   1403  1.1  christos   FLD (f_r2) = f_r2;
   1404  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1405  1.1  christos   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));
   1406  1.1  christos 
   1407  1.1  christos #if WITH_PROFILE_MODEL_P
   1408  1.1  christos   /* Record the fields for profiling.  */
   1409  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1410  1.1  christos     {
   1411  1.1  christos       FLD (in_sr) = f_r2;
   1412  1.1  christos     }
   1413  1.1  christos #endif
   1414  1.1  christos #undef FLD
   1415  1.1  christos     return idesc;
   1416  1.1  christos   }
   1417  1.1  christos 
   1418  1.1  christos  extract_sfmt_jl:
   1419  1.1  christos   {
   1420  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1421  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1422  1.1  christos #define FLD(f) abuf->fields.sfmt_jl.f
   1423  1.1  christos     UINT f_r2;
   1424  1.1  christos 
   1425  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1426  1.1  christos 
   1427  1.1  christos   /* Record the fields for the semantic handler.  */
   1428  1.1  christos   FLD (f_r2) = f_r2;
   1429  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1430  1.1  christos   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));
   1431  1.1  christos 
   1432  1.1  christos #if WITH_PROFILE_MODEL_P
   1433  1.1  christos   /* Record the fields for profiling.  */
   1434  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1435  1.1  christos     {
   1436  1.1  christos       FLD (in_sr) = f_r2;
   1437  1.1  christos       FLD (out_h_gr_SI_14) = 14;
   1438  1.1  christos     }
   1439  1.1  christos #endif
   1440  1.1  christos #undef FLD
   1441  1.1  christos     return idesc;
   1442  1.1  christos   }
   1443  1.1  christos 
   1444  1.1  christos  extract_sfmt_jmp:
   1445  1.1  christos   {
   1446  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1447  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1448  1.1  christos #define FLD(f) abuf->fields.sfmt_jl.f
   1449  1.1  christos     UINT f_r2;
   1450  1.1  christos 
   1451  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1452  1.1  christos 
   1453  1.1  christos   /* Record the fields for the semantic handler.  */
   1454  1.1  christos   FLD (f_r2) = f_r2;
   1455  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1456  1.1  christos   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));
   1457  1.1  christos 
   1458  1.1  christos #if WITH_PROFILE_MODEL_P
   1459  1.1  christos   /* Record the fields for profiling.  */
   1460  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1461  1.1  christos     {
   1462  1.1  christos       FLD (in_sr) = f_r2;
   1463  1.1  christos     }
   1464  1.1  christos #endif
   1465  1.1  christos #undef FLD
   1466  1.1  christos     return idesc;
   1467  1.1  christos   }
   1468  1.1  christos 
   1469  1.1  christos  extract_sfmt_ld:
   1470  1.1  christos   {
   1471  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1472  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1473  1.1  christos #define FLD(f) abuf->fields.sfmt_ld_plus.f
   1474  1.1  christos     UINT f_r1;
   1475  1.1  christos     UINT f_r2;
   1476  1.1  christos 
   1477  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1478  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1479  1.1  christos 
   1480  1.1  christos   /* Record the fields for the semantic handler.  */
   1481  1.1  christos   FLD (f_r2) = f_r2;
   1482  1.1  christos   FLD (f_r1) = f_r1;
   1483  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1484  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1485  1.1  christos   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));
   1486  1.1  christos 
   1487  1.1  christos #if WITH_PROFILE_MODEL_P
   1488  1.1  christos   /* Record the fields for profiling.  */
   1489  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1490  1.1  christos     {
   1491  1.1  christos       FLD (in_sr) = f_r2;
   1492  1.1  christos       FLD (out_dr) = f_r1;
   1493  1.1  christos     }
   1494  1.1  christos #endif
   1495  1.1  christos #undef FLD
   1496  1.1  christos     return idesc;
   1497  1.1  christos   }
   1498  1.1  christos 
   1499  1.1  christos  extract_sfmt_ld_d:
   1500  1.1  christos   {
   1501  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1502  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1503  1.1  christos #define FLD(f) abuf->fields.sfmt_add3.f
   1504  1.1  christos     UINT f_r1;
   1505  1.1  christos     UINT f_r2;
   1506  1.1  christos     INT f_simm16;
   1507  1.1  christos 
   1508  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   1509  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   1510  1.1  christos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
   1511  1.1  christos 
   1512  1.1  christos   /* Record the fields for the semantic handler.  */
   1513  1.1  christos   FLD (f_simm16) = f_simm16;
   1514  1.1  christos   FLD (f_r2) = f_r2;
   1515  1.1  christos   FLD (f_r1) = f_r1;
   1516  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1517  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1518  1.1  christos   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));
   1519  1.1  christos 
   1520  1.1  christos #if WITH_PROFILE_MODEL_P
   1521  1.1  christos   /* Record the fields for profiling.  */
   1522  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1523  1.1  christos     {
   1524  1.1  christos       FLD (in_sr) = f_r2;
   1525  1.1  christos       FLD (out_dr) = f_r1;
   1526  1.1  christos     }
   1527  1.1  christos #endif
   1528  1.1  christos #undef FLD
   1529  1.1  christos     return idesc;
   1530  1.1  christos   }
   1531  1.1  christos 
   1532  1.1  christos  extract_sfmt_ldb:
   1533  1.1  christos   {
   1534  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1535  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1536  1.1  christos #define FLD(f) abuf->fields.sfmt_ld_plus.f
   1537  1.1  christos     UINT f_r1;
   1538  1.1  christos     UINT f_r2;
   1539  1.1  christos 
   1540  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1541  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1542  1.1  christos 
   1543  1.1  christos   /* Record the fields for the semantic handler.  */
   1544  1.1  christos   FLD (f_r2) = f_r2;
   1545  1.1  christos   FLD (f_r1) = f_r1;
   1546  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1547  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1548  1.1  christos   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));
   1549  1.1  christos 
   1550  1.1  christos #if WITH_PROFILE_MODEL_P
   1551  1.1  christos   /* Record the fields for profiling.  */
   1552  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1553  1.1  christos     {
   1554  1.1  christos       FLD (in_sr) = f_r2;
   1555  1.1  christos       FLD (out_dr) = f_r1;
   1556  1.1  christos     }
   1557  1.1  christos #endif
   1558  1.1  christos #undef FLD
   1559  1.1  christos     return idesc;
   1560  1.1  christos   }
   1561  1.1  christos 
   1562  1.1  christos  extract_sfmt_ldb_d:
   1563  1.1  christos   {
   1564  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1565  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1566  1.1  christos #define FLD(f) abuf->fields.sfmt_add3.f
   1567  1.1  christos     UINT f_r1;
   1568  1.1  christos     UINT f_r2;
   1569  1.1  christos     INT f_simm16;
   1570  1.1  christos 
   1571  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   1572  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   1573  1.1  christos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
   1574  1.1  christos 
   1575  1.1  christos   /* Record the fields for the semantic handler.  */
   1576  1.1  christos   FLD (f_simm16) = f_simm16;
   1577  1.1  christos   FLD (f_r2) = f_r2;
   1578  1.1  christos   FLD (f_r1) = f_r1;
   1579  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1580  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1581  1.1  christos   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));
   1582  1.1  christos 
   1583  1.1  christos #if WITH_PROFILE_MODEL_P
   1584  1.1  christos   /* Record the fields for profiling.  */
   1585  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1586  1.1  christos     {
   1587  1.1  christos       FLD (in_sr) = f_r2;
   1588  1.1  christos       FLD (out_dr) = f_r1;
   1589  1.1  christos     }
   1590  1.1  christos #endif
   1591  1.1  christos #undef FLD
   1592  1.1  christos     return idesc;
   1593  1.1  christos   }
   1594  1.1  christos 
   1595  1.1  christos  extract_sfmt_ldh:
   1596  1.1  christos   {
   1597  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1598  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1599  1.1  christos #define FLD(f) abuf->fields.sfmt_ld_plus.f
   1600  1.1  christos     UINT f_r1;
   1601  1.1  christos     UINT f_r2;
   1602  1.1  christos 
   1603  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1604  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1605  1.1  christos 
   1606  1.1  christos   /* Record the fields for the semantic handler.  */
   1607  1.1  christos   FLD (f_r2) = f_r2;
   1608  1.1  christos   FLD (f_r1) = f_r1;
   1609  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1610  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1611  1.1  christos   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));
   1612  1.1  christos 
   1613  1.1  christos #if WITH_PROFILE_MODEL_P
   1614  1.1  christos   /* Record the fields for profiling.  */
   1615  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1616  1.1  christos     {
   1617  1.1  christos       FLD (in_sr) = f_r2;
   1618  1.1  christos       FLD (out_dr) = f_r1;
   1619  1.1  christos     }
   1620  1.1  christos #endif
   1621  1.1  christos #undef FLD
   1622  1.1  christos     return idesc;
   1623  1.1  christos   }
   1624  1.1  christos 
   1625  1.1  christos  extract_sfmt_ldh_d:
   1626  1.1  christos   {
   1627  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1628  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1629  1.1  christos #define FLD(f) abuf->fields.sfmt_add3.f
   1630  1.1  christos     UINT f_r1;
   1631  1.1  christos     UINT f_r2;
   1632  1.1  christos     INT f_simm16;
   1633  1.1  christos 
   1634  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   1635  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   1636  1.1  christos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
   1637  1.1  christos 
   1638  1.1  christos   /* Record the fields for the semantic handler.  */
   1639  1.1  christos   FLD (f_simm16) = f_simm16;
   1640  1.1  christos   FLD (f_r2) = f_r2;
   1641  1.1  christos   FLD (f_r1) = f_r1;
   1642  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1643  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1644  1.1  christos   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));
   1645  1.1  christos 
   1646  1.1  christos #if WITH_PROFILE_MODEL_P
   1647  1.1  christos   /* Record the fields for profiling.  */
   1648  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1649  1.1  christos     {
   1650  1.1  christos       FLD (in_sr) = f_r2;
   1651  1.1  christos       FLD (out_dr) = f_r1;
   1652  1.1  christos     }
   1653  1.1  christos #endif
   1654  1.1  christos #undef FLD
   1655  1.1  christos     return idesc;
   1656  1.1  christos   }
   1657  1.1  christos 
   1658  1.1  christos  extract_sfmt_ld_plus:
   1659  1.1  christos   {
   1660  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1661  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1662  1.1  christos #define FLD(f) abuf->fields.sfmt_ld_plus.f
   1663  1.1  christos     UINT f_r1;
   1664  1.1  christos     UINT f_r2;
   1665  1.1  christos 
   1666  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1667  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1668  1.1  christos 
   1669  1.1  christos   /* Record the fields for the semantic handler.  */
   1670  1.1  christos   FLD (f_r2) = f_r2;
   1671  1.1  christos   FLD (f_r1) = f_r1;
   1672  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1673  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1674  1.1  christos   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));
   1675  1.1  christos 
   1676  1.1  christos #if WITH_PROFILE_MODEL_P
   1677  1.1  christos   /* Record the fields for profiling.  */
   1678  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1679  1.1  christos     {
   1680  1.1  christos       FLD (in_sr) = f_r2;
   1681  1.1  christos       FLD (out_dr) = f_r1;
   1682  1.1  christos       FLD (out_sr) = f_r2;
   1683  1.1  christos     }
   1684  1.1  christos #endif
   1685  1.1  christos #undef FLD
   1686  1.1  christos     return idesc;
   1687  1.1  christos   }
   1688  1.1  christos 
   1689  1.1  christos  extract_sfmt_ld24:
   1690  1.1  christos   {
   1691  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1692  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1693  1.1  christos #define FLD(f) abuf->fields.sfmt_ld24.f
   1694  1.1  christos     UINT f_r1;
   1695  1.1  christos     UINT f_uimm24;
   1696  1.1  christos 
   1697  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   1698  1.1  christos     f_uimm24 = EXTRACT_MSB0_UINT (insn, 32, 8, 24);
   1699  1.1  christos 
   1700  1.1  christos   /* Record the fields for the semantic handler.  */
   1701  1.1  christos   FLD (f_r1) = f_r1;
   1702  1.1  christos   FLD (i_uimm24) = f_uimm24;
   1703  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1704  1.1  christos   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));
   1705  1.1  christos 
   1706  1.1  christos #if WITH_PROFILE_MODEL_P
   1707  1.1  christos   /* Record the fields for profiling.  */
   1708  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1709  1.1  christos     {
   1710  1.1  christos       FLD (out_dr) = f_r1;
   1711  1.1  christos     }
   1712  1.1  christos #endif
   1713  1.1  christos #undef FLD
   1714  1.1  christos     return idesc;
   1715  1.1  christos   }
   1716  1.1  christos 
   1717  1.1  christos  extract_sfmt_ldi8:
   1718  1.1  christos   {
   1719  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1720  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1721  1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
   1722  1.1  christos     UINT f_r1;
   1723  1.1  christos     INT f_simm8;
   1724  1.1  christos 
   1725  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1726  1.1  christos     f_simm8 = EXTRACT_MSB0_SINT (insn, 16, 8, 8);
   1727  1.1  christos 
   1728  1.1  christos   /* Record the fields for the semantic handler.  */
   1729  1.1  christos   FLD (f_simm8) = f_simm8;
   1730  1.1  christos   FLD (f_r1) = f_r1;
   1731  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1732  1.1  christos   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));
   1733  1.1  christos 
   1734  1.1  christos #if WITH_PROFILE_MODEL_P
   1735  1.1  christos   /* Record the fields for profiling.  */
   1736  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1737  1.1  christos     {
   1738  1.1  christos       FLD (out_dr) = f_r1;
   1739  1.1  christos     }
   1740  1.1  christos #endif
   1741  1.1  christos #undef FLD
   1742  1.1  christos     return idesc;
   1743  1.1  christos   }
   1744  1.1  christos 
   1745  1.1  christos  extract_sfmt_ldi16:
   1746  1.1  christos   {
   1747  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1748  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1749  1.1  christos #define FLD(f) abuf->fields.sfmt_add3.f
   1750  1.1  christos     UINT f_r1;
   1751  1.1  christos     INT f_simm16;
   1752  1.1  christos 
   1753  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   1754  1.1  christos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
   1755  1.1  christos 
   1756  1.1  christos   /* Record the fields for the semantic handler.  */
   1757  1.1  christos   FLD (f_simm16) = f_simm16;
   1758  1.1  christos   FLD (f_r1) = f_r1;
   1759  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1760  1.1  christos   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));
   1761  1.1  christos 
   1762  1.1  christos #if WITH_PROFILE_MODEL_P
   1763  1.1  christos   /* Record the fields for profiling.  */
   1764  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1765  1.1  christos     {
   1766  1.1  christos       FLD (out_dr) = f_r1;
   1767  1.1  christos     }
   1768  1.1  christos #endif
   1769  1.1  christos #undef FLD
   1770  1.1  christos     return idesc;
   1771  1.1  christos   }
   1772  1.1  christos 
   1773  1.1  christos  extract_sfmt_lock:
   1774  1.1  christos   {
   1775  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1776  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1777  1.1  christos #define FLD(f) abuf->fields.sfmt_ld_plus.f
   1778  1.1  christos     UINT f_r1;
   1779  1.1  christos     UINT f_r2;
   1780  1.1  christos 
   1781  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1782  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1783  1.1  christos 
   1784  1.1  christos   /* Record the fields for the semantic handler.  */
   1785  1.1  christos   FLD (f_r2) = f_r2;
   1786  1.1  christos   FLD (f_r1) = f_r1;
   1787  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1788  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1789  1.1  christos   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));
   1790  1.1  christos 
   1791  1.1  christos #if WITH_PROFILE_MODEL_P
   1792  1.1  christos   /* Record the fields for profiling.  */
   1793  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1794  1.1  christos     {
   1795  1.1  christos       FLD (in_sr) = f_r2;
   1796  1.1  christos       FLD (out_dr) = f_r1;
   1797  1.1  christos     }
   1798  1.1  christos #endif
   1799  1.1  christos #undef FLD
   1800  1.1  christos     return idesc;
   1801  1.1  christos   }
   1802  1.1  christos 
   1803  1.1  christos  extract_sfmt_machi_a:
   1804  1.1  christos   {
   1805  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1806  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1807  1.1  christos #define FLD(f) abuf->fields.sfmt_machi_a.f
   1808  1.1  christos     UINT f_r1;
   1809  1.1  christos     UINT f_acc;
   1810  1.1  christos     UINT f_r2;
   1811  1.1  christos 
   1812  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1813  1.1  christos     f_acc = EXTRACT_MSB0_UINT (insn, 16, 8, 1);
   1814  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1815  1.1  christos 
   1816  1.1  christos   /* Record the fields for the semantic handler.  */
   1817  1.1  christos   FLD (f_acc) = f_acc;
   1818  1.1  christos   FLD (f_r1) = f_r1;
   1819  1.1  christos   FLD (f_r2) = f_r2;
   1820  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   1821  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   1822  1.1  christos   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));
   1823  1.1  christos 
   1824  1.1  christos #if WITH_PROFILE_MODEL_P
   1825  1.1  christos   /* Record the fields for profiling.  */
   1826  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1827  1.1  christos     {
   1828  1.1  christos       FLD (in_src1) = f_r1;
   1829  1.1  christos       FLD (in_src2) = f_r2;
   1830  1.1  christos     }
   1831  1.1  christos #endif
   1832  1.1  christos #undef FLD
   1833  1.1  christos     return idesc;
   1834  1.1  christos   }
   1835  1.1  christos 
   1836  1.1  christos  extract_sfmt_mulhi_a:
   1837  1.1  christos   {
   1838  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1839  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1840  1.1  christos #define FLD(f) abuf->fields.sfmt_machi_a.f
   1841  1.1  christos     UINT f_r1;
   1842  1.1  christos     UINT f_acc;
   1843  1.1  christos     UINT f_r2;
   1844  1.1  christos 
   1845  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1846  1.1  christos     f_acc = EXTRACT_MSB0_UINT (insn, 16, 8, 1);
   1847  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1848  1.1  christos 
   1849  1.1  christos   /* Record the fields for the semantic handler.  */
   1850  1.1  christos   FLD (f_r1) = f_r1;
   1851  1.1  christos   FLD (f_r2) = f_r2;
   1852  1.1  christos   FLD (f_acc) = f_acc;
   1853  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   1854  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   1855  1.1  christos   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));
   1856  1.1  christos 
   1857  1.1  christos #if WITH_PROFILE_MODEL_P
   1858  1.1  christos   /* Record the fields for profiling.  */
   1859  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1860  1.1  christos     {
   1861  1.1  christos       FLD (in_src1) = f_r1;
   1862  1.1  christos       FLD (in_src2) = f_r2;
   1863  1.1  christos     }
   1864  1.1  christos #endif
   1865  1.1  christos #undef FLD
   1866  1.1  christos     return idesc;
   1867  1.1  christos   }
   1868  1.1  christos 
   1869  1.1  christos  extract_sfmt_mv:
   1870  1.1  christos   {
   1871  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1872  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1873  1.1  christos #define FLD(f) abuf->fields.sfmt_ld_plus.f
   1874  1.1  christos     UINT f_r1;
   1875  1.1  christos     UINT f_r2;
   1876  1.1  christos 
   1877  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1878  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1879  1.1  christos 
   1880  1.1  christos   /* Record the fields for the semantic handler.  */
   1881  1.1  christos   FLD (f_r2) = f_r2;
   1882  1.1  christos   FLD (f_r1) = f_r1;
   1883  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1884  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1885  1.1  christos   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));
   1886  1.1  christos 
   1887  1.1  christos #if WITH_PROFILE_MODEL_P
   1888  1.1  christos   /* Record the fields for profiling.  */
   1889  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1890  1.1  christos     {
   1891  1.1  christos       FLD (in_sr) = f_r2;
   1892  1.1  christos       FLD (out_dr) = f_r1;
   1893  1.1  christos     }
   1894  1.1  christos #endif
   1895  1.1  christos #undef FLD
   1896  1.1  christos     return idesc;
   1897  1.1  christos   }
   1898  1.1  christos 
   1899  1.1  christos  extract_sfmt_mvfachi_a:
   1900  1.1  christos   {
   1901  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1902  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1903  1.1  christos #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
   1904  1.1  christos     UINT f_r1;
   1905  1.1  christos     UINT f_accs;
   1906  1.1  christos 
   1907  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1908  1.1  christos     f_accs = EXTRACT_MSB0_UINT (insn, 16, 12, 2);
   1909  1.1  christos 
   1910  1.1  christos   /* Record the fields for the semantic handler.  */
   1911  1.1  christos   FLD (f_accs) = f_accs;
   1912  1.1  christos   FLD (f_r1) = f_r1;
   1913  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1914  1.1  christos   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));
   1915  1.1  christos 
   1916  1.1  christos #if WITH_PROFILE_MODEL_P
   1917  1.1  christos   /* Record the fields for profiling.  */
   1918  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1919  1.1  christos     {
   1920  1.1  christos       FLD (out_dr) = f_r1;
   1921  1.1  christos     }
   1922  1.1  christos #endif
   1923  1.1  christos #undef FLD
   1924  1.1  christos     return idesc;
   1925  1.1  christos   }
   1926  1.1  christos 
   1927  1.1  christos  extract_sfmt_mvfc:
   1928  1.1  christos   {
   1929  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1930  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1931  1.1  christos #define FLD(f) abuf->fields.sfmt_ld_plus.f
   1932  1.1  christos     UINT f_r1;
   1933  1.1  christos     UINT f_r2;
   1934  1.1  christos 
   1935  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1936  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1937  1.1  christos 
   1938  1.1  christos   /* Record the fields for the semantic handler.  */
   1939  1.1  christos   FLD (f_r2) = f_r2;
   1940  1.1  christos   FLD (f_r1) = f_r1;
   1941  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   1942  1.1  christos   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));
   1943  1.1  christos 
   1944  1.1  christos #if WITH_PROFILE_MODEL_P
   1945  1.1  christos   /* Record the fields for profiling.  */
   1946  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1947  1.1  christos     {
   1948  1.1  christos       FLD (out_dr) = f_r1;
   1949  1.1  christos     }
   1950  1.1  christos #endif
   1951  1.1  christos #undef FLD
   1952  1.1  christos     return idesc;
   1953  1.1  christos   }
   1954  1.1  christos 
   1955  1.1  christos  extract_sfmt_mvtachi_a:
   1956  1.1  christos   {
   1957  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1958  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1959  1.1  christos #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
   1960  1.1  christos     UINT f_r1;
   1961  1.1  christos     UINT f_accs;
   1962  1.1  christos 
   1963  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1964  1.1  christos     f_accs = EXTRACT_MSB0_UINT (insn, 16, 12, 2);
   1965  1.1  christos 
   1966  1.1  christos   /* Record the fields for the semantic handler.  */
   1967  1.1  christos   FLD (f_accs) = f_accs;
   1968  1.1  christos   FLD (f_r1) = f_r1;
   1969  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   1970  1.1  christos   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));
   1971  1.1  christos 
   1972  1.1  christos #if WITH_PROFILE_MODEL_P
   1973  1.1  christos   /* Record the fields for profiling.  */
   1974  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   1975  1.1  christos     {
   1976  1.1  christos       FLD (in_src1) = f_r1;
   1977  1.1  christos     }
   1978  1.1  christos #endif
   1979  1.1  christos #undef FLD
   1980  1.1  christos     return idesc;
   1981  1.1  christos   }
   1982  1.1  christos 
   1983  1.1  christos  extract_sfmt_mvtc:
   1984  1.1  christos   {
   1985  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   1986  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   1987  1.1  christos #define FLD(f) abuf->fields.sfmt_ld_plus.f
   1988  1.1  christos     UINT f_r1;
   1989  1.1  christos     UINT f_r2;
   1990  1.1  christos 
   1991  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   1992  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   1993  1.1  christos 
   1994  1.1  christos   /* Record the fields for the semantic handler.  */
   1995  1.1  christos   FLD (f_r2) = f_r2;
   1996  1.1  christos   FLD (f_r1) = f_r1;
   1997  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   1998  1.1  christos   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));
   1999  1.1  christos 
   2000  1.1  christos #if WITH_PROFILE_MODEL_P
   2001  1.1  christos   /* Record the fields for profiling.  */
   2002  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2003  1.1  christos     {
   2004  1.1  christos       FLD (in_sr) = f_r2;
   2005  1.1  christos     }
   2006  1.1  christos #endif
   2007  1.1  christos #undef FLD
   2008  1.1  christos     return idesc;
   2009  1.1  christos   }
   2010  1.1  christos 
   2011  1.1  christos  extract_sfmt_nop:
   2012  1.1  christos   {
   2013  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2014  1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2015  1.1  christos 
   2016  1.1  christos 
   2017  1.1  christos   /* Record the fields for the semantic handler.  */
   2018  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_nop", (char *) 0));
   2019  1.1  christos 
   2020  1.1  christos #undef FLD
   2021  1.1  christos     return idesc;
   2022  1.1  christos   }
   2023  1.1  christos 
   2024  1.1  christos  extract_sfmt_rac_dsi:
   2025  1.1  christos   {
   2026  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2027  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2028  1.1  christos #define FLD(f) abuf->fields.sfmt_rac_dsi.f
   2029  1.1  christos     UINT f_accd;
   2030  1.1  christos     UINT f_accs;
   2031  1.1  christos     SI f_imm1;
   2032  1.1  christos 
   2033  1.1  christos     f_accd = EXTRACT_MSB0_UINT (insn, 16, 4, 2);
   2034  1.1  christos     f_accs = EXTRACT_MSB0_UINT (insn, 16, 12, 2);
   2035  1.1  christos     f_imm1 = ((EXTRACT_MSB0_UINT (insn, 16, 15, 1)) + (1));
   2036  1.1  christos 
   2037  1.1  christos   /* Record the fields for the semantic handler.  */
   2038  1.1  christos   FLD (f_accs) = f_accs;
   2039  1.1  christos   FLD (f_imm1) = f_imm1;
   2040  1.1  christos   FLD (f_accd) = f_accd;
   2041  1.1  christos   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));
   2042  1.1  christos 
   2043  1.1  christos #undef FLD
   2044  1.1  christos     return idesc;
   2045  1.1  christos   }
   2046  1.1  christos 
   2047  1.1  christos  extract_sfmt_rte:
   2048  1.1  christos   {
   2049  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2050  1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2051  1.1  christos 
   2052  1.1  christos 
   2053  1.1  christos   /* Record the fields for the semantic handler.  */
   2054  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_rte", (char *) 0));
   2055  1.1  christos 
   2056  1.1  christos #if WITH_PROFILE_MODEL_P
   2057  1.1  christos   /* Record the fields for profiling.  */
   2058  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2059  1.1  christos     {
   2060  1.1  christos     }
   2061  1.1  christos #endif
   2062  1.1  christos #undef FLD
   2063  1.1  christos     return idesc;
   2064  1.1  christos   }
   2065  1.1  christos 
   2066  1.1  christos  extract_sfmt_seth:
   2067  1.1  christos   {
   2068  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2069  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2070  1.1  christos #define FLD(f) abuf->fields.sfmt_seth.f
   2071  1.1  christos     UINT f_r1;
   2072  1.1  christos     UINT f_hi16;
   2073  1.1  christos 
   2074  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   2075  1.1  christos     f_hi16 = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
   2076  1.1  christos 
   2077  1.1  christos   /* Record the fields for the semantic handler.  */
   2078  1.1  christos   FLD (f_hi16) = f_hi16;
   2079  1.1  christos   FLD (f_r1) = f_r1;
   2080  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   2081  1.1  christos   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));
   2082  1.1  christos 
   2083  1.1  christos #if WITH_PROFILE_MODEL_P
   2084  1.1  christos   /* Record the fields for profiling.  */
   2085  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2086  1.1  christos     {
   2087  1.1  christos       FLD (out_dr) = f_r1;
   2088  1.1  christos     }
   2089  1.1  christos #endif
   2090  1.1  christos #undef FLD
   2091  1.1  christos     return idesc;
   2092  1.1  christos   }
   2093  1.1  christos 
   2094  1.1  christos  extract_sfmt_sll3:
   2095  1.1  christos   {
   2096  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2097  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2098  1.1  christos #define FLD(f) abuf->fields.sfmt_add3.f
   2099  1.1  christos     UINT f_r1;
   2100  1.1  christos     UINT f_r2;
   2101  1.1  christos     INT f_simm16;
   2102  1.1  christos 
   2103  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   2104  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   2105  1.1  christos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
   2106  1.1  christos 
   2107  1.1  christos   /* Record the fields for the semantic handler.  */
   2108  1.1  christos   FLD (f_simm16) = f_simm16;
   2109  1.1  christos   FLD (f_r2) = f_r2;
   2110  1.1  christos   FLD (f_r1) = f_r1;
   2111  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   2112  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   2113  1.1  christos   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));
   2114  1.1  christos 
   2115  1.1  christos #if WITH_PROFILE_MODEL_P
   2116  1.1  christos   /* Record the fields for profiling.  */
   2117  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2118  1.1  christos     {
   2119  1.1  christos       FLD (in_sr) = f_r2;
   2120  1.1  christos       FLD (out_dr) = f_r1;
   2121  1.1  christos     }
   2122  1.1  christos #endif
   2123  1.1  christos #undef FLD
   2124  1.1  christos     return idesc;
   2125  1.1  christos   }
   2126  1.1  christos 
   2127  1.1  christos  extract_sfmt_slli:
   2128  1.1  christos   {
   2129  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2130  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2131  1.1  christos #define FLD(f) abuf->fields.sfmt_slli.f
   2132  1.1  christos     UINT f_r1;
   2133  1.1  christos     UINT f_uimm5;
   2134  1.1  christos 
   2135  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   2136  1.1  christos     f_uimm5 = EXTRACT_MSB0_UINT (insn, 16, 11, 5);
   2137  1.1  christos 
   2138  1.1  christos   /* Record the fields for the semantic handler.  */
   2139  1.1  christos   FLD (f_r1) = f_r1;
   2140  1.1  christos   FLD (f_uimm5) = f_uimm5;
   2141  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   2142  1.1  christos   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));
   2143  1.1  christos 
   2144  1.1  christos #if WITH_PROFILE_MODEL_P
   2145  1.1  christos   /* Record the fields for profiling.  */
   2146  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2147  1.1  christos     {
   2148  1.1  christos       FLD (in_dr) = f_r1;
   2149  1.1  christos       FLD (out_dr) = f_r1;
   2150  1.1  christos     }
   2151  1.1  christos #endif
   2152  1.1  christos #undef FLD
   2153  1.1  christos     return idesc;
   2154  1.1  christos   }
   2155  1.1  christos 
   2156  1.1  christos  extract_sfmt_st:
   2157  1.1  christos   {
   2158  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2159  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2160  1.1  christos #define FLD(f) abuf->fields.sfmt_st_plus.f
   2161  1.1  christos     UINT f_r1;
   2162  1.1  christos     UINT f_r2;
   2163  1.1  christos 
   2164  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   2165  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   2166  1.1  christos 
   2167  1.1  christos   /* Record the fields for the semantic handler.  */
   2168  1.1  christos   FLD (f_r1) = f_r1;
   2169  1.1  christos   FLD (f_r2) = f_r2;
   2170  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2171  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2172  1.1  christos   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));
   2173  1.1  christos 
   2174  1.1  christos #if WITH_PROFILE_MODEL_P
   2175  1.1  christos   /* Record the fields for profiling.  */
   2176  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2177  1.1  christos     {
   2178  1.1  christos       FLD (in_src1) = f_r1;
   2179  1.1  christos       FLD (in_src2) = f_r2;
   2180  1.1  christos     }
   2181  1.1  christos #endif
   2182  1.1  christos #undef FLD
   2183  1.1  christos     return idesc;
   2184  1.1  christos   }
   2185  1.1  christos 
   2186  1.1  christos  extract_sfmt_st_d:
   2187  1.1  christos   {
   2188  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2189  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2190  1.1  christos #define FLD(f) abuf->fields.sfmt_st_d.f
   2191  1.1  christos     UINT f_r1;
   2192  1.1  christos     UINT f_r2;
   2193  1.1  christos     INT f_simm16;
   2194  1.1  christos 
   2195  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   2196  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   2197  1.1  christos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
   2198  1.1  christos 
   2199  1.1  christos   /* Record the fields for the semantic handler.  */
   2200  1.1  christos   FLD (f_simm16) = f_simm16;
   2201  1.1  christos   FLD (f_r1) = f_r1;
   2202  1.1  christos   FLD (f_r2) = f_r2;
   2203  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2204  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2205  1.1  christos   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));
   2206  1.1  christos 
   2207  1.1  christos #if WITH_PROFILE_MODEL_P
   2208  1.1  christos   /* Record the fields for profiling.  */
   2209  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2210  1.1  christos     {
   2211  1.1  christos       FLD (in_src1) = f_r1;
   2212  1.1  christos       FLD (in_src2) = f_r2;
   2213  1.1  christos     }
   2214  1.1  christos #endif
   2215  1.1  christos #undef FLD
   2216  1.1  christos     return idesc;
   2217  1.1  christos   }
   2218  1.1  christos 
   2219  1.1  christos  extract_sfmt_stb:
   2220  1.1  christos   {
   2221  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2222  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2223  1.1  christos #define FLD(f) abuf->fields.sfmt_st_plus.f
   2224  1.1  christos     UINT f_r1;
   2225  1.1  christos     UINT f_r2;
   2226  1.1  christos 
   2227  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   2228  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   2229  1.1  christos 
   2230  1.1  christos   /* Record the fields for the semantic handler.  */
   2231  1.1  christos   FLD (f_r1) = f_r1;
   2232  1.1  christos   FLD (f_r2) = f_r2;
   2233  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2234  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2235  1.1  christos   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));
   2236  1.1  christos 
   2237  1.1  christos #if WITH_PROFILE_MODEL_P
   2238  1.1  christos   /* Record the fields for profiling.  */
   2239  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2240  1.1  christos     {
   2241  1.1  christos       FLD (in_src1) = f_r1;
   2242  1.1  christos       FLD (in_src2) = f_r2;
   2243  1.1  christos     }
   2244  1.1  christos #endif
   2245  1.1  christos #undef FLD
   2246  1.1  christos     return idesc;
   2247  1.1  christos   }
   2248  1.1  christos 
   2249  1.1  christos  extract_sfmt_stb_d:
   2250  1.1  christos   {
   2251  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2252  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2253  1.1  christos #define FLD(f) abuf->fields.sfmt_st_d.f
   2254  1.1  christos     UINT f_r1;
   2255  1.1  christos     UINT f_r2;
   2256  1.1  christos     INT f_simm16;
   2257  1.1  christos 
   2258  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   2259  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   2260  1.1  christos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
   2261  1.1  christos 
   2262  1.1  christos   /* Record the fields for the semantic handler.  */
   2263  1.1  christos   FLD (f_simm16) = f_simm16;
   2264  1.1  christos   FLD (f_r1) = f_r1;
   2265  1.1  christos   FLD (f_r2) = f_r2;
   2266  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2267  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2268  1.1  christos   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));
   2269  1.1  christos 
   2270  1.1  christos #if WITH_PROFILE_MODEL_P
   2271  1.1  christos   /* Record the fields for profiling.  */
   2272  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2273  1.1  christos     {
   2274  1.1  christos       FLD (in_src1) = f_r1;
   2275  1.1  christos       FLD (in_src2) = f_r2;
   2276  1.1  christos     }
   2277  1.1  christos #endif
   2278  1.1  christos #undef FLD
   2279  1.1  christos     return idesc;
   2280  1.1  christos   }
   2281  1.1  christos 
   2282  1.1  christos  extract_sfmt_sth:
   2283  1.1  christos   {
   2284  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2285  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2286  1.1  christos #define FLD(f) abuf->fields.sfmt_st_plus.f
   2287  1.1  christos     UINT f_r1;
   2288  1.1  christos     UINT f_r2;
   2289  1.1  christos 
   2290  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   2291  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   2292  1.1  christos 
   2293  1.1  christos   /* Record the fields for the semantic handler.  */
   2294  1.1  christos   FLD (f_r1) = f_r1;
   2295  1.1  christos   FLD (f_r2) = f_r2;
   2296  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2297  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2298  1.1  christos   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));
   2299  1.1  christos 
   2300  1.1  christos #if WITH_PROFILE_MODEL_P
   2301  1.1  christos   /* Record the fields for profiling.  */
   2302  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2303  1.1  christos     {
   2304  1.1  christos       FLD (in_src1) = f_r1;
   2305  1.1  christos       FLD (in_src2) = f_r2;
   2306  1.1  christos     }
   2307  1.1  christos #endif
   2308  1.1  christos #undef FLD
   2309  1.1  christos     return idesc;
   2310  1.1  christos   }
   2311  1.1  christos 
   2312  1.1  christos  extract_sfmt_sth_d:
   2313  1.1  christos   {
   2314  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2315  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2316  1.1  christos #define FLD(f) abuf->fields.sfmt_st_d.f
   2317  1.1  christos     UINT f_r1;
   2318  1.1  christos     UINT f_r2;
   2319  1.1  christos     INT f_simm16;
   2320  1.1  christos 
   2321  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   2322  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   2323  1.1  christos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
   2324  1.1  christos 
   2325  1.1  christos   /* Record the fields for the semantic handler.  */
   2326  1.1  christos   FLD (f_simm16) = f_simm16;
   2327  1.1  christos   FLD (f_r1) = f_r1;
   2328  1.1  christos   FLD (f_r2) = f_r2;
   2329  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2330  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2331  1.1  christos   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));
   2332  1.1  christos 
   2333  1.1  christos #if WITH_PROFILE_MODEL_P
   2334  1.1  christos   /* Record the fields for profiling.  */
   2335  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2336  1.1  christos     {
   2337  1.1  christos       FLD (in_src1) = f_r1;
   2338  1.1  christos       FLD (in_src2) = f_r2;
   2339  1.1  christos     }
   2340  1.1  christos #endif
   2341  1.1  christos #undef FLD
   2342  1.1  christos     return idesc;
   2343  1.1  christos   }
   2344  1.1  christos 
   2345  1.1  christos  extract_sfmt_st_plus:
   2346  1.1  christos   {
   2347  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2348  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2349  1.1  christos #define FLD(f) abuf->fields.sfmt_st_plus.f
   2350  1.1  christos     UINT f_r1;
   2351  1.1  christos     UINT f_r2;
   2352  1.1  christos 
   2353  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   2354  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   2355  1.1  christos 
   2356  1.1  christos   /* Record the fields for the semantic handler.  */
   2357  1.1  christos   FLD (f_r1) = f_r1;
   2358  1.1  christos   FLD (f_r2) = f_r2;
   2359  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2360  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2361  1.1  christos   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));
   2362  1.1  christos 
   2363  1.1  christos #if WITH_PROFILE_MODEL_P
   2364  1.1  christos   /* Record the fields for profiling.  */
   2365  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2366  1.1  christos     {
   2367  1.1  christos       FLD (in_src1) = f_r1;
   2368  1.1  christos       FLD (in_src2) = f_r2;
   2369  1.1  christos       FLD (out_src2) = f_r2;
   2370  1.1  christos     }
   2371  1.1  christos #endif
   2372  1.1  christos #undef FLD
   2373  1.1  christos     return idesc;
   2374  1.1  christos   }
   2375  1.1  christos 
   2376  1.1  christos  extract_sfmt_sth_plus:
   2377  1.1  christos   {
   2378  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2379  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2380  1.1  christos #define FLD(f) abuf->fields.sfmt_st_plus.f
   2381  1.1  christos     UINT f_r1;
   2382  1.1  christos     UINT f_r2;
   2383  1.1  christos 
   2384  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   2385  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   2386  1.1  christos 
   2387  1.1  christos   /* Record the fields for the semantic handler.  */
   2388  1.1  christos   FLD (f_r1) = f_r1;
   2389  1.1  christos   FLD (f_r2) = f_r2;
   2390  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2391  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2392  1.1  christos   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));
   2393  1.1  christos 
   2394  1.1  christos #if WITH_PROFILE_MODEL_P
   2395  1.1  christos   /* Record the fields for profiling.  */
   2396  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2397  1.1  christos     {
   2398  1.1  christos       FLD (in_src1) = f_r1;
   2399  1.1  christos       FLD (in_src2) = f_r2;
   2400  1.1  christos       FLD (out_src2) = f_r2;
   2401  1.1  christos     }
   2402  1.1  christos #endif
   2403  1.1  christos #undef FLD
   2404  1.1  christos     return idesc;
   2405  1.1  christos   }
   2406  1.1  christos 
   2407  1.1  christos  extract_sfmt_stb_plus:
   2408  1.1  christos   {
   2409  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2410  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2411  1.1  christos #define FLD(f) abuf->fields.sfmt_st_plus.f
   2412  1.1  christos     UINT f_r1;
   2413  1.1  christos     UINT f_r2;
   2414  1.1  christos 
   2415  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   2416  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   2417  1.1  christos 
   2418  1.1  christos   /* Record the fields for the semantic handler.  */
   2419  1.1  christos   FLD (f_r1) = f_r1;
   2420  1.1  christos   FLD (f_r2) = f_r2;
   2421  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2422  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2423  1.1  christos   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));
   2424  1.1  christos 
   2425  1.1  christos #if WITH_PROFILE_MODEL_P
   2426  1.1  christos   /* Record the fields for profiling.  */
   2427  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2428  1.1  christos     {
   2429  1.1  christos       FLD (in_src1) = f_r1;
   2430  1.1  christos       FLD (in_src2) = f_r2;
   2431  1.1  christos       FLD (out_src2) = f_r2;
   2432  1.1  christos     }
   2433  1.1  christos #endif
   2434  1.1  christos #undef FLD
   2435  1.1  christos     return idesc;
   2436  1.1  christos   }
   2437  1.1  christos 
   2438  1.1  christos  extract_sfmt_trap:
   2439  1.1  christos   {
   2440  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2441  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2442  1.1  christos #define FLD(f) abuf->fields.sfmt_trap.f
   2443  1.1  christos     UINT f_uimm4;
   2444  1.1  christos 
   2445  1.1  christos     f_uimm4 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   2446  1.1  christos 
   2447  1.1  christos   /* Record the fields for the semantic handler.  */
   2448  1.1  christos   FLD (f_uimm4) = f_uimm4;
   2449  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_trap", "f_uimm4 0x%x", 'x', f_uimm4, (char *) 0));
   2450  1.1  christos 
   2451  1.1  christos #if WITH_PROFILE_MODEL_P
   2452  1.1  christos   /* Record the fields for profiling.  */
   2453  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2454  1.1  christos     {
   2455  1.1  christos     }
   2456  1.1  christos #endif
   2457  1.1  christos #undef FLD
   2458  1.1  christos     return idesc;
   2459  1.1  christos   }
   2460  1.1  christos 
   2461  1.1  christos  extract_sfmt_unlock:
   2462  1.1  christos   {
   2463  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2464  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2465  1.1  christos #define FLD(f) abuf->fields.sfmt_st_plus.f
   2466  1.1  christos     UINT f_r1;
   2467  1.1  christos     UINT f_r2;
   2468  1.1  christos 
   2469  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   2470  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   2471  1.1  christos 
   2472  1.1  christos   /* Record the fields for the semantic handler.  */
   2473  1.1  christos   FLD (f_r1) = f_r1;
   2474  1.1  christos   FLD (f_r2) = f_r2;
   2475  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2476  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2477  1.1  christos   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));
   2478  1.1  christos 
   2479  1.1  christos #if WITH_PROFILE_MODEL_P
   2480  1.1  christos   /* Record the fields for profiling.  */
   2481  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2482  1.1  christos     {
   2483  1.1  christos       FLD (in_src1) = f_r1;
   2484  1.1  christos       FLD (in_src2) = f_r2;
   2485  1.1  christos     }
   2486  1.1  christos #endif
   2487  1.1  christos #undef FLD
   2488  1.1  christos     return idesc;
   2489  1.1  christos   }
   2490  1.1  christos 
   2491  1.1  christos  extract_sfmt_satb:
   2492  1.1  christos   {
   2493  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2494  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2495  1.1  christos #define FLD(f) abuf->fields.sfmt_ld_plus.f
   2496  1.1  christos     UINT f_r1;
   2497  1.1  christos     UINT f_r2;
   2498  1.1  christos 
   2499  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   2500  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   2501  1.1  christos 
   2502  1.1  christos   /* Record the fields for the semantic handler.  */
   2503  1.1  christos   FLD (f_r2) = f_r2;
   2504  1.1  christos   FLD (f_r1) = f_r1;
   2505  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   2506  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   2507  1.1  christos   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));
   2508  1.1  christos 
   2509  1.1  christos #if WITH_PROFILE_MODEL_P
   2510  1.1  christos   /* Record the fields for profiling.  */
   2511  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2512  1.1  christos     {
   2513  1.1  christos       FLD (in_sr) = f_r2;
   2514  1.1  christos       FLD (out_dr) = f_r1;
   2515  1.1  christos     }
   2516  1.1  christos #endif
   2517  1.1  christos #undef FLD
   2518  1.1  christos     return idesc;
   2519  1.1  christos   }
   2520  1.1  christos 
   2521  1.1  christos  extract_sfmt_sat:
   2522  1.1  christos   {
   2523  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2524  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2525  1.1  christos #define FLD(f) abuf->fields.sfmt_ld_plus.f
   2526  1.1  christos     UINT f_r1;
   2527  1.1  christos     UINT f_r2;
   2528  1.1  christos 
   2529  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
   2530  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   2531  1.1  christos 
   2532  1.1  christos   /* Record the fields for the semantic handler.  */
   2533  1.1  christos   FLD (f_r2) = f_r2;
   2534  1.1  christos   FLD (f_r1) = f_r1;
   2535  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   2536  1.1  christos   FLD (i_dr) = & CPU (h_gr)[f_r1];
   2537  1.1  christos   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));
   2538  1.1  christos 
   2539  1.1  christos #if WITH_PROFILE_MODEL_P
   2540  1.1  christos   /* Record the fields for profiling.  */
   2541  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2542  1.1  christos     {
   2543  1.1  christos       FLD (in_sr) = f_r2;
   2544  1.1  christos       FLD (out_dr) = f_r1;
   2545  1.1  christos     }
   2546  1.1  christos #endif
   2547  1.1  christos #undef FLD
   2548  1.1  christos     return idesc;
   2549  1.1  christos   }
   2550  1.1  christos 
   2551  1.1  christos  extract_sfmt_sadd:
   2552  1.1  christos   {
   2553  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2554  1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2555  1.1  christos 
   2556  1.1  christos 
   2557  1.1  christos   /* Record the fields for the semantic handler.  */
   2558  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sadd", (char *) 0));
   2559  1.1  christos 
   2560  1.1  christos #undef FLD
   2561  1.1  christos     return idesc;
   2562  1.1  christos   }
   2563  1.1  christos 
   2564  1.1  christos  extract_sfmt_macwu1:
   2565  1.1  christos   {
   2566  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2567  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2568  1.1  christos #define FLD(f) abuf->fields.sfmt_st_plus.f
   2569  1.1  christos     UINT f_r1;
   2570  1.1  christos     UINT f_r2;
   2571  1.1  christos 
   2572  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   2573  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   2574  1.1  christos 
   2575  1.1  christos   /* Record the fields for the semantic handler.  */
   2576  1.1  christos   FLD (f_r1) = f_r1;
   2577  1.1  christos   FLD (f_r2) = f_r2;
   2578  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2579  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2580  1.1  christos   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));
   2581  1.1  christos 
   2582  1.1  christos #if WITH_PROFILE_MODEL_P
   2583  1.1  christos   /* Record the fields for profiling.  */
   2584  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2585  1.1  christos     {
   2586  1.1  christos       FLD (in_src1) = f_r1;
   2587  1.1  christos       FLD (in_src2) = f_r2;
   2588  1.1  christos     }
   2589  1.1  christos #endif
   2590  1.1  christos #undef FLD
   2591  1.1  christos     return idesc;
   2592  1.1  christos   }
   2593  1.1  christos 
   2594  1.1  christos  extract_sfmt_msblo:
   2595  1.1  christos   {
   2596  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2597  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2598  1.1  christos #define FLD(f) abuf->fields.sfmt_st_plus.f
   2599  1.1  christos     UINT f_r1;
   2600  1.1  christos     UINT f_r2;
   2601  1.1  christos 
   2602  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   2603  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   2604  1.1  christos 
   2605  1.1  christos   /* Record the fields for the semantic handler.  */
   2606  1.1  christos   FLD (f_r1) = f_r1;
   2607  1.1  christos   FLD (f_r2) = f_r2;
   2608  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2609  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2610  1.1  christos   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));
   2611  1.1  christos 
   2612  1.1  christos #if WITH_PROFILE_MODEL_P
   2613  1.1  christos   /* Record the fields for profiling.  */
   2614  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2615  1.1  christos     {
   2616  1.1  christos       FLD (in_src1) = f_r1;
   2617  1.1  christos       FLD (in_src2) = f_r2;
   2618  1.1  christos     }
   2619  1.1  christos #endif
   2620  1.1  christos #undef FLD
   2621  1.1  christos     return idesc;
   2622  1.1  christos   }
   2623  1.1  christos 
   2624  1.1  christos  extract_sfmt_mulwu1:
   2625  1.1  christos   {
   2626  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2627  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2628  1.1  christos #define FLD(f) abuf->fields.sfmt_st_plus.f
   2629  1.1  christos     UINT f_r1;
   2630  1.1  christos     UINT f_r2;
   2631  1.1  christos 
   2632  1.1  christos     f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
   2633  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   2634  1.1  christos 
   2635  1.1  christos   /* Record the fields for the semantic handler.  */
   2636  1.1  christos   FLD (f_r1) = f_r1;
   2637  1.1  christos   FLD (f_r2) = f_r2;
   2638  1.1  christos   FLD (i_src1) = & CPU (h_gr)[f_r1];
   2639  1.1  christos   FLD (i_src2) = & CPU (h_gr)[f_r2];
   2640  1.1  christos   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));
   2641  1.1  christos 
   2642  1.1  christos #if WITH_PROFILE_MODEL_P
   2643  1.1  christos   /* Record the fields for profiling.  */
   2644  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2645  1.1  christos     {
   2646  1.1  christos       FLD (in_src1) = f_r1;
   2647  1.1  christos       FLD (in_src2) = f_r2;
   2648  1.1  christos     }
   2649  1.1  christos #endif
   2650  1.1  christos #undef FLD
   2651  1.1  christos     return idesc;
   2652  1.1  christos   }
   2653  1.1  christos 
   2654  1.1  christos  extract_sfmt_sc:
   2655  1.1  christos   {
   2656  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2657  1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2658  1.1  christos 
   2659  1.1  christos 
   2660  1.1  christos   /* Record the fields for the semantic handler.  */
   2661  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sc", (char *) 0));
   2662  1.1  christos 
   2663  1.1  christos #undef FLD
   2664  1.1  christos     return idesc;
   2665  1.1  christos   }
   2666  1.1  christos 
   2667  1.1  christos  extract_sfmt_clrpsw:
   2668  1.1  christos   {
   2669  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2670  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2671  1.1  christos #define FLD(f) abuf->fields.sfmt_clrpsw.f
   2672  1.1  christos     UINT f_uimm8;
   2673  1.1  christos 
   2674  1.1  christos     f_uimm8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
   2675  1.1  christos 
   2676  1.1  christos   /* Record the fields for the semantic handler.  */
   2677  1.1  christos   FLD (f_uimm8) = f_uimm8;
   2678  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_clrpsw", "f_uimm8 0x%x", 'x', f_uimm8, (char *) 0));
   2679  1.1  christos 
   2680  1.1  christos #undef FLD
   2681  1.1  christos     return idesc;
   2682  1.1  christos   }
   2683  1.1  christos 
   2684  1.1  christos  extract_sfmt_setpsw:
   2685  1.1  christos   {
   2686  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2687  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2688  1.1  christos #define FLD(f) abuf->fields.sfmt_clrpsw.f
   2689  1.1  christos     UINT f_uimm8;
   2690  1.1  christos 
   2691  1.1  christos     f_uimm8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
   2692  1.1  christos 
   2693  1.1  christos   /* Record the fields for the semantic handler.  */
   2694  1.1  christos   FLD (f_uimm8) = f_uimm8;
   2695  1.1  christos   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_setpsw", "f_uimm8 0x%x", 'x', f_uimm8, (char *) 0));
   2696  1.1  christos 
   2697  1.1  christos #undef FLD
   2698  1.1  christos     return idesc;
   2699  1.1  christos   }
   2700  1.1  christos 
   2701  1.1  christos  extract_sfmt_bset:
   2702  1.1  christos   {
   2703  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2704  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2705  1.1  christos #define FLD(f) abuf->fields.sfmt_bset.f
   2706  1.1  christos     UINT f_uimm3;
   2707  1.1  christos     UINT f_r2;
   2708  1.1  christos     INT f_simm16;
   2709  1.1  christos 
   2710  1.1  christos     f_uimm3 = EXTRACT_MSB0_UINT (insn, 32, 5, 3);
   2711  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
   2712  1.1  christos     f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
   2713  1.1  christos 
   2714  1.1  christos   /* Record the fields for the semantic handler.  */
   2715  1.1  christos   FLD (f_simm16) = f_simm16;
   2716  1.1  christos   FLD (f_r2) = f_r2;
   2717  1.1  christos   FLD (f_uimm3) = f_uimm3;
   2718  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   2719  1.1  christos   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));
   2720  1.1  christos 
   2721  1.1  christos #if WITH_PROFILE_MODEL_P
   2722  1.1  christos   /* Record the fields for profiling.  */
   2723  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2724  1.1  christos     {
   2725  1.1  christos       FLD (in_sr) = f_r2;
   2726  1.1  christos     }
   2727  1.1  christos #endif
   2728  1.1  christos #undef FLD
   2729  1.1  christos     return idesc;
   2730  1.1  christos   }
   2731  1.1  christos 
   2732  1.1  christos  extract_sfmt_btst:
   2733  1.1  christos   {
   2734  1.1  christos     const IDESC *idesc = &m32r2f_insn_data[itype];
   2735  1.1  christos     CGEN_INSN_WORD insn = entire_insn;
   2736  1.1  christos #define FLD(f) abuf->fields.sfmt_bset.f
   2737  1.1  christos     UINT f_uimm3;
   2738  1.1  christos     UINT f_r2;
   2739  1.1  christos 
   2740  1.1  christos     f_uimm3 = EXTRACT_MSB0_UINT (insn, 16, 5, 3);
   2741  1.1  christos     f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
   2742  1.1  christos 
   2743  1.1  christos   /* Record the fields for the semantic handler.  */
   2744  1.1  christos   FLD (f_r2) = f_r2;
   2745  1.1  christos   FLD (f_uimm3) = f_uimm3;
   2746  1.1  christos   FLD (i_sr) = & CPU (h_gr)[f_r2];
   2747  1.1  christos   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));
   2748  1.1  christos 
   2749  1.1  christos #if WITH_PROFILE_MODEL_P
   2750  1.1  christos   /* Record the fields for profiling.  */
   2751  1.1  christos   if (PROFILE_MODEL_P (current_cpu))
   2752  1.1  christos     {
   2753  1.1  christos       FLD (in_sr) = f_r2;
   2754  1.1  christos     }
   2755  1.1  christos #endif
   2756  1.1  christos #undef FLD
   2757  1.1  christos     return idesc;
   2758  1.1  christos   }
   2759  1.1  christos 
   2760  1.1  christos }
   2761