1 /* Simulator instruction decoder for m32r2f.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #define WANT_CPU m32r2f
25 #define WANT_CPU_M32R2F
28 #include "sim-assert.h"
30 /* Insn can't be executed in parallel.
31 Or is that "do NOt Pass to Air defense Radar"? :-) */
34 /* The instruction descriptor array.
35 This is computed at runtime. Space for it is not malloc'd to save a
36 teensy bit of cpu in the decoder. Moving it to malloc space is trivial
37 but won't be done until necessary (we don't currently support the runtime
38 addition of instructions nor an SMP machine with different cpus). */
39 static IDESC m32r2f_insn_data[M32R2F_INSN__MAX];
41 /* Commas between elements are contained in the macros.
42 Some of these are conditionally compiled out. */
44 static const struct insn_sem m32r2f_insn_sem[] =
46 { VIRTUAL_INSN_X_INVALID, M32R2F_INSN_X_INVALID, M32R2F_SFMT_EMPTY, NOPAR, NOPAR },
47 { VIRTUAL_INSN_X_AFTER, M32R2F_INSN_X_AFTER, M32R2F_SFMT_EMPTY, NOPAR, NOPAR },
48 { VIRTUAL_INSN_X_BEFORE, M32R2F_INSN_X_BEFORE, M32R2F_SFMT_EMPTY, NOPAR, NOPAR },
49 { VIRTUAL_INSN_X_CTI_CHAIN, M32R2F_INSN_X_CTI_CHAIN, M32R2F_SFMT_EMPTY, NOPAR, NOPAR },
50 { VIRTUAL_INSN_X_CHAIN, M32R2F_INSN_X_CHAIN, M32R2F_SFMT_EMPTY, NOPAR, NOPAR },
51 { VIRTUAL_INSN_X_BEGIN, M32R2F_INSN_X_BEGIN, M32R2F_SFMT_EMPTY, NOPAR, NOPAR },
52 { M32R_INSN_ADD, M32R2F_INSN_ADD, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_ADD, M32R2F_INSN_WRITE_ADD },
53 { M32R_INSN_ADD3, M32R2F_INSN_ADD3, M32R2F_SFMT_ADD3, NOPAR, NOPAR },
54 { M32R_INSN_AND, M32R2F_INSN_AND, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_AND, M32R2F_INSN_WRITE_AND },
55 { M32R_INSN_AND3, M32R2F_INSN_AND3, M32R2F_SFMT_AND3, NOPAR, NOPAR },
56 { M32R_INSN_OR, M32R2F_INSN_OR, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_OR, M32R2F_INSN_WRITE_OR },
57 { M32R_INSN_OR3, M32R2F_INSN_OR3, M32R2F_SFMT_OR3, NOPAR, NOPAR },
58 { M32R_INSN_XOR, M32R2F_INSN_XOR, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_XOR, M32R2F_INSN_WRITE_XOR },
59 { M32R_INSN_XOR3, M32R2F_INSN_XOR3, M32R2F_SFMT_AND3, NOPAR, NOPAR },
60 { M32R_INSN_ADDI, M32R2F_INSN_ADDI, M32R2F_SFMT_ADDI, M32R2F_INSN_PAR_ADDI, M32R2F_INSN_WRITE_ADDI },
61 { M32R_INSN_ADDV, M32R2F_INSN_ADDV, M32R2F_SFMT_ADDV, M32R2F_INSN_PAR_ADDV, M32R2F_INSN_WRITE_ADDV },
62 { M32R_INSN_ADDV3, M32R2F_INSN_ADDV3, M32R2F_SFMT_ADDV3, NOPAR, NOPAR },
63 { M32R_INSN_ADDX, M32R2F_INSN_ADDX, M32R2F_SFMT_ADDX, M32R2F_INSN_PAR_ADDX, M32R2F_INSN_WRITE_ADDX },
64 { M32R_INSN_BC8, M32R2F_INSN_BC8, M32R2F_SFMT_BC8, M32R2F_INSN_PAR_BC8, M32R2F_INSN_WRITE_BC8 },
65 { M32R_INSN_BC24, M32R2F_INSN_BC24, M32R2F_SFMT_BC24, NOPAR, NOPAR },
66 { M32R_INSN_BEQ, M32R2F_INSN_BEQ, M32R2F_SFMT_BEQ, NOPAR, NOPAR },
67 { M32R_INSN_BEQZ, M32R2F_INSN_BEQZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR },
68 { M32R_INSN_BGEZ, M32R2F_INSN_BGEZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR },
69 { M32R_INSN_BGTZ, M32R2F_INSN_BGTZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR },
70 { M32R_INSN_BLEZ, M32R2F_INSN_BLEZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR },
71 { M32R_INSN_BLTZ, M32R2F_INSN_BLTZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR },
72 { M32R_INSN_BNEZ, M32R2F_INSN_BNEZ, M32R2F_SFMT_BEQZ, NOPAR, NOPAR },
73 { M32R_INSN_BL8, M32R2F_INSN_BL8, M32R2F_SFMT_BL8, M32R2F_INSN_PAR_BL8, M32R2F_INSN_WRITE_BL8 },
74 { M32R_INSN_BL24, M32R2F_INSN_BL24, M32R2F_SFMT_BL24, NOPAR, NOPAR },
75 { M32R_INSN_BCL8, M32R2F_INSN_BCL8, M32R2F_SFMT_BCL8, M32R2F_INSN_PAR_BCL8, M32R2F_INSN_WRITE_BCL8 },
76 { M32R_INSN_BCL24, M32R2F_INSN_BCL24, M32R2F_SFMT_BCL24, NOPAR, NOPAR },
77 { M32R_INSN_BNC8, M32R2F_INSN_BNC8, M32R2F_SFMT_BC8, M32R2F_INSN_PAR_BNC8, M32R2F_INSN_WRITE_BNC8 },
78 { M32R_INSN_BNC24, M32R2F_INSN_BNC24, M32R2F_SFMT_BC24, NOPAR, NOPAR },
79 { M32R_INSN_BNE, M32R2F_INSN_BNE, M32R2F_SFMT_BEQ, NOPAR, NOPAR },
80 { M32R_INSN_BRA8, M32R2F_INSN_BRA8, M32R2F_SFMT_BRA8, M32R2F_INSN_PAR_BRA8, M32R2F_INSN_WRITE_BRA8 },
81 { M32R_INSN_BRA24, M32R2F_INSN_BRA24, M32R2F_SFMT_BRA24, NOPAR, NOPAR },
82 { M32R_INSN_BNCL8, M32R2F_INSN_BNCL8, M32R2F_SFMT_BCL8, M32R2F_INSN_PAR_BNCL8, M32R2F_INSN_WRITE_BNCL8 },
83 { M32R_INSN_BNCL24, M32R2F_INSN_BNCL24, M32R2F_SFMT_BCL24, NOPAR, NOPAR },
84 { M32R_INSN_CMP, M32R2F_INSN_CMP, M32R2F_SFMT_CMP, M32R2F_INSN_PAR_CMP, M32R2F_INSN_WRITE_CMP },
85 { M32R_INSN_CMPI, M32R2F_INSN_CMPI, M32R2F_SFMT_CMPI, NOPAR, NOPAR },
86 { M32R_INSN_CMPU, M32R2F_INSN_CMPU, M32R2F_SFMT_CMP, M32R2F_INSN_PAR_CMPU, M32R2F_INSN_WRITE_CMPU },
87 { M32R_INSN_CMPUI, M32R2F_INSN_CMPUI, M32R2F_SFMT_CMPI, NOPAR, NOPAR },
88 { M32R_INSN_CMPEQ, M32R2F_INSN_CMPEQ, M32R2F_SFMT_CMP, M32R2F_INSN_PAR_CMPEQ, M32R2F_INSN_WRITE_CMPEQ },
89 { M32R_INSN_CMPZ, M32R2F_INSN_CMPZ, M32R2F_SFMT_CMPZ, M32R2F_INSN_PAR_CMPZ, M32R2F_INSN_WRITE_CMPZ },
90 { M32R_INSN_DIV, M32R2F_INSN_DIV, M32R2F_SFMT_DIV, NOPAR, NOPAR },
91 { M32R_INSN_DIVU, M32R2F_INSN_DIVU, M32R2F_SFMT_DIV, NOPAR, NOPAR },
92 { M32R_INSN_REM, M32R2F_INSN_REM, M32R2F_SFMT_DIV, NOPAR, NOPAR },
93 { M32R_INSN_REMU, M32R2F_INSN_REMU, M32R2F_SFMT_DIV, NOPAR, NOPAR },
94 { M32R_INSN_REMH, M32R2F_INSN_REMH, M32R2F_SFMT_DIV, NOPAR, NOPAR },
95 { M32R_INSN_REMUH, M32R2F_INSN_REMUH, M32R2F_SFMT_DIV, NOPAR, NOPAR },
96 { M32R_INSN_REMB, M32R2F_INSN_REMB, M32R2F_SFMT_DIV, NOPAR, NOPAR },
97 { M32R_INSN_REMUB, M32R2F_INSN_REMUB, M32R2F_SFMT_DIV, NOPAR, NOPAR },
98 { M32R_INSN_DIVUH, M32R2F_INSN_DIVUH, M32R2F_SFMT_DIV, NOPAR, NOPAR },
99 { M32R_INSN_DIVB, M32R2F_INSN_DIVB, M32R2F_SFMT_DIV, NOPAR, NOPAR },
100 { M32R_INSN_DIVUB, M32R2F_INSN_DIVUB, M32R2F_SFMT_DIV, NOPAR, NOPAR },
101 { M32R_INSN_DIVH, M32R2F_INSN_DIVH, M32R2F_SFMT_DIV, NOPAR, NOPAR },
102 { M32R_INSN_JC, M32R2F_INSN_JC, M32R2F_SFMT_JC, M32R2F_INSN_PAR_JC, M32R2F_INSN_WRITE_JC },
103 { M32R_INSN_JNC, M32R2F_INSN_JNC, M32R2F_SFMT_JC, M32R2F_INSN_PAR_JNC, M32R2F_INSN_WRITE_JNC },
104 { M32R_INSN_JL, M32R2F_INSN_JL, M32R2F_SFMT_JL, M32R2F_INSN_PAR_JL, M32R2F_INSN_WRITE_JL },
105 { M32R_INSN_JMP, M32R2F_INSN_JMP, M32R2F_SFMT_JMP, M32R2F_INSN_PAR_JMP, M32R2F_INSN_WRITE_JMP },
106 { M32R_INSN_LD, M32R2F_INSN_LD, M32R2F_SFMT_LD, M32R2F_INSN_PAR_LD, M32R2F_INSN_WRITE_LD },
107 { M32R_INSN_LD_D, M32R2F_INSN_LD_D, M32R2F_SFMT_LD_D, NOPAR, NOPAR },
108 { M32R_INSN_LDB, M32R2F_INSN_LDB, M32R2F_SFMT_LDB, M32R2F_INSN_PAR_LDB, M32R2F_INSN_WRITE_LDB },
109 { M32R_INSN_LDB_D, M32R2F_INSN_LDB_D, M32R2F_SFMT_LDB_D, NOPAR, NOPAR },
110 { M32R_INSN_LDH, M32R2F_INSN_LDH, M32R2F_SFMT_LDH, M32R2F_INSN_PAR_LDH, M32R2F_INSN_WRITE_LDH },
111 { M32R_INSN_LDH_D, M32R2F_INSN_LDH_D, M32R2F_SFMT_LDH_D, NOPAR, NOPAR },
112 { M32R_INSN_LDUB, M32R2F_INSN_LDUB, M32R2F_SFMT_LDB, M32R2F_INSN_PAR_LDUB, M32R2F_INSN_WRITE_LDUB },
113 { M32R_INSN_LDUB_D, M32R2F_INSN_LDUB_D, M32R2F_SFMT_LDB_D, NOPAR, NOPAR },
114 { M32R_INSN_LDUH, M32R2F_INSN_LDUH, M32R2F_SFMT_LDH, M32R2F_INSN_PAR_LDUH, M32R2F_INSN_WRITE_LDUH },
115 { M32R_INSN_LDUH_D, M32R2F_INSN_LDUH_D, M32R2F_SFMT_LDH_D, NOPAR, NOPAR },
116 { M32R_INSN_LD_PLUS, M32R2F_INSN_LD_PLUS, M32R2F_SFMT_LD_PLUS, M32R2F_INSN_PAR_LD_PLUS, M32R2F_INSN_WRITE_LD_PLUS },
117 { M32R_INSN_LD24, M32R2F_INSN_LD24, M32R2F_SFMT_LD24, NOPAR, NOPAR },
118 { M32R_INSN_LDI8, M32R2F_INSN_LDI8, M32R2F_SFMT_LDI8, M32R2F_INSN_PAR_LDI8, M32R2F_INSN_WRITE_LDI8 },
119 { M32R_INSN_LDI16, M32R2F_INSN_LDI16, M32R2F_SFMT_LDI16, NOPAR, NOPAR },
120 { M32R_INSN_LOCK, M32R2F_INSN_LOCK, M32R2F_SFMT_LOCK, M32R2F_INSN_PAR_LOCK, M32R2F_INSN_WRITE_LOCK },
121 { M32R_INSN_MACHI_A, M32R2F_INSN_MACHI_A, M32R2F_SFMT_MACHI_A, M32R2F_INSN_PAR_MACHI_A, M32R2F_INSN_WRITE_MACHI_A },
122 { M32R_INSN_MACLO_A, M32R2F_INSN_MACLO_A, M32R2F_SFMT_MACHI_A, M32R2F_INSN_PAR_MACLO_A, M32R2F_INSN_WRITE_MACLO_A },
123 { M32R_INSN_MACWHI_A, M32R2F_INSN_MACWHI_A, M32R2F_SFMT_MACHI_A, M32R2F_INSN_PAR_MACWHI_A, M32R2F_INSN_WRITE_MACWHI_A },
124 { M32R_INSN_MACWLO_A, M32R2F_INSN_MACWLO_A, M32R2F_SFMT_MACHI_A, M32R2F_INSN_PAR_MACWLO_A, M32R2F_INSN_WRITE_MACWLO_A },
125 { M32R_INSN_MUL, M32R2F_INSN_MUL, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_MUL, M32R2F_INSN_WRITE_MUL },
126 { M32R_INSN_MULHI_A, M32R2F_INSN_MULHI_A, M32R2F_SFMT_MULHI_A, M32R2F_INSN_PAR_MULHI_A, M32R2F_INSN_WRITE_MULHI_A },
127 { M32R_INSN_MULLO_A, M32R2F_INSN_MULLO_A, M32R2F_SFMT_MULHI_A, M32R2F_INSN_PAR_MULLO_A, M32R2F_INSN_WRITE_MULLO_A },
128 { M32R_INSN_MULWHI_A, M32R2F_INSN_MULWHI_A, M32R2F_SFMT_MULHI_A, M32R2F_INSN_PAR_MULWHI_A, M32R2F_INSN_WRITE_MULWHI_A },
129 { M32R_INSN_MULWLO_A, M32R2F_INSN_MULWLO_A, M32R2F_SFMT_MULHI_A, M32R2F_INSN_PAR_MULWLO_A, M32R2F_INSN_WRITE_MULWLO_A },
130 { M32R_INSN_MV, M32R2F_INSN_MV, M32R2F_SFMT_MV, M32R2F_INSN_PAR_MV, M32R2F_INSN_WRITE_MV },
131 { M32R_INSN_MVFACHI_A, M32R2F_INSN_MVFACHI_A, M32R2F_SFMT_MVFACHI_A, M32R2F_INSN_PAR_MVFACHI_A, M32R2F_INSN_WRITE_MVFACHI_A },
132 { M32R_INSN_MVFACLO_A, M32R2F_INSN_MVFACLO_A, M32R2F_SFMT_MVFACHI_A, M32R2F_INSN_PAR_MVFACLO_A, M32R2F_INSN_WRITE_MVFACLO_A },
133 { M32R_INSN_MVFACMI_A, M32R2F_INSN_MVFACMI_A, M32R2F_SFMT_MVFACHI_A, M32R2F_INSN_PAR_MVFACMI_A, M32R2F_INSN_WRITE_MVFACMI_A },
134 { M32R_INSN_MVFC, M32R2F_INSN_MVFC, M32R2F_SFMT_MVFC, M32R2F_INSN_PAR_MVFC, M32R2F_INSN_WRITE_MVFC },
135 { M32R_INSN_MVTACHI_A, M32R2F_INSN_MVTACHI_A, M32R2F_SFMT_MVTACHI_A, M32R2F_INSN_PAR_MVTACHI_A, M32R2F_INSN_WRITE_MVTACHI_A },
136 { M32R_INSN_MVTACLO_A, M32R2F_INSN_MVTACLO_A, M32R2F_SFMT_MVTACHI_A, M32R2F_INSN_PAR_MVTACLO_A, M32R2F_INSN_WRITE_MVTACLO_A },
137 { M32R_INSN_MVTC, M32R2F_INSN_MVTC, M32R2F_SFMT_MVTC, M32R2F_INSN_PAR_MVTC, M32R2F_INSN_WRITE_MVTC },
138 { M32R_INSN_NEG, M32R2F_INSN_NEG, M32R2F_SFMT_MV, M32R2F_INSN_PAR_NEG, M32R2F_INSN_WRITE_NEG },
139 { M32R_INSN_NOP, M32R2F_INSN_NOP, M32R2F_SFMT_NOP, M32R2F_INSN_PAR_NOP, M32R2F_INSN_WRITE_NOP },
140 { M32R_INSN_NOT, M32R2F_INSN_NOT, M32R2F_SFMT_MV, M32R2F_INSN_PAR_NOT, M32R2F_INSN_WRITE_NOT },
141 { M32R_INSN_RAC_DSI, M32R2F_INSN_RAC_DSI, M32R2F_SFMT_RAC_DSI, M32R2F_INSN_PAR_RAC_DSI, M32R2F_INSN_WRITE_RAC_DSI },
142 { M32R_INSN_RACH_DSI, M32R2F_INSN_RACH_DSI, M32R2F_SFMT_RAC_DSI, M32R2F_INSN_PAR_RACH_DSI, M32R2F_INSN_WRITE_RACH_DSI },
143 { M32R_INSN_RTE, M32R2F_INSN_RTE, M32R2F_SFMT_RTE, M32R2F_INSN_PAR_RTE, M32R2F_INSN_WRITE_RTE },
144 { M32R_INSN_SETH, M32R2F_INSN_SETH, M32R2F_SFMT_SETH, NOPAR, NOPAR },
145 { M32R_INSN_SLL, M32R2F_INSN_SLL, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_SLL, M32R2F_INSN_WRITE_SLL },
146 { M32R_INSN_SLL3, M32R2F_INSN_SLL3, M32R2F_SFMT_SLL3, NOPAR, NOPAR },
147 { M32R_INSN_SLLI, M32R2F_INSN_SLLI, M32R2F_SFMT_SLLI, M32R2F_INSN_PAR_SLLI, M32R2F_INSN_WRITE_SLLI },
148 { M32R_INSN_SRA, M32R2F_INSN_SRA, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_SRA, M32R2F_INSN_WRITE_SRA },
149 { M32R_INSN_SRA3, M32R2F_INSN_SRA3, M32R2F_SFMT_SLL3, NOPAR, NOPAR },
150 { M32R_INSN_SRAI, M32R2F_INSN_SRAI, M32R2F_SFMT_SLLI, M32R2F_INSN_PAR_SRAI, M32R2F_INSN_WRITE_SRAI },
151 { M32R_INSN_SRL, M32R2F_INSN_SRL, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_SRL, M32R2F_INSN_WRITE_SRL },
152 { M32R_INSN_SRL3, M32R2F_INSN_SRL3, M32R2F_SFMT_SLL3, NOPAR, NOPAR },
153 { M32R_INSN_SRLI, M32R2F_INSN_SRLI, M32R2F_SFMT_SLLI, M32R2F_INSN_PAR_SRLI, M32R2F_INSN_WRITE_SRLI },
154 { M32R_INSN_ST, M32R2F_INSN_ST, M32R2F_SFMT_ST, M32R2F_INSN_PAR_ST, M32R2F_INSN_WRITE_ST },
155 { M32R_INSN_ST_D, M32R2F_INSN_ST_D, M32R2F_SFMT_ST_D, NOPAR, NOPAR },
156 { M32R_INSN_STB, M32R2F_INSN_STB, M32R2F_SFMT_STB, M32R2F_INSN_PAR_STB, M32R2F_INSN_WRITE_STB },
157 { M32R_INSN_STB_D, M32R2F_INSN_STB_D, M32R2F_SFMT_STB_D, NOPAR, NOPAR },
158 { M32R_INSN_STH, M32R2F_INSN_STH, M32R2F_SFMT_STH, M32R2F_INSN_PAR_STH, M32R2F_INSN_WRITE_STH },
159 { M32R_INSN_STH_D, M32R2F_INSN_STH_D, M32R2F_SFMT_STH_D, NOPAR, NOPAR },
160 { M32R_INSN_ST_PLUS, M32R2F_INSN_ST_PLUS, M32R2F_SFMT_ST_PLUS, M32R2F_INSN_PAR_ST_PLUS, M32R2F_INSN_WRITE_ST_PLUS },
161 { M32R_INSN_STH_PLUS, M32R2F_INSN_STH_PLUS, M32R2F_SFMT_STH_PLUS, M32R2F_INSN_PAR_STH_PLUS, M32R2F_INSN_WRITE_STH_PLUS },
162 { M32R_INSN_STB_PLUS, M32R2F_INSN_STB_PLUS, M32R2F_SFMT_STB_PLUS, M32R2F_INSN_PAR_STB_PLUS, M32R2F_INSN_WRITE_STB_PLUS },
163 { M32R_INSN_ST_MINUS, M32R2F_INSN_ST_MINUS, M32R2F_SFMT_ST_PLUS, M32R2F_INSN_PAR_ST_MINUS, M32R2F_INSN_WRITE_ST_MINUS },
164 { M32R_INSN_SUB, M32R2F_INSN_SUB, M32R2F_SFMT_ADD, M32R2F_INSN_PAR_SUB, M32R2F_INSN_WRITE_SUB },
165 { M32R_INSN_SUBV, M32R2F_INSN_SUBV, M32R2F_SFMT_ADDV, M32R2F_INSN_PAR_SUBV, M32R2F_INSN_WRITE_SUBV },
166 { M32R_INSN_SUBX, M32R2F_INSN_SUBX, M32R2F_SFMT_ADDX, M32R2F_INSN_PAR_SUBX, M32R2F_INSN_WRITE_SUBX },
167 { M32R_INSN_TRAP, M32R2F_INSN_TRAP, M32R2F_SFMT_TRAP, M32R2F_INSN_PAR_TRAP, M32R2F_INSN_WRITE_TRAP },
168 { M32R_INSN_UNLOCK, M32R2F_INSN_UNLOCK, M32R2F_SFMT_UNLOCK, M32R2F_INSN_PAR_UNLOCK, M32R2F_INSN_WRITE_UNLOCK },
169 { M32R_INSN_SATB, M32R2F_INSN_SATB, M32R2F_SFMT_SATB, NOPAR, NOPAR },
170 { M32R_INSN_SATH, M32R2F_INSN_SATH, M32R2F_SFMT_SATB, NOPAR, NOPAR },
171 { M32R_INSN_SAT, M32R2F_INSN_SAT, M32R2F_SFMT_SAT, NOPAR, NOPAR },
172 { M32R_INSN_PCMPBZ, M32R2F_INSN_PCMPBZ, M32R2F_SFMT_CMPZ, M32R2F_INSN_PAR_PCMPBZ, M32R2F_INSN_WRITE_PCMPBZ },
173 { M32R_INSN_SADD, M32R2F_INSN_SADD, M32R2F_SFMT_SADD, M32R2F_INSN_PAR_SADD, M32R2F_INSN_WRITE_SADD },
174 { M32R_INSN_MACWU1, M32R2F_INSN_MACWU1, M32R2F_SFMT_MACWU1, M32R2F_INSN_PAR_MACWU1, M32R2F_INSN_WRITE_MACWU1 },
175 { M32R_INSN_MSBLO, M32R2F_INSN_MSBLO, M32R2F_SFMT_MSBLO, M32R2F_INSN_PAR_MSBLO, M32R2F_INSN_WRITE_MSBLO },
176 { M32R_INSN_MULWU1, M32R2F_INSN_MULWU1, M32R2F_SFMT_MULWU1, M32R2F_INSN_PAR_MULWU1, M32R2F_INSN_WRITE_MULWU1 },
177 { M32R_INSN_MACLH1, M32R2F_INSN_MACLH1, M32R2F_SFMT_MACWU1, M32R2F_INSN_PAR_MACLH1, M32R2F_INSN_WRITE_MACLH1 },
178 { M32R_INSN_SC, M32R2F_INSN_SC, M32R2F_SFMT_SC, M32R2F_INSN_PAR_SC, M32R2F_INSN_WRITE_SC },
179 { M32R_INSN_SNC, M32R2F_INSN_SNC, M32R2F_SFMT_SC, M32R2F_INSN_PAR_SNC, M32R2F_INSN_WRITE_SNC },
180 { M32R_INSN_CLRPSW, M32R2F_INSN_CLRPSW, M32R2F_SFMT_CLRPSW, M32R2F_INSN_PAR_CLRPSW, M32R2F_INSN_WRITE_CLRPSW },
181 { M32R_INSN_SETPSW, M32R2F_INSN_SETPSW, M32R2F_SFMT_SETPSW, M32R2F_INSN_PAR_SETPSW, M32R2F_INSN_WRITE_SETPSW },
182 { M32R_INSN_BSET, M32R2F_INSN_BSET, M32R2F_SFMT_BSET, NOPAR, NOPAR },
183 { M32R_INSN_BCLR, M32R2F_INSN_BCLR, M32R2F_SFMT_BSET, NOPAR, NOPAR },
184 { M32R_INSN_BTST, M32R2F_INSN_BTST, M32R2F_SFMT_BTST, M32R2F_INSN_PAR_BTST, M32R2F_INSN_WRITE_BTST },
187 static const struct insn_sem m32r2f_insn_sem_invalid = {
188 VIRTUAL_INSN_X_INVALID, M32R2F_INSN_X_INVALID, M32R2F_SFMT_EMPTY, NOPAR, NOPAR
191 /* Initialize an IDESC from the compile-time computable parts. */
194 init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t)
196 const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries;
200 if ((int) t->type <= 0)
201 id->idata = & cgen_virtual_insn_table[- (int) t->type];
203 id->idata = & insn_table[t->type];
204 id->attrs = CGEN_INSN_ATTRS (id->idata);
205 /* Oh my god, a magic number. */
206 id->length = CGEN_INSN_BITSIZE (id->idata) / 8;
208 #if WITH_PROFILE_MODEL_P
209 id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index];
211 SIM_DESC sd = CPU_STATE (cpu);
212 SIM_ASSERT (t->index == id->timing->num);
216 /* Semantic pointers are initialized elsewhere. */
219 /* Initialize the instruction descriptor table. */
222 m32r2f_init_idesc_table (SIM_CPU *cpu)
225 const struct insn_sem *t,*tend;
226 int tabsize = M32R2F_INSN__MAX;
227 IDESC *table = m32r2f_insn_data;
229 memset (table, 0, tabsize * sizeof (IDESC));
231 /* First set all entries to the `invalid insn'. */
232 t = & m32r2f_insn_sem_invalid;
233 for (id = table, tabend = table + tabsize; id < tabend; ++id)
234 init_idesc (cpu, id, t);
236 /* Now fill in the values for the chosen cpu. */
237 for (t = m32r2f_insn_sem, tend = t + sizeof (m32r2f_insn_sem) / sizeof (*t);
240 init_idesc (cpu, & table[t->index], t);
241 if (t->par_index != NOPAR)
243 init_idesc (cpu, &table[t->par_index], t);
244 table[t->index].par_idesc = &table[t->par_index];
246 if (t->par_index != NOPAR)
248 init_idesc (cpu, &table[t->write_index], t);
249 table[t->par_index].par_idesc = &table[t->write_index];
253 /* Link the IDESC table into the cpu. */
254 CPU_IDESC (cpu) = table;
257 /* Given an instruction, return a pointer to its IDESC entry. */
260 m32r2f_decode (SIM_CPU *current_cpu, IADDR pc,
261 CGEN_INSN_INT base_insn, CGEN_INSN_INT entire_insn,
264 /* Result of decoder. */
265 M32R2F_INSN_TYPE itype;
268 CGEN_INSN_INT insn = base_insn;
271 unsigned int val = (((insn >> 8) & (15 << 4)) | ((insn >> 4) & (15 << 0)));
274 case 0 : itype = M32R2F_INSN_SUBV; goto extract_sfmt_addv;
275 case 1 : itype = M32R2F_INSN_SUBX; goto extract_sfmt_addx;
276 case 2 : itype = M32R2F_INSN_SUB; goto extract_sfmt_add;
277 case 3 : itype = M32R2F_INSN_NEG; goto extract_sfmt_mv;
278 case 4 : itype = M32R2F_INSN_CMP; goto extract_sfmt_cmp;
279 case 5 : itype = M32R2F_INSN_CMPU; goto extract_sfmt_cmp;
280 case 6 : itype = M32R2F_INSN_CMPEQ; goto extract_sfmt_cmp;
283 unsigned int val = (((insn >> 8) & (3 << 0)));
286 case 0 : itype = M32R2F_INSN_CMPZ; goto extract_sfmt_cmpz;
287 case 3 : itype = M32R2F_INSN_PCMPBZ; goto extract_sfmt_cmpz;
288 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
291 case 8 : itype = M32R2F_INSN_ADDV; goto extract_sfmt_addv;
292 case 9 : itype = M32R2F_INSN_ADDX; goto extract_sfmt_addx;
293 case 10 : itype = M32R2F_INSN_ADD; goto extract_sfmt_add;
294 case 11 : itype = M32R2F_INSN_NOT; goto extract_sfmt_mv;
295 case 12 : itype = M32R2F_INSN_AND; goto extract_sfmt_add;
296 case 13 : itype = M32R2F_INSN_XOR; goto extract_sfmt_add;
297 case 14 : itype = M32R2F_INSN_OR; goto extract_sfmt_add;
298 case 15 : itype = M32R2F_INSN_BTST; goto extract_sfmt_btst;
299 case 16 : itype = M32R2F_INSN_SRL; goto extract_sfmt_add;
300 case 18 : itype = M32R2F_INSN_SRA; goto extract_sfmt_add;
301 case 20 : itype = M32R2F_INSN_SLL; goto extract_sfmt_add;
302 case 22 : itype = M32R2F_INSN_MUL; goto extract_sfmt_add;
303 case 24 : itype = M32R2F_INSN_MV; goto extract_sfmt_mv;
304 case 25 : itype = M32R2F_INSN_MVFC; goto extract_sfmt_mvfc;
305 case 26 : itype = M32R2F_INSN_MVTC; goto extract_sfmt_mvtc;
308 unsigned int val = (((insn >> 8) & (3 << 0)));
311 case 0 : itype = M32R2F_INSN_JC; goto extract_sfmt_jc;
312 case 1 : itype = M32R2F_INSN_JNC; goto extract_sfmt_jc;
313 case 2 : itype = M32R2F_INSN_JL; goto extract_sfmt_jl;
314 case 3 : itype = M32R2F_INSN_JMP; goto extract_sfmt_jmp;
315 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
318 case 29 : itype = M32R2F_INSN_RTE; goto extract_sfmt_rte;
319 case 31 : itype = M32R2F_INSN_TRAP; goto extract_sfmt_trap;
320 case 32 : itype = M32R2F_INSN_STB; goto extract_sfmt_stb;
321 case 33 : itype = M32R2F_INSN_STB_PLUS; goto extract_sfmt_stb_plus;
322 case 34 : itype = M32R2F_INSN_STH; goto extract_sfmt_sth;
323 case 35 : itype = M32R2F_INSN_STH_PLUS; goto extract_sfmt_sth_plus;
324 case 36 : itype = M32R2F_INSN_ST; goto extract_sfmt_st;
325 case 37 : itype = M32R2F_INSN_UNLOCK; goto extract_sfmt_unlock;
326 case 38 : itype = M32R2F_INSN_ST_PLUS; goto extract_sfmt_st_plus;
327 case 39 : itype = M32R2F_INSN_ST_MINUS; goto extract_sfmt_st_plus;
328 case 40 : itype = M32R2F_INSN_LDB; goto extract_sfmt_ldb;
329 case 41 : itype = M32R2F_INSN_LDUB; goto extract_sfmt_ldb;
330 case 42 : itype = M32R2F_INSN_LDH; goto extract_sfmt_ldh;
331 case 43 : itype = M32R2F_INSN_LDUH; goto extract_sfmt_ldh;
332 case 44 : itype = M32R2F_INSN_LD; goto extract_sfmt_ld;
333 case 45 : itype = M32R2F_INSN_LOCK; goto extract_sfmt_lock;
334 case 46 : itype = M32R2F_INSN_LD_PLUS; goto extract_sfmt_ld_plus;
335 case 48 : /* fall through */
336 case 56 : itype = M32R2F_INSN_MULHI_A; goto extract_sfmt_mulhi_a;
337 case 49 : /* fall through */
338 case 57 : itype = M32R2F_INSN_MULLO_A; goto extract_sfmt_mulhi_a;
339 case 50 : /* fall through */
340 case 58 : itype = M32R2F_INSN_MULWHI_A; goto extract_sfmt_mulhi_a;
341 case 51 : /* fall through */
342 case 59 : itype = M32R2F_INSN_MULWLO_A; goto extract_sfmt_mulhi_a;
343 case 52 : /* fall through */
344 case 60 : itype = M32R2F_INSN_MACHI_A; goto extract_sfmt_machi_a;
345 case 53 : /* fall through */
346 case 61 : itype = M32R2F_INSN_MACLO_A; goto extract_sfmt_machi_a;
347 case 54 : /* fall through */
348 case 62 : itype = M32R2F_INSN_MACWHI_A; goto extract_sfmt_machi_a;
349 case 55 : /* fall through */
350 case 63 : itype = M32R2F_INSN_MACWLO_A; goto extract_sfmt_machi_a;
351 case 64 : /* fall through */
352 case 65 : /* fall through */
353 case 66 : /* fall through */
354 case 67 : /* fall through */
355 case 68 : /* fall through */
356 case 69 : /* fall through */
357 case 70 : /* fall through */
358 case 71 : /* fall through */
359 case 72 : /* fall through */
360 case 73 : /* fall through */
361 case 74 : /* fall through */
362 case 75 : /* fall through */
363 case 76 : /* fall through */
364 case 77 : /* fall through */
365 case 78 : /* fall through */
366 case 79 : itype = M32R2F_INSN_ADDI; goto extract_sfmt_addi;
367 case 80 : /* fall through */
368 case 81 : itype = M32R2F_INSN_SRLI; goto extract_sfmt_slli;
369 case 82 : /* fall through */
370 case 83 : itype = M32R2F_INSN_SRAI; goto extract_sfmt_slli;
371 case 84 : /* fall through */
372 case 85 : itype = M32R2F_INSN_SLLI; goto extract_sfmt_slli;
375 unsigned int val = (((insn >> 0) & (1 << 0)));
378 case 0 : itype = M32R2F_INSN_MVTACHI_A; goto extract_sfmt_mvtachi_a;
379 case 1 : itype = M32R2F_INSN_MVTACLO_A; goto extract_sfmt_mvtachi_a;
380 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
383 case 88 : itype = M32R2F_INSN_RACH_DSI; goto extract_sfmt_rac_dsi;
384 case 89 : itype = M32R2F_INSN_RAC_DSI; goto extract_sfmt_rac_dsi;
385 case 90 : itype = M32R2F_INSN_MULWU1; goto extract_sfmt_mulwu1;
386 case 91 : itype = M32R2F_INSN_MACWU1; goto extract_sfmt_macwu1;
387 case 92 : itype = M32R2F_INSN_MACLH1; goto extract_sfmt_macwu1;
388 case 93 : itype = M32R2F_INSN_MSBLO; goto extract_sfmt_msblo;
389 case 94 : itype = M32R2F_INSN_SADD; goto extract_sfmt_sadd;
392 unsigned int val = (((insn >> 0) & (3 << 0)));
395 case 0 : itype = M32R2F_INSN_MVFACHI_A; goto extract_sfmt_mvfachi_a;
396 case 1 : itype = M32R2F_INSN_MVFACLO_A; goto extract_sfmt_mvfachi_a;
397 case 2 : itype = M32R2F_INSN_MVFACMI_A; goto extract_sfmt_mvfachi_a;
398 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
401 case 96 : /* fall through */
402 case 97 : /* fall through */
403 case 98 : /* fall through */
404 case 99 : /* fall through */
405 case 100 : /* fall through */
406 case 101 : /* fall through */
407 case 102 : /* fall through */
408 case 103 : /* fall through */
409 case 104 : /* fall through */
410 case 105 : /* fall through */
411 case 106 : /* fall through */
412 case 107 : /* fall through */
413 case 108 : /* fall through */
414 case 109 : /* fall through */
415 case 110 : /* fall through */
416 case 111 : itype = M32R2F_INSN_LDI8; goto extract_sfmt_ldi8;
419 unsigned int val = (((insn >> 7) & (15 << 1)) | ((insn >> 0) & (1 << 0)));
422 case 0 : itype = M32R2F_INSN_NOP; goto extract_sfmt_nop;
423 case 2 : /* fall through */
424 case 3 : itype = M32R2F_INSN_SETPSW; goto extract_sfmt_setpsw;
425 case 4 : /* fall through */
426 case 5 : itype = M32R2F_INSN_CLRPSW; goto extract_sfmt_clrpsw;
427 case 9 : itype = M32R2F_INSN_SC; goto extract_sfmt_sc;
428 case 11 : itype = M32R2F_INSN_SNC; goto extract_sfmt_sc;
429 case 16 : /* fall through */
430 case 17 : itype = M32R2F_INSN_BCL8; goto extract_sfmt_bcl8;
431 case 18 : /* fall through */
432 case 19 : itype = M32R2F_INSN_BNCL8; goto extract_sfmt_bcl8;
433 case 24 : /* fall through */
434 case 25 : itype = M32R2F_INSN_BC8; goto extract_sfmt_bc8;
435 case 26 : /* fall through */
436 case 27 : itype = M32R2F_INSN_BNC8; goto extract_sfmt_bc8;
437 case 28 : /* fall through */
438 case 29 : itype = M32R2F_INSN_BL8; goto extract_sfmt_bl8;
439 case 30 : /* fall through */
440 case 31 : itype = M32R2F_INSN_BRA8; goto extract_sfmt_bra8;
441 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
444 case 113 : /* fall through */
445 case 114 : /* fall through */
446 case 115 : /* fall through */
447 case 116 : /* fall through */
448 case 117 : /* fall through */
449 case 118 : /* fall through */
450 case 119 : /* fall through */
451 case 120 : /* fall through */
452 case 121 : /* fall through */
453 case 122 : /* fall through */
454 case 123 : /* fall through */
455 case 124 : /* fall through */
456 case 125 : /* fall through */
457 case 126 : /* fall through */
460 unsigned int val = (((insn >> 8) & (15 << 0)));
463 case 1 : itype = M32R2F_INSN_SETPSW; goto extract_sfmt_setpsw;
464 case 2 : itype = M32R2F_INSN_CLRPSW; goto extract_sfmt_clrpsw;
465 case 8 : itype = M32R2F_INSN_BCL8; goto extract_sfmt_bcl8;
466 case 9 : itype = M32R2F_INSN_BNCL8; goto extract_sfmt_bcl8;
467 case 12 : itype = M32R2F_INSN_BC8; goto extract_sfmt_bc8;
468 case 13 : itype = M32R2F_INSN_BNC8; goto extract_sfmt_bc8;
469 case 14 : itype = M32R2F_INSN_BL8; goto extract_sfmt_bl8;
470 case 15 : itype = M32R2F_INSN_BRA8; goto extract_sfmt_bra8;
471 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
474 case 132 : itype = M32R2F_INSN_CMPI; goto extract_sfmt_cmpi;
475 case 133 : itype = M32R2F_INSN_CMPUI; goto extract_sfmt_cmpi;
478 unsigned int val = (((insn >> -8) & (3 << 0)));
481 case 0 : itype = M32R2F_INSN_SAT; goto extract_sfmt_sat;
482 case 2 : itype = M32R2F_INSN_SATH; goto extract_sfmt_satb;
483 case 3 : itype = M32R2F_INSN_SATB; goto extract_sfmt_satb;
484 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
487 case 136 : itype = M32R2F_INSN_ADDV3; goto extract_sfmt_addv3;
488 case 138 : itype = M32R2F_INSN_ADD3; goto extract_sfmt_add3;
489 case 140 : itype = M32R2F_INSN_AND3; goto extract_sfmt_and3;
490 case 141 : itype = M32R2F_INSN_XOR3; goto extract_sfmt_and3;
491 case 142 : itype = M32R2F_INSN_OR3; goto extract_sfmt_or3;
494 unsigned int val = (((insn >> -13) & (3 << 0)));
497 case 0 : itype = M32R2F_INSN_DIV; goto extract_sfmt_div;
498 case 2 : itype = M32R2F_INSN_DIVH; goto extract_sfmt_div;
499 case 3 : itype = M32R2F_INSN_DIVB; goto extract_sfmt_div;
500 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
505 unsigned int val = (((insn >> -13) & (3 << 0)));
508 case 0 : itype = M32R2F_INSN_DIVU; goto extract_sfmt_div;
509 case 2 : itype = M32R2F_INSN_DIVUH; goto extract_sfmt_div;
510 case 3 : itype = M32R2F_INSN_DIVUB; goto extract_sfmt_div;
511 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
516 unsigned int val = (((insn >> -13) & (3 << 0)));
519 case 0 : itype = M32R2F_INSN_REM; goto extract_sfmt_div;
520 case 2 : itype = M32R2F_INSN_REMH; goto extract_sfmt_div;
521 case 3 : itype = M32R2F_INSN_REMB; goto extract_sfmt_div;
522 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
527 unsigned int val = (((insn >> -13) & (3 << 0)));
530 case 0 : itype = M32R2F_INSN_REMU; goto extract_sfmt_div;
531 case 2 : itype = M32R2F_INSN_REMUH; goto extract_sfmt_div;
532 case 3 : itype = M32R2F_INSN_REMUB; goto extract_sfmt_div;
533 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
536 case 152 : itype = M32R2F_INSN_SRL3; goto extract_sfmt_sll3;
537 case 154 : itype = M32R2F_INSN_SRA3; goto extract_sfmt_sll3;
538 case 156 : itype = M32R2F_INSN_SLL3; goto extract_sfmt_sll3;
539 case 159 : itype = M32R2F_INSN_LDI16; goto extract_sfmt_ldi16;
540 case 160 : itype = M32R2F_INSN_STB_D; goto extract_sfmt_stb_d;
541 case 162 : itype = M32R2F_INSN_STH_D; goto extract_sfmt_sth_d;
542 case 164 : itype = M32R2F_INSN_ST_D; goto extract_sfmt_st_d;
543 case 166 : itype = M32R2F_INSN_BSET; goto extract_sfmt_bset;
544 case 167 : itype = M32R2F_INSN_BCLR; goto extract_sfmt_bset;
545 case 168 : itype = M32R2F_INSN_LDB_D; goto extract_sfmt_ldb_d;
546 case 169 : itype = M32R2F_INSN_LDUB_D; goto extract_sfmt_ldb_d;
547 case 170 : itype = M32R2F_INSN_LDH_D; goto extract_sfmt_ldh_d;
548 case 171 : itype = M32R2F_INSN_LDUH_D; goto extract_sfmt_ldh_d;
549 case 172 : itype = M32R2F_INSN_LD_D; goto extract_sfmt_ld_d;
550 case 176 : itype = M32R2F_INSN_BEQ; goto extract_sfmt_beq;
551 case 177 : itype = M32R2F_INSN_BNE; goto extract_sfmt_beq;
552 case 184 : itype = M32R2F_INSN_BEQZ; goto extract_sfmt_beqz;
553 case 185 : itype = M32R2F_INSN_BNEZ; goto extract_sfmt_beqz;
554 case 186 : itype = M32R2F_INSN_BLTZ; goto extract_sfmt_beqz;
555 case 187 : itype = M32R2F_INSN_BGEZ; goto extract_sfmt_beqz;
556 case 188 : itype = M32R2F_INSN_BLEZ; goto extract_sfmt_beqz;
557 case 189 : itype = M32R2F_INSN_BGTZ; goto extract_sfmt_beqz;
558 case 220 : itype = M32R2F_INSN_SETH; goto extract_sfmt_seth;
559 case 224 : /* fall through */
560 case 225 : /* fall through */
561 case 226 : /* fall through */
562 case 227 : /* fall through */
563 case 228 : /* fall through */
564 case 229 : /* fall through */
565 case 230 : /* fall through */
566 case 231 : /* fall through */
567 case 232 : /* fall through */
568 case 233 : /* fall through */
569 case 234 : /* fall through */
570 case 235 : /* fall through */
571 case 236 : /* fall through */
572 case 237 : /* fall through */
573 case 238 : /* fall through */
574 case 239 : itype = M32R2F_INSN_LD24; goto extract_sfmt_ld24;
575 case 240 : /* fall through */
576 case 241 : /* fall through */
577 case 242 : /* fall through */
578 case 243 : /* fall through */
579 case 244 : /* fall through */
580 case 245 : /* fall through */
581 case 246 : /* fall through */
582 case 247 : /* fall through */
583 case 248 : /* fall through */
584 case 249 : /* fall through */
585 case 250 : /* fall through */
586 case 251 : /* fall through */
587 case 252 : /* fall through */
588 case 253 : /* fall through */
589 case 254 : /* fall through */
592 unsigned int val = (((insn >> 8) & (7 << 0)));
595 case 0 : itype = M32R2F_INSN_BCL24; goto extract_sfmt_bcl24;
596 case 1 : itype = M32R2F_INSN_BNCL24; goto extract_sfmt_bcl24;
597 case 4 : itype = M32R2F_INSN_BC24; goto extract_sfmt_bc24;
598 case 5 : itype = M32R2F_INSN_BNC24; goto extract_sfmt_bc24;
599 case 6 : itype = M32R2F_INSN_BL24; goto extract_sfmt_bl24;
600 case 7 : itype = M32R2F_INSN_BRA24; goto extract_sfmt_bra24;
601 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
604 default : itype = M32R2F_INSN_X_INVALID; goto extract_sfmt_empty;
609 /* The instruction has been decoded, now extract the fields. */
613 const IDESC *idesc = &m32r2f_insn_data[itype];
614 #define FLD(f) abuf->fields.fmt_empty.f
617 /* Record the fields for the semantic handler. */
618 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0));
626 const IDESC *idesc = &m32r2f_insn_data[itype];
627 CGEN_INSN_INT insn = entire_insn;
628 #define FLD(f) abuf->fields.sfmt_add.f
632 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
633 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
635 /* Record the fields for the semantic handler. */
638 FLD (i_dr) = & CPU (h_gr)[f_r1];
639 FLD (i_sr) = & CPU (h_gr)[f_r2];
640 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));
642 #if WITH_PROFILE_MODEL_P
643 /* Record the fields for profiling. */
644 if (PROFILE_MODEL_P (current_cpu))
657 const IDESC *idesc = &m32r2f_insn_data[itype];
658 CGEN_INSN_INT insn = entire_insn;
659 #define FLD(f) abuf->fields.sfmt_add3.f
664 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
665 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
666 f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
668 /* Record the fields for the semantic handler. */
669 FLD (f_simm16) = f_simm16;
672 FLD (i_sr) = & CPU (h_gr)[f_r2];
673 FLD (i_dr) = & CPU (h_gr)[f_r1];
674 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));
676 #if WITH_PROFILE_MODEL_P
677 /* Record the fields for profiling. */
678 if (PROFILE_MODEL_P (current_cpu))
690 const IDESC *idesc = &m32r2f_insn_data[itype];
691 CGEN_INSN_INT insn = entire_insn;
692 #define FLD(f) abuf->fields.sfmt_and3.f
697 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
698 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
699 f_uimm16 = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
701 /* Record the fields for the semantic handler. */
703 FLD (f_uimm16) = f_uimm16;
705 FLD (i_sr) = & CPU (h_gr)[f_r2];
706 FLD (i_dr) = & CPU (h_gr)[f_r1];
707 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));
709 #if WITH_PROFILE_MODEL_P
710 /* Record the fields for profiling. */
711 if (PROFILE_MODEL_P (current_cpu))
723 const IDESC *idesc = &m32r2f_insn_data[itype];
724 CGEN_INSN_INT insn = entire_insn;
725 #define FLD(f) abuf->fields.sfmt_and3.f
730 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
731 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
732 f_uimm16 = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
734 /* Record the fields for the semantic handler. */
736 FLD (f_uimm16) = f_uimm16;
738 FLD (i_sr) = & CPU (h_gr)[f_r2];
739 FLD (i_dr) = & CPU (h_gr)[f_r1];
740 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));
742 #if WITH_PROFILE_MODEL_P
743 /* Record the fields for profiling. */
744 if (PROFILE_MODEL_P (current_cpu))
756 const IDESC *idesc = &m32r2f_insn_data[itype];
757 CGEN_INSN_INT insn = entire_insn;
758 #define FLD(f) abuf->fields.sfmt_addi.f
762 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
763 f_simm8 = EXTRACT_MSB0_INT (insn, 16, 8, 8);
765 /* Record the fields for the semantic handler. */
767 FLD (f_simm8) = f_simm8;
768 FLD (i_dr) = & CPU (h_gr)[f_r1];
769 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));
771 #if WITH_PROFILE_MODEL_P
772 /* Record the fields for profiling. */
773 if (PROFILE_MODEL_P (current_cpu))
785 const IDESC *idesc = &m32r2f_insn_data[itype];
786 CGEN_INSN_INT insn = entire_insn;
787 #define FLD(f) abuf->fields.sfmt_add.f
791 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
792 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
794 /* Record the fields for the semantic handler. */
797 FLD (i_dr) = & CPU (h_gr)[f_r1];
798 FLD (i_sr) = & CPU (h_gr)[f_r2];
799 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));
801 #if WITH_PROFILE_MODEL_P
802 /* Record the fields for profiling. */
803 if (PROFILE_MODEL_P (current_cpu))
816 const IDESC *idesc = &m32r2f_insn_data[itype];
817 CGEN_INSN_INT insn = entire_insn;
818 #define FLD(f) abuf->fields.sfmt_add3.f
823 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
824 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
825 f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
827 /* Record the fields for the semantic handler. */
828 FLD (f_simm16) = f_simm16;
831 FLD (i_sr) = & CPU (h_gr)[f_r2];
832 FLD (i_dr) = & CPU (h_gr)[f_r1];
833 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));
835 #if WITH_PROFILE_MODEL_P
836 /* Record the fields for profiling. */
837 if (PROFILE_MODEL_P (current_cpu))
849 const IDESC *idesc = &m32r2f_insn_data[itype];
850 CGEN_INSN_INT insn = entire_insn;
851 #define FLD(f) abuf->fields.sfmt_add.f
855 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
856 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
858 /* Record the fields for the semantic handler. */
861 FLD (i_dr) = & CPU (h_gr)[f_r1];
862 FLD (i_sr) = & CPU (h_gr)[f_r2];
863 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));
865 #if WITH_PROFILE_MODEL_P
866 /* Record the fields for profiling. */
867 if (PROFILE_MODEL_P (current_cpu))
880 const IDESC *idesc = &m32r2f_insn_data[itype];
881 CGEN_INSN_INT insn = entire_insn;
882 #define FLD(f) abuf->fields.sfmt_bl8.f
885 f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
887 /* Record the fields for the semantic handler. */
888 FLD (i_disp8) = f_disp8;
889 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bc8", "disp8 0x%x", 'x', f_disp8, (char *) 0));
891 #if WITH_PROFILE_MODEL_P
892 /* Record the fields for profiling. */
893 if (PROFILE_MODEL_P (current_cpu))
903 const IDESC *idesc = &m32r2f_insn_data[itype];
904 CGEN_INSN_INT insn = entire_insn;
905 #define FLD(f) abuf->fields.sfmt_bl24.f
908 f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
910 /* Record the fields for the semantic handler. */
911 FLD (i_disp24) = f_disp24;
912 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bc24", "disp24 0x%x", 'x', f_disp24, (char *) 0));
914 #if WITH_PROFILE_MODEL_P
915 /* Record the fields for profiling. */
916 if (PROFILE_MODEL_P (current_cpu))
926 const IDESC *idesc = &m32r2f_insn_data[itype];
927 CGEN_INSN_INT insn = entire_insn;
928 #define FLD(f) abuf->fields.sfmt_beq.f
933 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
934 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
935 f_disp16 = ((((EXTRACT_MSB0_INT (insn, 32, 16, 16)) << (2))) + (pc));
937 /* Record the fields for the semantic handler. */
940 FLD (i_disp16) = f_disp16;
941 FLD (i_src1) = & CPU (h_gr)[f_r1];
942 FLD (i_src2) = & CPU (h_gr)[f_r2];
943 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));
945 #if WITH_PROFILE_MODEL_P
946 /* Record the fields for profiling. */
947 if (PROFILE_MODEL_P (current_cpu))
949 FLD (in_src1) = f_r1;
950 FLD (in_src2) = f_r2;
959 const IDESC *idesc = &m32r2f_insn_data[itype];
960 CGEN_INSN_INT insn = entire_insn;
961 #define FLD(f) abuf->fields.sfmt_beq.f
965 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
966 f_disp16 = ((((EXTRACT_MSB0_INT (insn, 32, 16, 16)) << (2))) + (pc));
968 /* Record the fields for the semantic handler. */
970 FLD (i_disp16) = f_disp16;
971 FLD (i_src2) = & CPU (h_gr)[f_r2];
972 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));
974 #if WITH_PROFILE_MODEL_P
975 /* Record the fields for profiling. */
976 if (PROFILE_MODEL_P (current_cpu))
978 FLD (in_src2) = f_r2;
987 const IDESC *idesc = &m32r2f_insn_data[itype];
988 CGEN_INSN_INT insn = entire_insn;
989 #define FLD(f) abuf->fields.sfmt_bl8.f
992 f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
994 /* Record the fields for the semantic handler. */
995 FLD (i_disp8) = f_disp8;
996 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bl8", "disp8 0x%x", 'x', f_disp8, (char *) 0));
998 #if WITH_PROFILE_MODEL_P
999 /* Record the fields for profiling. */
1000 if (PROFILE_MODEL_P (current_cpu))
1002 FLD (out_h_gr_SI_14) = 14;
1011 const IDESC *idesc = &m32r2f_insn_data[itype];
1012 CGEN_INSN_INT insn = entire_insn;
1013 #define FLD(f) abuf->fields.sfmt_bl24.f
1016 f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
1018 /* Record the fields for the semantic handler. */
1019 FLD (i_disp24) = f_disp24;
1020 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bl24", "disp24 0x%x", 'x', f_disp24, (char *) 0));
1022 #if WITH_PROFILE_MODEL_P
1023 /* Record the fields for profiling. */
1024 if (PROFILE_MODEL_P (current_cpu))
1026 FLD (out_h_gr_SI_14) = 14;
1035 const IDESC *idesc = &m32r2f_insn_data[itype];
1036 CGEN_INSN_INT insn = entire_insn;
1037 #define FLD(f) abuf->fields.sfmt_bl8.f
1040 f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
1042 /* Record the fields for the semantic handler. */
1043 FLD (i_disp8) = f_disp8;
1044 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcl8", "disp8 0x%x", 'x', f_disp8, (char *) 0));
1046 #if WITH_PROFILE_MODEL_P
1047 /* Record the fields for profiling. */
1048 if (PROFILE_MODEL_P (current_cpu))
1050 FLD (out_h_gr_SI_14) = 14;
1059 const IDESC *idesc = &m32r2f_insn_data[itype];
1060 CGEN_INSN_INT insn = entire_insn;
1061 #define FLD(f) abuf->fields.sfmt_bl24.f
1064 f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
1066 /* Record the fields for the semantic handler. */
1067 FLD (i_disp24) = f_disp24;
1068 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcl24", "disp24 0x%x", 'x', f_disp24, (char *) 0));
1070 #if WITH_PROFILE_MODEL_P
1071 /* Record the fields for profiling. */
1072 if (PROFILE_MODEL_P (current_cpu))
1074 FLD (out_h_gr_SI_14) = 14;
1083 const IDESC *idesc = &m32r2f_insn_data[itype];
1084 CGEN_INSN_INT insn = entire_insn;
1085 #define FLD(f) abuf->fields.sfmt_bl8.f
1088 f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
1090 /* Record the fields for the semantic handler. */
1091 FLD (i_disp8) = f_disp8;
1092 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bra8", "disp8 0x%x", 'x', f_disp8, (char *) 0));
1094 #if WITH_PROFILE_MODEL_P
1095 /* Record the fields for profiling. */
1096 if (PROFILE_MODEL_P (current_cpu))
1106 const IDESC *idesc = &m32r2f_insn_data[itype];
1107 CGEN_INSN_INT insn = entire_insn;
1108 #define FLD(f) abuf->fields.sfmt_bl24.f
1111 f_disp24 = ((((EXTRACT_MSB0_INT (insn, 32, 8, 24)) << (2))) + (pc));
1113 /* Record the fields for the semantic handler. */
1114 FLD (i_disp24) = f_disp24;
1115 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bra24", "disp24 0x%x", 'x', f_disp24, (char *) 0));
1117 #if WITH_PROFILE_MODEL_P
1118 /* Record the fields for profiling. */
1119 if (PROFILE_MODEL_P (current_cpu))
1129 const IDESC *idesc = &m32r2f_insn_data[itype];
1130 CGEN_INSN_INT insn = entire_insn;
1131 #define FLD(f) abuf->fields.sfmt_st_plus.f
1135 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1136 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1138 /* Record the fields for the semantic handler. */
1141 FLD (i_src1) = & CPU (h_gr)[f_r1];
1142 FLD (i_src2) = & CPU (h_gr)[f_r2];
1143 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));
1145 #if WITH_PROFILE_MODEL_P
1146 /* Record the fields for profiling. */
1147 if (PROFILE_MODEL_P (current_cpu))
1149 FLD (in_src1) = f_r1;
1150 FLD (in_src2) = f_r2;
1159 const IDESC *idesc = &m32r2f_insn_data[itype];
1160 CGEN_INSN_INT insn = entire_insn;
1161 #define FLD(f) abuf->fields.sfmt_st_d.f
1165 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1166 f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
1168 /* Record the fields for the semantic handler. */
1169 FLD (f_simm16) = f_simm16;
1171 FLD (i_src2) = & CPU (h_gr)[f_r2];
1172 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));
1174 #if WITH_PROFILE_MODEL_P
1175 /* Record the fields for profiling. */
1176 if (PROFILE_MODEL_P (current_cpu))
1178 FLD (in_src2) = f_r2;
1187 const IDESC *idesc = &m32r2f_insn_data[itype];
1188 CGEN_INSN_INT insn = entire_insn;
1189 #define FLD(f) abuf->fields.sfmt_st_plus.f
1192 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1194 /* Record the fields for the semantic handler. */
1196 FLD (i_src2) = & CPU (h_gr)[f_r2];
1197 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));
1199 #if WITH_PROFILE_MODEL_P
1200 /* Record the fields for profiling. */
1201 if (PROFILE_MODEL_P (current_cpu))
1203 FLD (in_src2) = f_r2;
1212 const IDESC *idesc = &m32r2f_insn_data[itype];
1213 CGEN_INSN_INT insn = entire_insn;
1214 #define FLD(f) abuf->fields.sfmt_add.f
1218 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1219 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1221 /* Record the fields for the semantic handler. */
1224 FLD (i_dr) = & CPU (h_gr)[f_r1];
1225 FLD (i_sr) = & CPU (h_gr)[f_r2];
1226 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));
1228 #if WITH_PROFILE_MODEL_P
1229 /* Record the fields for profiling. */
1230 if (PROFILE_MODEL_P (current_cpu))
1234 FLD (out_dr) = f_r1;
1243 const IDESC *idesc = &m32r2f_insn_data[itype];
1244 CGEN_INSN_INT insn = entire_insn;
1245 #define FLD(f) abuf->fields.sfmt_jl.f
1248 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1250 /* Record the fields for the semantic handler. */
1252 FLD (i_sr) = & CPU (h_gr)[f_r2];
1253 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));
1255 #if WITH_PROFILE_MODEL_P
1256 /* Record the fields for profiling. */
1257 if (PROFILE_MODEL_P (current_cpu))
1268 const IDESC *idesc = &m32r2f_insn_data[itype];
1269 CGEN_INSN_INT insn = entire_insn;
1270 #define FLD(f) abuf->fields.sfmt_jl.f
1273 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1275 /* Record the fields for the semantic handler. */
1277 FLD (i_sr) = & CPU (h_gr)[f_r2];
1278 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));
1280 #if WITH_PROFILE_MODEL_P
1281 /* Record the fields for profiling. */
1282 if (PROFILE_MODEL_P (current_cpu))
1285 FLD (out_h_gr_SI_14) = 14;
1294 const IDESC *idesc = &m32r2f_insn_data[itype];
1295 CGEN_INSN_INT insn = entire_insn;
1296 #define FLD(f) abuf->fields.sfmt_jl.f
1299 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1301 /* Record the fields for the semantic handler. */
1303 FLD (i_sr) = & CPU (h_gr)[f_r2];
1304 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));
1306 #if WITH_PROFILE_MODEL_P
1307 /* Record the fields for profiling. */
1308 if (PROFILE_MODEL_P (current_cpu))
1319 const IDESC *idesc = &m32r2f_insn_data[itype];
1320 CGEN_INSN_INT insn = entire_insn;
1321 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1325 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1326 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1328 /* Record the fields for the semantic handler. */
1331 FLD (i_sr) = & CPU (h_gr)[f_r2];
1332 FLD (i_dr) = & CPU (h_gr)[f_r1];
1333 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));
1335 #if WITH_PROFILE_MODEL_P
1336 /* Record the fields for profiling. */
1337 if (PROFILE_MODEL_P (current_cpu))
1340 FLD (out_dr) = f_r1;
1349 const IDESC *idesc = &m32r2f_insn_data[itype];
1350 CGEN_INSN_INT insn = entire_insn;
1351 #define FLD(f) abuf->fields.sfmt_add3.f
1356 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1357 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1358 f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
1360 /* Record the fields for the semantic handler. */
1361 FLD (f_simm16) = f_simm16;
1364 FLD (i_sr) = & CPU (h_gr)[f_r2];
1365 FLD (i_dr) = & CPU (h_gr)[f_r1];
1366 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));
1368 #if WITH_PROFILE_MODEL_P
1369 /* Record the fields for profiling. */
1370 if (PROFILE_MODEL_P (current_cpu))
1373 FLD (out_dr) = f_r1;
1382 const IDESC *idesc = &m32r2f_insn_data[itype];
1383 CGEN_INSN_INT insn = entire_insn;
1384 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1388 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1389 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1391 /* Record the fields for the semantic handler. */
1394 FLD (i_sr) = & CPU (h_gr)[f_r2];
1395 FLD (i_dr) = & CPU (h_gr)[f_r1];
1396 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));
1398 #if WITH_PROFILE_MODEL_P
1399 /* Record the fields for profiling. */
1400 if (PROFILE_MODEL_P (current_cpu))
1403 FLD (out_dr) = f_r1;
1412 const IDESC *idesc = &m32r2f_insn_data[itype];
1413 CGEN_INSN_INT insn = entire_insn;
1414 #define FLD(f) abuf->fields.sfmt_add3.f
1419 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1420 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1421 f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
1423 /* Record the fields for the semantic handler. */
1424 FLD (f_simm16) = f_simm16;
1427 FLD (i_sr) = & CPU (h_gr)[f_r2];
1428 FLD (i_dr) = & CPU (h_gr)[f_r1];
1429 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));
1431 #if WITH_PROFILE_MODEL_P
1432 /* Record the fields for profiling. */
1433 if (PROFILE_MODEL_P (current_cpu))
1436 FLD (out_dr) = f_r1;
1445 const IDESC *idesc = &m32r2f_insn_data[itype];
1446 CGEN_INSN_INT insn = entire_insn;
1447 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1451 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1452 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1454 /* Record the fields for the semantic handler. */
1457 FLD (i_sr) = & CPU (h_gr)[f_r2];
1458 FLD (i_dr) = & CPU (h_gr)[f_r1];
1459 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));
1461 #if WITH_PROFILE_MODEL_P
1462 /* Record the fields for profiling. */
1463 if (PROFILE_MODEL_P (current_cpu))
1466 FLD (out_dr) = f_r1;
1475 const IDESC *idesc = &m32r2f_insn_data[itype];
1476 CGEN_INSN_INT insn = entire_insn;
1477 #define FLD(f) abuf->fields.sfmt_add3.f
1482 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1483 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1484 f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
1486 /* Record the fields for the semantic handler. */
1487 FLD (f_simm16) = f_simm16;
1490 FLD (i_sr) = & CPU (h_gr)[f_r2];
1491 FLD (i_dr) = & CPU (h_gr)[f_r1];
1492 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));
1494 #if WITH_PROFILE_MODEL_P
1495 /* Record the fields for profiling. */
1496 if (PROFILE_MODEL_P (current_cpu))
1499 FLD (out_dr) = f_r1;
1506 extract_sfmt_ld_plus:
1508 const IDESC *idesc = &m32r2f_insn_data[itype];
1509 CGEN_INSN_INT insn = entire_insn;
1510 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1514 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1515 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1517 /* Record the fields for the semantic handler. */
1520 FLD (i_sr) = & CPU (h_gr)[f_r2];
1521 FLD (i_dr) = & CPU (h_gr)[f_r1];
1522 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));
1524 #if WITH_PROFILE_MODEL_P
1525 /* Record the fields for profiling. */
1526 if (PROFILE_MODEL_P (current_cpu))
1529 FLD (out_dr) = f_r1;
1530 FLD (out_sr) = f_r2;
1539 const IDESC *idesc = &m32r2f_insn_data[itype];
1540 CGEN_INSN_INT insn = entire_insn;
1541 #define FLD(f) abuf->fields.sfmt_ld24.f
1545 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1546 f_uimm24 = EXTRACT_MSB0_UINT (insn, 32, 8, 24);
1548 /* Record the fields for the semantic handler. */
1550 FLD (i_uimm24) = f_uimm24;
1551 FLD (i_dr) = & CPU (h_gr)[f_r1];
1552 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));
1554 #if WITH_PROFILE_MODEL_P
1555 /* Record the fields for profiling. */
1556 if (PROFILE_MODEL_P (current_cpu))
1558 FLD (out_dr) = f_r1;
1567 const IDESC *idesc = &m32r2f_insn_data[itype];
1568 CGEN_INSN_INT insn = entire_insn;
1569 #define FLD(f) abuf->fields.sfmt_addi.f
1573 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1574 f_simm8 = EXTRACT_MSB0_INT (insn, 16, 8, 8);
1576 /* Record the fields for the semantic handler. */
1577 FLD (f_simm8) = f_simm8;
1579 FLD (i_dr) = & CPU (h_gr)[f_r1];
1580 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));
1582 #if WITH_PROFILE_MODEL_P
1583 /* Record the fields for profiling. */
1584 if (PROFILE_MODEL_P (current_cpu))
1586 FLD (out_dr) = f_r1;
1595 const IDESC *idesc = &m32r2f_insn_data[itype];
1596 CGEN_INSN_INT insn = entire_insn;
1597 #define FLD(f) abuf->fields.sfmt_add3.f
1601 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1602 f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
1604 /* Record the fields for the semantic handler. */
1605 FLD (f_simm16) = f_simm16;
1607 FLD (i_dr) = & CPU (h_gr)[f_r1];
1608 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));
1610 #if WITH_PROFILE_MODEL_P
1611 /* Record the fields for profiling. */
1612 if (PROFILE_MODEL_P (current_cpu))
1614 FLD (out_dr) = f_r1;
1623 const IDESC *idesc = &m32r2f_insn_data[itype];
1624 CGEN_INSN_INT insn = entire_insn;
1625 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1629 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1630 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1632 /* Record the fields for the semantic handler. */
1635 FLD (i_sr) = & CPU (h_gr)[f_r2];
1636 FLD (i_dr) = & CPU (h_gr)[f_r1];
1637 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));
1639 #if WITH_PROFILE_MODEL_P
1640 /* Record the fields for profiling. */
1641 if (PROFILE_MODEL_P (current_cpu))
1644 FLD (out_dr) = f_r1;
1651 extract_sfmt_machi_a:
1653 const IDESC *idesc = &m32r2f_insn_data[itype];
1654 CGEN_INSN_INT insn = entire_insn;
1655 #define FLD(f) abuf->fields.sfmt_machi_a.f
1660 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1661 f_acc = EXTRACT_MSB0_UINT (insn, 16, 8, 1);
1662 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1664 /* Record the fields for the semantic handler. */
1665 FLD (f_acc) = f_acc;
1668 FLD (i_src1) = & CPU (h_gr)[f_r1];
1669 FLD (i_src2) = & CPU (h_gr)[f_r2];
1670 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));
1672 #if WITH_PROFILE_MODEL_P
1673 /* Record the fields for profiling. */
1674 if (PROFILE_MODEL_P (current_cpu))
1676 FLD (in_src1) = f_r1;
1677 FLD (in_src2) = f_r2;
1684 extract_sfmt_mulhi_a:
1686 const IDESC *idesc = &m32r2f_insn_data[itype];
1687 CGEN_INSN_INT insn = entire_insn;
1688 #define FLD(f) abuf->fields.sfmt_machi_a.f
1693 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1694 f_acc = EXTRACT_MSB0_UINT (insn, 16, 8, 1);
1695 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1697 /* Record the fields for the semantic handler. */
1700 FLD (f_acc) = f_acc;
1701 FLD (i_src1) = & CPU (h_gr)[f_r1];
1702 FLD (i_src2) = & CPU (h_gr)[f_r2];
1703 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));
1705 #if WITH_PROFILE_MODEL_P
1706 /* Record the fields for profiling. */
1707 if (PROFILE_MODEL_P (current_cpu))
1709 FLD (in_src1) = f_r1;
1710 FLD (in_src2) = f_r2;
1719 const IDESC *idesc = &m32r2f_insn_data[itype];
1720 CGEN_INSN_INT insn = entire_insn;
1721 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1725 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1726 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1728 /* Record the fields for the semantic handler. */
1731 FLD (i_sr) = & CPU (h_gr)[f_r2];
1732 FLD (i_dr) = & CPU (h_gr)[f_r1];
1733 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));
1735 #if WITH_PROFILE_MODEL_P
1736 /* Record the fields for profiling. */
1737 if (PROFILE_MODEL_P (current_cpu))
1740 FLD (out_dr) = f_r1;
1747 extract_sfmt_mvfachi_a:
1749 const IDESC *idesc = &m32r2f_insn_data[itype];
1750 CGEN_INSN_INT insn = entire_insn;
1751 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
1755 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1756 f_accs = EXTRACT_MSB0_UINT (insn, 16, 12, 2);
1758 /* Record the fields for the semantic handler. */
1759 FLD (f_accs) = f_accs;
1761 FLD (i_dr) = & CPU (h_gr)[f_r1];
1762 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));
1764 #if WITH_PROFILE_MODEL_P
1765 /* Record the fields for profiling. */
1766 if (PROFILE_MODEL_P (current_cpu))
1768 FLD (out_dr) = f_r1;
1777 const IDESC *idesc = &m32r2f_insn_data[itype];
1778 CGEN_INSN_INT insn = entire_insn;
1779 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1783 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1784 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1786 /* Record the fields for the semantic handler. */
1789 FLD (i_dr) = & CPU (h_gr)[f_r1];
1790 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));
1792 #if WITH_PROFILE_MODEL_P
1793 /* Record the fields for profiling. */
1794 if (PROFILE_MODEL_P (current_cpu))
1796 FLD (out_dr) = f_r1;
1803 extract_sfmt_mvtachi_a:
1805 const IDESC *idesc = &m32r2f_insn_data[itype];
1806 CGEN_INSN_INT insn = entire_insn;
1807 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
1811 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1812 f_accs = EXTRACT_MSB0_UINT (insn, 16, 12, 2);
1814 /* Record the fields for the semantic handler. */
1815 FLD (f_accs) = f_accs;
1817 FLD (i_src1) = & CPU (h_gr)[f_r1];
1818 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));
1820 #if WITH_PROFILE_MODEL_P
1821 /* Record the fields for profiling. */
1822 if (PROFILE_MODEL_P (current_cpu))
1824 FLD (in_src1) = f_r1;
1833 const IDESC *idesc = &m32r2f_insn_data[itype];
1834 CGEN_INSN_INT insn = entire_insn;
1835 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1839 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1840 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1842 /* Record the fields for the semantic handler. */
1845 FLD (i_sr) = & CPU (h_gr)[f_r2];
1846 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));
1848 #if WITH_PROFILE_MODEL_P
1849 /* Record the fields for profiling. */
1850 if (PROFILE_MODEL_P (current_cpu))
1861 const IDESC *idesc = &m32r2f_insn_data[itype];
1862 #define FLD(f) abuf->fields.fmt_empty.f
1865 /* Record the fields for the semantic handler. */
1866 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_nop", (char *) 0));
1872 extract_sfmt_rac_dsi:
1874 const IDESC *idesc = &m32r2f_insn_data[itype];
1875 CGEN_INSN_INT insn = entire_insn;
1876 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
1881 f_accd = EXTRACT_MSB0_UINT (insn, 16, 4, 2);
1882 f_accs = EXTRACT_MSB0_UINT (insn, 16, 12, 2);
1883 f_imm1 = ((EXTRACT_MSB0_UINT (insn, 16, 15, 1)) + (1));
1885 /* Record the fields for the semantic handler. */
1886 FLD (f_accs) = f_accs;
1887 FLD (f_imm1) = f_imm1;
1888 FLD (f_accd) = f_accd;
1889 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));
1897 const IDESC *idesc = &m32r2f_insn_data[itype];
1898 #define FLD(f) abuf->fields.fmt_empty.f
1901 /* Record the fields for the semantic handler. */
1902 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_rte", (char *) 0));
1904 #if WITH_PROFILE_MODEL_P
1905 /* Record the fields for profiling. */
1906 if (PROFILE_MODEL_P (current_cpu))
1916 const IDESC *idesc = &m32r2f_insn_data[itype];
1917 CGEN_INSN_INT insn = entire_insn;
1918 #define FLD(f) abuf->fields.sfmt_seth.f
1922 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1923 f_hi16 = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
1925 /* Record the fields for the semantic handler. */
1926 FLD (f_hi16) = f_hi16;
1928 FLD (i_dr) = & CPU (h_gr)[f_r1];
1929 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));
1931 #if WITH_PROFILE_MODEL_P
1932 /* Record the fields for profiling. */
1933 if (PROFILE_MODEL_P (current_cpu))
1935 FLD (out_dr) = f_r1;
1944 const IDESC *idesc = &m32r2f_insn_data[itype];
1945 CGEN_INSN_INT insn = entire_insn;
1946 #define FLD(f) abuf->fields.sfmt_add3.f
1951 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1952 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1953 f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
1955 /* Record the fields for the semantic handler. */
1956 FLD (f_simm16) = f_simm16;
1959 FLD (i_sr) = & CPU (h_gr)[f_r2];
1960 FLD (i_dr) = & CPU (h_gr)[f_r1];
1961 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));
1963 #if WITH_PROFILE_MODEL_P
1964 /* Record the fields for profiling. */
1965 if (PROFILE_MODEL_P (current_cpu))
1968 FLD (out_dr) = f_r1;
1977 const IDESC *idesc = &m32r2f_insn_data[itype];
1978 CGEN_INSN_INT insn = entire_insn;
1979 #define FLD(f) abuf->fields.sfmt_slli.f
1983 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1984 f_uimm5 = EXTRACT_MSB0_UINT (insn, 16, 11, 5);
1986 /* Record the fields for the semantic handler. */
1988 FLD (f_uimm5) = f_uimm5;
1989 FLD (i_dr) = & CPU (h_gr)[f_r1];
1990 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));
1992 #if WITH_PROFILE_MODEL_P
1993 /* Record the fields for profiling. */
1994 if (PROFILE_MODEL_P (current_cpu))
1997 FLD (out_dr) = f_r1;
2006 const IDESC *idesc = &m32r2f_insn_data[itype];
2007 CGEN_INSN_INT insn = entire_insn;
2008 #define FLD(f) abuf->fields.sfmt_st_plus.f
2012 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2013 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2015 /* Record the fields for the semantic handler. */
2018 FLD (i_src1) = & CPU (h_gr)[f_r1];
2019 FLD (i_src2) = & CPU (h_gr)[f_r2];
2020 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));
2022 #if WITH_PROFILE_MODEL_P
2023 /* Record the fields for profiling. */
2024 if (PROFILE_MODEL_P (current_cpu))
2026 FLD (in_src1) = f_r1;
2027 FLD (in_src2) = f_r2;
2036 const IDESC *idesc = &m32r2f_insn_data[itype];
2037 CGEN_INSN_INT insn = entire_insn;
2038 #define FLD(f) abuf->fields.sfmt_st_d.f
2043 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
2044 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2045 f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
2047 /* Record the fields for the semantic handler. */
2048 FLD (f_simm16) = f_simm16;
2051 FLD (i_src1) = & CPU (h_gr)[f_r1];
2052 FLD (i_src2) = & CPU (h_gr)[f_r2];
2053 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));
2055 #if WITH_PROFILE_MODEL_P
2056 /* Record the fields for profiling. */
2057 if (PROFILE_MODEL_P (current_cpu))
2059 FLD (in_src1) = f_r1;
2060 FLD (in_src2) = f_r2;
2069 const IDESC *idesc = &m32r2f_insn_data[itype];
2070 CGEN_INSN_INT insn = entire_insn;
2071 #define FLD(f) abuf->fields.sfmt_st_plus.f
2075 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2076 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2078 /* Record the fields for the semantic handler. */
2081 FLD (i_src1) = & CPU (h_gr)[f_r1];
2082 FLD (i_src2) = & CPU (h_gr)[f_r2];
2083 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));
2085 #if WITH_PROFILE_MODEL_P
2086 /* Record the fields for profiling. */
2087 if (PROFILE_MODEL_P (current_cpu))
2089 FLD (in_src1) = f_r1;
2090 FLD (in_src2) = f_r2;
2099 const IDESC *idesc = &m32r2f_insn_data[itype];
2100 CGEN_INSN_INT insn = entire_insn;
2101 #define FLD(f) abuf->fields.sfmt_st_d.f
2106 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
2107 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2108 f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
2110 /* Record the fields for the semantic handler. */
2111 FLD (f_simm16) = f_simm16;
2114 FLD (i_src1) = & CPU (h_gr)[f_r1];
2115 FLD (i_src2) = & CPU (h_gr)[f_r2];
2116 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));
2118 #if WITH_PROFILE_MODEL_P
2119 /* Record the fields for profiling. */
2120 if (PROFILE_MODEL_P (current_cpu))
2122 FLD (in_src1) = f_r1;
2123 FLD (in_src2) = f_r2;
2132 const IDESC *idesc = &m32r2f_insn_data[itype];
2133 CGEN_INSN_INT insn = entire_insn;
2134 #define FLD(f) abuf->fields.sfmt_st_plus.f
2138 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2139 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2141 /* Record the fields for the semantic handler. */
2144 FLD (i_src1) = & CPU (h_gr)[f_r1];
2145 FLD (i_src2) = & CPU (h_gr)[f_r2];
2146 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));
2148 #if WITH_PROFILE_MODEL_P
2149 /* Record the fields for profiling. */
2150 if (PROFILE_MODEL_P (current_cpu))
2152 FLD (in_src1) = f_r1;
2153 FLD (in_src2) = f_r2;
2162 const IDESC *idesc = &m32r2f_insn_data[itype];
2163 CGEN_INSN_INT insn = entire_insn;
2164 #define FLD(f) abuf->fields.sfmt_st_d.f
2169 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
2170 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2171 f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
2173 /* Record the fields for the semantic handler. */
2174 FLD (f_simm16) = f_simm16;
2177 FLD (i_src1) = & CPU (h_gr)[f_r1];
2178 FLD (i_src2) = & CPU (h_gr)[f_r2];
2179 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));
2181 #if WITH_PROFILE_MODEL_P
2182 /* Record the fields for profiling. */
2183 if (PROFILE_MODEL_P (current_cpu))
2185 FLD (in_src1) = f_r1;
2186 FLD (in_src2) = f_r2;
2193 extract_sfmt_st_plus:
2195 const IDESC *idesc = &m32r2f_insn_data[itype];
2196 CGEN_INSN_INT insn = entire_insn;
2197 #define FLD(f) abuf->fields.sfmt_st_plus.f
2201 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2202 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2204 /* Record the fields for the semantic handler. */
2207 FLD (i_src1) = & CPU (h_gr)[f_r1];
2208 FLD (i_src2) = & CPU (h_gr)[f_r2];
2209 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));
2211 #if WITH_PROFILE_MODEL_P
2212 /* Record the fields for profiling. */
2213 if (PROFILE_MODEL_P (current_cpu))
2215 FLD (in_src1) = f_r1;
2216 FLD (in_src2) = f_r2;
2217 FLD (out_src2) = f_r2;
2224 extract_sfmt_sth_plus:
2226 const IDESC *idesc = &m32r2f_insn_data[itype];
2227 CGEN_INSN_INT insn = entire_insn;
2228 #define FLD(f) abuf->fields.sfmt_st_plus.f
2232 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2233 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2235 /* Record the fields for the semantic handler. */
2238 FLD (i_src1) = & CPU (h_gr)[f_r1];
2239 FLD (i_src2) = & CPU (h_gr)[f_r2];
2240 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));
2242 #if WITH_PROFILE_MODEL_P
2243 /* Record the fields for profiling. */
2244 if (PROFILE_MODEL_P (current_cpu))
2246 FLD (in_src1) = f_r1;
2247 FLD (in_src2) = f_r2;
2248 FLD (out_src2) = f_r2;
2255 extract_sfmt_stb_plus:
2257 const IDESC *idesc = &m32r2f_insn_data[itype];
2258 CGEN_INSN_INT insn = entire_insn;
2259 #define FLD(f) abuf->fields.sfmt_st_plus.f
2263 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2264 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2266 /* Record the fields for the semantic handler. */
2269 FLD (i_src1) = & CPU (h_gr)[f_r1];
2270 FLD (i_src2) = & CPU (h_gr)[f_r2];
2271 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));
2273 #if WITH_PROFILE_MODEL_P
2274 /* Record the fields for profiling. */
2275 if (PROFILE_MODEL_P (current_cpu))
2277 FLD (in_src1) = f_r1;
2278 FLD (in_src2) = f_r2;
2279 FLD (out_src2) = f_r2;
2288 const IDESC *idesc = &m32r2f_insn_data[itype];
2289 CGEN_INSN_INT insn = entire_insn;
2290 #define FLD(f) abuf->fields.sfmt_trap.f
2293 f_uimm4 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2295 /* Record the fields for the semantic handler. */
2296 FLD (f_uimm4) = f_uimm4;
2297 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_trap", "f_uimm4 0x%x", 'x', f_uimm4, (char *) 0));
2299 #if WITH_PROFILE_MODEL_P
2300 /* Record the fields for profiling. */
2301 if (PROFILE_MODEL_P (current_cpu))
2309 extract_sfmt_unlock:
2311 const IDESC *idesc = &m32r2f_insn_data[itype];
2312 CGEN_INSN_INT insn = entire_insn;
2313 #define FLD(f) abuf->fields.sfmt_st_plus.f
2317 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2318 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2320 /* Record the fields for the semantic handler. */
2323 FLD (i_src1) = & CPU (h_gr)[f_r1];
2324 FLD (i_src2) = & CPU (h_gr)[f_r2];
2325 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));
2327 #if WITH_PROFILE_MODEL_P
2328 /* Record the fields for profiling. */
2329 if (PROFILE_MODEL_P (current_cpu))
2331 FLD (in_src1) = f_r1;
2332 FLD (in_src2) = f_r2;
2341 const IDESC *idesc = &m32r2f_insn_data[itype];
2342 CGEN_INSN_INT insn = entire_insn;
2343 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2347 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
2348 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2350 /* Record the fields for the semantic handler. */
2353 FLD (i_sr) = & CPU (h_gr)[f_r2];
2354 FLD (i_dr) = & CPU (h_gr)[f_r1];
2355 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));
2357 #if WITH_PROFILE_MODEL_P
2358 /* Record the fields for profiling. */
2359 if (PROFILE_MODEL_P (current_cpu))
2362 FLD (out_dr) = f_r1;
2371 const IDESC *idesc = &m32r2f_insn_data[itype];
2372 CGEN_INSN_INT insn = entire_insn;
2373 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2377 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
2378 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2380 /* Record the fields for the semantic handler. */
2383 FLD (i_sr) = & CPU (h_gr)[f_r2];
2384 FLD (i_dr) = & CPU (h_gr)[f_r1];
2385 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));
2387 #if WITH_PROFILE_MODEL_P
2388 /* Record the fields for profiling. */
2389 if (PROFILE_MODEL_P (current_cpu))
2392 FLD (out_dr) = f_r1;
2401 const IDESC *idesc = &m32r2f_insn_data[itype];
2402 #define FLD(f) abuf->fields.fmt_empty.f
2405 /* Record the fields for the semantic handler. */
2406 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sadd", (char *) 0));
2412 extract_sfmt_macwu1:
2414 const IDESC *idesc = &m32r2f_insn_data[itype];
2415 CGEN_INSN_INT insn = entire_insn;
2416 #define FLD(f) abuf->fields.sfmt_st_plus.f
2420 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2421 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2423 /* Record the fields for the semantic handler. */
2426 FLD (i_src1) = & CPU (h_gr)[f_r1];
2427 FLD (i_src2) = & CPU (h_gr)[f_r2];
2428 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));
2430 #if WITH_PROFILE_MODEL_P
2431 /* Record the fields for profiling. */
2432 if (PROFILE_MODEL_P (current_cpu))
2434 FLD (in_src1) = f_r1;
2435 FLD (in_src2) = f_r2;
2444 const IDESC *idesc = &m32r2f_insn_data[itype];
2445 CGEN_INSN_INT insn = entire_insn;
2446 #define FLD(f) abuf->fields.sfmt_st_plus.f
2450 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2451 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2453 /* Record the fields for the semantic handler. */
2456 FLD (i_src1) = & CPU (h_gr)[f_r1];
2457 FLD (i_src2) = & CPU (h_gr)[f_r2];
2458 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));
2460 #if WITH_PROFILE_MODEL_P
2461 /* Record the fields for profiling. */
2462 if (PROFILE_MODEL_P (current_cpu))
2464 FLD (in_src1) = f_r1;
2465 FLD (in_src2) = f_r2;
2472 extract_sfmt_mulwu1:
2474 const IDESC *idesc = &m32r2f_insn_data[itype];
2475 CGEN_INSN_INT insn = entire_insn;
2476 #define FLD(f) abuf->fields.sfmt_st_plus.f
2480 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2481 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2483 /* Record the fields for the semantic handler. */
2486 FLD (i_src1) = & CPU (h_gr)[f_r1];
2487 FLD (i_src2) = & CPU (h_gr)[f_r2];
2488 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));
2490 #if WITH_PROFILE_MODEL_P
2491 /* Record the fields for profiling. */
2492 if (PROFILE_MODEL_P (current_cpu))
2494 FLD (in_src1) = f_r1;
2495 FLD (in_src2) = f_r2;
2504 const IDESC *idesc = &m32r2f_insn_data[itype];
2505 #define FLD(f) abuf->fields.fmt_empty.f
2508 /* Record the fields for the semantic handler. */
2509 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sc", (char *) 0));
2515 extract_sfmt_clrpsw:
2517 const IDESC *idesc = &m32r2f_insn_data[itype];
2518 CGEN_INSN_INT insn = entire_insn;
2519 #define FLD(f) abuf->fields.sfmt_clrpsw.f
2522 f_uimm8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
2524 /* Record the fields for the semantic handler. */
2525 FLD (f_uimm8) = f_uimm8;
2526 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_clrpsw", "f_uimm8 0x%x", 'x', f_uimm8, (char *) 0));
2532 extract_sfmt_setpsw:
2534 const IDESC *idesc = &m32r2f_insn_data[itype];
2535 CGEN_INSN_INT insn = entire_insn;
2536 #define FLD(f) abuf->fields.sfmt_clrpsw.f
2539 f_uimm8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
2541 /* Record the fields for the semantic handler. */
2542 FLD (f_uimm8) = f_uimm8;
2543 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_setpsw", "f_uimm8 0x%x", 'x', f_uimm8, (char *) 0));
2551 const IDESC *idesc = &m32r2f_insn_data[itype];
2552 CGEN_INSN_INT insn = entire_insn;
2553 #define FLD(f) abuf->fields.sfmt_bset.f
2558 f_uimm3 = EXTRACT_MSB0_UINT (insn, 32, 5, 3);
2559 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2560 f_simm16 = EXTRACT_MSB0_INT (insn, 32, 16, 16);
2562 /* Record the fields for the semantic handler. */
2563 FLD (f_simm16) = f_simm16;
2565 FLD (f_uimm3) = f_uimm3;
2566 FLD (i_sr) = & CPU (h_gr)[f_r2];
2567 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));
2569 #if WITH_PROFILE_MODEL_P
2570 /* Record the fields for profiling. */
2571 if (PROFILE_MODEL_P (current_cpu))
2582 const IDESC *idesc = &m32r2f_insn_data[itype];
2583 CGEN_INSN_INT insn = entire_insn;
2584 #define FLD(f) abuf->fields.sfmt_bset.f
2588 f_uimm3 = EXTRACT_MSB0_UINT (insn, 16, 5, 3);
2589 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2591 /* Record the fields for the semantic handler. */
2593 FLD (f_uimm3) = f_uimm3;
2594 FLD (i_sr) = & CPU (h_gr)[f_r2];
2595 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));
2597 #if WITH_PROFILE_MODEL_P
2598 /* Record the fields for profiling. */
2599 if (PROFILE_MODEL_P (current_cpu))