1 /* Simulator instruction decoder for m32r2f.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996-2024 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
9 This file is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
14 It is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
25 #define WANT_CPU m32r2f
26 #define WANT_CPU_M32R2F
29 #include "sim-assert.h"
33 /* Insn can't be executed in parallel.
34 Or is that "do NOt Pass to Air defense Radar"? :-) */
37 /* The instruction descriptor array.
38 This is computed at runtime. Space for it is not malloc'd to save a
39 teensy bit of cpu in the decoder. Moving it to malloc space is trivial
40 but won't be done until necessary (we don't currently support the runtime
41 addition of instructions nor an SMP machine with different cpus). */
42 static IDESC m32r2f_insn_data
[M32R2F_INSN__MAX
];
44 /* Commas between elements are contained in the macros.
45 Some of these are conditionally compiled out. */
47 static const struct insn_sem m32r2f_insn_sem
[] =
49 { VIRTUAL_INSN_X_INVALID
, M32R2F_INSN_X_INVALID
, M32R2F_SFMT_EMPTY
, NOPAR
, NOPAR
},
50 { VIRTUAL_INSN_X_AFTER
, M32R2F_INSN_X_AFTER
, M32R2F_SFMT_EMPTY
, NOPAR
, NOPAR
},
51 { VIRTUAL_INSN_X_BEFORE
, M32R2F_INSN_X_BEFORE
, M32R2F_SFMT_EMPTY
, NOPAR
, NOPAR
},
52 { VIRTUAL_INSN_X_CTI_CHAIN
, M32R2F_INSN_X_CTI_CHAIN
, M32R2F_SFMT_EMPTY
, NOPAR
, NOPAR
},
53 { VIRTUAL_INSN_X_CHAIN
, M32R2F_INSN_X_CHAIN
, M32R2F_SFMT_EMPTY
, NOPAR
, NOPAR
},
54 { VIRTUAL_INSN_X_BEGIN
, M32R2F_INSN_X_BEGIN
, M32R2F_SFMT_EMPTY
, NOPAR
, NOPAR
},
55 { M32R_INSN_ADD
, M32R2F_INSN_ADD
, M32R2F_SFMT_ADD
, M32R2F_INSN_PAR_ADD
, M32R2F_INSN_WRITE_ADD
},
56 { M32R_INSN_ADD3
, M32R2F_INSN_ADD3
, M32R2F_SFMT_ADD3
, NOPAR
, NOPAR
},
57 { M32R_INSN_AND
, M32R2F_INSN_AND
, M32R2F_SFMT_ADD
, M32R2F_INSN_PAR_AND
, M32R2F_INSN_WRITE_AND
},
58 { M32R_INSN_AND3
, M32R2F_INSN_AND3
, M32R2F_SFMT_AND3
, NOPAR
, NOPAR
},
59 { M32R_INSN_OR
, M32R2F_INSN_OR
, M32R2F_SFMT_ADD
, M32R2F_INSN_PAR_OR
, M32R2F_INSN_WRITE_OR
},
60 { M32R_INSN_OR3
, M32R2F_INSN_OR3
, M32R2F_SFMT_OR3
, NOPAR
, NOPAR
},
61 { M32R_INSN_XOR
, M32R2F_INSN_XOR
, M32R2F_SFMT_ADD
, M32R2F_INSN_PAR_XOR
, M32R2F_INSN_WRITE_XOR
},
62 { M32R_INSN_XOR3
, M32R2F_INSN_XOR3
, M32R2F_SFMT_AND3
, NOPAR
, NOPAR
},
63 { M32R_INSN_ADDI
, M32R2F_INSN_ADDI
, M32R2F_SFMT_ADDI
, M32R2F_INSN_PAR_ADDI
, M32R2F_INSN_WRITE_ADDI
},
64 { M32R_INSN_ADDV
, M32R2F_INSN_ADDV
, M32R2F_SFMT_ADDV
, M32R2F_INSN_PAR_ADDV
, M32R2F_INSN_WRITE_ADDV
},
65 { M32R_INSN_ADDV3
, M32R2F_INSN_ADDV3
, M32R2F_SFMT_ADDV3
, NOPAR
, NOPAR
},
66 { M32R_INSN_ADDX
, M32R2F_INSN_ADDX
, M32R2F_SFMT_ADDX
, M32R2F_INSN_PAR_ADDX
, M32R2F_INSN_WRITE_ADDX
},
67 { M32R_INSN_BC8
, M32R2F_INSN_BC8
, M32R2F_SFMT_BC8
, M32R2F_INSN_PAR_BC8
, M32R2F_INSN_WRITE_BC8
},
68 { M32R_INSN_BC24
, M32R2F_INSN_BC24
, M32R2F_SFMT_BC24
, NOPAR
, NOPAR
},
69 { M32R_INSN_BEQ
, M32R2F_INSN_BEQ
, M32R2F_SFMT_BEQ
, NOPAR
, NOPAR
},
70 { M32R_INSN_BEQZ
, M32R2F_INSN_BEQZ
, M32R2F_SFMT_BEQZ
, NOPAR
, NOPAR
},
71 { M32R_INSN_BGEZ
, M32R2F_INSN_BGEZ
, M32R2F_SFMT_BEQZ
, NOPAR
, NOPAR
},
72 { M32R_INSN_BGTZ
, M32R2F_INSN_BGTZ
, M32R2F_SFMT_BEQZ
, NOPAR
, NOPAR
},
73 { M32R_INSN_BLEZ
, M32R2F_INSN_BLEZ
, M32R2F_SFMT_BEQZ
, NOPAR
, NOPAR
},
74 { M32R_INSN_BLTZ
, M32R2F_INSN_BLTZ
, M32R2F_SFMT_BEQZ
, NOPAR
, NOPAR
},
75 { M32R_INSN_BNEZ
, M32R2F_INSN_BNEZ
, M32R2F_SFMT_BEQZ
, NOPAR
, NOPAR
},
76 { M32R_INSN_BL8
, M32R2F_INSN_BL8
, M32R2F_SFMT_BL8
, M32R2F_INSN_PAR_BL8
, M32R2F_INSN_WRITE_BL8
},
77 { M32R_INSN_BL24
, M32R2F_INSN_BL24
, M32R2F_SFMT_BL24
, NOPAR
, NOPAR
},
78 { M32R_INSN_BCL8
, M32R2F_INSN_BCL8
, M32R2F_SFMT_BCL8
, M32R2F_INSN_PAR_BCL8
, M32R2F_INSN_WRITE_BCL8
},
79 { M32R_INSN_BCL24
, M32R2F_INSN_BCL24
, M32R2F_SFMT_BCL24
, NOPAR
, NOPAR
},
80 { M32R_INSN_BNC8
, M32R2F_INSN_BNC8
, M32R2F_SFMT_BC8
, M32R2F_INSN_PAR_BNC8
, M32R2F_INSN_WRITE_BNC8
},
81 { M32R_INSN_BNC24
, M32R2F_INSN_BNC24
, M32R2F_SFMT_BC24
, NOPAR
, NOPAR
},
82 { M32R_INSN_BNE
, M32R2F_INSN_BNE
, M32R2F_SFMT_BEQ
, NOPAR
, NOPAR
},
83 { M32R_INSN_BRA8
, M32R2F_INSN_BRA8
, M32R2F_SFMT_BRA8
, M32R2F_INSN_PAR_BRA8
, M32R2F_INSN_WRITE_BRA8
},
84 { M32R_INSN_BRA24
, M32R2F_INSN_BRA24
, M32R2F_SFMT_BRA24
, NOPAR
, NOPAR
},
85 { M32R_INSN_BNCL8
, M32R2F_INSN_BNCL8
, M32R2F_SFMT_BCL8
, M32R2F_INSN_PAR_BNCL8
, M32R2F_INSN_WRITE_BNCL8
},
86 { M32R_INSN_BNCL24
, M32R2F_INSN_BNCL24
, M32R2F_SFMT_BCL24
, NOPAR
, NOPAR
},
87 { M32R_INSN_CMP
, M32R2F_INSN_CMP
, M32R2F_SFMT_CMP
, M32R2F_INSN_PAR_CMP
, M32R2F_INSN_WRITE_CMP
},
88 { M32R_INSN_CMPI
, M32R2F_INSN_CMPI
, M32R2F_SFMT_CMPI
, NOPAR
, NOPAR
},
89 { M32R_INSN_CMPU
, M32R2F_INSN_CMPU
, M32R2F_SFMT_CMP
, M32R2F_INSN_PAR_CMPU
, M32R2F_INSN_WRITE_CMPU
},
90 { M32R_INSN_CMPUI
, M32R2F_INSN_CMPUI
, M32R2F_SFMT_CMPI
, NOPAR
, NOPAR
},
91 { M32R_INSN_CMPEQ
, M32R2F_INSN_CMPEQ
, M32R2F_SFMT_CMP
, M32R2F_INSN_PAR_CMPEQ
, M32R2F_INSN_WRITE_CMPEQ
},
92 { M32R_INSN_CMPZ
, M32R2F_INSN_CMPZ
, M32R2F_SFMT_CMPZ
, M32R2F_INSN_PAR_CMPZ
, M32R2F_INSN_WRITE_CMPZ
},
93 { M32R_INSN_DIV
, M32R2F_INSN_DIV
, M32R2F_SFMT_DIV
, NOPAR
, NOPAR
},
94 { M32R_INSN_DIVU
, M32R2F_INSN_DIVU
, M32R2F_SFMT_DIV
, NOPAR
, NOPAR
},
95 { M32R_INSN_REM
, M32R2F_INSN_REM
, M32R2F_SFMT_DIV
, NOPAR
, NOPAR
},
96 { M32R_INSN_REMU
, M32R2F_INSN_REMU
, M32R2F_SFMT_DIV
, NOPAR
, NOPAR
},
97 { M32R_INSN_REMH
, M32R2F_INSN_REMH
, M32R2F_SFMT_DIV
, NOPAR
, NOPAR
},
98 { M32R_INSN_REMUH
, M32R2F_INSN_REMUH
, M32R2F_SFMT_DIV
, NOPAR
, NOPAR
},
99 { M32R_INSN_REMB
, M32R2F_INSN_REMB
, M32R2F_SFMT_DIV
, NOPAR
, NOPAR
},
100 { M32R_INSN_REMUB
, M32R2F_INSN_REMUB
, M32R2F_SFMT_DIV
, NOPAR
, NOPAR
},
101 { M32R_INSN_DIVUH
, M32R2F_INSN_DIVUH
, M32R2F_SFMT_DIV
, NOPAR
, NOPAR
},
102 { M32R_INSN_DIVB
, M32R2F_INSN_DIVB
, M32R2F_SFMT_DIV
, NOPAR
, NOPAR
},
103 { M32R_INSN_DIVUB
, M32R2F_INSN_DIVUB
, M32R2F_SFMT_DIV
, NOPAR
, NOPAR
},
104 { M32R_INSN_DIVH
, M32R2F_INSN_DIVH
, M32R2F_SFMT_DIV
, NOPAR
, NOPAR
},
105 { M32R_INSN_JC
, M32R2F_INSN_JC
, M32R2F_SFMT_JC
, M32R2F_INSN_PAR_JC
, M32R2F_INSN_WRITE_JC
},
106 { M32R_INSN_JNC
, M32R2F_INSN_JNC
, M32R2F_SFMT_JC
, M32R2F_INSN_PAR_JNC
, M32R2F_INSN_WRITE_JNC
},
107 { M32R_INSN_JL
, M32R2F_INSN_JL
, M32R2F_SFMT_JL
, M32R2F_INSN_PAR_JL
, M32R2F_INSN_WRITE_JL
},
108 { M32R_INSN_JMP
, M32R2F_INSN_JMP
, M32R2F_SFMT_JMP
, M32R2F_INSN_PAR_JMP
, M32R2F_INSN_WRITE_JMP
},
109 { M32R_INSN_LD
, M32R2F_INSN_LD
, M32R2F_SFMT_LD
, M32R2F_INSN_PAR_LD
, M32R2F_INSN_WRITE_LD
},
110 { M32R_INSN_LD_D
, M32R2F_INSN_LD_D
, M32R2F_SFMT_LD_D
, NOPAR
, NOPAR
},
111 { M32R_INSN_LDB
, M32R2F_INSN_LDB
, M32R2F_SFMT_LDB
, M32R2F_INSN_PAR_LDB
, M32R2F_INSN_WRITE_LDB
},
112 { M32R_INSN_LDB_D
, M32R2F_INSN_LDB_D
, M32R2F_SFMT_LDB_D
, NOPAR
, NOPAR
},
113 { M32R_INSN_LDH
, M32R2F_INSN_LDH
, M32R2F_SFMT_LDH
, M32R2F_INSN_PAR_LDH
, M32R2F_INSN_WRITE_LDH
},
114 { M32R_INSN_LDH_D
, M32R2F_INSN_LDH_D
, M32R2F_SFMT_LDH_D
, NOPAR
, NOPAR
},
115 { M32R_INSN_LDUB
, M32R2F_INSN_LDUB
, M32R2F_SFMT_LDB
, M32R2F_INSN_PAR_LDUB
, M32R2F_INSN_WRITE_LDUB
},
116 { M32R_INSN_LDUB_D
, M32R2F_INSN_LDUB_D
, M32R2F_SFMT_LDB_D
, NOPAR
, NOPAR
},
117 { M32R_INSN_LDUH
, M32R2F_INSN_LDUH
, M32R2F_SFMT_LDH
, M32R2F_INSN_PAR_LDUH
, M32R2F_INSN_WRITE_LDUH
},
118 { M32R_INSN_LDUH_D
, M32R2F_INSN_LDUH_D
, M32R2F_SFMT_LDH_D
, NOPAR
, NOPAR
},
119 { M32R_INSN_LD_PLUS
, M32R2F_INSN_LD_PLUS
, M32R2F_SFMT_LD_PLUS
, M32R2F_INSN_PAR_LD_PLUS
, M32R2F_INSN_WRITE_LD_PLUS
},
120 { M32R_INSN_LD24
, M32R2F_INSN_LD24
, M32R2F_SFMT_LD24
, NOPAR
, NOPAR
},
121 { M32R_INSN_LDI8
, M32R2F_INSN_LDI8
, M32R2F_SFMT_LDI8
, M32R2F_INSN_PAR_LDI8
, M32R2F_INSN_WRITE_LDI8
},
122 { M32R_INSN_LDI16
, M32R2F_INSN_LDI16
, M32R2F_SFMT_LDI16
, NOPAR
, NOPAR
},
123 { M32R_INSN_LOCK
, M32R2F_INSN_LOCK
, M32R2F_SFMT_LOCK
, M32R2F_INSN_PAR_LOCK
, M32R2F_INSN_WRITE_LOCK
},
124 { M32R_INSN_MACHI_A
, M32R2F_INSN_MACHI_A
, M32R2F_SFMT_MACHI_A
, M32R2F_INSN_PAR_MACHI_A
, M32R2F_INSN_WRITE_MACHI_A
},
125 { M32R_INSN_MACLO_A
, M32R2F_INSN_MACLO_A
, M32R2F_SFMT_MACHI_A
, M32R2F_INSN_PAR_MACLO_A
, M32R2F_INSN_WRITE_MACLO_A
},
126 { M32R_INSN_MACWHI_A
, M32R2F_INSN_MACWHI_A
, M32R2F_SFMT_MACHI_A
, M32R2F_INSN_PAR_MACWHI_A
, M32R2F_INSN_WRITE_MACWHI_A
},
127 { M32R_INSN_MACWLO_A
, M32R2F_INSN_MACWLO_A
, M32R2F_SFMT_MACHI_A
, M32R2F_INSN_PAR_MACWLO_A
, M32R2F_INSN_WRITE_MACWLO_A
},
128 { M32R_INSN_MUL
, M32R2F_INSN_MUL
, M32R2F_SFMT_ADD
, M32R2F_INSN_PAR_MUL
, M32R2F_INSN_WRITE_MUL
},
129 { M32R_INSN_MULHI_A
, M32R2F_INSN_MULHI_A
, M32R2F_SFMT_MULHI_A
, M32R2F_INSN_PAR_MULHI_A
, M32R2F_INSN_WRITE_MULHI_A
},
130 { M32R_INSN_MULLO_A
, M32R2F_INSN_MULLO_A
, M32R2F_SFMT_MULHI_A
, M32R2F_INSN_PAR_MULLO_A
, M32R2F_INSN_WRITE_MULLO_A
},
131 { M32R_INSN_MULWHI_A
, M32R2F_INSN_MULWHI_A
, M32R2F_SFMT_MULHI_A
, M32R2F_INSN_PAR_MULWHI_A
, M32R2F_INSN_WRITE_MULWHI_A
},
132 { M32R_INSN_MULWLO_A
, M32R2F_INSN_MULWLO_A
, M32R2F_SFMT_MULHI_A
, M32R2F_INSN_PAR_MULWLO_A
, M32R2F_INSN_WRITE_MULWLO_A
},
133 { M32R_INSN_MV
, M32R2F_INSN_MV
, M32R2F_SFMT_MV
, M32R2F_INSN_PAR_MV
, M32R2F_INSN_WRITE_MV
},
134 { M32R_INSN_MVFACHI_A
, M32R2F_INSN_MVFACHI_A
, M32R2F_SFMT_MVFACHI_A
, M32R2F_INSN_PAR_MVFACHI_A
, M32R2F_INSN_WRITE_MVFACHI_A
},
135 { M32R_INSN_MVFACLO_A
, M32R2F_INSN_MVFACLO_A
, M32R2F_SFMT_MVFACHI_A
, M32R2F_INSN_PAR_MVFACLO_A
, M32R2F_INSN_WRITE_MVFACLO_A
},
136 { M32R_INSN_MVFACMI_A
, M32R2F_INSN_MVFACMI_A
, M32R2F_SFMT_MVFACHI_A
, M32R2F_INSN_PAR_MVFACMI_A
, M32R2F_INSN_WRITE_MVFACMI_A
},
137 { M32R_INSN_MVFC
, M32R2F_INSN_MVFC
, M32R2F_SFMT_MVFC
, M32R2F_INSN_PAR_MVFC
, M32R2F_INSN_WRITE_MVFC
},
138 { M32R_INSN_MVTACHI_A
, M32R2F_INSN_MVTACHI_A
, M32R2F_SFMT_MVTACHI_A
, M32R2F_INSN_PAR_MVTACHI_A
, M32R2F_INSN_WRITE_MVTACHI_A
},
139 { M32R_INSN_MVTACLO_A
, M32R2F_INSN_MVTACLO_A
, M32R2F_SFMT_MVTACHI_A
, M32R2F_INSN_PAR_MVTACLO_A
, M32R2F_INSN_WRITE_MVTACLO_A
},
140 { M32R_INSN_MVTC
, M32R2F_INSN_MVTC
, M32R2F_SFMT_MVTC
, M32R2F_INSN_PAR_MVTC
, M32R2F_INSN_WRITE_MVTC
},
141 { M32R_INSN_NEG
, M32R2F_INSN_NEG
, M32R2F_SFMT_MV
, M32R2F_INSN_PAR_NEG
, M32R2F_INSN_WRITE_NEG
},
142 { M32R_INSN_NOP
, M32R2F_INSN_NOP
, M32R2F_SFMT_NOP
, M32R2F_INSN_PAR_NOP
, M32R2F_INSN_WRITE_NOP
},
143 { M32R_INSN_NOT
, M32R2F_INSN_NOT
, M32R2F_SFMT_MV
, M32R2F_INSN_PAR_NOT
, M32R2F_INSN_WRITE_NOT
},
144 { M32R_INSN_RAC_DSI
, M32R2F_INSN_RAC_DSI
, M32R2F_SFMT_RAC_DSI
, M32R2F_INSN_PAR_RAC_DSI
, M32R2F_INSN_WRITE_RAC_DSI
},
145 { M32R_INSN_RACH_DSI
, M32R2F_INSN_RACH_DSI
, M32R2F_SFMT_RAC_DSI
, M32R2F_INSN_PAR_RACH_DSI
, M32R2F_INSN_WRITE_RACH_DSI
},
146 { M32R_INSN_RTE
, M32R2F_INSN_RTE
, M32R2F_SFMT_RTE
, M32R2F_INSN_PAR_RTE
, M32R2F_INSN_WRITE_RTE
},
147 { M32R_INSN_SETH
, M32R2F_INSN_SETH
, M32R2F_SFMT_SETH
, NOPAR
, NOPAR
},
148 { M32R_INSN_SLL
, M32R2F_INSN_SLL
, M32R2F_SFMT_ADD
, M32R2F_INSN_PAR_SLL
, M32R2F_INSN_WRITE_SLL
},
149 { M32R_INSN_SLL3
, M32R2F_INSN_SLL3
, M32R2F_SFMT_SLL3
, NOPAR
, NOPAR
},
150 { M32R_INSN_SLLI
, M32R2F_INSN_SLLI
, M32R2F_SFMT_SLLI
, M32R2F_INSN_PAR_SLLI
, M32R2F_INSN_WRITE_SLLI
},
151 { M32R_INSN_SRA
, M32R2F_INSN_SRA
, M32R2F_SFMT_ADD
, M32R2F_INSN_PAR_SRA
, M32R2F_INSN_WRITE_SRA
},
152 { M32R_INSN_SRA3
, M32R2F_INSN_SRA3
, M32R2F_SFMT_SLL3
, NOPAR
, NOPAR
},
153 { M32R_INSN_SRAI
, M32R2F_INSN_SRAI
, M32R2F_SFMT_SLLI
, M32R2F_INSN_PAR_SRAI
, M32R2F_INSN_WRITE_SRAI
},
154 { M32R_INSN_SRL
, M32R2F_INSN_SRL
, M32R2F_SFMT_ADD
, M32R2F_INSN_PAR_SRL
, M32R2F_INSN_WRITE_SRL
},
155 { M32R_INSN_SRL3
, M32R2F_INSN_SRL3
, M32R2F_SFMT_SLL3
, NOPAR
, NOPAR
},
156 { M32R_INSN_SRLI
, M32R2F_INSN_SRLI
, M32R2F_SFMT_SLLI
, M32R2F_INSN_PAR_SRLI
, M32R2F_INSN_WRITE_SRLI
},
157 { M32R_INSN_ST
, M32R2F_INSN_ST
, M32R2F_SFMT_ST
, M32R2F_INSN_PAR_ST
, M32R2F_INSN_WRITE_ST
},
158 { M32R_INSN_ST_D
, M32R2F_INSN_ST_D
, M32R2F_SFMT_ST_D
, NOPAR
, NOPAR
},
159 { M32R_INSN_STB
, M32R2F_INSN_STB
, M32R2F_SFMT_STB
, M32R2F_INSN_PAR_STB
, M32R2F_INSN_WRITE_STB
},
160 { M32R_INSN_STB_D
, M32R2F_INSN_STB_D
, M32R2F_SFMT_STB_D
, NOPAR
, NOPAR
},
161 { M32R_INSN_STH
, M32R2F_INSN_STH
, M32R2F_SFMT_STH
, M32R2F_INSN_PAR_STH
, M32R2F_INSN_WRITE_STH
},
162 { M32R_INSN_STH_D
, M32R2F_INSN_STH_D
, M32R2F_SFMT_STH_D
, NOPAR
, NOPAR
},
163 { M32R_INSN_ST_PLUS
, M32R2F_INSN_ST_PLUS
, M32R2F_SFMT_ST_PLUS
, M32R2F_INSN_PAR_ST_PLUS
, M32R2F_INSN_WRITE_ST_PLUS
},
164 { M32R_INSN_STH_PLUS
, M32R2F_INSN_STH_PLUS
, M32R2F_SFMT_STH_PLUS
, M32R2F_INSN_PAR_STH_PLUS
, M32R2F_INSN_WRITE_STH_PLUS
},
165 { M32R_INSN_STB_PLUS
, M32R2F_INSN_STB_PLUS
, M32R2F_SFMT_STB_PLUS
, M32R2F_INSN_PAR_STB_PLUS
, M32R2F_INSN_WRITE_STB_PLUS
},
166 { M32R_INSN_ST_MINUS
, M32R2F_INSN_ST_MINUS
, M32R2F_SFMT_ST_PLUS
, M32R2F_INSN_PAR_ST_MINUS
, M32R2F_INSN_WRITE_ST_MINUS
},
167 { M32R_INSN_SUB
, M32R2F_INSN_SUB
, M32R2F_SFMT_ADD
, M32R2F_INSN_PAR_SUB
, M32R2F_INSN_WRITE_SUB
},
168 { M32R_INSN_SUBV
, M32R2F_INSN_SUBV
, M32R2F_SFMT_ADDV
, M32R2F_INSN_PAR_SUBV
, M32R2F_INSN_WRITE_SUBV
},
169 { M32R_INSN_SUBX
, M32R2F_INSN_SUBX
, M32R2F_SFMT_ADDX
, M32R2F_INSN_PAR_SUBX
, M32R2F_INSN_WRITE_SUBX
},
170 { M32R_INSN_TRAP
, M32R2F_INSN_TRAP
, M32R2F_SFMT_TRAP
, M32R2F_INSN_PAR_TRAP
, M32R2F_INSN_WRITE_TRAP
},
171 { M32R_INSN_UNLOCK
, M32R2F_INSN_UNLOCK
, M32R2F_SFMT_UNLOCK
, M32R2F_INSN_PAR_UNLOCK
, M32R2F_INSN_WRITE_UNLOCK
},
172 { M32R_INSN_SATB
, M32R2F_INSN_SATB
, M32R2F_SFMT_SATB
, NOPAR
, NOPAR
},
173 { M32R_INSN_SATH
, M32R2F_INSN_SATH
, M32R2F_SFMT_SATB
, NOPAR
, NOPAR
},
174 { M32R_INSN_SAT
, M32R2F_INSN_SAT
, M32R2F_SFMT_SAT
, NOPAR
, NOPAR
},
175 { M32R_INSN_PCMPBZ
, M32R2F_INSN_PCMPBZ
, M32R2F_SFMT_CMPZ
, M32R2F_INSN_PAR_PCMPBZ
, M32R2F_INSN_WRITE_PCMPBZ
},
176 { M32R_INSN_SADD
, M32R2F_INSN_SADD
, M32R2F_SFMT_SADD
, M32R2F_INSN_PAR_SADD
, M32R2F_INSN_WRITE_SADD
},
177 { M32R_INSN_MACWU1
, M32R2F_INSN_MACWU1
, M32R2F_SFMT_MACWU1
, M32R2F_INSN_PAR_MACWU1
, M32R2F_INSN_WRITE_MACWU1
},
178 { M32R_INSN_MSBLO
, M32R2F_INSN_MSBLO
, M32R2F_SFMT_MSBLO
, M32R2F_INSN_PAR_MSBLO
, M32R2F_INSN_WRITE_MSBLO
},
179 { M32R_INSN_MULWU1
, M32R2F_INSN_MULWU1
, M32R2F_SFMT_MULWU1
, M32R2F_INSN_PAR_MULWU1
, M32R2F_INSN_WRITE_MULWU1
},
180 { M32R_INSN_MACLH1
, M32R2F_INSN_MACLH1
, M32R2F_SFMT_MACWU1
, M32R2F_INSN_PAR_MACLH1
, M32R2F_INSN_WRITE_MACLH1
},
181 { M32R_INSN_SC
, M32R2F_INSN_SC
, M32R2F_SFMT_SC
, M32R2F_INSN_PAR_SC
, M32R2F_INSN_WRITE_SC
},
182 { M32R_INSN_SNC
, M32R2F_INSN_SNC
, M32R2F_SFMT_SC
, M32R2F_INSN_PAR_SNC
, M32R2F_INSN_WRITE_SNC
},
183 { M32R_INSN_CLRPSW
, M32R2F_INSN_CLRPSW
, M32R2F_SFMT_CLRPSW
, M32R2F_INSN_PAR_CLRPSW
, M32R2F_INSN_WRITE_CLRPSW
},
184 { M32R_INSN_SETPSW
, M32R2F_INSN_SETPSW
, M32R2F_SFMT_SETPSW
, M32R2F_INSN_PAR_SETPSW
, M32R2F_INSN_WRITE_SETPSW
},
185 { M32R_INSN_BSET
, M32R2F_INSN_BSET
, M32R2F_SFMT_BSET
, NOPAR
, NOPAR
},
186 { M32R_INSN_BCLR
, M32R2F_INSN_BCLR
, M32R2F_SFMT_BSET
, NOPAR
, NOPAR
},
187 { M32R_INSN_BTST
, M32R2F_INSN_BTST
, M32R2F_SFMT_BTST
, M32R2F_INSN_PAR_BTST
, M32R2F_INSN_WRITE_BTST
},
190 static const struct insn_sem m32r2f_insn_sem_invalid
=
192 VIRTUAL_INSN_X_INVALID
, M32R2F_INSN_X_INVALID
, M32R2F_SFMT_EMPTY
, NOPAR
, NOPAR
195 /* Initialize an IDESC from the compile-time computable parts. */
198 init_idesc (SIM_CPU
*cpu
, IDESC
*id
, const struct insn_sem
*t
)
200 const CGEN_INSN
*insn_table
= CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu
))->init_entries
;
204 if ((int) t
->type
<= 0)
205 id
->idata
= & cgen_virtual_insn_table
[- (int) t
->type
];
207 id
->idata
= & insn_table
[t
->type
];
208 id
->attrs
= CGEN_INSN_ATTRS (id
->idata
);
209 /* Oh my god, a magic number. */
210 id
->length
= CGEN_INSN_BITSIZE (id
->idata
) / 8;
212 #if WITH_PROFILE_MODEL_P
213 id
->timing
= & MODEL_TIMING (CPU_MODEL (cpu
)) [t
->index
];
215 SIM_DESC sd
= CPU_STATE (cpu
);
216 SIM_ASSERT (t
->index
== id
->timing
->num
);
220 /* Semantic pointers are initialized elsewhere. */
223 /* Initialize the instruction descriptor table. */
226 m32r2f_init_idesc_table (SIM_CPU
*cpu
)
229 const struct insn_sem
*t
,*tend
;
230 int tabsize
= M32R2F_INSN__MAX
;
231 IDESC
*table
= m32r2f_insn_data
;
233 memset (table
, 0, tabsize
* sizeof (IDESC
));
235 /* First set all entries to the `invalid insn'. */
236 t
= & m32r2f_insn_sem_invalid
;
237 for (id
= table
, tabend
= table
+ tabsize
; id
< tabend
; ++id
)
238 init_idesc (cpu
, id
, t
);
240 /* Now fill in the values for the chosen cpu. */
241 for (t
= m32r2f_insn_sem
, tend
= t
+ ARRAY_SIZE (m32r2f_insn_sem
);
244 init_idesc (cpu
, & table
[t
->index
], t
);
245 if (t
->par_index
!= NOPAR
)
247 init_idesc (cpu
, &table
[t
->par_index
], t
);
248 table
[t
->index
].par_idesc
= &table
[t
->par_index
];
250 if (t
->par_index
!= NOPAR
)
252 init_idesc (cpu
, &table
[t
->write_index
], t
);
253 table
[t
->par_index
].par_idesc
= &table
[t
->write_index
];
257 /* Link the IDESC table into the cpu. */
258 CPU_IDESC (cpu
) = table
;
261 /* Given an instruction, return a pointer to its IDESC entry. */
264 m32r2f_decode (SIM_CPU
*current_cpu
, IADDR pc
,
265 CGEN_INSN_WORD base_insn
, CGEN_INSN_WORD entire_insn
,
268 /* Result of decoder. */
269 M32R2F_INSN_TYPE itype
;
272 CGEN_INSN_WORD insn
= base_insn
;
275 unsigned int val0
= (((insn
>> 8) & (15 << 4)) | ((insn
>> 4) & (15 << 0)));
278 case 0: itype
= M32R2F_INSN_SUBV
; goto extract_sfmt_addv
;
279 case 1: itype
= M32R2F_INSN_SUBX
; goto extract_sfmt_addx
;
280 case 2: itype
= M32R2F_INSN_SUB
; goto extract_sfmt_add
;
281 case 3: itype
= M32R2F_INSN_NEG
; goto extract_sfmt_mv
;
282 case 4: itype
= M32R2F_INSN_CMP
; goto extract_sfmt_cmp
;
283 case 5: itype
= M32R2F_INSN_CMPU
; goto extract_sfmt_cmp
;
284 case 6: itype
= M32R2F_INSN_CMPEQ
; goto extract_sfmt_cmp
;
287 unsigned int val1
= (((insn
>> 8) & (3 << 0)));
291 if ((entire_insn
& 0xfff0) == 0x70)
292 { itype
= M32R2F_INSN_CMPZ
; goto extract_sfmt_cmpz
; }
293 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
295 if ((entire_insn
& 0xfff0) == 0x370)
296 { itype
= M32R2F_INSN_PCMPBZ
; goto extract_sfmt_cmpz
; }
297 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
298 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
301 case 8: itype
= M32R2F_INSN_ADDV
; goto extract_sfmt_addv
;
302 case 9: itype
= M32R2F_INSN_ADDX
; goto extract_sfmt_addx
;
303 case 10: itype
= M32R2F_INSN_ADD
; goto extract_sfmt_add
;
304 case 11: itype
= M32R2F_INSN_NOT
; goto extract_sfmt_mv
;
305 case 12: itype
= M32R2F_INSN_AND
; goto extract_sfmt_add
;
306 case 13: itype
= M32R2F_INSN_XOR
; goto extract_sfmt_add
;
307 case 14: itype
= M32R2F_INSN_OR
; goto extract_sfmt_add
;
309 if ((entire_insn
& 0xf8f0) == 0xf0)
310 { itype
= M32R2F_INSN_BTST
; goto extract_sfmt_btst
; }
311 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
312 case 16: itype
= M32R2F_INSN_SRL
; goto extract_sfmt_add
;
313 case 18: itype
= M32R2F_INSN_SRA
; goto extract_sfmt_add
;
314 case 20: itype
= M32R2F_INSN_SLL
; goto extract_sfmt_add
;
315 case 22: itype
= M32R2F_INSN_MUL
; goto extract_sfmt_add
;
316 case 24: itype
= M32R2F_INSN_MV
; goto extract_sfmt_mv
;
317 case 25: itype
= M32R2F_INSN_MVFC
; goto extract_sfmt_mvfc
;
318 case 26: itype
= M32R2F_INSN_MVTC
; goto extract_sfmt_mvtc
;
321 unsigned int val1
= (((insn
>> 8) & (3 << 0)));
325 if ((entire_insn
& 0xfff0) == 0x1cc0)
326 { itype
= M32R2F_INSN_JC
; goto extract_sfmt_jc
; }
327 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
329 if ((entire_insn
& 0xfff0) == 0x1dc0)
330 { itype
= M32R2F_INSN_JNC
; goto extract_sfmt_jc
; }
331 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
333 if ((entire_insn
& 0xfff0) == 0x1ec0)
334 { itype
= M32R2F_INSN_JL
; goto extract_sfmt_jl
; }
335 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
337 if ((entire_insn
& 0xfff0) == 0x1fc0)
338 { itype
= M32R2F_INSN_JMP
; goto extract_sfmt_jmp
; }
339 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
340 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
344 if ((entire_insn
& 0xffff) == 0x10d6)
345 { itype
= M32R2F_INSN_RTE
; goto extract_sfmt_rte
; }
346 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
348 if ((entire_insn
& 0xfff0) == 0x10f0)
349 { itype
= M32R2F_INSN_TRAP
; goto extract_sfmt_trap
; }
350 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
351 case 32: itype
= M32R2F_INSN_STB
; goto extract_sfmt_stb
;
352 case 33: itype
= M32R2F_INSN_STB_PLUS
; goto extract_sfmt_stb_plus
;
353 case 34: itype
= M32R2F_INSN_STH
; goto extract_sfmt_sth
;
354 case 35: itype
= M32R2F_INSN_STH_PLUS
; goto extract_sfmt_sth_plus
;
355 case 36: itype
= M32R2F_INSN_ST
; goto extract_sfmt_st
;
356 case 37: itype
= M32R2F_INSN_UNLOCK
; goto extract_sfmt_unlock
;
357 case 38: itype
= M32R2F_INSN_ST_PLUS
; goto extract_sfmt_st_plus
;
358 case 39: itype
= M32R2F_INSN_ST_MINUS
; goto extract_sfmt_st_plus
;
359 case 40: itype
= M32R2F_INSN_LDB
; goto extract_sfmt_ldb
;
360 case 41: itype
= M32R2F_INSN_LDUB
; goto extract_sfmt_ldb
;
361 case 42: itype
= M32R2F_INSN_LDH
; goto extract_sfmt_ldh
;
362 case 43: itype
= M32R2F_INSN_LDUH
; goto extract_sfmt_ldh
;
363 case 44: itype
= M32R2F_INSN_LD
; goto extract_sfmt_ld
;
364 case 45: itype
= M32R2F_INSN_LOCK
; goto extract_sfmt_lock
;
365 case 46: itype
= M32R2F_INSN_LD_PLUS
; goto extract_sfmt_ld_plus
;
367 case 56: itype
= M32R2F_INSN_MULHI_A
; goto extract_sfmt_mulhi_a
;
369 case 57: itype
= M32R2F_INSN_MULLO_A
; goto extract_sfmt_mulhi_a
;
371 case 58: itype
= M32R2F_INSN_MULWHI_A
; goto extract_sfmt_mulhi_a
;
373 case 59: itype
= M32R2F_INSN_MULWLO_A
; goto extract_sfmt_mulhi_a
;
375 case 60: itype
= M32R2F_INSN_MACHI_A
; goto extract_sfmt_machi_a
;
377 case 61: itype
= M32R2F_INSN_MACLO_A
; goto extract_sfmt_machi_a
;
379 case 62: itype
= M32R2F_INSN_MACWHI_A
; goto extract_sfmt_machi_a
;
381 case 63: itype
= M32R2F_INSN_MACWLO_A
; goto extract_sfmt_machi_a
;
397 case 79: itype
= M32R2F_INSN_ADDI
; goto extract_sfmt_addi
;
399 case 81: itype
= M32R2F_INSN_SRLI
; goto extract_sfmt_slli
;
401 case 83: itype
= M32R2F_INSN_SRAI
; goto extract_sfmt_slli
;
403 case 85: itype
= M32R2F_INSN_SLLI
; goto extract_sfmt_slli
;
406 unsigned int val1
= (((insn
>> 0) & (1 << 0)));
410 if ((entire_insn
& 0xf0f3) == 0x5070)
411 { itype
= M32R2F_INSN_MVTACHI_A
; goto extract_sfmt_mvtachi_a
; }
412 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
414 if ((entire_insn
& 0xf0f3) == 0x5071)
415 { itype
= M32R2F_INSN_MVTACLO_A
; goto extract_sfmt_mvtachi_a
; }
416 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
417 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
421 if ((entire_insn
& 0xf3f2) == 0x5080)
422 { itype
= M32R2F_INSN_RACH_DSI
; goto extract_sfmt_rac_dsi
; }
423 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
425 if ((entire_insn
& 0xf3f2) == 0x5090)
426 { itype
= M32R2F_INSN_RAC_DSI
; goto extract_sfmt_rac_dsi
; }
427 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
428 case 90: itype
= M32R2F_INSN_MULWU1
; goto extract_sfmt_mulwu1
;
429 case 91: itype
= M32R2F_INSN_MACWU1
; goto extract_sfmt_macwu1
;
430 case 92: itype
= M32R2F_INSN_MACLH1
; goto extract_sfmt_macwu1
;
431 case 93: itype
= M32R2F_INSN_MSBLO
; goto extract_sfmt_msblo
;
433 if ((entire_insn
& 0xffff) == 0x50e4)
434 { itype
= M32R2F_INSN_SADD
; goto extract_sfmt_sadd
; }
435 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
438 unsigned int val1
= (((insn
>> 0) & (3 << 0)));
441 case 0: itype
= M32R2F_INSN_MVFACHI_A
; goto extract_sfmt_mvfachi_a
;
442 case 1: itype
= M32R2F_INSN_MVFACLO_A
; goto extract_sfmt_mvfachi_a
;
443 case 2: itype
= M32R2F_INSN_MVFACMI_A
; goto extract_sfmt_mvfachi_a
;
444 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
462 case 111: itype
= M32R2F_INSN_LDI8
; goto extract_sfmt_ldi8
;
465 unsigned int val1
= (((insn
>> 7) & (15 << 1)) | ((insn
>> 0) & (1 << 0)));
469 if ((entire_insn
& 0xffff) == 0x7000)
470 { itype
= M32R2F_INSN_NOP
; goto extract_sfmt_nop
; }
471 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
473 case 3: itype
= M32R2F_INSN_SETPSW
; goto extract_sfmt_setpsw
;
475 case 5: itype
= M32R2F_INSN_CLRPSW
; goto extract_sfmt_clrpsw
;
477 if ((entire_insn
& 0xffff) == 0x7401)
478 { itype
= M32R2F_INSN_SC
; goto extract_sfmt_sc
; }
479 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
481 if ((entire_insn
& 0xffff) == 0x7501)
482 { itype
= M32R2F_INSN_SNC
; goto extract_sfmt_sc
; }
483 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
485 case 17: itype
= M32R2F_INSN_BCL8
; goto extract_sfmt_bcl8
;
487 case 19: itype
= M32R2F_INSN_BNCL8
; goto extract_sfmt_bcl8
;
489 case 25: itype
= M32R2F_INSN_BC8
; goto extract_sfmt_bc8
;
491 case 27: itype
= M32R2F_INSN_BNC8
; goto extract_sfmt_bc8
;
493 case 29: itype
= M32R2F_INSN_BL8
; goto extract_sfmt_bl8
;
495 case 31: itype
= M32R2F_INSN_BRA8
; goto extract_sfmt_bra8
;
496 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
515 unsigned int val1
= (((insn
>> 8) & (15 << 0)));
518 case 1: itype
= M32R2F_INSN_SETPSW
; goto extract_sfmt_setpsw
;
519 case 2: itype
= M32R2F_INSN_CLRPSW
; goto extract_sfmt_clrpsw
;
520 case 8: itype
= M32R2F_INSN_BCL8
; goto extract_sfmt_bcl8
;
521 case 9: itype
= M32R2F_INSN_BNCL8
; goto extract_sfmt_bcl8
;
522 case 12: itype
= M32R2F_INSN_BC8
; goto extract_sfmt_bc8
;
523 case 13: itype
= M32R2F_INSN_BNC8
; goto extract_sfmt_bc8
;
524 case 14: itype
= M32R2F_INSN_BL8
; goto extract_sfmt_bl8
;
525 case 15: itype
= M32R2F_INSN_BRA8
; goto extract_sfmt_bra8
;
526 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
530 if ((entire_insn
& 0xfff00000) == 0x80400000)
531 { itype
= M32R2F_INSN_CMPI
; goto extract_sfmt_cmpi
; }
532 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
534 if ((entire_insn
& 0xfff00000) == 0x80500000)
535 { itype
= M32R2F_INSN_CMPUI
; goto extract_sfmt_cmpi
; }
536 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
539 unsigned int val1
= (((entire_insn
>> 8) & (3 << 0)));
543 if ((entire_insn
& 0xf0f0ffff) == 0x80600000)
544 { itype
= M32R2F_INSN_SAT
; goto extract_sfmt_sat
; }
545 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
547 if ((entire_insn
& 0xf0f0ffff) == 0x80600200)
548 { itype
= M32R2F_INSN_SATH
; goto extract_sfmt_satb
; }
549 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
551 if ((entire_insn
& 0xf0f0ffff) == 0x80600300)
552 { itype
= M32R2F_INSN_SATB
; goto extract_sfmt_satb
; }
553 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
554 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
557 case 136: itype
= M32R2F_INSN_ADDV3
; goto extract_sfmt_addv3
;
558 case 138: itype
= M32R2F_INSN_ADD3
; goto extract_sfmt_add3
;
559 case 140: itype
= M32R2F_INSN_AND3
; goto extract_sfmt_and3
;
560 case 141: itype
= M32R2F_INSN_XOR3
; goto extract_sfmt_and3
;
561 case 142: itype
= M32R2F_INSN_OR3
; goto extract_sfmt_or3
;
564 unsigned int val1
= (((entire_insn
>> 3) & (3 << 0)));
568 if ((entire_insn
& 0xf0f0ffff) == 0x90000000)
569 { itype
= M32R2F_INSN_DIV
; goto extract_sfmt_div
; }
570 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
572 if ((entire_insn
& 0xf0f0ffff) == 0x90000010)
573 { itype
= M32R2F_INSN_DIVH
; goto extract_sfmt_div
; }
574 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
576 if ((entire_insn
& 0xf0f0ffff) == 0x90000018)
577 { itype
= M32R2F_INSN_DIVB
; goto extract_sfmt_div
; }
578 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
579 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
584 unsigned int val1
= (((entire_insn
>> 3) & (3 << 0)));
588 if ((entire_insn
& 0xf0f0ffff) == 0x90100000)
589 { itype
= M32R2F_INSN_DIVU
; goto extract_sfmt_div
; }
590 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
592 if ((entire_insn
& 0xf0f0ffff) == 0x90100010)
593 { itype
= M32R2F_INSN_DIVUH
; goto extract_sfmt_div
; }
594 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
596 if ((entire_insn
& 0xf0f0ffff) == 0x90100018)
597 { itype
= M32R2F_INSN_DIVUB
; goto extract_sfmt_div
; }
598 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
599 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
604 unsigned int val1
= (((entire_insn
>> 3) & (3 << 0)));
608 if ((entire_insn
& 0xf0f0ffff) == 0x90200000)
609 { itype
= M32R2F_INSN_REM
; goto extract_sfmt_div
; }
610 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
612 if ((entire_insn
& 0xf0f0ffff) == 0x90200010)
613 { itype
= M32R2F_INSN_REMH
; goto extract_sfmt_div
; }
614 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
616 if ((entire_insn
& 0xf0f0ffff) == 0x90200018)
617 { itype
= M32R2F_INSN_REMB
; goto extract_sfmt_div
; }
618 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
619 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
624 unsigned int val1
= (((entire_insn
>> 3) & (3 << 0)));
628 if ((entire_insn
& 0xf0f0ffff) == 0x90300000)
629 { itype
= M32R2F_INSN_REMU
; goto extract_sfmt_div
; }
630 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
632 if ((entire_insn
& 0xf0f0ffff) == 0x90300010)
633 { itype
= M32R2F_INSN_REMUH
; goto extract_sfmt_div
; }
634 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
636 if ((entire_insn
& 0xf0f0ffff) == 0x90300018)
637 { itype
= M32R2F_INSN_REMUB
; goto extract_sfmt_div
; }
638 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
639 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
642 case 152: itype
= M32R2F_INSN_SRL3
; goto extract_sfmt_sll3
;
643 case 154: itype
= M32R2F_INSN_SRA3
; goto extract_sfmt_sll3
;
644 case 156: itype
= M32R2F_INSN_SLL3
; goto extract_sfmt_sll3
;
646 if ((entire_insn
& 0xf0ff0000) == 0x90f00000)
647 { itype
= M32R2F_INSN_LDI16
; goto extract_sfmt_ldi16
; }
648 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
649 case 160: itype
= M32R2F_INSN_STB_D
; goto extract_sfmt_stb_d
;
650 case 162: itype
= M32R2F_INSN_STH_D
; goto extract_sfmt_sth_d
;
651 case 164: itype
= M32R2F_INSN_ST_D
; goto extract_sfmt_st_d
;
653 if ((entire_insn
& 0xf8f00000) == 0xa0600000)
654 { itype
= M32R2F_INSN_BSET
; goto extract_sfmt_bset
; }
655 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
657 if ((entire_insn
& 0xf8f00000) == 0xa0700000)
658 { itype
= M32R2F_INSN_BCLR
; goto extract_sfmt_bset
; }
659 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
660 case 168: itype
= M32R2F_INSN_LDB_D
; goto extract_sfmt_ldb_d
;
661 case 169: itype
= M32R2F_INSN_LDUB_D
; goto extract_sfmt_ldb_d
;
662 case 170: itype
= M32R2F_INSN_LDH_D
; goto extract_sfmt_ldh_d
;
663 case 171: itype
= M32R2F_INSN_LDUH_D
; goto extract_sfmt_ldh_d
;
664 case 172: itype
= M32R2F_INSN_LD_D
; goto extract_sfmt_ld_d
;
665 case 176: itype
= M32R2F_INSN_BEQ
; goto extract_sfmt_beq
;
666 case 177: itype
= M32R2F_INSN_BNE
; goto extract_sfmt_beq
;
668 if ((entire_insn
& 0xfff00000) == 0xb0800000)
669 { itype
= M32R2F_INSN_BEQZ
; goto extract_sfmt_beqz
; }
670 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
672 if ((entire_insn
& 0xfff00000) == 0xb0900000)
673 { itype
= M32R2F_INSN_BNEZ
; goto extract_sfmt_beqz
; }
674 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
676 if ((entire_insn
& 0xfff00000) == 0xb0a00000)
677 { itype
= M32R2F_INSN_BLTZ
; goto extract_sfmt_beqz
; }
678 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
680 if ((entire_insn
& 0xfff00000) == 0xb0b00000)
681 { itype
= M32R2F_INSN_BGEZ
; goto extract_sfmt_beqz
; }
682 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
684 if ((entire_insn
& 0xfff00000) == 0xb0c00000)
685 { itype
= M32R2F_INSN_BLEZ
; goto extract_sfmt_beqz
; }
686 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
688 if ((entire_insn
& 0xfff00000) == 0xb0d00000)
689 { itype
= M32R2F_INSN_BGTZ
; goto extract_sfmt_beqz
; }
690 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
692 if ((entire_insn
& 0xf0ff0000) == 0xd0c00000)
693 { itype
= M32R2F_INSN_SETH
; goto extract_sfmt_seth
; }
694 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
710 case 239: itype
= M32R2F_INSN_LD24
; goto extract_sfmt_ld24
;
728 unsigned int val1
= (((insn
>> 8) & (7 << 0)));
732 if ((entire_insn
& 0xff000000) == 0xf8000000)
733 { itype
= M32R2F_INSN_BCL24
; goto extract_sfmt_bcl24
; }
734 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
736 if ((entire_insn
& 0xff000000) == 0xf9000000)
737 { itype
= M32R2F_INSN_BNCL24
; goto extract_sfmt_bcl24
; }
738 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
740 if ((entire_insn
& 0xff000000) == 0xfc000000)
741 { itype
= M32R2F_INSN_BC24
; goto extract_sfmt_bc24
; }
742 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
744 if ((entire_insn
& 0xff000000) == 0xfd000000)
745 { itype
= M32R2F_INSN_BNC24
; goto extract_sfmt_bc24
; }
746 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
748 if ((entire_insn
& 0xff000000) == 0xfe000000)
749 { itype
= M32R2F_INSN_BL24
; goto extract_sfmt_bl24
; }
750 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
752 if ((entire_insn
& 0xff000000) == 0xff000000)
753 { itype
= M32R2F_INSN_BRA24
; goto extract_sfmt_bra24
; }
754 itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
755 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
758 default: itype
= M32R2F_INSN_X_INVALID
; goto extract_sfmt_empty
;
763 /* The instruction has been decoded, now extract the fields. */
767 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
768 #define FLD(f) abuf->fields.sfmt_empty.f
771 /* Record the fields for the semantic handler. */
772 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_empty", (char *) 0));
780 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
781 CGEN_INSN_WORD insn
= entire_insn
;
782 #define FLD(f) abuf->fields.sfmt_add.f
786 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
787 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
789 /* Record the fields for the semantic handler. */
792 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
793 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
794 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_add", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
796 #if WITH_PROFILE_MODEL_P
797 /* Record the fields for profiling. */
798 if (PROFILE_MODEL_P (current_cpu
))
811 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
812 CGEN_INSN_WORD insn
= entire_insn
;
813 #define FLD(f) abuf->fields.sfmt_add3.f
818 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
819 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
820 f_simm16
= EXTRACT_MSB0_SINT (insn
, 32, 16, 16);
822 /* Record the fields for the semantic handler. */
823 FLD (f_simm16
) = f_simm16
;
826 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
827 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
828 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_add3", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
830 #if WITH_PROFILE_MODEL_P
831 /* Record the fields for profiling. */
832 if (PROFILE_MODEL_P (current_cpu
))
844 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
845 CGEN_INSN_WORD insn
= entire_insn
;
846 #define FLD(f) abuf->fields.sfmt_and3.f
851 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
852 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
853 f_uimm16
= EXTRACT_MSB0_UINT (insn
, 32, 16, 16);
855 /* Record the fields for the semantic handler. */
857 FLD (f_uimm16
) = f_uimm16
;
859 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
860 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
861 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_and3", "f_r2 0x%x", 'x', f_r2
, "f_uimm16 0x%x", 'x', f_uimm16
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
863 #if WITH_PROFILE_MODEL_P
864 /* Record the fields for profiling. */
865 if (PROFILE_MODEL_P (current_cpu
))
877 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
878 CGEN_INSN_WORD insn
= entire_insn
;
879 #define FLD(f) abuf->fields.sfmt_and3.f
884 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
885 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
886 f_uimm16
= EXTRACT_MSB0_UINT (insn
, 32, 16, 16);
888 /* Record the fields for the semantic handler. */
890 FLD (f_uimm16
) = f_uimm16
;
892 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
893 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
894 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_or3", "f_r2 0x%x", 'x', f_r2
, "f_uimm16 0x%x", 'x', f_uimm16
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
896 #if WITH_PROFILE_MODEL_P
897 /* Record the fields for profiling. */
898 if (PROFILE_MODEL_P (current_cpu
))
910 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
911 CGEN_INSN_WORD insn
= entire_insn
;
912 #define FLD(f) abuf->fields.sfmt_addi.f
916 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
917 f_simm8
= EXTRACT_MSB0_SINT (insn
, 16, 8, 8);
919 /* Record the fields for the semantic handler. */
921 FLD (f_simm8
) = f_simm8
;
922 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
923 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_addi", "f_r1 0x%x", 'x', f_r1
, "f_simm8 0x%x", 'x', f_simm8
, "dr 0x%x", 'x', f_r1
, (char *) 0));
925 #if WITH_PROFILE_MODEL_P
926 /* Record the fields for profiling. */
927 if (PROFILE_MODEL_P (current_cpu
))
939 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
940 CGEN_INSN_WORD insn
= entire_insn
;
941 #define FLD(f) abuf->fields.sfmt_add.f
945 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
946 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
948 /* Record the fields for the semantic handler. */
951 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
952 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
953 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_addv", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
955 #if WITH_PROFILE_MODEL_P
956 /* Record the fields for profiling. */
957 if (PROFILE_MODEL_P (current_cpu
))
970 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
971 CGEN_INSN_WORD insn
= entire_insn
;
972 #define FLD(f) abuf->fields.sfmt_add3.f
977 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
978 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
979 f_simm16
= EXTRACT_MSB0_SINT (insn
, 32, 16, 16);
981 /* Record the fields for the semantic handler. */
982 FLD (f_simm16
) = f_simm16
;
985 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
986 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
987 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_addv3", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
989 #if WITH_PROFILE_MODEL_P
990 /* Record the fields for profiling. */
991 if (PROFILE_MODEL_P (current_cpu
))
1003 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1004 CGEN_INSN_WORD insn
= entire_insn
;
1005 #define FLD(f) abuf->fields.sfmt_add.f
1009 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1010 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1012 /* Record the fields for the semantic handler. */
1015 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1016 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1017 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_addx", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
1019 #if WITH_PROFILE_MODEL_P
1020 /* Record the fields for profiling. */
1021 if (PROFILE_MODEL_P (current_cpu
))
1025 FLD (out_dr
) = f_r1
;
1034 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1035 CGEN_INSN_WORD insn
= entire_insn
;
1036 #define FLD(f) abuf->fields.sfmt_bl8.f
1039 f_disp8
= ((((EXTRACT_MSB0_SINT (insn
, 16, 8, 8)) * (4))) + (((pc
) & (-4))));
1041 /* Record the fields for the semantic handler. */
1042 FLD (i_disp8
) = f_disp8
;
1043 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bc8", "disp8 0x%x", 'x', f_disp8
, (char *) 0));
1045 #if WITH_PROFILE_MODEL_P
1046 /* Record the fields for profiling. */
1047 if (PROFILE_MODEL_P (current_cpu
))
1057 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1058 CGEN_INSN_WORD insn
= entire_insn
;
1059 #define FLD(f) abuf->fields.sfmt_bl24.f
1062 f_disp24
= ((((EXTRACT_MSB0_SINT (insn
, 32, 8, 24)) * (4))) + (pc
));
1064 /* Record the fields for the semantic handler. */
1065 FLD (i_disp24
) = f_disp24
;
1066 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bc24", "disp24 0x%x", 'x', f_disp24
, (char *) 0));
1068 #if WITH_PROFILE_MODEL_P
1069 /* Record the fields for profiling. */
1070 if (PROFILE_MODEL_P (current_cpu
))
1080 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1081 CGEN_INSN_WORD insn
= entire_insn
;
1082 #define FLD(f) abuf->fields.sfmt_beq.f
1087 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1088 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1089 f_disp16
= ((((EXTRACT_MSB0_SINT (insn
, 32, 16, 16)) * (4))) + (pc
));
1091 /* Record the fields for the semantic handler. */
1094 FLD (i_disp16
) = f_disp16
;
1095 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1096 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1097 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_beq", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "disp16 0x%x", 'x', f_disp16
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1099 #if WITH_PROFILE_MODEL_P
1100 /* Record the fields for profiling. */
1101 if (PROFILE_MODEL_P (current_cpu
))
1103 FLD (in_src1
) = f_r1
;
1104 FLD (in_src2
) = f_r2
;
1113 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1114 CGEN_INSN_WORD insn
= entire_insn
;
1115 #define FLD(f) abuf->fields.sfmt_beq.f
1119 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1120 f_disp16
= ((((EXTRACT_MSB0_SINT (insn
, 32, 16, 16)) * (4))) + (pc
));
1122 /* Record the fields for the semantic handler. */
1124 FLD (i_disp16
) = f_disp16
;
1125 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1126 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_beqz", "f_r2 0x%x", 'x', f_r2
, "disp16 0x%x", 'x', f_disp16
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1128 #if WITH_PROFILE_MODEL_P
1129 /* Record the fields for profiling. */
1130 if (PROFILE_MODEL_P (current_cpu
))
1132 FLD (in_src2
) = f_r2
;
1141 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1142 CGEN_INSN_WORD insn
= entire_insn
;
1143 #define FLD(f) abuf->fields.sfmt_bl8.f
1146 f_disp8
= ((((EXTRACT_MSB0_SINT (insn
, 16, 8, 8)) * (4))) + (((pc
) & (-4))));
1148 /* Record the fields for the semantic handler. */
1149 FLD (i_disp8
) = f_disp8
;
1150 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bl8", "disp8 0x%x", 'x', f_disp8
, (char *) 0));
1152 #if WITH_PROFILE_MODEL_P
1153 /* Record the fields for profiling. */
1154 if (PROFILE_MODEL_P (current_cpu
))
1156 FLD (out_h_gr_SI_14
) = 14;
1165 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1166 CGEN_INSN_WORD insn
= entire_insn
;
1167 #define FLD(f) abuf->fields.sfmt_bl24.f
1170 f_disp24
= ((((EXTRACT_MSB0_SINT (insn
, 32, 8, 24)) * (4))) + (pc
));
1172 /* Record the fields for the semantic handler. */
1173 FLD (i_disp24
) = f_disp24
;
1174 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bl24", "disp24 0x%x", 'x', f_disp24
, (char *) 0));
1176 #if WITH_PROFILE_MODEL_P
1177 /* Record the fields for profiling. */
1178 if (PROFILE_MODEL_P (current_cpu
))
1180 FLD (out_h_gr_SI_14
) = 14;
1189 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1190 CGEN_INSN_WORD insn
= entire_insn
;
1191 #define FLD(f) abuf->fields.sfmt_bl8.f
1194 f_disp8
= ((((EXTRACT_MSB0_SINT (insn
, 16, 8, 8)) * (4))) + (((pc
) & (-4))));
1196 /* Record the fields for the semantic handler. */
1197 FLD (i_disp8
) = f_disp8
;
1198 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bcl8", "disp8 0x%x", 'x', f_disp8
, (char *) 0));
1200 #if WITH_PROFILE_MODEL_P
1201 /* Record the fields for profiling. */
1202 if (PROFILE_MODEL_P (current_cpu
))
1204 FLD (out_h_gr_SI_14
) = 14;
1213 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1214 CGEN_INSN_WORD insn
= entire_insn
;
1215 #define FLD(f) abuf->fields.sfmt_bl24.f
1218 f_disp24
= ((((EXTRACT_MSB0_SINT (insn
, 32, 8, 24)) * (4))) + (pc
));
1220 /* Record the fields for the semantic handler. */
1221 FLD (i_disp24
) = f_disp24
;
1222 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bcl24", "disp24 0x%x", 'x', f_disp24
, (char *) 0));
1224 #if WITH_PROFILE_MODEL_P
1225 /* Record the fields for profiling. */
1226 if (PROFILE_MODEL_P (current_cpu
))
1228 FLD (out_h_gr_SI_14
) = 14;
1237 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1238 CGEN_INSN_WORD insn
= entire_insn
;
1239 #define FLD(f) abuf->fields.sfmt_bl8.f
1242 f_disp8
= ((((EXTRACT_MSB0_SINT (insn
, 16, 8, 8)) * (4))) + (((pc
) & (-4))));
1244 /* Record the fields for the semantic handler. */
1245 FLD (i_disp8
) = f_disp8
;
1246 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bra8", "disp8 0x%x", 'x', f_disp8
, (char *) 0));
1248 #if WITH_PROFILE_MODEL_P
1249 /* Record the fields for profiling. */
1250 if (PROFILE_MODEL_P (current_cpu
))
1260 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1261 CGEN_INSN_WORD insn
= entire_insn
;
1262 #define FLD(f) abuf->fields.sfmt_bl24.f
1265 f_disp24
= ((((EXTRACT_MSB0_SINT (insn
, 32, 8, 24)) * (4))) + (pc
));
1267 /* Record the fields for the semantic handler. */
1268 FLD (i_disp24
) = f_disp24
;
1269 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bra24", "disp24 0x%x", 'x', f_disp24
, (char *) 0));
1271 #if WITH_PROFILE_MODEL_P
1272 /* Record the fields for profiling. */
1273 if (PROFILE_MODEL_P (current_cpu
))
1283 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1284 CGEN_INSN_WORD insn
= entire_insn
;
1285 #define FLD(f) abuf->fields.sfmt_st_plus.f
1289 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1290 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1292 /* Record the fields for the semantic handler. */
1295 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1296 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1297 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_cmp", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1299 #if WITH_PROFILE_MODEL_P
1300 /* Record the fields for profiling. */
1301 if (PROFILE_MODEL_P (current_cpu
))
1303 FLD (in_src1
) = f_r1
;
1304 FLD (in_src2
) = f_r2
;
1313 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1314 CGEN_INSN_WORD insn
= entire_insn
;
1315 #define FLD(f) abuf->fields.sfmt_st_d.f
1319 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1320 f_simm16
= EXTRACT_MSB0_SINT (insn
, 32, 16, 16);
1322 /* Record the fields for the semantic handler. */
1323 FLD (f_simm16
) = f_simm16
;
1325 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1326 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_cmpi", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1328 #if WITH_PROFILE_MODEL_P
1329 /* Record the fields for profiling. */
1330 if (PROFILE_MODEL_P (current_cpu
))
1332 FLD (in_src2
) = f_r2
;
1341 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1342 CGEN_INSN_WORD insn
= entire_insn
;
1343 #define FLD(f) abuf->fields.sfmt_st_plus.f
1346 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1348 /* Record the fields for the semantic handler. */
1350 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1351 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_cmpz", "f_r2 0x%x", 'x', f_r2
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1353 #if WITH_PROFILE_MODEL_P
1354 /* Record the fields for profiling. */
1355 if (PROFILE_MODEL_P (current_cpu
))
1357 FLD (in_src2
) = f_r2
;
1366 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1367 CGEN_INSN_WORD insn
= entire_insn
;
1368 #define FLD(f) abuf->fields.sfmt_add.f
1372 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1373 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1375 /* Record the fields for the semantic handler. */
1378 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1379 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1380 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_div", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
1382 #if WITH_PROFILE_MODEL_P
1383 /* Record the fields for profiling. */
1384 if (PROFILE_MODEL_P (current_cpu
))
1388 FLD (out_dr
) = f_r1
;
1397 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1398 CGEN_INSN_WORD insn
= entire_insn
;
1399 #define FLD(f) abuf->fields.sfmt_jl.f
1402 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1404 /* Record the fields for the semantic handler. */
1406 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1407 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_jc", "f_r2 0x%x", 'x', f_r2
, "sr 0x%x", 'x', f_r2
, (char *) 0));
1409 #if WITH_PROFILE_MODEL_P
1410 /* Record the fields for profiling. */
1411 if (PROFILE_MODEL_P (current_cpu
))
1422 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1423 CGEN_INSN_WORD insn
= entire_insn
;
1424 #define FLD(f) abuf->fields.sfmt_jl.f
1427 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1429 /* Record the fields for the semantic handler. */
1431 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1432 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_jl", "f_r2 0x%x", 'x', f_r2
, "sr 0x%x", 'x', f_r2
, (char *) 0));
1434 #if WITH_PROFILE_MODEL_P
1435 /* Record the fields for profiling. */
1436 if (PROFILE_MODEL_P (current_cpu
))
1439 FLD (out_h_gr_SI_14
) = 14;
1448 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1449 CGEN_INSN_WORD insn
= entire_insn
;
1450 #define FLD(f) abuf->fields.sfmt_jl.f
1453 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1455 /* Record the fields for the semantic handler. */
1457 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1458 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_jmp", "f_r2 0x%x", 'x', f_r2
, "sr 0x%x", 'x', f_r2
, (char *) 0));
1460 #if WITH_PROFILE_MODEL_P
1461 /* Record the fields for profiling. */
1462 if (PROFILE_MODEL_P (current_cpu
))
1473 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1474 CGEN_INSN_WORD insn
= entire_insn
;
1475 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1479 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1480 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1482 /* Record the fields for the semantic handler. */
1485 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1486 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1487 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ld", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1489 #if WITH_PROFILE_MODEL_P
1490 /* Record the fields for profiling. */
1491 if (PROFILE_MODEL_P (current_cpu
))
1494 FLD (out_dr
) = f_r1
;
1503 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1504 CGEN_INSN_WORD insn
= entire_insn
;
1505 #define FLD(f) abuf->fields.sfmt_add3.f
1510 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1511 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1512 f_simm16
= EXTRACT_MSB0_SINT (insn
, 32, 16, 16);
1514 /* Record the fields for the semantic handler. */
1515 FLD (f_simm16
) = f_simm16
;
1518 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1519 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1520 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ld_d", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1522 #if WITH_PROFILE_MODEL_P
1523 /* Record the fields for profiling. */
1524 if (PROFILE_MODEL_P (current_cpu
))
1527 FLD (out_dr
) = f_r1
;
1536 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1537 CGEN_INSN_WORD insn
= entire_insn
;
1538 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1542 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1543 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1545 /* Record the fields for the semantic handler. */
1548 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1549 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1550 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ldb", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1552 #if WITH_PROFILE_MODEL_P
1553 /* Record the fields for profiling. */
1554 if (PROFILE_MODEL_P (current_cpu
))
1557 FLD (out_dr
) = f_r1
;
1566 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1567 CGEN_INSN_WORD insn
= entire_insn
;
1568 #define FLD(f) abuf->fields.sfmt_add3.f
1573 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1574 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1575 f_simm16
= EXTRACT_MSB0_SINT (insn
, 32, 16, 16);
1577 /* Record the fields for the semantic handler. */
1578 FLD (f_simm16
) = f_simm16
;
1581 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1582 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1583 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ldb_d", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1585 #if WITH_PROFILE_MODEL_P
1586 /* Record the fields for profiling. */
1587 if (PROFILE_MODEL_P (current_cpu
))
1590 FLD (out_dr
) = f_r1
;
1599 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1600 CGEN_INSN_WORD insn
= entire_insn
;
1601 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1605 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1606 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1608 /* Record the fields for the semantic handler. */
1611 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1612 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1613 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ldh", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1615 #if WITH_PROFILE_MODEL_P
1616 /* Record the fields for profiling. */
1617 if (PROFILE_MODEL_P (current_cpu
))
1620 FLD (out_dr
) = f_r1
;
1629 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1630 CGEN_INSN_WORD insn
= entire_insn
;
1631 #define FLD(f) abuf->fields.sfmt_add3.f
1636 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1637 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
1638 f_simm16
= EXTRACT_MSB0_SINT (insn
, 32, 16, 16);
1640 /* Record the fields for the semantic handler. */
1641 FLD (f_simm16
) = f_simm16
;
1644 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1645 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1646 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ldh_d", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1648 #if WITH_PROFILE_MODEL_P
1649 /* Record the fields for profiling. */
1650 if (PROFILE_MODEL_P (current_cpu
))
1653 FLD (out_dr
) = f_r1
;
1660 extract_sfmt_ld_plus
:
1662 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1663 CGEN_INSN_WORD insn
= entire_insn
;
1664 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1668 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1669 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1671 /* Record the fields for the semantic handler. */
1674 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1675 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1676 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ld_plus", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1678 #if WITH_PROFILE_MODEL_P
1679 /* Record the fields for profiling. */
1680 if (PROFILE_MODEL_P (current_cpu
))
1683 FLD (out_dr
) = f_r1
;
1684 FLD (out_sr
) = f_r2
;
1693 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1694 CGEN_INSN_WORD insn
= entire_insn
;
1695 #define FLD(f) abuf->fields.sfmt_ld24.f
1699 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1700 f_uimm24
= EXTRACT_MSB0_UINT (insn
, 32, 8, 24);
1702 /* Record the fields for the semantic handler. */
1704 FLD (i_uimm24
) = f_uimm24
;
1705 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1706 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ld24", "f_r1 0x%x", 'x', f_r1
, "uimm24 0x%x", 'x', f_uimm24
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1708 #if WITH_PROFILE_MODEL_P
1709 /* Record the fields for profiling. */
1710 if (PROFILE_MODEL_P (current_cpu
))
1712 FLD (out_dr
) = f_r1
;
1721 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1722 CGEN_INSN_WORD insn
= entire_insn
;
1723 #define FLD(f) abuf->fields.sfmt_addi.f
1727 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1728 f_simm8
= EXTRACT_MSB0_SINT (insn
, 16, 8, 8);
1730 /* Record the fields for the semantic handler. */
1731 FLD (f_simm8
) = f_simm8
;
1733 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1734 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ldi8", "f_simm8 0x%x", 'x', f_simm8
, "f_r1 0x%x", 'x', f_r1
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1736 #if WITH_PROFILE_MODEL_P
1737 /* Record the fields for profiling. */
1738 if (PROFILE_MODEL_P (current_cpu
))
1740 FLD (out_dr
) = f_r1
;
1749 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1750 CGEN_INSN_WORD insn
= entire_insn
;
1751 #define FLD(f) abuf->fields.sfmt_add3.f
1755 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
1756 f_simm16
= EXTRACT_MSB0_SINT (insn
, 32, 16, 16);
1758 /* Record the fields for the semantic handler. */
1759 FLD (f_simm16
) = f_simm16
;
1761 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1762 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_ldi16", "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, "dr 0x%x", 'x', f_r1
, (char *) 0));
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_WORD 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_sr
) = & CPU (h_gr
)[f_r2
];
1790 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1791 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_lock", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1793 #if WITH_PROFILE_MODEL_P
1794 /* Record the fields for profiling. */
1795 if (PROFILE_MODEL_P (current_cpu
))
1798 FLD (out_dr
) = f_r1
;
1805 extract_sfmt_machi_a
:
1807 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1808 CGEN_INSN_WORD insn
= entire_insn
;
1809 #define FLD(f) abuf->fields.sfmt_machi_a.f
1814 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1815 f_acc
= EXTRACT_MSB0_UINT (insn
, 16, 8, 1);
1816 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1818 /* Record the fields for the semantic handler. */
1819 FLD (f_acc
) = f_acc
;
1822 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1823 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1824 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_machi_a", "f_acc 0x%x", 'x', f_acc
, "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1826 #if WITH_PROFILE_MODEL_P
1827 /* Record the fields for profiling. */
1828 if (PROFILE_MODEL_P (current_cpu
))
1830 FLD (in_src1
) = f_r1
;
1831 FLD (in_src2
) = f_r2
;
1838 extract_sfmt_mulhi_a
:
1840 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1841 CGEN_INSN_WORD insn
= entire_insn
;
1842 #define FLD(f) abuf->fields.sfmt_machi_a.f
1847 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1848 f_acc
= EXTRACT_MSB0_UINT (insn
, 16, 8, 1);
1849 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1851 /* Record the fields for the semantic handler. */
1854 FLD (f_acc
) = f_acc
;
1855 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1856 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
1857 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mulhi_a", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "f_acc 0x%x", 'x', f_acc
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
1859 #if WITH_PROFILE_MODEL_P
1860 /* Record the fields for profiling. */
1861 if (PROFILE_MODEL_P (current_cpu
))
1863 FLD (in_src1
) = f_r1
;
1864 FLD (in_src2
) = f_r2
;
1873 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1874 CGEN_INSN_WORD insn
= entire_insn
;
1875 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1879 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1880 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1882 /* Record the fields for the semantic handler. */
1885 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
1886 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1887 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mv", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1889 #if WITH_PROFILE_MODEL_P
1890 /* Record the fields for profiling. */
1891 if (PROFILE_MODEL_P (current_cpu
))
1894 FLD (out_dr
) = f_r1
;
1901 extract_sfmt_mvfachi_a
:
1903 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1904 CGEN_INSN_WORD insn
= entire_insn
;
1905 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
1909 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1910 f_accs
= EXTRACT_MSB0_UINT (insn
, 16, 12, 2);
1912 /* Record the fields for the semantic handler. */
1913 FLD (f_accs
) = f_accs
;
1915 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1916 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mvfachi_a", "f_accs 0x%x", 'x', f_accs
, "f_r1 0x%x", 'x', f_r1
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1918 #if WITH_PROFILE_MODEL_P
1919 /* Record the fields for profiling. */
1920 if (PROFILE_MODEL_P (current_cpu
))
1922 FLD (out_dr
) = f_r1
;
1931 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1932 CGEN_INSN_WORD insn
= entire_insn
;
1933 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1937 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1938 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1940 /* Record the fields for the semantic handler. */
1943 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
1944 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mvfc", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "dr 0x%x", 'x', f_r1
, (char *) 0));
1946 #if WITH_PROFILE_MODEL_P
1947 /* Record the fields for profiling. */
1948 if (PROFILE_MODEL_P (current_cpu
))
1950 FLD (out_dr
) = f_r1
;
1957 extract_sfmt_mvtachi_a
:
1959 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1960 CGEN_INSN_WORD insn
= entire_insn
;
1961 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
1965 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1966 f_accs
= EXTRACT_MSB0_UINT (insn
, 16, 12, 2);
1968 /* Record the fields for the semantic handler. */
1969 FLD (f_accs
) = f_accs
;
1971 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
1972 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mvtachi_a", "f_accs 0x%x", 'x', f_accs
, "f_r1 0x%x", 'x', f_r1
, "src1 0x%x", 'x', f_r1
, (char *) 0));
1974 #if WITH_PROFILE_MODEL_P
1975 /* Record the fields for profiling. */
1976 if (PROFILE_MODEL_P (current_cpu
))
1978 FLD (in_src1
) = f_r1
;
1987 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
1988 CGEN_INSN_WORD insn
= entire_insn
;
1989 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1993 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
1994 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
1996 /* Record the fields for the semantic handler. */
1999 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
2000 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mvtc", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, (char *) 0));
2002 #if WITH_PROFILE_MODEL_P
2003 /* Record the fields for profiling. */
2004 if (PROFILE_MODEL_P (current_cpu
))
2015 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2016 #define FLD(f) abuf->fields.sfmt_empty.f
2019 /* Record the fields for the semantic handler. */
2020 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_nop", (char *) 0));
2026 extract_sfmt_rac_dsi
:
2028 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2029 CGEN_INSN_WORD insn
= entire_insn
;
2030 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
2035 f_accd
= EXTRACT_MSB0_UINT (insn
, 16, 4, 2);
2036 f_accs
= EXTRACT_MSB0_UINT (insn
, 16, 12, 2);
2037 f_imm1
= ((EXTRACT_MSB0_UINT (insn
, 16, 15, 1)) + (1));
2039 /* Record the fields for the semantic handler. */
2040 FLD (f_accs
) = f_accs
;
2041 FLD (f_imm1
) = f_imm1
;
2042 FLD (f_accd
) = f_accd
;
2043 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_rac_dsi", "f_accs 0x%x", 'x', f_accs
, "f_imm1 0x%x", 'x', f_imm1
, "f_accd 0x%x", 'x', f_accd
, (char *) 0));
2051 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2052 #define FLD(f) abuf->fields.sfmt_empty.f
2055 /* Record the fields for the semantic handler. */
2056 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_rte", (char *) 0));
2058 #if WITH_PROFILE_MODEL_P
2059 /* Record the fields for profiling. */
2060 if (PROFILE_MODEL_P (current_cpu
))
2070 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2071 CGEN_INSN_WORD insn
= entire_insn
;
2072 #define FLD(f) abuf->fields.sfmt_seth.f
2076 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
2077 f_hi16
= EXTRACT_MSB0_UINT (insn
, 32, 16, 16);
2079 /* Record the fields for the semantic handler. */
2080 FLD (f_hi16
) = f_hi16
;
2082 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
2083 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_seth", "f_hi16 0x%x", 'x', f_hi16
, "f_r1 0x%x", 'x', f_r1
, "dr 0x%x", 'x', f_r1
, (char *) 0));
2085 #if WITH_PROFILE_MODEL_P
2086 /* Record the fields for profiling. */
2087 if (PROFILE_MODEL_P (current_cpu
))
2089 FLD (out_dr
) = f_r1
;
2098 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2099 CGEN_INSN_WORD insn
= entire_insn
;
2100 #define FLD(f) abuf->fields.sfmt_add3.f
2105 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
2106 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
2107 f_simm16
= EXTRACT_MSB0_SINT (insn
, 32, 16, 16);
2109 /* Record the fields for the semantic handler. */
2110 FLD (f_simm16
) = f_simm16
;
2113 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
2114 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
2115 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_sll3", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
2117 #if WITH_PROFILE_MODEL_P
2118 /* Record the fields for profiling. */
2119 if (PROFILE_MODEL_P (current_cpu
))
2122 FLD (out_dr
) = f_r1
;
2131 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2132 CGEN_INSN_WORD insn
= entire_insn
;
2133 #define FLD(f) abuf->fields.sfmt_slli.f
2137 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
2138 f_uimm5
= EXTRACT_MSB0_UINT (insn
, 16, 11, 5);
2140 /* Record the fields for the semantic handler. */
2142 FLD (f_uimm5
) = f_uimm5
;
2143 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
2144 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_slli", "f_r1 0x%x", 'x', f_r1
, "f_uimm5 0x%x", 'x', f_uimm5
, "dr 0x%x", 'x', f_r1
, (char *) 0));
2146 #if WITH_PROFILE_MODEL_P
2147 /* Record the fields for profiling. */
2148 if (PROFILE_MODEL_P (current_cpu
))
2151 FLD (out_dr
) = f_r1
;
2160 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2161 CGEN_INSN_WORD insn
= entire_insn
;
2162 #define FLD(f) abuf->fields.sfmt_st_plus.f
2166 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
2167 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2169 /* Record the fields for the semantic handler. */
2172 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2173 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2174 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_st", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2176 #if WITH_PROFILE_MODEL_P
2177 /* Record the fields for profiling. */
2178 if (PROFILE_MODEL_P (current_cpu
))
2180 FLD (in_src1
) = f_r1
;
2181 FLD (in_src2
) = f_r2
;
2190 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2191 CGEN_INSN_WORD insn
= entire_insn
;
2192 #define FLD(f) abuf->fields.sfmt_st_d.f
2197 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
2198 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
2199 f_simm16
= EXTRACT_MSB0_SINT (insn
, 32, 16, 16);
2201 /* Record the fields for the semantic handler. */
2202 FLD (f_simm16
) = f_simm16
;
2205 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2206 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2207 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_st_d", "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2209 #if WITH_PROFILE_MODEL_P
2210 /* Record the fields for profiling. */
2211 if (PROFILE_MODEL_P (current_cpu
))
2213 FLD (in_src1
) = f_r1
;
2214 FLD (in_src2
) = f_r2
;
2223 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2224 CGEN_INSN_WORD insn
= entire_insn
;
2225 #define FLD(f) abuf->fields.sfmt_st_plus.f
2229 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
2230 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2232 /* Record the fields for the semantic handler. */
2235 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2236 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2237 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_stb", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2239 #if WITH_PROFILE_MODEL_P
2240 /* Record the fields for profiling. */
2241 if (PROFILE_MODEL_P (current_cpu
))
2243 FLD (in_src1
) = f_r1
;
2244 FLD (in_src2
) = f_r2
;
2253 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2254 CGEN_INSN_WORD insn
= entire_insn
;
2255 #define FLD(f) abuf->fields.sfmt_st_d.f
2260 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
2261 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
2262 f_simm16
= EXTRACT_MSB0_SINT (insn
, 32, 16, 16);
2264 /* Record the fields for the semantic handler. */
2265 FLD (f_simm16
) = f_simm16
;
2268 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2269 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2270 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_stb_d", "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2272 #if WITH_PROFILE_MODEL_P
2273 /* Record the fields for profiling. */
2274 if (PROFILE_MODEL_P (current_cpu
))
2276 FLD (in_src1
) = f_r1
;
2277 FLD (in_src2
) = f_r2
;
2286 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2287 CGEN_INSN_WORD insn
= entire_insn
;
2288 #define FLD(f) abuf->fields.sfmt_st_plus.f
2292 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
2293 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2295 /* Record the fields for the semantic handler. */
2298 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2299 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2300 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_sth", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2302 #if WITH_PROFILE_MODEL_P
2303 /* Record the fields for profiling. */
2304 if (PROFILE_MODEL_P (current_cpu
))
2306 FLD (in_src1
) = f_r1
;
2307 FLD (in_src2
) = f_r2
;
2316 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2317 CGEN_INSN_WORD insn
= entire_insn
;
2318 #define FLD(f) abuf->fields.sfmt_st_d.f
2323 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
2324 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
2325 f_simm16
= EXTRACT_MSB0_SINT (insn
, 32, 16, 16);
2327 /* Record the fields for the semantic handler. */
2328 FLD (f_simm16
) = f_simm16
;
2331 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2332 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2333 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_sth_d", "f_simm16 0x%x", 'x', f_simm16
, "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2335 #if WITH_PROFILE_MODEL_P
2336 /* Record the fields for profiling. */
2337 if (PROFILE_MODEL_P (current_cpu
))
2339 FLD (in_src1
) = f_r1
;
2340 FLD (in_src2
) = f_r2
;
2347 extract_sfmt_st_plus
:
2349 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2350 CGEN_INSN_WORD insn
= entire_insn
;
2351 #define FLD(f) abuf->fields.sfmt_st_plus.f
2355 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
2356 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2358 /* Record the fields for the semantic handler. */
2361 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2362 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2363 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_st_plus", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2365 #if WITH_PROFILE_MODEL_P
2366 /* Record the fields for profiling. */
2367 if (PROFILE_MODEL_P (current_cpu
))
2369 FLD (in_src1
) = f_r1
;
2370 FLD (in_src2
) = f_r2
;
2371 FLD (out_src2
) = f_r2
;
2378 extract_sfmt_sth_plus
:
2380 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2381 CGEN_INSN_WORD insn
= entire_insn
;
2382 #define FLD(f) abuf->fields.sfmt_st_plus.f
2386 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
2387 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2389 /* Record the fields for the semantic handler. */
2392 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2393 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2394 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_sth_plus", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2396 #if WITH_PROFILE_MODEL_P
2397 /* Record the fields for profiling. */
2398 if (PROFILE_MODEL_P (current_cpu
))
2400 FLD (in_src1
) = f_r1
;
2401 FLD (in_src2
) = f_r2
;
2402 FLD (out_src2
) = f_r2
;
2409 extract_sfmt_stb_plus
:
2411 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2412 CGEN_INSN_WORD insn
= entire_insn
;
2413 #define FLD(f) abuf->fields.sfmt_st_plus.f
2417 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
2418 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2420 /* Record the fields for the semantic handler. */
2423 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2424 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2425 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_stb_plus", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2427 #if WITH_PROFILE_MODEL_P
2428 /* Record the fields for profiling. */
2429 if (PROFILE_MODEL_P (current_cpu
))
2431 FLD (in_src1
) = f_r1
;
2432 FLD (in_src2
) = f_r2
;
2433 FLD (out_src2
) = f_r2
;
2442 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2443 CGEN_INSN_WORD insn
= entire_insn
;
2444 #define FLD(f) abuf->fields.sfmt_trap.f
2447 f_uimm4
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2449 /* Record the fields for the semantic handler. */
2450 FLD (f_uimm4
) = f_uimm4
;
2451 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_trap", "f_uimm4 0x%x", 'x', f_uimm4
, (char *) 0));
2453 #if WITH_PROFILE_MODEL_P
2454 /* Record the fields for profiling. */
2455 if (PROFILE_MODEL_P (current_cpu
))
2463 extract_sfmt_unlock
:
2465 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2466 CGEN_INSN_WORD insn
= entire_insn
;
2467 #define FLD(f) abuf->fields.sfmt_st_plus.f
2471 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
2472 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2474 /* Record the fields for the semantic handler. */
2477 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2478 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2479 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_unlock", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2481 #if WITH_PROFILE_MODEL_P
2482 /* Record the fields for profiling. */
2483 if (PROFILE_MODEL_P (current_cpu
))
2485 FLD (in_src1
) = f_r1
;
2486 FLD (in_src2
) = f_r2
;
2495 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2496 CGEN_INSN_WORD insn
= entire_insn
;
2497 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2501 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
2502 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
2504 /* Record the fields for the semantic handler. */
2507 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
2508 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
2509 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_satb", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
2511 #if WITH_PROFILE_MODEL_P
2512 /* Record the fields for profiling. */
2513 if (PROFILE_MODEL_P (current_cpu
))
2516 FLD (out_dr
) = f_r1
;
2525 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2526 CGEN_INSN_WORD insn
= entire_insn
;
2527 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2531 f_r1
= EXTRACT_MSB0_UINT (insn
, 32, 4, 4);
2532 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
2534 /* Record the fields for the semantic handler. */
2537 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
2538 FLD (i_dr
) = & CPU (h_gr
)[f_r1
];
2539 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_sat", "f_r2 0x%x", 'x', f_r2
, "f_r1 0x%x", 'x', f_r1
, "sr 0x%x", 'x', f_r2
, "dr 0x%x", 'x', f_r1
, (char *) 0));
2541 #if WITH_PROFILE_MODEL_P
2542 /* Record the fields for profiling. */
2543 if (PROFILE_MODEL_P (current_cpu
))
2546 FLD (out_dr
) = f_r1
;
2555 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2556 #define FLD(f) abuf->fields.sfmt_empty.f
2559 /* Record the fields for the semantic handler. */
2560 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_sadd", (char *) 0));
2566 extract_sfmt_macwu1
:
2568 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2569 CGEN_INSN_WORD insn
= entire_insn
;
2570 #define FLD(f) abuf->fields.sfmt_st_plus.f
2574 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
2575 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2577 /* Record the fields for the semantic handler. */
2580 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2581 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2582 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_macwu1", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2584 #if WITH_PROFILE_MODEL_P
2585 /* Record the fields for profiling. */
2586 if (PROFILE_MODEL_P (current_cpu
))
2588 FLD (in_src1
) = f_r1
;
2589 FLD (in_src2
) = f_r2
;
2598 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2599 CGEN_INSN_WORD insn
= entire_insn
;
2600 #define FLD(f) abuf->fields.sfmt_st_plus.f
2604 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
2605 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2607 /* Record the fields for the semantic handler. */
2610 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2611 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2612 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_msblo", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2614 #if WITH_PROFILE_MODEL_P
2615 /* Record the fields for profiling. */
2616 if (PROFILE_MODEL_P (current_cpu
))
2618 FLD (in_src1
) = f_r1
;
2619 FLD (in_src2
) = f_r2
;
2626 extract_sfmt_mulwu1
:
2628 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2629 CGEN_INSN_WORD insn
= entire_insn
;
2630 #define FLD(f) abuf->fields.sfmt_st_plus.f
2634 f_r1
= EXTRACT_MSB0_UINT (insn
, 16, 4, 4);
2635 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2637 /* Record the fields for the semantic handler. */
2640 FLD (i_src1
) = & CPU (h_gr
)[f_r1
];
2641 FLD (i_src2
) = & CPU (h_gr
)[f_r2
];
2642 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_mulwu1", "f_r1 0x%x", 'x', f_r1
, "f_r2 0x%x", 'x', f_r2
, "src1 0x%x", 'x', f_r1
, "src2 0x%x", 'x', f_r2
, (char *) 0));
2644 #if WITH_PROFILE_MODEL_P
2645 /* Record the fields for profiling. */
2646 if (PROFILE_MODEL_P (current_cpu
))
2648 FLD (in_src1
) = f_r1
;
2649 FLD (in_src2
) = f_r2
;
2658 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2659 #define FLD(f) abuf->fields.sfmt_empty.f
2662 /* Record the fields for the semantic handler. */
2663 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_sc", (char *) 0));
2669 extract_sfmt_clrpsw
:
2671 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2672 CGEN_INSN_WORD insn
= entire_insn
;
2673 #define FLD(f) abuf->fields.sfmt_clrpsw.f
2676 f_uimm8
= EXTRACT_MSB0_UINT (insn
, 16, 8, 8);
2678 /* Record the fields for the semantic handler. */
2679 FLD (f_uimm8
) = f_uimm8
;
2680 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_clrpsw", "f_uimm8 0x%x", 'x', f_uimm8
, (char *) 0));
2686 extract_sfmt_setpsw
:
2688 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2689 CGEN_INSN_WORD insn
= entire_insn
;
2690 #define FLD(f) abuf->fields.sfmt_clrpsw.f
2693 f_uimm8
= EXTRACT_MSB0_UINT (insn
, 16, 8, 8);
2695 /* Record the fields for the semantic handler. */
2696 FLD (f_uimm8
) = f_uimm8
;
2697 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_setpsw", "f_uimm8 0x%x", 'x', f_uimm8
, (char *) 0));
2705 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2706 CGEN_INSN_WORD insn
= entire_insn
;
2707 #define FLD(f) abuf->fields.sfmt_bset.f
2712 f_uimm3
= EXTRACT_MSB0_UINT (insn
, 32, 5, 3);
2713 f_r2
= EXTRACT_MSB0_UINT (insn
, 32, 12, 4);
2714 f_simm16
= EXTRACT_MSB0_SINT (insn
, 32, 16, 16);
2716 /* Record the fields for the semantic handler. */
2717 FLD (f_simm16
) = f_simm16
;
2719 FLD (f_uimm3
) = f_uimm3
;
2720 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
2721 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bset", "f_simm16 0x%x", 'x', f_simm16
, "f_r2 0x%x", 'x', f_r2
, "f_uimm3 0x%x", 'x', f_uimm3
, "sr 0x%x", 'x', f_r2
, (char *) 0));
2723 #if WITH_PROFILE_MODEL_P
2724 /* Record the fields for profiling. */
2725 if (PROFILE_MODEL_P (current_cpu
))
2736 const IDESC
*idesc
= &m32r2f_insn_data
[itype
];
2737 CGEN_INSN_WORD insn
= entire_insn
;
2738 #define FLD(f) abuf->fields.sfmt_bset.f
2742 f_uimm3
= EXTRACT_MSB0_UINT (insn
, 16, 5, 3);
2743 f_r2
= EXTRACT_MSB0_UINT (insn
, 16, 12, 4);
2745 /* Record the fields for the semantic handler. */
2747 FLD (f_uimm3
) = f_uimm3
;
2748 FLD (i_sr
) = & CPU (h_gr
)[f_r2
];
2749 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_btst", "f_r2 0x%x", 'x', f_r2
, "f_uimm3 0x%x", 'x', f_uimm3
, "sr 0x%x", 'x', f_r2
, (char *) 0));
2751 #if WITH_PROFILE_MODEL_P
2752 /* Record the fields for profiling. */
2753 if (PROFILE_MODEL_P (current_cpu
))