1 /* Simulator instruction semantics for sh64.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996-2019 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, see <http://www.gnu.org/licenses/>.
26 /* The labels have the case they have because the enum of insn types
27 is all uppercase and in the non-stdc case the insn symbol is built
28 into the enum name. */
34 { SH64_COMPACT_INSN_X_INVALID
, && case_sem_INSN_X_INVALID
},
35 { SH64_COMPACT_INSN_X_AFTER
, && case_sem_INSN_X_AFTER
},
36 { SH64_COMPACT_INSN_X_BEFORE
, && case_sem_INSN_X_BEFORE
},
37 { SH64_COMPACT_INSN_X_CTI_CHAIN
, && case_sem_INSN_X_CTI_CHAIN
},
38 { SH64_COMPACT_INSN_X_CHAIN
, && case_sem_INSN_X_CHAIN
},
39 { SH64_COMPACT_INSN_X_BEGIN
, && case_sem_INSN_X_BEGIN
},
40 { SH64_COMPACT_INSN_ADD_COMPACT
, && case_sem_INSN_ADD_COMPACT
},
41 { SH64_COMPACT_INSN_ADDI_COMPACT
, && case_sem_INSN_ADDI_COMPACT
},
42 { SH64_COMPACT_INSN_ADDC_COMPACT
, && case_sem_INSN_ADDC_COMPACT
},
43 { SH64_COMPACT_INSN_ADDV_COMPACT
, && case_sem_INSN_ADDV_COMPACT
},
44 { SH64_COMPACT_INSN_AND_COMPACT
, && case_sem_INSN_AND_COMPACT
},
45 { SH64_COMPACT_INSN_ANDI_COMPACT
, && case_sem_INSN_ANDI_COMPACT
},
46 { SH64_COMPACT_INSN_ANDB_COMPACT
, && case_sem_INSN_ANDB_COMPACT
},
47 { SH64_COMPACT_INSN_BF_COMPACT
, && case_sem_INSN_BF_COMPACT
},
48 { SH64_COMPACT_INSN_BFS_COMPACT
, && case_sem_INSN_BFS_COMPACT
},
49 { SH64_COMPACT_INSN_BRA_COMPACT
, && case_sem_INSN_BRA_COMPACT
},
50 { SH64_COMPACT_INSN_BRAF_COMPACT
, && case_sem_INSN_BRAF_COMPACT
},
51 { SH64_COMPACT_INSN_BRK_COMPACT
, && case_sem_INSN_BRK_COMPACT
},
52 { SH64_COMPACT_INSN_BSR_COMPACT
, && case_sem_INSN_BSR_COMPACT
},
53 { SH64_COMPACT_INSN_BSRF_COMPACT
, && case_sem_INSN_BSRF_COMPACT
},
54 { SH64_COMPACT_INSN_BT_COMPACT
, && case_sem_INSN_BT_COMPACT
},
55 { SH64_COMPACT_INSN_BTS_COMPACT
, && case_sem_INSN_BTS_COMPACT
},
56 { SH64_COMPACT_INSN_CLRMAC_COMPACT
, && case_sem_INSN_CLRMAC_COMPACT
},
57 { SH64_COMPACT_INSN_CLRS_COMPACT
, && case_sem_INSN_CLRS_COMPACT
},
58 { SH64_COMPACT_INSN_CLRT_COMPACT
, && case_sem_INSN_CLRT_COMPACT
},
59 { SH64_COMPACT_INSN_CMPEQ_COMPACT
, && case_sem_INSN_CMPEQ_COMPACT
},
60 { SH64_COMPACT_INSN_CMPEQI_COMPACT
, && case_sem_INSN_CMPEQI_COMPACT
},
61 { SH64_COMPACT_INSN_CMPGE_COMPACT
, && case_sem_INSN_CMPGE_COMPACT
},
62 { SH64_COMPACT_INSN_CMPGT_COMPACT
, && case_sem_INSN_CMPGT_COMPACT
},
63 { SH64_COMPACT_INSN_CMPHI_COMPACT
, && case_sem_INSN_CMPHI_COMPACT
},
64 { SH64_COMPACT_INSN_CMPHS_COMPACT
, && case_sem_INSN_CMPHS_COMPACT
},
65 { SH64_COMPACT_INSN_CMPPL_COMPACT
, && case_sem_INSN_CMPPL_COMPACT
},
66 { SH64_COMPACT_INSN_CMPPZ_COMPACT
, && case_sem_INSN_CMPPZ_COMPACT
},
67 { SH64_COMPACT_INSN_CMPSTR_COMPACT
, && case_sem_INSN_CMPSTR_COMPACT
},
68 { SH64_COMPACT_INSN_DIV0S_COMPACT
, && case_sem_INSN_DIV0S_COMPACT
},
69 { SH64_COMPACT_INSN_DIV0U_COMPACT
, && case_sem_INSN_DIV0U_COMPACT
},
70 { SH64_COMPACT_INSN_DIV1_COMPACT
, && case_sem_INSN_DIV1_COMPACT
},
71 { SH64_COMPACT_INSN_DIVU_COMPACT
, && case_sem_INSN_DIVU_COMPACT
},
72 { SH64_COMPACT_INSN_MULR_COMPACT
, && case_sem_INSN_MULR_COMPACT
},
73 { SH64_COMPACT_INSN_DMULSL_COMPACT
, && case_sem_INSN_DMULSL_COMPACT
},
74 { SH64_COMPACT_INSN_DMULUL_COMPACT
, && case_sem_INSN_DMULUL_COMPACT
},
75 { SH64_COMPACT_INSN_DT_COMPACT
, && case_sem_INSN_DT_COMPACT
},
76 { SH64_COMPACT_INSN_EXTSB_COMPACT
, && case_sem_INSN_EXTSB_COMPACT
},
77 { SH64_COMPACT_INSN_EXTSW_COMPACT
, && case_sem_INSN_EXTSW_COMPACT
},
78 { SH64_COMPACT_INSN_EXTUB_COMPACT
, && case_sem_INSN_EXTUB_COMPACT
},
79 { SH64_COMPACT_INSN_EXTUW_COMPACT
, && case_sem_INSN_EXTUW_COMPACT
},
80 { SH64_COMPACT_INSN_FABS_COMPACT
, && case_sem_INSN_FABS_COMPACT
},
81 { SH64_COMPACT_INSN_FADD_COMPACT
, && case_sem_INSN_FADD_COMPACT
},
82 { SH64_COMPACT_INSN_FCMPEQ_COMPACT
, && case_sem_INSN_FCMPEQ_COMPACT
},
83 { SH64_COMPACT_INSN_FCMPGT_COMPACT
, && case_sem_INSN_FCMPGT_COMPACT
},
84 { SH64_COMPACT_INSN_FCNVDS_COMPACT
, && case_sem_INSN_FCNVDS_COMPACT
},
85 { SH64_COMPACT_INSN_FCNVSD_COMPACT
, && case_sem_INSN_FCNVSD_COMPACT
},
86 { SH64_COMPACT_INSN_FDIV_COMPACT
, && case_sem_INSN_FDIV_COMPACT
},
87 { SH64_COMPACT_INSN_FIPR_COMPACT
, && case_sem_INSN_FIPR_COMPACT
},
88 { SH64_COMPACT_INSN_FLDS_COMPACT
, && case_sem_INSN_FLDS_COMPACT
},
89 { SH64_COMPACT_INSN_FLDI0_COMPACT
, && case_sem_INSN_FLDI0_COMPACT
},
90 { SH64_COMPACT_INSN_FLDI1_COMPACT
, && case_sem_INSN_FLDI1_COMPACT
},
91 { SH64_COMPACT_INSN_FLOAT_COMPACT
, && case_sem_INSN_FLOAT_COMPACT
},
92 { SH64_COMPACT_INSN_FMAC_COMPACT
, && case_sem_INSN_FMAC_COMPACT
},
93 { SH64_COMPACT_INSN_FMOV1_COMPACT
, && case_sem_INSN_FMOV1_COMPACT
},
94 { SH64_COMPACT_INSN_FMOV2_COMPACT
, && case_sem_INSN_FMOV2_COMPACT
},
95 { SH64_COMPACT_INSN_FMOV3_COMPACT
, && case_sem_INSN_FMOV3_COMPACT
},
96 { SH64_COMPACT_INSN_FMOV4_COMPACT
, && case_sem_INSN_FMOV4_COMPACT
},
97 { SH64_COMPACT_INSN_FMOV5_COMPACT
, && case_sem_INSN_FMOV5_COMPACT
},
98 { SH64_COMPACT_INSN_FMOV6_COMPACT
, && case_sem_INSN_FMOV6_COMPACT
},
99 { SH64_COMPACT_INSN_FMOV7_COMPACT
, && case_sem_INSN_FMOV7_COMPACT
},
100 { SH64_COMPACT_INSN_FMOV8_COMPACT
, && case_sem_INSN_FMOV8_COMPACT
},
101 { SH64_COMPACT_INSN_FMOV9_COMPACT
, && case_sem_INSN_FMOV9_COMPACT
},
102 { SH64_COMPACT_INSN_FMUL_COMPACT
, && case_sem_INSN_FMUL_COMPACT
},
103 { SH64_COMPACT_INSN_FNEG_COMPACT
, && case_sem_INSN_FNEG_COMPACT
},
104 { SH64_COMPACT_INSN_FRCHG_COMPACT
, && case_sem_INSN_FRCHG_COMPACT
},
105 { SH64_COMPACT_INSN_FSCHG_COMPACT
, && case_sem_INSN_FSCHG_COMPACT
},
106 { SH64_COMPACT_INSN_FSQRT_COMPACT
, && case_sem_INSN_FSQRT_COMPACT
},
107 { SH64_COMPACT_INSN_FSTS_COMPACT
, && case_sem_INSN_FSTS_COMPACT
},
108 { SH64_COMPACT_INSN_FSUB_COMPACT
, && case_sem_INSN_FSUB_COMPACT
},
109 { SH64_COMPACT_INSN_FTRC_COMPACT
, && case_sem_INSN_FTRC_COMPACT
},
110 { SH64_COMPACT_INSN_FTRV_COMPACT
, && case_sem_INSN_FTRV_COMPACT
},
111 { SH64_COMPACT_INSN_JMP_COMPACT
, && case_sem_INSN_JMP_COMPACT
},
112 { SH64_COMPACT_INSN_JSR_COMPACT
, && case_sem_INSN_JSR_COMPACT
},
113 { SH64_COMPACT_INSN_LDC_GBR_COMPACT
, && case_sem_INSN_LDC_GBR_COMPACT
},
114 { SH64_COMPACT_INSN_LDC_VBR_COMPACT
, && case_sem_INSN_LDC_VBR_COMPACT
},
115 { SH64_COMPACT_INSN_LDC_SR_COMPACT
, && case_sem_INSN_LDC_SR_COMPACT
},
116 { SH64_COMPACT_INSN_LDCL_GBR_COMPACT
, && case_sem_INSN_LDCL_GBR_COMPACT
},
117 { SH64_COMPACT_INSN_LDCL_VBR_COMPACT
, && case_sem_INSN_LDCL_VBR_COMPACT
},
118 { SH64_COMPACT_INSN_LDS_FPSCR_COMPACT
, && case_sem_INSN_LDS_FPSCR_COMPACT
},
119 { SH64_COMPACT_INSN_LDSL_FPSCR_COMPACT
, && case_sem_INSN_LDSL_FPSCR_COMPACT
},
120 { SH64_COMPACT_INSN_LDS_FPUL_COMPACT
, && case_sem_INSN_LDS_FPUL_COMPACT
},
121 { SH64_COMPACT_INSN_LDSL_FPUL_COMPACT
, && case_sem_INSN_LDSL_FPUL_COMPACT
},
122 { SH64_COMPACT_INSN_LDS_MACH_COMPACT
, && case_sem_INSN_LDS_MACH_COMPACT
},
123 { SH64_COMPACT_INSN_LDSL_MACH_COMPACT
, && case_sem_INSN_LDSL_MACH_COMPACT
},
124 { SH64_COMPACT_INSN_LDS_MACL_COMPACT
, && case_sem_INSN_LDS_MACL_COMPACT
},
125 { SH64_COMPACT_INSN_LDSL_MACL_COMPACT
, && case_sem_INSN_LDSL_MACL_COMPACT
},
126 { SH64_COMPACT_INSN_LDS_PR_COMPACT
, && case_sem_INSN_LDS_PR_COMPACT
},
127 { SH64_COMPACT_INSN_LDSL_PR_COMPACT
, && case_sem_INSN_LDSL_PR_COMPACT
},
128 { SH64_COMPACT_INSN_MACL_COMPACT
, && case_sem_INSN_MACL_COMPACT
},
129 { SH64_COMPACT_INSN_MACW_COMPACT
, && case_sem_INSN_MACW_COMPACT
},
130 { SH64_COMPACT_INSN_MOV_COMPACT
, && case_sem_INSN_MOV_COMPACT
},
131 { SH64_COMPACT_INSN_MOVI_COMPACT
, && case_sem_INSN_MOVI_COMPACT
},
132 { SH64_COMPACT_INSN_MOVI20_COMPACT
, && case_sem_INSN_MOVI20_COMPACT
},
133 { SH64_COMPACT_INSN_MOVB1_COMPACT
, && case_sem_INSN_MOVB1_COMPACT
},
134 { SH64_COMPACT_INSN_MOVB2_COMPACT
, && case_sem_INSN_MOVB2_COMPACT
},
135 { SH64_COMPACT_INSN_MOVB3_COMPACT
, && case_sem_INSN_MOVB3_COMPACT
},
136 { SH64_COMPACT_INSN_MOVB4_COMPACT
, && case_sem_INSN_MOVB4_COMPACT
},
137 { SH64_COMPACT_INSN_MOVB5_COMPACT
, && case_sem_INSN_MOVB5_COMPACT
},
138 { SH64_COMPACT_INSN_MOVB6_COMPACT
, && case_sem_INSN_MOVB6_COMPACT
},
139 { SH64_COMPACT_INSN_MOVB7_COMPACT
, && case_sem_INSN_MOVB7_COMPACT
},
140 { SH64_COMPACT_INSN_MOVB8_COMPACT
, && case_sem_INSN_MOVB8_COMPACT
},
141 { SH64_COMPACT_INSN_MOVB9_COMPACT
, && case_sem_INSN_MOVB9_COMPACT
},
142 { SH64_COMPACT_INSN_MOVB10_COMPACT
, && case_sem_INSN_MOVB10_COMPACT
},
143 { SH64_COMPACT_INSN_MOVL1_COMPACT
, && case_sem_INSN_MOVL1_COMPACT
},
144 { SH64_COMPACT_INSN_MOVL2_COMPACT
, && case_sem_INSN_MOVL2_COMPACT
},
145 { SH64_COMPACT_INSN_MOVL3_COMPACT
, && case_sem_INSN_MOVL3_COMPACT
},
146 { SH64_COMPACT_INSN_MOVL4_COMPACT
, && case_sem_INSN_MOVL4_COMPACT
},
147 { SH64_COMPACT_INSN_MOVL5_COMPACT
, && case_sem_INSN_MOVL5_COMPACT
},
148 { SH64_COMPACT_INSN_MOVL6_COMPACT
, && case_sem_INSN_MOVL6_COMPACT
},
149 { SH64_COMPACT_INSN_MOVL7_COMPACT
, && case_sem_INSN_MOVL7_COMPACT
},
150 { SH64_COMPACT_INSN_MOVL8_COMPACT
, && case_sem_INSN_MOVL8_COMPACT
},
151 { SH64_COMPACT_INSN_MOVL9_COMPACT
, && case_sem_INSN_MOVL9_COMPACT
},
152 { SH64_COMPACT_INSN_MOVL10_COMPACT
, && case_sem_INSN_MOVL10_COMPACT
},
153 { SH64_COMPACT_INSN_MOVL11_COMPACT
, && case_sem_INSN_MOVL11_COMPACT
},
154 { SH64_COMPACT_INSN_MOVL12_COMPACT
, && case_sem_INSN_MOVL12_COMPACT
},
155 { SH64_COMPACT_INSN_MOVL13_COMPACT
, && case_sem_INSN_MOVL13_COMPACT
},
156 { SH64_COMPACT_INSN_MOVW1_COMPACT
, && case_sem_INSN_MOVW1_COMPACT
},
157 { SH64_COMPACT_INSN_MOVW2_COMPACT
, && case_sem_INSN_MOVW2_COMPACT
},
158 { SH64_COMPACT_INSN_MOVW3_COMPACT
, && case_sem_INSN_MOVW3_COMPACT
},
159 { SH64_COMPACT_INSN_MOVW4_COMPACT
, && case_sem_INSN_MOVW4_COMPACT
},
160 { SH64_COMPACT_INSN_MOVW5_COMPACT
, && case_sem_INSN_MOVW5_COMPACT
},
161 { SH64_COMPACT_INSN_MOVW6_COMPACT
, && case_sem_INSN_MOVW6_COMPACT
},
162 { SH64_COMPACT_INSN_MOVW7_COMPACT
, && case_sem_INSN_MOVW7_COMPACT
},
163 { SH64_COMPACT_INSN_MOVW8_COMPACT
, && case_sem_INSN_MOVW8_COMPACT
},
164 { SH64_COMPACT_INSN_MOVW9_COMPACT
, && case_sem_INSN_MOVW9_COMPACT
},
165 { SH64_COMPACT_INSN_MOVW10_COMPACT
, && case_sem_INSN_MOVW10_COMPACT
},
166 { SH64_COMPACT_INSN_MOVW11_COMPACT
, && case_sem_INSN_MOVW11_COMPACT
},
167 { SH64_COMPACT_INSN_MOVA_COMPACT
, && case_sem_INSN_MOVA_COMPACT
},
168 { SH64_COMPACT_INSN_MOVCAL_COMPACT
, && case_sem_INSN_MOVCAL_COMPACT
},
169 { SH64_COMPACT_INSN_MOVCOL_COMPACT
, && case_sem_INSN_MOVCOL_COMPACT
},
170 { SH64_COMPACT_INSN_MOVT_COMPACT
, && case_sem_INSN_MOVT_COMPACT
},
171 { SH64_COMPACT_INSN_MOVUAL_COMPACT
, && case_sem_INSN_MOVUAL_COMPACT
},
172 { SH64_COMPACT_INSN_MOVUAL2_COMPACT
, && case_sem_INSN_MOVUAL2_COMPACT
},
173 { SH64_COMPACT_INSN_MULL_COMPACT
, && case_sem_INSN_MULL_COMPACT
},
174 { SH64_COMPACT_INSN_MULSW_COMPACT
, && case_sem_INSN_MULSW_COMPACT
},
175 { SH64_COMPACT_INSN_MULUW_COMPACT
, && case_sem_INSN_MULUW_COMPACT
},
176 { SH64_COMPACT_INSN_NEG_COMPACT
, && case_sem_INSN_NEG_COMPACT
},
177 { SH64_COMPACT_INSN_NEGC_COMPACT
, && case_sem_INSN_NEGC_COMPACT
},
178 { SH64_COMPACT_INSN_NOP_COMPACT
, && case_sem_INSN_NOP_COMPACT
},
179 { SH64_COMPACT_INSN_NOT_COMPACT
, && case_sem_INSN_NOT_COMPACT
},
180 { SH64_COMPACT_INSN_OCBI_COMPACT
, && case_sem_INSN_OCBI_COMPACT
},
181 { SH64_COMPACT_INSN_OCBP_COMPACT
, && case_sem_INSN_OCBP_COMPACT
},
182 { SH64_COMPACT_INSN_OCBWB_COMPACT
, && case_sem_INSN_OCBWB_COMPACT
},
183 { SH64_COMPACT_INSN_OR_COMPACT
, && case_sem_INSN_OR_COMPACT
},
184 { SH64_COMPACT_INSN_ORI_COMPACT
, && case_sem_INSN_ORI_COMPACT
},
185 { SH64_COMPACT_INSN_ORB_COMPACT
, && case_sem_INSN_ORB_COMPACT
},
186 { SH64_COMPACT_INSN_PREF_COMPACT
, && case_sem_INSN_PREF_COMPACT
},
187 { SH64_COMPACT_INSN_ROTCL_COMPACT
, && case_sem_INSN_ROTCL_COMPACT
},
188 { SH64_COMPACT_INSN_ROTCR_COMPACT
, && case_sem_INSN_ROTCR_COMPACT
},
189 { SH64_COMPACT_INSN_ROTL_COMPACT
, && case_sem_INSN_ROTL_COMPACT
},
190 { SH64_COMPACT_INSN_ROTR_COMPACT
, && case_sem_INSN_ROTR_COMPACT
},
191 { SH64_COMPACT_INSN_RTS_COMPACT
, && case_sem_INSN_RTS_COMPACT
},
192 { SH64_COMPACT_INSN_SETS_COMPACT
, && case_sem_INSN_SETS_COMPACT
},
193 { SH64_COMPACT_INSN_SETT_COMPACT
, && case_sem_INSN_SETT_COMPACT
},
194 { SH64_COMPACT_INSN_SHAD_COMPACT
, && case_sem_INSN_SHAD_COMPACT
},
195 { SH64_COMPACT_INSN_SHAL_COMPACT
, && case_sem_INSN_SHAL_COMPACT
},
196 { SH64_COMPACT_INSN_SHAR_COMPACT
, && case_sem_INSN_SHAR_COMPACT
},
197 { SH64_COMPACT_INSN_SHLD_COMPACT
, && case_sem_INSN_SHLD_COMPACT
},
198 { SH64_COMPACT_INSN_SHLL_COMPACT
, && case_sem_INSN_SHLL_COMPACT
},
199 { SH64_COMPACT_INSN_SHLL2_COMPACT
, && case_sem_INSN_SHLL2_COMPACT
},
200 { SH64_COMPACT_INSN_SHLL8_COMPACT
, && case_sem_INSN_SHLL8_COMPACT
},
201 { SH64_COMPACT_INSN_SHLL16_COMPACT
, && case_sem_INSN_SHLL16_COMPACT
},
202 { SH64_COMPACT_INSN_SHLR_COMPACT
, && case_sem_INSN_SHLR_COMPACT
},
203 { SH64_COMPACT_INSN_SHLR2_COMPACT
, && case_sem_INSN_SHLR2_COMPACT
},
204 { SH64_COMPACT_INSN_SHLR8_COMPACT
, && case_sem_INSN_SHLR8_COMPACT
},
205 { SH64_COMPACT_INSN_SHLR16_COMPACT
, && case_sem_INSN_SHLR16_COMPACT
},
206 { SH64_COMPACT_INSN_STC_GBR_COMPACT
, && case_sem_INSN_STC_GBR_COMPACT
},
207 { SH64_COMPACT_INSN_STC_VBR_COMPACT
, && case_sem_INSN_STC_VBR_COMPACT
},
208 { SH64_COMPACT_INSN_STCL_GBR_COMPACT
, && case_sem_INSN_STCL_GBR_COMPACT
},
209 { SH64_COMPACT_INSN_STCL_VBR_COMPACT
, && case_sem_INSN_STCL_VBR_COMPACT
},
210 { SH64_COMPACT_INSN_STS_FPSCR_COMPACT
, && case_sem_INSN_STS_FPSCR_COMPACT
},
211 { SH64_COMPACT_INSN_STSL_FPSCR_COMPACT
, && case_sem_INSN_STSL_FPSCR_COMPACT
},
212 { SH64_COMPACT_INSN_STS_FPUL_COMPACT
, && case_sem_INSN_STS_FPUL_COMPACT
},
213 { SH64_COMPACT_INSN_STSL_FPUL_COMPACT
, && case_sem_INSN_STSL_FPUL_COMPACT
},
214 { SH64_COMPACT_INSN_STS_MACH_COMPACT
, && case_sem_INSN_STS_MACH_COMPACT
},
215 { SH64_COMPACT_INSN_STSL_MACH_COMPACT
, && case_sem_INSN_STSL_MACH_COMPACT
},
216 { SH64_COMPACT_INSN_STS_MACL_COMPACT
, && case_sem_INSN_STS_MACL_COMPACT
},
217 { SH64_COMPACT_INSN_STSL_MACL_COMPACT
, && case_sem_INSN_STSL_MACL_COMPACT
},
218 { SH64_COMPACT_INSN_STS_PR_COMPACT
, && case_sem_INSN_STS_PR_COMPACT
},
219 { SH64_COMPACT_INSN_STSL_PR_COMPACT
, && case_sem_INSN_STSL_PR_COMPACT
},
220 { SH64_COMPACT_INSN_SUB_COMPACT
, && case_sem_INSN_SUB_COMPACT
},
221 { SH64_COMPACT_INSN_SUBC_COMPACT
, && case_sem_INSN_SUBC_COMPACT
},
222 { SH64_COMPACT_INSN_SUBV_COMPACT
, && case_sem_INSN_SUBV_COMPACT
},
223 { SH64_COMPACT_INSN_SWAPB_COMPACT
, && case_sem_INSN_SWAPB_COMPACT
},
224 { SH64_COMPACT_INSN_SWAPW_COMPACT
, && case_sem_INSN_SWAPW_COMPACT
},
225 { SH64_COMPACT_INSN_TASB_COMPACT
, && case_sem_INSN_TASB_COMPACT
},
226 { SH64_COMPACT_INSN_TRAPA_COMPACT
, && case_sem_INSN_TRAPA_COMPACT
},
227 { SH64_COMPACT_INSN_TST_COMPACT
, && case_sem_INSN_TST_COMPACT
},
228 { SH64_COMPACT_INSN_TSTI_COMPACT
, && case_sem_INSN_TSTI_COMPACT
},
229 { SH64_COMPACT_INSN_TSTB_COMPACT
, && case_sem_INSN_TSTB_COMPACT
},
230 { SH64_COMPACT_INSN_XOR_COMPACT
, && case_sem_INSN_XOR_COMPACT
},
231 { SH64_COMPACT_INSN_XORI_COMPACT
, && case_sem_INSN_XORI_COMPACT
},
232 { SH64_COMPACT_INSN_XORB_COMPACT
, && case_sem_INSN_XORB_COMPACT
},
233 { SH64_COMPACT_INSN_XTRCT_COMPACT
, && case_sem_INSN_XTRCT_COMPACT
},
238 for (i
= 0; labels
[i
].label
!= 0; ++i
)
241 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_fast_lab
= labels
[i
].label
;
243 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_full_lab
= labels
[i
].label
;
248 #endif /* DEFINE_LABELS */
252 /* If hyper-fast [well not unnecessarily slow] execution is selected, turn
253 off frills like tracing and profiling. */
254 /* FIXME: A better way would be to have CGEN_TRACE_RESULT check for something
255 that can cause it to be optimized out. Another way would be to emit
256 special handlers into the instruction "stream". */
259 #undef CGEN_TRACE_RESULT
260 #define CGEN_TRACE_RESULT(cpu, abuf, name, type, val)
264 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
270 /* Branch to next handler without going around main loop. */
271 #define NEXT(vpc) goto * SEM_ARGBUF (vpc) -> semantic.sem_case
272 SWITCH (sem
, SEM_ARGBUF (vpc
) -> semantic
.sem_case
)
274 #else /* ! WITH_SCACHE_PBB */
276 #define NEXT(vpc) BREAK (sem)
279 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_fast_lab
)
281 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_full_lab
)
284 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->num
)
287 #endif /* ! WITH_SCACHE_PBB */
291 CASE (sem
, INSN_X_INVALID
) : /* --invalid-- */
293 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
294 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
295 #define FLD(f) abuf->fields.sfmt_empty.f
296 int UNUSED written
= 0;
297 IADDR UNUSED pc
= abuf
->addr
;
298 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
301 /* Update the recorded pc in the cpu state struct.
302 Only necessary for WITH_SCACHE case, but to avoid the
303 conditional compilation .... */
305 /* Virtual insns have zero size. Overwrite vpc with address of next insn
306 using the default-insn-bitsize spec. When executing insns in parallel
307 we may want to queue the fault and continue execution. */
308 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
309 vpc
= sim_engine_invalid_insn (current_cpu
, pc
, vpc
);
316 CASE (sem
, INSN_X_AFTER
) : /* --after-- */
318 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
319 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
320 #define FLD(f) abuf->fields.sfmt_empty.f
321 int UNUSED written
= 0;
322 IADDR UNUSED pc
= abuf
->addr
;
323 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
326 #if WITH_SCACHE_PBB_SH64_COMPACT
327 sh64_compact_pbb_after (current_cpu
, sem_arg
);
335 CASE (sem
, INSN_X_BEFORE
) : /* --before-- */
337 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
338 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
339 #define FLD(f) abuf->fields.sfmt_empty.f
340 int UNUSED written
= 0;
341 IADDR UNUSED pc
= abuf
->addr
;
342 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
345 #if WITH_SCACHE_PBB_SH64_COMPACT
346 sh64_compact_pbb_before (current_cpu
, sem_arg
);
354 CASE (sem
, INSN_X_CTI_CHAIN
) : /* --cti-chain-- */
356 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
357 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
358 #define FLD(f) abuf->fields.sfmt_empty.f
359 int UNUSED written
= 0;
360 IADDR UNUSED pc
= abuf
->addr
;
361 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
364 #if WITH_SCACHE_PBB_SH64_COMPACT
366 vpc
= sh64_compact_pbb_cti_chain (current_cpu
, sem_arg
,
367 pbb_br_type
, pbb_br_npc
);
370 /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
371 vpc
= sh64_compact_pbb_cti_chain (current_cpu
, sem_arg
,
372 CPU_PBB_BR_TYPE (current_cpu
),
373 CPU_PBB_BR_NPC (current_cpu
));
382 CASE (sem
, INSN_X_CHAIN
) : /* --chain-- */
384 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
385 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
386 #define FLD(f) abuf->fields.sfmt_empty.f
387 int UNUSED written
= 0;
388 IADDR UNUSED pc
= abuf
->addr
;
389 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
392 #if WITH_SCACHE_PBB_SH64_COMPACT
393 vpc
= sh64_compact_pbb_chain (current_cpu
, sem_arg
);
404 CASE (sem
, INSN_X_BEGIN
) : /* --begin-- */
406 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
407 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
408 #define FLD(f) abuf->fields.sfmt_empty.f
409 int UNUSED written
= 0;
410 IADDR UNUSED pc
= abuf
->addr
;
411 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
414 #if WITH_SCACHE_PBB_SH64_COMPACT
415 #if defined DEFINE_SWITCH || defined FAST_P
416 /* In the switch case FAST_P is a constant, allowing several optimizations
417 in any called inline functions. */
418 vpc
= sh64_compact_pbb_begin (current_cpu
, FAST_P
);
420 #if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
421 vpc
= sh64_compact_pbb_begin (current_cpu
, STATE_RUN_FAST_P (CPU_STATE (current_cpu
)));
423 vpc
= sh64_compact_pbb_begin (current_cpu
, 0);
433 CASE (sem
, INSN_ADD_COMPACT
) : /* add $rm, $rn */
435 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
436 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
437 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
438 int UNUSED written
= 0;
439 IADDR UNUSED pc
= abuf
->addr
;
440 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
443 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)));
444 SET_H_GRC (FLD (f_rn
), opval
);
445 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
452 CASE (sem
, INSN_ADDI_COMPACT
) : /* add #$imm8, $rn */
454 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
455 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
456 #define FLD(f) abuf->fields.sfmt_addi_compact.f
457 int UNUSED written
= 0;
458 IADDR UNUSED pc
= abuf
->addr
;
459 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
462 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), EXTQISI (ANDQI (FLD (f_imm8
), 255)));
463 SET_H_GRC (FLD (f_rn
), opval
);
464 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
471 CASE (sem
, INSN_ADDC_COMPACT
) : /* addc $rm, $rn */
473 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
474 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
475 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
476 int UNUSED written
= 0;
477 IADDR UNUSED pc
= abuf
->addr
;
478 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
482 tmp_flag
= ADDCFSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)), GET_H_TBIT ());
484 SI opval
= ADDCSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)), GET_H_TBIT ());
485 SET_H_GRC (FLD (f_rn
), opval
);
486 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
491 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
499 CASE (sem
, INSN_ADDV_COMPACT
) : /* addv $rm, $rn */
501 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
502 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
503 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
504 int UNUSED written
= 0;
505 IADDR UNUSED pc
= abuf
->addr
;
506 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
510 tmp_t
= ADDOFSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)), 0);
512 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)));
513 SET_H_GRC (FLD (f_rn
), opval
);
514 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
519 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
527 CASE (sem
, INSN_AND_COMPACT
) : /* and $rm64, $rn64 */
529 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
530 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
531 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
532 int UNUSED written
= 0;
533 IADDR UNUSED pc
= abuf
->addr
;
534 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
537 DI opval
= ANDDI (GET_H_GR (FLD (f_rm
)), GET_H_GR (FLD (f_rn
)));
538 SET_H_GR (FLD (f_rn
), opval
);
539 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'D', opval
);
546 CASE (sem
, INSN_ANDI_COMPACT
) : /* and #$uimm8, r0 */
548 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
549 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
550 #define FLD(f) abuf->fields.sfmt_addi_compact.f
551 int UNUSED written
= 0;
552 IADDR UNUSED pc
= abuf
->addr
;
553 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
556 SI opval
= ANDSI (GET_H_GRC (((UINT
) 0)), ZEXTSIDI (FLD (f_imm8
)));
557 SET_H_GRC (((UINT
) 0), opval
);
558 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
565 CASE (sem
, INSN_ANDB_COMPACT
) : /* and.b #$imm8, @(r0, gbr) */
567 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
568 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
569 #define FLD(f) abuf->fields.sfmt_addi_compact.f
570 int UNUSED written
= 0;
571 IADDR UNUSED pc
= abuf
->addr
;
572 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
577 tmp_addr
= ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GBR ());
578 tmp_data
= ANDQI (GETMEMUQI (current_cpu
, pc
, tmp_addr
), FLD (f_imm8
));
580 UQI opval
= tmp_data
;
581 SETMEMUQI (current_cpu
, pc
, tmp_addr
, opval
);
582 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
590 CASE (sem
, INSN_BF_COMPACT
) : /* bf $disp8 */
592 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
593 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
594 #define FLD(f) abuf->fields.sfmt_bf_compact.f
595 int UNUSED written
= 0;
596 IADDR UNUSED pc
= abuf
->addr
;
598 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
600 if (NOTBI (GET_H_TBIT ())) {
602 UDI opval
= FLD (i_disp8
);
603 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
605 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
609 abuf
->written
= written
;
610 SEM_BRANCH_FINI (vpc
);
615 CASE (sem
, INSN_BFS_COMPACT
) : /* bf/s $disp8 */
617 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
618 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
619 #define FLD(f) abuf->fields.sfmt_bf_compact.f
620 int UNUSED written
= 0;
621 IADDR UNUSED pc
= abuf
->addr
;
623 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
625 if (NOTBI (GET_H_TBIT ())) {
628 UDI opval
= ADDDI (pc
, 2);
629 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
631 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
636 UDI opval
= FLD (i_disp8
);
637 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
639 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
645 abuf
->written
= written
;
646 SEM_BRANCH_FINI (vpc
);
651 CASE (sem
, INSN_BRA_COMPACT
) : /* bra $disp12 */
653 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
654 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
655 #define FLD(f) abuf->fields.sfmt_bra_compact.f
656 int UNUSED written
= 0;
657 IADDR UNUSED pc
= abuf
->addr
;
659 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
663 UDI opval
= ADDDI (pc
, 2);
664 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
665 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
670 UDI opval
= FLD (i_disp12
);
671 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
672 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
677 SEM_BRANCH_FINI (vpc
);
682 CASE (sem
, INSN_BRAF_COMPACT
) : /* braf $rn */
684 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
685 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
686 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
687 int UNUSED written
= 0;
688 IADDR UNUSED pc
= abuf
->addr
;
690 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
694 UDI opval
= ADDDI (pc
, 2);
695 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
696 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
701 UDI opval
= ADDDI (EXTSIDI (GET_H_GRC (FLD (f_rn
))), ADDDI (pc
, 4));
702 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
703 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
708 SEM_BRANCH_FINI (vpc
);
713 CASE (sem
, INSN_BRK_COMPACT
) : /* brk */
715 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
716 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
717 #define FLD(f) abuf->fields.sfmt_empty.f
718 int UNUSED written
= 0;
719 IADDR UNUSED pc
= abuf
->addr
;
720 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
722 sh64_break (current_cpu
, pc
);
728 CASE (sem
, INSN_BSR_COMPACT
) : /* bsr $disp12 */
730 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
731 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
732 #define FLD(f) abuf->fields.sfmt_bra_compact.f
733 int UNUSED written
= 0;
734 IADDR UNUSED pc
= abuf
->addr
;
736 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
741 SI opval
= ADDDI (pc
, 4);
743 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pr", 'x', opval
);
747 UDI opval
= ADDDI (pc
, 2);
748 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
749 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
754 UDI opval
= FLD (i_disp12
);
755 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
756 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
761 SEM_BRANCH_FINI (vpc
);
766 CASE (sem
, INSN_BSRF_COMPACT
) : /* bsrf $rn */
768 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
769 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
770 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
771 int UNUSED written
= 0;
772 IADDR UNUSED pc
= abuf
->addr
;
774 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
779 SI opval
= ADDDI (pc
, 4);
781 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pr", 'x', opval
);
785 UDI opval
= ADDDI (pc
, 2);
786 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
787 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
792 UDI opval
= ADDDI (EXTSIDI (GET_H_GRC (FLD (f_rn
))), ADDDI (pc
, 4));
793 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
794 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
799 SEM_BRANCH_FINI (vpc
);
804 CASE (sem
, INSN_BT_COMPACT
) : /* bt $disp8 */
806 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
807 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
808 #define FLD(f) abuf->fields.sfmt_bf_compact.f
809 int UNUSED written
= 0;
810 IADDR UNUSED pc
= abuf
->addr
;
812 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
816 UDI opval
= FLD (i_disp8
);
817 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
819 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
823 abuf
->written
= written
;
824 SEM_BRANCH_FINI (vpc
);
829 CASE (sem
, INSN_BTS_COMPACT
) : /* bt/s $disp8 */
831 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
832 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
833 #define FLD(f) abuf->fields.sfmt_bf_compact.f
834 int UNUSED written
= 0;
835 IADDR UNUSED pc
= abuf
->addr
;
837 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
842 UDI opval
= ADDDI (pc
, 2);
843 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
845 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
850 UDI opval
= FLD (i_disp8
);
851 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
853 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
859 abuf
->written
= written
;
860 SEM_BRANCH_FINI (vpc
);
865 CASE (sem
, INSN_CLRMAC_COMPACT
) : /* clrmac */
867 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
868 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
869 #define FLD(f) abuf->fields.sfmt_empty.f
870 int UNUSED written
= 0;
871 IADDR UNUSED pc
= abuf
->addr
;
872 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
878 CGEN_TRACE_RESULT (current_cpu
, abuf
, "macl", 'x', opval
);
883 CGEN_TRACE_RESULT (current_cpu
, abuf
, "mach", 'x', opval
);
891 CASE (sem
, INSN_CLRS_COMPACT
) : /* clrs */
893 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
894 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
895 #define FLD(f) abuf->fields.sfmt_empty.f
896 int UNUSED written
= 0;
897 IADDR UNUSED pc
= abuf
->addr
;
898 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
903 CGEN_TRACE_RESULT (current_cpu
, abuf
, "sbit", 'x', opval
);
910 CASE (sem
, INSN_CLRT_COMPACT
) : /* clrt */
912 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
913 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
914 #define FLD(f) abuf->fields.sfmt_empty.f
915 int UNUSED written
= 0;
916 IADDR UNUSED pc
= abuf
->addr
;
917 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
922 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
929 CASE (sem
, INSN_CMPEQ_COMPACT
) : /* cmp/eq $rm, $rn */
931 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
932 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
933 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
934 int UNUSED written
= 0;
935 IADDR UNUSED pc
= abuf
->addr
;
936 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
939 BI opval
= EQSI (GET_H_GRC (FLD (f_rm
)), GET_H_GRC (FLD (f_rn
)));
941 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
948 CASE (sem
, INSN_CMPEQI_COMPACT
) : /* cmp/eq #$imm8, r0 */
950 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
951 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
952 #define FLD(f) abuf->fields.sfmt_addi_compact.f
953 int UNUSED written
= 0;
954 IADDR UNUSED pc
= abuf
->addr
;
955 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
958 BI opval
= EQSI (GET_H_GRC (((UINT
) 0)), EXTQISI (ANDQI (FLD (f_imm8
), 255)));
960 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
967 CASE (sem
, INSN_CMPGE_COMPACT
) : /* cmp/ge $rm, $rn */
969 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
970 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
971 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
972 int UNUSED written
= 0;
973 IADDR UNUSED pc
= abuf
->addr
;
974 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
977 BI opval
= GESI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)));
979 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
986 CASE (sem
, INSN_CMPGT_COMPACT
) : /* cmp/gt $rm, $rn */
988 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
989 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
990 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
991 int UNUSED written
= 0;
992 IADDR UNUSED pc
= abuf
->addr
;
993 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
996 BI opval
= GTSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)));
998 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1005 CASE (sem
, INSN_CMPHI_COMPACT
) : /* cmp/hi $rm, $rn */
1007 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1008 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1009 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1010 int UNUSED written
= 0;
1011 IADDR UNUSED pc
= abuf
->addr
;
1012 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1015 BI opval
= GTUSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)));
1017 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1024 CASE (sem
, INSN_CMPHS_COMPACT
) : /* cmp/hs $rm, $rn */
1026 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1027 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1028 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1029 int UNUSED written
= 0;
1030 IADDR UNUSED pc
= abuf
->addr
;
1031 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1034 BI opval
= GEUSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)));
1036 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1043 CASE (sem
, INSN_CMPPL_COMPACT
) : /* cmp/pl $rn */
1045 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1046 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1047 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
1048 int UNUSED written
= 0;
1049 IADDR UNUSED pc
= abuf
->addr
;
1050 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1053 BI opval
= GTSI (GET_H_GRC (FLD (f_rn
)), 0);
1055 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1062 CASE (sem
, INSN_CMPPZ_COMPACT
) : /* cmp/pz $rn */
1064 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1065 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1066 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
1067 int UNUSED written
= 0;
1068 IADDR UNUSED pc
= abuf
->addr
;
1069 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1072 BI opval
= GESI (GET_H_GRC (FLD (f_rn
)), 0);
1074 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1081 CASE (sem
, INSN_CMPSTR_COMPACT
) : /* cmp/str $rm, $rn */
1083 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1084 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1085 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1086 int UNUSED written
= 0;
1087 IADDR UNUSED pc
= abuf
->addr
;
1088 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1093 tmp_temp
= XORSI (GET_H_GRC (FLD (f_rm
)), GET_H_GRC (FLD (f_rn
)));
1094 tmp_t
= EQSI (ANDSI (tmp_temp
, 0xff000000), 0);
1095 tmp_t
= ORBI (EQSI (ANDSI (tmp_temp
, 16711680), 0), tmp_t
);
1096 tmp_t
= ORBI (EQSI (ANDSI (tmp_temp
, 65280), 0), tmp_t
);
1097 tmp_t
= ORBI (EQSI (ANDSI (tmp_temp
, 255), 0), tmp_t
);
1099 BI opval
= ((GTUBI (tmp_t
, 0)) ? (1) : (0));
1101 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1109 CASE (sem
, INSN_DIV0S_COMPACT
) : /* div0s $rm, $rn */
1111 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1112 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1113 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1114 int UNUSED written
= 0;
1115 IADDR UNUSED pc
= abuf
->addr
;
1116 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1120 BI opval
= SRLSI (GET_H_GRC (FLD (f_rn
)), 31);
1122 CGEN_TRACE_RESULT (current_cpu
, abuf
, "qbit", 'x', opval
);
1125 BI opval
= SRLSI (GET_H_GRC (FLD (f_rm
)), 31);
1127 CGEN_TRACE_RESULT (current_cpu
, abuf
, "mbit", 'x', opval
);
1130 BI opval
= ((EQSI (SRLSI (GET_H_GRC (FLD (f_rm
)), 31), SRLSI (GET_H_GRC (FLD (f_rn
)), 31))) ? (0) : (1));
1132 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1140 CASE (sem
, INSN_DIV0U_COMPACT
) : /* div0u */
1142 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1143 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1144 #define FLD(f) abuf->fields.sfmt_empty.f
1145 int UNUSED written
= 0;
1146 IADDR UNUSED pc
= abuf
->addr
;
1147 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1153 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1158 CGEN_TRACE_RESULT (current_cpu
, abuf
, "qbit", 'x', opval
);
1163 CGEN_TRACE_RESULT (current_cpu
, abuf
, "mbit", 'x', opval
);
1171 CASE (sem
, INSN_DIV1_COMPACT
) : /* div1 $rm, $rn */
1173 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1174 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1175 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1176 int UNUSED written
= 0;
1177 IADDR UNUSED pc
= abuf
->addr
;
1178 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1184 tmp_oldq
= GET_H_QBIT ();
1186 BI opval
= SRLSI (GET_H_GRC (FLD (f_rn
)), 31);
1188 CGEN_TRACE_RESULT (current_cpu
, abuf
, "qbit", 'x', opval
);
1191 SI opval
= ORSI (SLLSI (GET_H_GRC (FLD (f_rn
)), 1), ZEXTBISI (GET_H_TBIT ()));
1192 SET_H_GRC (FLD (f_rn
), opval
);
1193 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1195 if (NOTBI (tmp_oldq
)) {
1196 if (NOTBI (GET_H_MBIT ())) {
1198 tmp_tmp0
= GET_H_GRC (FLD (f_rn
));
1200 SI opval
= SUBSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)));
1201 SET_H_GRC (FLD (f_rn
), opval
);
1202 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1204 tmp_tmp1
= GTUSI (GET_H_GRC (FLD (f_rn
)), tmp_tmp0
);
1205 if (NOTBI (GET_H_QBIT ())) {
1207 BI opval
= ((tmp_tmp1
) ? (1) : (0));
1209 CGEN_TRACE_RESULT (current_cpu
, abuf
, "qbit", 'x', opval
);
1213 BI opval
= ((EQQI (tmp_tmp1
, 0)) ? (1) : (0));
1215 CGEN_TRACE_RESULT (current_cpu
, abuf
, "qbit", 'x', opval
);
1221 tmp_tmp0
= GET_H_GRC (FLD (f_rn
));
1223 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)));
1224 SET_H_GRC (FLD (f_rn
), opval
);
1225 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1227 tmp_tmp1
= LTUSI (GET_H_GRC (FLD (f_rn
)), tmp_tmp0
);
1228 if (NOTBI (GET_H_QBIT ())) {
1230 BI opval
= ((EQQI (tmp_tmp1
, 0)) ? (1) : (0));
1232 CGEN_TRACE_RESULT (current_cpu
, abuf
, "qbit", 'x', opval
);
1236 BI opval
= ((tmp_tmp1
) ? (1) : (0));
1238 CGEN_TRACE_RESULT (current_cpu
, abuf
, "qbit", 'x', opval
);
1244 if (NOTBI (GET_H_MBIT ())) {
1246 tmp_tmp0
= GET_H_GRC (FLD (f_rn
));
1248 SI opval
= ADDSI (GET_H_GRC (FLD (f_rm
)), GET_H_GRC (FLD (f_rn
)));
1249 SET_H_GRC (FLD (f_rn
), opval
);
1250 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1252 tmp_tmp1
= LTUSI (GET_H_GRC (FLD (f_rn
)), tmp_tmp0
);
1253 if (NOTBI (GET_H_QBIT ())) {
1255 BI opval
= ((tmp_tmp1
) ? (1) : (0));
1257 CGEN_TRACE_RESULT (current_cpu
, abuf
, "qbit", 'x', opval
);
1261 BI opval
= ((EQQI (tmp_tmp1
, 0)) ? (1) : (0));
1263 CGEN_TRACE_RESULT (current_cpu
, abuf
, "qbit", 'x', opval
);
1269 tmp_tmp0
= GET_H_GRC (FLD (f_rn
));
1271 SI opval
= SUBSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)));
1272 SET_H_GRC (FLD (f_rn
), opval
);
1273 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1275 tmp_tmp1
= GTUSI (GET_H_GRC (FLD (f_rn
)), tmp_tmp0
);
1276 if (NOTBI (GET_H_QBIT ())) {
1278 BI opval
= ((EQQI (tmp_tmp1
, 0)) ? (1) : (0));
1280 CGEN_TRACE_RESULT (current_cpu
, abuf
, "qbit", 'x', opval
);
1284 BI opval
= ((tmp_tmp1
) ? (1) : (0));
1286 CGEN_TRACE_RESULT (current_cpu
, abuf
, "qbit", 'x', opval
);
1293 BI opval
= ((EQBI (GET_H_QBIT (), GET_H_MBIT ())) ? (1) : (0));
1295 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1303 CASE (sem
, INSN_DIVU_COMPACT
) : /* divu r0, $rn */
1305 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1306 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1307 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
1308 int UNUSED written
= 0;
1309 IADDR UNUSED pc
= abuf
->addr
;
1310 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1313 SI opval
= UDIVSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (((UINT
) 0)));
1314 SET_H_GRC (FLD (f_rn
), opval
);
1315 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1322 CASE (sem
, INSN_MULR_COMPACT
) : /* mulr r0, $rn */
1324 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1325 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1326 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
1327 int UNUSED written
= 0;
1328 IADDR UNUSED pc
= abuf
->addr
;
1329 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1332 SI opval
= MULSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (((UINT
) 0)));
1333 SET_H_GRC (FLD (f_rn
), opval
);
1334 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1341 CASE (sem
, INSN_DMULSL_COMPACT
) : /* dmuls.l $rm, $rn */
1343 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1344 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1345 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1346 int UNUSED written
= 0;
1347 IADDR UNUSED pc
= abuf
->addr
;
1348 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1352 tmp_result
= MULDI (EXTSIDI (GET_H_GRC (FLD (f_rm
))), EXTSIDI (GET_H_GRC (FLD (f_rn
))));
1354 SI opval
= SUBWORDDISI (tmp_result
, 0);
1356 CGEN_TRACE_RESULT (current_cpu
, abuf
, "mach", 'x', opval
);
1359 SI opval
= SUBWORDDISI (tmp_result
, 1);
1361 CGEN_TRACE_RESULT (current_cpu
, abuf
, "macl", 'x', opval
);
1369 CASE (sem
, INSN_DMULUL_COMPACT
) : /* dmulu.l $rm, $rn */
1371 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1372 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1373 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1374 int UNUSED written
= 0;
1375 IADDR UNUSED pc
= abuf
->addr
;
1376 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1380 tmp_result
= MULDI (ZEXTSIDI (GET_H_GRC (FLD (f_rm
))), ZEXTSIDI (GET_H_GRC (FLD (f_rn
))));
1382 SI opval
= SUBWORDDISI (tmp_result
, 0);
1384 CGEN_TRACE_RESULT (current_cpu
, abuf
, "mach", 'x', opval
);
1387 SI opval
= SUBWORDDISI (tmp_result
, 1);
1389 CGEN_TRACE_RESULT (current_cpu
, abuf
, "macl", 'x', opval
);
1397 CASE (sem
, INSN_DT_COMPACT
) : /* dt $rn */
1399 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1400 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1401 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
1402 int UNUSED written
= 0;
1403 IADDR UNUSED pc
= abuf
->addr
;
1404 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1408 SI opval
= SUBSI (GET_H_GRC (FLD (f_rn
)), 1);
1409 SET_H_GRC (FLD (f_rn
), opval
);
1410 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1413 BI opval
= EQSI (GET_H_GRC (FLD (f_rn
)), 0);
1415 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1423 CASE (sem
, INSN_EXTSB_COMPACT
) : /* exts.b $rm, $rn */
1425 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1426 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1427 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1428 int UNUSED written
= 0;
1429 IADDR UNUSED pc
= abuf
->addr
;
1430 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1433 SI opval
= EXTQISI (SUBWORDSIQI (GET_H_GRC (FLD (f_rm
)), 3));
1434 SET_H_GRC (FLD (f_rn
), opval
);
1435 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1442 CASE (sem
, INSN_EXTSW_COMPACT
) : /* exts.w $rm, $rn */
1444 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1445 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1446 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1447 int UNUSED written
= 0;
1448 IADDR UNUSED pc
= abuf
->addr
;
1449 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1452 SI opval
= EXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm
)), 1));
1453 SET_H_GRC (FLD (f_rn
), opval
);
1454 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1461 CASE (sem
, INSN_EXTUB_COMPACT
) : /* extu.b $rm, $rn */
1463 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1464 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1465 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1466 int UNUSED written
= 0;
1467 IADDR UNUSED pc
= abuf
->addr
;
1468 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1471 SI opval
= ZEXTQISI (SUBWORDSIQI (GET_H_GRC (FLD (f_rm
)), 3));
1472 SET_H_GRC (FLD (f_rn
), opval
);
1473 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1480 CASE (sem
, INSN_EXTUW_COMPACT
) : /* extu.w $rm, $rn */
1482 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1483 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1484 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1485 int UNUSED written
= 0;
1486 IADDR UNUSED pc
= abuf
->addr
;
1487 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1490 SI opval
= ZEXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm
)), 1));
1491 SET_H_GRC (FLD (f_rn
), opval
);
1492 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1499 CASE (sem
, INSN_FABS_COMPACT
) : /* fabs $fsdn */
1501 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1502 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1503 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
1504 int UNUSED written
= 0;
1505 IADDR UNUSED pc
= abuf
->addr
;
1506 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1508 if (GET_H_PRBIT ()) {
1510 DF opval
= sh64_fabsd (current_cpu
, GET_H_FSD (FLD (f_rn
)));
1511 SET_H_FSD (FLD (f_rn
), opval
);
1512 written
|= (1 << 2);
1513 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
1517 DF opval
= sh64_fabss (current_cpu
, GET_H_FSD (FLD (f_rn
)));
1518 SET_H_FSD (FLD (f_rn
), opval
);
1519 written
|= (1 << 2);
1520 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
1524 abuf
->written
= written
;
1529 CASE (sem
, INSN_FADD_COMPACT
) : /* fadd $fsdm, $fsdn */
1531 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1532 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1533 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1534 int UNUSED written
= 0;
1535 IADDR UNUSED pc
= abuf
->addr
;
1536 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1538 if (GET_H_PRBIT ()) {
1540 DF opval
= sh64_faddd (current_cpu
, GET_H_FSD (FLD (f_rm
)), GET_H_FSD (FLD (f_rn
)));
1541 SET_H_FSD (FLD (f_rn
), opval
);
1542 written
|= (1 << 3);
1543 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
1547 DF opval
= sh64_fadds (current_cpu
, GET_H_FSD (FLD (f_rm
)), GET_H_FSD (FLD (f_rn
)));
1548 SET_H_FSD (FLD (f_rn
), opval
);
1549 written
|= (1 << 3);
1550 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
1554 abuf
->written
= written
;
1559 CASE (sem
, INSN_FCMPEQ_COMPACT
) : /* fcmp/eq $fsdm, $fsdn */
1561 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1562 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1563 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1564 int UNUSED written
= 0;
1565 IADDR UNUSED pc
= abuf
->addr
;
1566 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1568 if (GET_H_PRBIT ()) {
1570 BI opval
= sh64_fcmpeqd (current_cpu
, GET_H_FSD (FLD (f_rm
)), GET_H_FSD (FLD (f_rn
)));
1572 written
|= (1 << 3);
1573 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1577 BI opval
= sh64_fcmpeqs (current_cpu
, GET_H_FSD (FLD (f_rm
)), GET_H_FSD (FLD (f_rn
)));
1579 written
|= (1 << 3);
1580 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1584 abuf
->written
= written
;
1589 CASE (sem
, INSN_FCMPGT_COMPACT
) : /* fcmp/gt $fsdm, $fsdn */
1591 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1592 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1593 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1594 int UNUSED written
= 0;
1595 IADDR UNUSED pc
= abuf
->addr
;
1596 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1598 if (GET_H_PRBIT ()) {
1600 BI opval
= sh64_fcmpgtd (current_cpu
, GET_H_FSD (FLD (f_rn
)), GET_H_FSD (FLD (f_rm
)));
1602 written
|= (1 << 3);
1603 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1607 BI opval
= sh64_fcmpgts (current_cpu
, GET_H_FSD (FLD (f_rn
)), GET_H_FSD (FLD (f_rm
)));
1609 written
|= (1 << 3);
1610 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
1614 abuf
->written
= written
;
1619 CASE (sem
, INSN_FCNVDS_COMPACT
) : /* fcnvds $drn, fpul */
1621 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1622 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1623 #define FLD(f) abuf->fields.sfmt_fmov8_compact.f
1624 int UNUSED written
= 0;
1625 IADDR UNUSED pc
= abuf
->addr
;
1626 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1629 SF opval
= sh64_fcnvds (current_cpu
, GET_H_DRC (FLD (f_dn
)));
1630 CPU (h_fr
[((UINT
) 32)]) = opval
;
1631 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fr", 'f', opval
);
1638 CASE (sem
, INSN_FCNVSD_COMPACT
) : /* fcnvsd fpul, $drn */
1640 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1641 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1642 #define FLD(f) abuf->fields.sfmt_fmov8_compact.f
1643 int UNUSED written
= 0;
1644 IADDR UNUSED pc
= abuf
->addr
;
1645 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1648 DF opval
= sh64_fcnvsd (current_cpu
, CPU (h_fr
[((UINT
) 32)]));
1649 SET_H_DRC (FLD (f_dn
), opval
);
1650 CGEN_TRACE_RESULT (current_cpu
, abuf
, "drc", 'f', opval
);
1657 CASE (sem
, INSN_FDIV_COMPACT
) : /* fdiv $fsdm, $fsdn */
1659 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1660 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1661 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1662 int UNUSED written
= 0;
1663 IADDR UNUSED pc
= abuf
->addr
;
1664 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1666 if (GET_H_PRBIT ()) {
1668 DF opval
= sh64_fdivd (current_cpu
, GET_H_FSD (FLD (f_rn
)), GET_H_FSD (FLD (f_rm
)));
1669 SET_H_FSD (FLD (f_rn
), opval
);
1670 written
|= (1 << 3);
1671 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
1675 DF opval
= sh64_fdivs (current_cpu
, GET_H_FSD (FLD (f_rn
)), GET_H_FSD (FLD (f_rm
)));
1676 SET_H_FSD (FLD (f_rn
), opval
);
1677 written
|= (1 << 3);
1678 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
1682 abuf
->written
= written
;
1687 CASE (sem
, INSN_FIPR_COMPACT
) : /* fipr $fvm, $fvn */
1689 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1690 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1691 #define FLD(f) abuf->fields.sfmt_fipr_compact.f
1692 int UNUSED written
= 0;
1693 IADDR UNUSED pc
= abuf
->addr
;
1694 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1696 sh64_fipr (current_cpu
, FLD (f_vm
), FLD (f_vn
));
1702 CASE (sem
, INSN_FLDS_COMPACT
) : /* flds $frn, fpul */
1704 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1705 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1706 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
1707 int UNUSED written
= 0;
1708 IADDR UNUSED pc
= abuf
->addr
;
1709 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1712 SF opval
= GET_H_FRC (FLD (f_rn
));
1713 CPU (h_fr
[((UINT
) 32)]) = opval
;
1714 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fr", 'f', opval
);
1721 CASE (sem
, INSN_FLDI0_COMPACT
) : /* fldi0 $frn */
1723 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1724 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1725 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
1726 int UNUSED written
= 0;
1727 IADDR UNUSED pc
= abuf
->addr
;
1728 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1731 SF opval
= sh64_fldi0 (current_cpu
);
1732 SET_H_FRC (FLD (f_rn
), opval
);
1733 CGEN_TRACE_RESULT (current_cpu
, abuf
, "frc", 'f', opval
);
1740 CASE (sem
, INSN_FLDI1_COMPACT
) : /* fldi1 $frn */
1742 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1743 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1744 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
1745 int UNUSED written
= 0;
1746 IADDR UNUSED pc
= abuf
->addr
;
1747 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1750 SF opval
= sh64_fldi1 (current_cpu
);
1751 SET_H_FRC (FLD (f_rn
), opval
);
1752 CGEN_TRACE_RESULT (current_cpu
, abuf
, "frc", 'f', opval
);
1759 CASE (sem
, INSN_FLOAT_COMPACT
) : /* float fpul, $fsdn */
1761 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1762 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1763 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
1764 int UNUSED written
= 0;
1765 IADDR UNUSED pc
= abuf
->addr
;
1766 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1768 if (GET_H_PRBIT ()) {
1770 DF opval
= sh64_floatld (current_cpu
, CPU (h_fr
[((UINT
) 32)]));
1771 SET_H_FSD (FLD (f_rn
), opval
);
1772 written
|= (1 << 2);
1773 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
1777 DF opval
= sh64_floatls (current_cpu
, CPU (h_fr
[((UINT
) 32)]));
1778 SET_H_FSD (FLD (f_rn
), opval
);
1779 written
|= (1 << 2);
1780 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
1784 abuf
->written
= written
;
1789 CASE (sem
, INSN_FMAC_COMPACT
) : /* fmac fr0, $frm, $frn */
1791 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1792 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1793 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1794 int UNUSED written
= 0;
1795 IADDR UNUSED pc
= abuf
->addr
;
1796 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1799 SF opval
= sh64_fmacs (current_cpu
, GET_H_FRC (((UINT
) 0)), GET_H_FRC (FLD (f_rm
)), GET_H_FRC (FLD (f_rn
)));
1800 SET_H_FRC (FLD (f_rn
), opval
);
1801 CGEN_TRACE_RESULT (current_cpu
, abuf
, "frc", 'f', opval
);
1808 CASE (sem
, INSN_FMOV1_COMPACT
) : /* fmov $fmovm, $fmovn */
1810 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1811 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1812 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1813 int UNUSED written
= 0;
1814 IADDR UNUSED pc
= abuf
->addr
;
1815 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1818 DF opval
= GET_H_FMOV (FLD (f_rm
));
1819 SET_H_FMOV (FLD (f_rn
), opval
);
1820 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fmov", 'f', opval
);
1827 CASE (sem
, INSN_FMOV2_COMPACT
) : /* fmov @$rm, $fmovn */
1829 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1830 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1831 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1832 int UNUSED written
= 0;
1833 IADDR UNUSED pc
= abuf
->addr
;
1834 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1836 if (NOTBI (GET_H_SZBIT ())) {
1838 DF opval
= GETMEMSF (current_cpu
, pc
, GET_H_GRC (FLD (f_rm
)));
1839 SET_H_FMOV (FLD (f_rn
), opval
);
1840 written
|= (1 << 4);
1841 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fmov", 'f', opval
);
1845 DF opval
= GETMEMDF (current_cpu
, pc
, GET_H_GRC (FLD (f_rm
)));
1846 SET_H_FMOV (FLD (f_rn
), opval
);
1847 written
|= (1 << 4);
1848 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fmov", 'f', opval
);
1852 abuf
->written
= written
;
1857 CASE (sem
, INSN_FMOV3_COMPACT
) : /* fmov @${rm}+, fmovn */
1859 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1860 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1861 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1862 int UNUSED written
= 0;
1863 IADDR UNUSED pc
= abuf
->addr
;
1864 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1866 if (NOTBI (GET_H_SZBIT ())) {
1869 DF opval
= GETMEMSF (current_cpu
, pc
, GET_H_GRC (FLD (f_rm
)));
1870 SET_H_FMOV (FLD (f_rn
), opval
);
1871 written
|= (1 << 4);
1872 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fmov", 'f', opval
);
1875 SI opval
= ADDSI (GET_H_GRC (FLD (f_rm
)), 4);
1876 SET_H_GRC (FLD (f_rm
), opval
);
1877 written
|= (1 << 5);
1878 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1884 DF opval
= GETMEMDF (current_cpu
, pc
, GET_H_GRC (FLD (f_rm
)));
1885 SET_H_FMOV (FLD (f_rn
), opval
);
1886 written
|= (1 << 4);
1887 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fmov", 'f', opval
);
1890 SI opval
= ADDSI (GET_H_GRC (FLD (f_rm
)), 8);
1891 SET_H_GRC (FLD (f_rm
), opval
);
1892 written
|= (1 << 5);
1893 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1898 abuf
->written
= written
;
1903 CASE (sem
, INSN_FMOV4_COMPACT
) : /* fmov @(r0, $rm), $fmovn */
1905 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1906 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1907 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1908 int UNUSED written
= 0;
1909 IADDR UNUSED pc
= abuf
->addr
;
1910 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1912 if (NOTBI (GET_H_SZBIT ())) {
1914 DF opval
= GETMEMSF (current_cpu
, pc
, ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GRC (FLD (f_rm
))));
1915 SET_H_FMOV (FLD (f_rn
), opval
);
1916 written
|= (1 << 5);
1917 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fmov", 'f', opval
);
1921 DF opval
= GETMEMDF (current_cpu
, pc
, ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GRC (FLD (f_rm
))));
1922 SET_H_FMOV (FLD (f_rn
), opval
);
1923 written
|= (1 << 5);
1924 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fmov", 'f', opval
);
1928 abuf
->written
= written
;
1933 CASE (sem
, INSN_FMOV5_COMPACT
) : /* fmov $fmovm, @$rn */
1935 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1936 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1937 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1938 int UNUSED written
= 0;
1939 IADDR UNUSED pc
= abuf
->addr
;
1940 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1942 if (NOTBI (GET_H_SZBIT ())) {
1944 SF opval
= GET_H_FMOV (FLD (f_rm
));
1945 SETMEMSF (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)), opval
);
1946 written
|= (1 << 4);
1947 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'f', opval
);
1951 DF opval
= GET_H_FMOV (FLD (f_rm
));
1952 SETMEMDF (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)), opval
);
1953 written
|= (1 << 3);
1954 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'f', opval
);
1958 abuf
->written
= written
;
1963 CASE (sem
, INSN_FMOV6_COMPACT
) : /* fmov $fmovm, @-$rn */
1965 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1966 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1967 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
1968 int UNUSED written
= 0;
1969 IADDR UNUSED pc
= abuf
->addr
;
1970 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1972 if (NOTBI (GET_H_SZBIT ())) {
1975 SI opval
= SUBSI (GET_H_GRC (FLD (f_rn
)), 4);
1976 SET_H_GRC (FLD (f_rn
), opval
);
1977 written
|= (1 << 5);
1978 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1981 SF opval
= GET_H_FMOV (FLD (f_rm
));
1982 SETMEMSF (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)), opval
);
1983 written
|= (1 << 4);
1984 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'f', opval
);
1990 SI opval
= SUBSI (GET_H_GRC (FLD (f_rn
)), 8);
1991 SET_H_GRC (FLD (f_rn
), opval
);
1992 written
|= (1 << 5);
1993 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
1996 DF opval
= GET_H_FMOV (FLD (f_rm
));
1997 SETMEMDF (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)), opval
);
1998 written
|= (1 << 3);
1999 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'f', opval
);
2004 abuf
->written
= written
;
2009 CASE (sem
, INSN_FMOV7_COMPACT
) : /* fmov $fmovm, @(r0, $rn) */
2011 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2012 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2013 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
2014 int UNUSED written
= 0;
2015 IADDR UNUSED pc
= abuf
->addr
;
2016 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2018 if (NOTBI (GET_H_SZBIT ())) {
2020 SF opval
= GET_H_FMOV (FLD (f_rm
));
2021 SETMEMSF (current_cpu
, pc
, ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GRC (FLD (f_rn
))), opval
);
2022 written
|= (1 << 5);
2023 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'f', opval
);
2027 DF opval
= GET_H_FMOV (FLD (f_rm
));
2028 SETMEMDF (current_cpu
, pc
, ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GRC (FLD (f_rn
))), opval
);
2029 written
|= (1 << 4);
2030 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'f', opval
);
2034 abuf
->written
= written
;
2039 CASE (sem
, INSN_FMOV8_COMPACT
) : /* fmov.d @($imm12x8, $rm), $drn */
2041 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2042 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2043 #define FLD(f) abuf->fields.sfmt_fmov8_compact.f
2044 int UNUSED written
= 0;
2045 IADDR UNUSED pc
= abuf
->addr
;
2046 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2049 DF opval
= GETMEMDF (current_cpu
, pc
, ADDSI (GET_H_GRC (FLD (f_rm
)), FLD (f_imm12x8
)));
2050 SET_H_DRC (FLD (f_dn
), opval
);
2051 CGEN_TRACE_RESULT (current_cpu
, abuf
, "drc", 'f', opval
);
2058 CASE (sem
, INSN_FMOV9_COMPACT
) : /* mov.l $drm, @($imm12x8, $rn) */
2060 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2061 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2062 #define FLD(f) abuf->fields.sfmt_fmov9_compact.f
2063 int UNUSED written
= 0;
2064 IADDR UNUSED pc
= abuf
->addr
;
2065 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2068 DF opval
= GET_H_DRC (FLD (f_dm
));
2069 SETMEMDF (current_cpu
, pc
, ADDSI (GET_H_GRC (FLD (f_rn
)), FLD (f_imm12x8
)), opval
);
2070 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'f', opval
);
2077 CASE (sem
, INSN_FMUL_COMPACT
) : /* fmul $fsdm, $fsdn */
2079 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2080 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2081 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
2082 int UNUSED written
= 0;
2083 IADDR UNUSED pc
= abuf
->addr
;
2084 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2086 if (GET_H_PRBIT ()) {
2088 DF opval
= sh64_fmuld (current_cpu
, GET_H_FSD (FLD (f_rm
)), GET_H_FSD (FLD (f_rn
)));
2089 SET_H_FSD (FLD (f_rn
), opval
);
2090 written
|= (1 << 3);
2091 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
2095 DF opval
= sh64_fmuls (current_cpu
, GET_H_FSD (FLD (f_rm
)), GET_H_FSD (FLD (f_rn
)));
2096 SET_H_FSD (FLD (f_rn
), opval
);
2097 written
|= (1 << 3);
2098 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
2102 abuf
->written
= written
;
2107 CASE (sem
, INSN_FNEG_COMPACT
) : /* fneg $fsdn */
2109 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2110 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2111 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2112 int UNUSED written
= 0;
2113 IADDR UNUSED pc
= abuf
->addr
;
2114 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2116 if (GET_H_PRBIT ()) {
2118 DF opval
= sh64_fnegd (current_cpu
, GET_H_FSD (FLD (f_rn
)));
2119 SET_H_FSD (FLD (f_rn
), opval
);
2120 written
|= (1 << 2);
2121 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
2125 DF opval
= sh64_fnegs (current_cpu
, GET_H_FSD (FLD (f_rn
)));
2126 SET_H_FSD (FLD (f_rn
), opval
);
2127 written
|= (1 << 2);
2128 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
2132 abuf
->written
= written
;
2137 CASE (sem
, INSN_FRCHG_COMPACT
) : /* frchg */
2139 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2140 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2141 #define FLD(f) abuf->fields.sfmt_empty.f
2142 int UNUSED written
= 0;
2143 IADDR UNUSED pc
= abuf
->addr
;
2144 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2147 BI opval
= NOTBI (GET_H_FRBIT ());
2148 SET_H_FRBIT (opval
);
2149 CGEN_TRACE_RESULT (current_cpu
, abuf
, "frbit", 'x', opval
);
2156 CASE (sem
, INSN_FSCHG_COMPACT
) : /* fschg */
2158 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2159 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2160 #define FLD(f) abuf->fields.sfmt_empty.f
2161 int UNUSED written
= 0;
2162 IADDR UNUSED pc
= abuf
->addr
;
2163 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2166 BI opval
= NOTBI (GET_H_SZBIT ());
2167 SET_H_SZBIT (opval
);
2168 CGEN_TRACE_RESULT (current_cpu
, abuf
, "szbit", 'x', opval
);
2175 CASE (sem
, INSN_FSQRT_COMPACT
) : /* fsqrt $fsdn */
2177 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2178 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2179 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2180 int UNUSED written
= 0;
2181 IADDR UNUSED pc
= abuf
->addr
;
2182 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2184 if (GET_H_PRBIT ()) {
2186 DF opval
= sh64_fsqrtd (current_cpu
, GET_H_FSD (FLD (f_rn
)));
2187 SET_H_FSD (FLD (f_rn
), opval
);
2188 written
|= (1 << 2);
2189 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
2193 DF opval
= sh64_fsqrts (current_cpu
, GET_H_FSD (FLD (f_rn
)));
2194 SET_H_FSD (FLD (f_rn
), opval
);
2195 written
|= (1 << 2);
2196 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
2200 abuf
->written
= written
;
2205 CASE (sem
, INSN_FSTS_COMPACT
) : /* fsts fpul, $frn */
2207 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2208 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2209 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2210 int UNUSED written
= 0;
2211 IADDR UNUSED pc
= abuf
->addr
;
2212 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2215 SF opval
= CPU (h_fr
[((UINT
) 32)]);
2216 SET_H_FRC (FLD (f_rn
), opval
);
2217 CGEN_TRACE_RESULT (current_cpu
, abuf
, "frc", 'f', opval
);
2224 CASE (sem
, INSN_FSUB_COMPACT
) : /* fsub $fsdm, $fsdn */
2226 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2227 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2228 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
2229 int UNUSED written
= 0;
2230 IADDR UNUSED pc
= abuf
->addr
;
2231 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2233 if (GET_H_PRBIT ()) {
2235 DF opval
= sh64_fsubd (current_cpu
, GET_H_FSD (FLD (f_rn
)), GET_H_FSD (FLD (f_rm
)));
2236 SET_H_FSD (FLD (f_rn
), opval
);
2237 written
|= (1 << 3);
2238 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
2242 DF opval
= sh64_fsubs (current_cpu
, GET_H_FSD (FLD (f_rn
)), GET_H_FSD (FLD (f_rm
)));
2243 SET_H_FSD (FLD (f_rn
), opval
);
2244 written
|= (1 << 3);
2245 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fsd", 'f', opval
);
2249 abuf
->written
= written
;
2254 CASE (sem
, INSN_FTRC_COMPACT
) : /* ftrc $fsdn, fpul */
2256 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2257 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2258 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2259 int UNUSED written
= 0;
2260 IADDR UNUSED pc
= abuf
->addr
;
2261 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2264 SF opval
= ((GET_H_PRBIT ()) ? (sh64_ftrcdl (current_cpu
, GET_H_FSD (FLD (f_rn
)))) : (sh64_ftrcsl (current_cpu
, GET_H_FSD (FLD (f_rn
)))));
2265 CPU (h_fr
[((UINT
) 32)]) = opval
;
2266 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fr", 'f', opval
);
2273 CASE (sem
, INSN_FTRV_COMPACT
) : /* ftrv xmtrx, $fvn */
2275 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2276 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2277 #define FLD(f) abuf->fields.sfmt_fipr_compact.f
2278 int UNUSED written
= 0;
2279 IADDR UNUSED pc
= abuf
->addr
;
2280 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2282 sh64_ftrv (current_cpu
, FLD (f_vn
));
2288 CASE (sem
, INSN_JMP_COMPACT
) : /* jmp @$rn */
2290 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2291 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2292 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2293 int UNUSED written
= 0;
2294 IADDR UNUSED pc
= abuf
->addr
;
2296 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2300 UDI opval
= ADDDI (pc
, 2);
2301 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
2302 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
2307 UDI opval
= GET_H_GRC (FLD (f_rn
));
2308 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
2309 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
2315 SEM_BRANCH_FINI (vpc
);
2320 CASE (sem
, INSN_JSR_COMPACT
) : /* jsr @$rn */
2322 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2323 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2324 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2325 int UNUSED written
= 0;
2326 IADDR UNUSED pc
= abuf
->addr
;
2328 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2333 SI opval
= ADDDI (pc
, 4);
2335 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pr", 'x', opval
);
2339 UDI opval
= ADDDI (pc
, 2);
2340 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
2341 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
2346 UDI opval
= GET_H_GRC (FLD (f_rn
));
2347 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
2348 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
2354 SEM_BRANCH_FINI (vpc
);
2359 CASE (sem
, INSN_LDC_GBR_COMPACT
) : /* ldc $rn, gbr */
2361 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2362 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2363 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2364 int UNUSED written
= 0;
2365 IADDR UNUSED pc
= abuf
->addr
;
2366 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2369 SI opval
= GET_H_GRC (FLD (f_rn
));
2371 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gbr", 'x', opval
);
2378 CASE (sem
, INSN_LDC_VBR_COMPACT
) : /* ldc $rn, vbr */
2380 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2381 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2382 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2383 int UNUSED written
= 0;
2384 IADDR UNUSED pc
= abuf
->addr
;
2385 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2388 SI opval
= GET_H_GRC (FLD (f_rn
));
2390 CGEN_TRACE_RESULT (current_cpu
, abuf
, "vbr", 'x', opval
);
2397 CASE (sem
, INSN_LDC_SR_COMPACT
) : /* ldc $rn, sr */
2399 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2400 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2401 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2402 int UNUSED written
= 0;
2403 IADDR UNUSED pc
= abuf
->addr
;
2404 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2407 SI opval
= GET_H_GRC (FLD (f_rn
));
2409 CGEN_TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
2416 CASE (sem
, INSN_LDCL_GBR_COMPACT
) : /* ldc.l @${rn}+, gbr */
2418 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2419 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2420 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2421 int UNUSED written
= 0;
2422 IADDR UNUSED pc
= abuf
->addr
;
2423 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2427 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)));
2429 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gbr", 'x', opval
);
2432 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), 4);
2433 SET_H_GRC (FLD (f_rn
), opval
);
2434 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2442 CASE (sem
, INSN_LDCL_VBR_COMPACT
) : /* ldc.l @${rn}+, vbr */
2444 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2445 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2446 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2447 int UNUSED written
= 0;
2448 IADDR UNUSED pc
= abuf
->addr
;
2449 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2453 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)));
2455 CGEN_TRACE_RESULT (current_cpu
, abuf
, "vbr", 'x', opval
);
2458 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), 4);
2459 SET_H_GRC (FLD (f_rn
), opval
);
2460 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2468 CASE (sem
, INSN_LDS_FPSCR_COMPACT
) : /* lds $rn, fpscr */
2470 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2471 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2472 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2473 int UNUSED written
= 0;
2474 IADDR UNUSED pc
= abuf
->addr
;
2475 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2478 SI opval
= GET_H_GRC (FLD (f_rn
));
2479 CPU (h_fpscr
) = opval
;
2480 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fpscr", 'x', opval
);
2487 CASE (sem
, INSN_LDSL_FPSCR_COMPACT
) : /* lds.l @${rn}+, fpscr */
2489 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2490 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2491 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2492 int UNUSED written
= 0;
2493 IADDR UNUSED pc
= abuf
->addr
;
2494 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2498 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)));
2499 CPU (h_fpscr
) = opval
;
2500 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fpscr", 'x', opval
);
2503 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), 4);
2504 SET_H_GRC (FLD (f_rn
), opval
);
2505 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2513 CASE (sem
, INSN_LDS_FPUL_COMPACT
) : /* lds $rn, fpul */
2515 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2516 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2517 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2518 int UNUSED written
= 0;
2519 IADDR UNUSED pc
= abuf
->addr
;
2520 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2523 SF opval
= SUBWORDSISF (GET_H_GRC (FLD (f_rn
)));
2524 CPU (h_fr
[((UINT
) 32)]) = opval
;
2525 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fr", 'f', opval
);
2532 CASE (sem
, INSN_LDSL_FPUL_COMPACT
) : /* lds.l @${rn}+, fpul */
2534 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2535 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2536 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2537 int UNUSED written
= 0;
2538 IADDR UNUSED pc
= abuf
->addr
;
2539 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2543 SF opval
= GETMEMSF (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)));
2544 CPU (h_fr
[((UINT
) 32)]) = opval
;
2545 CGEN_TRACE_RESULT (current_cpu
, abuf
, "fr", 'f', opval
);
2548 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), 4);
2549 SET_H_GRC (FLD (f_rn
), opval
);
2550 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2558 CASE (sem
, INSN_LDS_MACH_COMPACT
) : /* lds $rn, mach */
2560 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2561 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2562 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2563 int UNUSED written
= 0;
2564 IADDR UNUSED pc
= abuf
->addr
;
2565 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2568 SI opval
= GET_H_GRC (FLD (f_rn
));
2570 CGEN_TRACE_RESULT (current_cpu
, abuf
, "mach", 'x', opval
);
2577 CASE (sem
, INSN_LDSL_MACH_COMPACT
) : /* lds.l @${rn}+, mach */
2579 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2580 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2581 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2582 int UNUSED written
= 0;
2583 IADDR UNUSED pc
= abuf
->addr
;
2584 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2588 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)));
2590 CGEN_TRACE_RESULT (current_cpu
, abuf
, "mach", 'x', opval
);
2593 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), 4);
2594 SET_H_GRC (FLD (f_rn
), opval
);
2595 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2603 CASE (sem
, INSN_LDS_MACL_COMPACT
) : /* lds $rn, macl */
2605 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2606 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2607 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2608 int UNUSED written
= 0;
2609 IADDR UNUSED pc
= abuf
->addr
;
2610 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2613 SI opval
= GET_H_GRC (FLD (f_rn
));
2615 CGEN_TRACE_RESULT (current_cpu
, abuf
, "macl", 'x', opval
);
2622 CASE (sem
, INSN_LDSL_MACL_COMPACT
) : /* lds.l @${rn}+, macl */
2624 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2625 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2626 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2627 int UNUSED written
= 0;
2628 IADDR UNUSED pc
= abuf
->addr
;
2629 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2633 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)));
2635 CGEN_TRACE_RESULT (current_cpu
, abuf
, "macl", 'x', opval
);
2638 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), 4);
2639 SET_H_GRC (FLD (f_rn
), opval
);
2640 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2648 CASE (sem
, INSN_LDS_PR_COMPACT
) : /* lds $rn, pr */
2650 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2651 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2652 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2653 int UNUSED written
= 0;
2654 IADDR UNUSED pc
= abuf
->addr
;
2655 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2658 SI opval
= GET_H_GRC (FLD (f_rn
));
2660 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pr", 'x', opval
);
2667 CASE (sem
, INSN_LDSL_PR_COMPACT
) : /* lds.l @${rn}+, pr */
2669 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2670 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2671 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
2672 int UNUSED written
= 0;
2673 IADDR UNUSED pc
= abuf
->addr
;
2674 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2678 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)));
2680 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pr", 'x', opval
);
2683 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), 4);
2684 SET_H_GRC (FLD (f_rn
), opval
);
2685 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2693 CASE (sem
, INSN_MACL_COMPACT
) : /* mac.l @${rm}+, @${rn}+ */
2695 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2696 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2697 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
2698 int UNUSED written
= 0;
2699 IADDR UNUSED pc
= abuf
->addr
;
2700 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2708 tmp_x
= GETMEMSI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)));
2710 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), 4);
2711 SET_H_GRC (FLD (f_rn
), opval
);
2712 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2714 if (EQSI (FLD (f_rn
), FLD (f_rm
))) {
2717 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), 4);
2718 SET_H_GRC (FLD (f_rn
), opval
);
2719 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2722 SI opval
= ADDSI (GET_H_GRC (FLD (f_rm
)), 4);
2723 SET_H_GRC (FLD (f_rm
), opval
);
2724 written
|= (1 << 11);
2725 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2729 tmp_y
= GETMEMSI (current_cpu
, pc
, GET_H_GRC (FLD (f_rm
)));
2731 SI opval
= ADDSI (GET_H_GRC (FLD (f_rm
)), 4);
2732 SET_H_GRC (FLD (f_rm
), opval
);
2733 written
|= (1 << 11);
2734 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2736 tmp_tmpry
= MULDI (ZEXTSIDI (tmp_x
), ZEXTSIDI (tmp_y
));
2737 tmp_mac
= ORDI (SLLDI (ZEXTSIDI (GET_H_MACH ()), 32), ZEXTSIDI (GET_H_MACL ()));
2738 tmp_result
= ADDDI (tmp_mac
, tmp_tmpry
);
2740 if (GET_H_SBIT ()) {
2744 tmp_max
= SRLDI (INVDI (0), 16);
2745 tmp_min
= SRLDI (INVDI (0), 15);
2746 if (GTDI (tmp_result
, tmp_max
)) {
2747 tmp_result
= tmp_max
;
2749 if (LTDI (tmp_result
, tmp_min
)) {
2750 tmp_result
= tmp_min
;
2756 SI opval
= SUBWORDDISI (tmp_result
, 0);
2758 CGEN_TRACE_RESULT (current_cpu
, abuf
, "mach", 'x', opval
);
2761 SI opval
= SUBWORDDISI (tmp_result
, 1);
2763 CGEN_TRACE_RESULT (current_cpu
, abuf
, "macl", 'x', opval
);
2768 abuf
->written
= written
;
2773 CASE (sem
, INSN_MACW_COMPACT
) : /* mac.w @${rm}+, @${rn}+ */
2775 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2776 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2777 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
2778 int UNUSED written
= 0;
2779 IADDR UNUSED pc
= abuf
->addr
;
2780 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2788 tmp_x
= GETMEMHI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)));
2790 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), 2);
2791 SET_H_GRC (FLD (f_rn
), opval
);
2792 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2794 if (EQSI (FLD (f_rn
), FLD (f_rm
))) {
2797 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), 2);
2798 SET_H_GRC (FLD (f_rn
), opval
);
2799 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2802 SI opval
= ADDSI (GET_H_GRC (FLD (f_rm
)), 2);
2803 SET_H_GRC (FLD (f_rm
), opval
);
2804 written
|= (1 << 11);
2805 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2809 tmp_y
= GETMEMHI (current_cpu
, pc
, GET_H_GRC (FLD (f_rm
)));
2811 SI opval
= ADDSI (GET_H_GRC (FLD (f_rm
)), 2);
2812 SET_H_GRC (FLD (f_rm
), opval
);
2813 written
|= (1 << 11);
2814 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2816 tmp_tmpry
= MULSI (ZEXTHISI (tmp_x
), ZEXTHISI (tmp_y
));
2817 if (GET_H_SBIT ()) {
2819 if (ADDOFSI (tmp_tmpry
, GET_H_MACL (), 0)) {
2823 written
|= (1 << 9);
2824 CGEN_TRACE_RESULT (current_cpu
, abuf
, "mach", 'x', opval
);
2828 SI opval
= ADDSI (tmp_tmpry
, GET_H_MACL ());
2830 written
|= (1 << 10);
2831 CGEN_TRACE_RESULT (current_cpu
, abuf
, "macl", 'x', opval
);
2836 tmp_mac
= ORDI (SLLDI (ZEXTSIDI (GET_H_MACH ()), 32), ZEXTSIDI (GET_H_MACL ()));
2837 tmp_result
= ADDDI (tmp_mac
, EXTSIDI (tmp_tmpry
));
2839 SI opval
= SUBWORDDISI (tmp_result
, 0);
2841 written
|= (1 << 9);
2842 CGEN_TRACE_RESULT (current_cpu
, abuf
, "mach", 'x', opval
);
2845 SI opval
= SUBWORDDISI (tmp_result
, 1);
2847 written
|= (1 << 10);
2848 CGEN_TRACE_RESULT (current_cpu
, abuf
, "macl", 'x', opval
);
2854 abuf
->written
= written
;
2859 CASE (sem
, INSN_MOV_COMPACT
) : /* mov $rm64, $rn64 */
2861 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2862 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2863 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
2864 int UNUSED written
= 0;
2865 IADDR UNUSED pc
= abuf
->addr
;
2866 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2869 DI opval
= GET_H_GR (FLD (f_rm
));
2870 SET_H_GR (FLD (f_rn
), opval
);
2871 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'D', opval
);
2878 CASE (sem
, INSN_MOVI_COMPACT
) : /* mov #$imm8, $rn */
2880 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2881 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2882 #define FLD(f) abuf->fields.sfmt_addi_compact.f
2883 int UNUSED written
= 0;
2884 IADDR UNUSED pc
= abuf
->addr
;
2885 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2888 SI opval
= EXTQIDI (ANDQI (FLD (f_imm8
), 255));
2889 SET_H_GRC (FLD (f_rn
), opval
);
2890 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2897 CASE (sem
, INSN_MOVI20_COMPACT
) : /* movi20 #$imm20, $rn */
2899 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2900 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2901 #define FLD(f) abuf->fields.sfmt_movi20_compact.f
2902 int UNUSED written
= 0;
2903 IADDR UNUSED pc
= abuf
->addr
;
2904 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2907 SI opval
= FLD (f_imm20
);
2908 SET_H_GRC (FLD (f_rn
), opval
);
2909 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2916 CASE (sem
, INSN_MOVB1_COMPACT
) : /* mov.b $rm, @$rn */
2918 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2919 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2920 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
2921 int UNUSED written
= 0;
2922 IADDR UNUSED pc
= abuf
->addr
;
2923 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2926 UQI opval
= SUBWORDSIUQI (GET_H_GRC (FLD (f_rm
)), 3);
2927 SETMEMUQI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)), opval
);
2928 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2935 CASE (sem
, INSN_MOVB2_COMPACT
) : /* mov.b $rm, @-$rn */
2937 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2938 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2939 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
2940 int UNUSED written
= 0;
2941 IADDR UNUSED pc
= abuf
->addr
;
2942 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2946 tmp_addr
= SUBSI (GET_H_GRC (FLD (f_rn
)), 1);
2948 UQI opval
= SUBWORDSIUQI (GET_H_GRC (FLD (f_rm
)), 3);
2949 SETMEMUQI (current_cpu
, pc
, tmp_addr
, opval
);
2950 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2953 SI opval
= tmp_addr
;
2954 SET_H_GRC (FLD (f_rn
), opval
);
2955 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
2963 CASE (sem
, INSN_MOVB3_COMPACT
) : /* mov.b $rm, @(r0,$rn) */
2965 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2966 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2967 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
2968 int UNUSED written
= 0;
2969 IADDR UNUSED pc
= abuf
->addr
;
2970 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2973 UQI opval
= SUBWORDSIUQI (GET_H_GRC (FLD (f_rm
)), 3);
2974 SETMEMUQI (current_cpu
, pc
, ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GRC (FLD (f_rn
))), opval
);
2975 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2982 CASE (sem
, INSN_MOVB4_COMPACT
) : /* mov.b r0, @($imm8, gbr) */
2984 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2985 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2986 #define FLD(f) abuf->fields.sfmt_addi_compact.f
2987 int UNUSED written
= 0;
2988 IADDR UNUSED pc
= abuf
->addr
;
2989 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2993 tmp_addr
= ADDSI (GET_H_GBR (), FLD (f_imm8
));
2995 UQI opval
= SUBWORDSIUQI (GET_H_GRC (((UINT
) 0)), 3);
2996 SETMEMUQI (current_cpu
, pc
, tmp_addr
, opval
);
2997 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3005 CASE (sem
, INSN_MOVB5_COMPACT
) : /* mov.b r0, @($imm4, $rm) */
3007 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3008 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3009 #define FLD(f) abuf->fields.sfmt_movb5_compact.f
3010 int UNUSED written
= 0;
3011 IADDR UNUSED pc
= abuf
->addr
;
3012 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3016 tmp_addr
= ADDSI (GET_H_GRC (FLD (f_rm
)), FLD (f_imm4
));
3018 UQI opval
= SUBWORDSIUQI (GET_H_GRC (((UINT
) 0)), 3);
3019 SETMEMUQI (current_cpu
, pc
, tmp_addr
, opval
);
3020 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3028 CASE (sem
, INSN_MOVB6_COMPACT
) : /* mov.b @$rm, $rn */
3030 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3031 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3032 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3033 int UNUSED written
= 0;
3034 IADDR UNUSED pc
= abuf
->addr
;
3035 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3038 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, GET_H_GRC (FLD (f_rm
))));
3039 SET_H_GRC (FLD (f_rn
), opval
);
3040 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3047 CASE (sem
, INSN_MOVB7_COMPACT
) : /* mov.b @${rm}+, $rn */
3049 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3050 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3051 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3052 int UNUSED written
= 0;
3053 IADDR UNUSED pc
= abuf
->addr
;
3054 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3058 tmp_data
= GETMEMQI (current_cpu
, pc
, GET_H_GRC (FLD (f_rm
)));
3059 if (EQSI (FLD (f_rm
), FLD (f_rn
))) {
3061 SI opval
= EXTQISI (tmp_data
);
3062 SET_H_GRC (FLD (f_rm
), opval
);
3063 written
|= (1 << 4);
3064 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3068 SI opval
= ADDSI (GET_H_GRC (FLD (f_rm
)), 1);
3069 SET_H_GRC (FLD (f_rm
), opval
);
3070 written
|= (1 << 4);
3071 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3075 SI opval
= EXTQISI (tmp_data
);
3076 SET_H_GRC (FLD (f_rn
), opval
);
3077 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3081 abuf
->written
= written
;
3086 CASE (sem
, INSN_MOVB8_COMPACT
) : /* mov.b @(r0, $rm), $rn */
3088 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3089 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3090 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3091 int UNUSED written
= 0;
3092 IADDR UNUSED pc
= abuf
->addr
;
3093 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3096 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GRC (FLD (f_rm
)))));
3097 SET_H_GRC (FLD (f_rn
), opval
);
3098 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3105 CASE (sem
, INSN_MOVB9_COMPACT
) : /* mov.b @($imm8, gbr), r0 */
3107 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3108 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3109 #define FLD(f) abuf->fields.sfmt_addi_compact.f
3110 int UNUSED written
= 0;
3111 IADDR UNUSED pc
= abuf
->addr
;
3112 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3115 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (GET_H_GBR (), FLD (f_imm8
))));
3116 SET_H_GRC (((UINT
) 0), opval
);
3117 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3124 CASE (sem
, INSN_MOVB10_COMPACT
) : /* mov.b @($imm4, $rm), r0 */
3126 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3127 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3128 #define FLD(f) abuf->fields.sfmt_movb5_compact.f
3129 int UNUSED written
= 0;
3130 IADDR UNUSED pc
= abuf
->addr
;
3131 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3134 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (GET_H_GRC (FLD (f_rm
)), FLD (f_imm4
))));
3135 SET_H_GRC (((UINT
) 0), opval
);
3136 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3143 CASE (sem
, INSN_MOVL1_COMPACT
) : /* mov.l $rm, @$rn */
3145 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3146 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3147 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3148 int UNUSED written
= 0;
3149 IADDR UNUSED pc
= abuf
->addr
;
3150 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3153 SI opval
= GET_H_GRC (FLD (f_rm
));
3154 SETMEMSI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)), opval
);
3155 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3162 CASE (sem
, INSN_MOVL2_COMPACT
) : /* mov.l $rm, @-$rn */
3164 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3165 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3166 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3167 int UNUSED written
= 0;
3168 IADDR UNUSED pc
= abuf
->addr
;
3169 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3173 tmp_addr
= SUBSI (GET_H_GRC (FLD (f_rn
)), 4);
3175 SI opval
= GET_H_GRC (FLD (f_rm
));
3176 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
3177 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3180 SI opval
= tmp_addr
;
3181 SET_H_GRC (FLD (f_rn
), opval
);
3182 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3190 CASE (sem
, INSN_MOVL3_COMPACT
) : /* mov.l $rm, @(r0, $rn) */
3192 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3193 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3194 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3195 int UNUSED written
= 0;
3196 IADDR UNUSED pc
= abuf
->addr
;
3197 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3200 SI opval
= GET_H_GRC (FLD (f_rm
));
3201 SETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GRC (FLD (f_rn
))), opval
);
3202 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3209 CASE (sem
, INSN_MOVL4_COMPACT
) : /* mov.l r0, @($imm8x4, gbr) */
3211 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3212 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3213 #define FLD(f) abuf->fields.sfmt_movl10_compact.f
3214 int UNUSED written
= 0;
3215 IADDR UNUSED pc
= abuf
->addr
;
3216 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3219 SI opval
= GET_H_GRC (((UINT
) 0));
3220 SETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GBR (), FLD (f_imm8x4
)), opval
);
3221 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3228 CASE (sem
, INSN_MOVL5_COMPACT
) : /* mov.l $rm, @($imm4x4, $rn) */
3230 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3231 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3232 #define FLD(f) abuf->fields.sfmt_movl5_compact.f
3233 int UNUSED written
= 0;
3234 IADDR UNUSED pc
= abuf
->addr
;
3235 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3238 SI opval
= GET_H_GRC (FLD (f_rm
));
3239 SETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GRC (FLD (f_rn
)), FLD (f_imm4x4
)), opval
);
3240 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3247 CASE (sem
, INSN_MOVL6_COMPACT
) : /* mov.l @$rm, $rn */
3249 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3250 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3251 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3252 int UNUSED written
= 0;
3253 IADDR UNUSED pc
= abuf
->addr
;
3254 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3257 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_GRC (FLD (f_rm
)));
3258 SET_H_GRC (FLD (f_rn
), opval
);
3259 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3266 CASE (sem
, INSN_MOVL7_COMPACT
) : /* mov.l @${rm}+, $rn */
3268 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3269 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3270 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3271 int UNUSED written
= 0;
3272 IADDR UNUSED pc
= abuf
->addr
;
3273 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3277 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_GRC (FLD (f_rm
)));
3278 SET_H_GRC (FLD (f_rn
), opval
);
3279 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3281 if (EQSI (FLD (f_rm
), FLD (f_rn
))) {
3283 SI opval
= GET_H_GRC (FLD (f_rn
));
3284 SET_H_GRC (FLD (f_rm
), opval
);
3285 written
|= (1 << 5);
3286 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3290 SI opval
= ADDSI (GET_H_GRC (FLD (f_rm
)), 4);
3291 SET_H_GRC (FLD (f_rm
), opval
);
3292 written
|= (1 << 5);
3293 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3298 abuf
->written
= written
;
3303 CASE (sem
, INSN_MOVL8_COMPACT
) : /* mov.l @(r0, $rm), $rn */
3305 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3306 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3307 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3308 int UNUSED written
= 0;
3309 IADDR UNUSED pc
= abuf
->addr
;
3310 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3313 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GRC (FLD (f_rm
))));
3314 SET_H_GRC (FLD (f_rn
), opval
);
3315 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3322 CASE (sem
, INSN_MOVL9_COMPACT
) : /* mov.l @($imm8x4, gbr), r0 */
3324 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3325 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3326 #define FLD(f) abuf->fields.sfmt_movl10_compact.f
3327 int UNUSED written
= 0;
3328 IADDR UNUSED pc
= abuf
->addr
;
3329 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3332 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GBR (), FLD (f_imm8x4
)));
3333 SET_H_GRC (((UINT
) 0), opval
);
3334 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3341 CASE (sem
, INSN_MOVL10_COMPACT
) : /* mov.l @($imm8x4, pc), $rn */
3343 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3344 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3345 #define FLD(f) abuf->fields.sfmt_movl10_compact.f
3346 int UNUSED written
= 0;
3347 IADDR UNUSED pc
= abuf
->addr
;
3348 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3351 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (FLD (f_imm8x4
), ANDDI (ADDDI (pc
, 4), INVSI (3))));
3352 SET_H_GRC (FLD (f_rn
), opval
);
3353 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3360 CASE (sem
, INSN_MOVL11_COMPACT
) : /* mov.l @($imm4x4, $rm), $rn */
3362 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3363 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3364 #define FLD(f) abuf->fields.sfmt_movl5_compact.f
3365 int UNUSED written
= 0;
3366 IADDR UNUSED pc
= abuf
->addr
;
3367 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3370 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GRC (FLD (f_rm
)), FLD (f_imm4x4
)));
3371 SET_H_GRC (FLD (f_rn
), opval
);
3372 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3379 CASE (sem
, INSN_MOVL12_COMPACT
) : /* mov.l @($imm12x4, $rm), $rn */
3381 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3382 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3383 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3384 int UNUSED written
= 0;
3385 IADDR UNUSED pc
= abuf
->addr
;
3386 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3389 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GRC (FLD (f_rm
)), FLD (f_imm12x4
)));
3390 SET_H_GRC (FLD (f_rn
), opval
);
3391 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3398 CASE (sem
, INSN_MOVL13_COMPACT
) : /* mov.l $rm, @($imm12x4, $rn) */
3400 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3401 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3402 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3403 int UNUSED written
= 0;
3404 IADDR UNUSED pc
= abuf
->addr
;
3405 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3408 SI opval
= GET_H_GRC (FLD (f_rm
));
3409 SETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GRC (FLD (f_rn
)), FLD (f_imm12x4
)), opval
);
3410 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3417 CASE (sem
, INSN_MOVW1_COMPACT
) : /* mov.w $rm, @$rn */
3419 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3420 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3421 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3422 int UNUSED written
= 0;
3423 IADDR UNUSED pc
= abuf
->addr
;
3424 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3427 HI opval
= SUBWORDSIHI (GET_H_GRC (FLD (f_rm
)), 1);
3428 SETMEMHI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)), opval
);
3429 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3436 CASE (sem
, INSN_MOVW2_COMPACT
) : /* mov.w $rm, @-$rn */
3438 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3439 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3440 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3441 int UNUSED written
= 0;
3442 IADDR UNUSED pc
= abuf
->addr
;
3443 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3447 tmp_addr
= SUBSI (GET_H_GRC (FLD (f_rn
)), 2);
3449 HI opval
= SUBWORDSIHI (GET_H_GRC (FLD (f_rm
)), 1);
3450 SETMEMHI (current_cpu
, pc
, tmp_addr
, opval
);
3451 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3454 SI opval
= tmp_addr
;
3455 SET_H_GRC (FLD (f_rn
), opval
);
3456 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3464 CASE (sem
, INSN_MOVW3_COMPACT
) : /* mov.w $rm, @(r0, $rn) */
3466 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3467 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3468 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3469 int UNUSED written
= 0;
3470 IADDR UNUSED pc
= abuf
->addr
;
3471 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3474 HI opval
= SUBWORDSIHI (GET_H_GRC (FLD (f_rm
)), 1);
3475 SETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GRC (FLD (f_rn
))), opval
);
3476 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3483 CASE (sem
, INSN_MOVW4_COMPACT
) : /* mov.w r0, @($imm8x2, gbr) */
3485 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3486 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3487 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
3488 int UNUSED written
= 0;
3489 IADDR UNUSED pc
= abuf
->addr
;
3490 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3493 HI opval
= SUBWORDSIHI (GET_H_GRC (((UINT
) 0)), 1);
3494 SETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GBR (), FLD (f_imm8x2
)), opval
);
3495 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3502 CASE (sem
, INSN_MOVW5_COMPACT
) : /* mov.w r0, @($imm4x2, $rm) */
3504 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3505 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3506 #define FLD(f) abuf->fields.sfmt_movw5_compact.f
3507 int UNUSED written
= 0;
3508 IADDR UNUSED pc
= abuf
->addr
;
3509 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3512 HI opval
= SUBWORDSIHI (GET_H_GRC (((UINT
) 0)), 1);
3513 SETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GRC (FLD (f_rm
)), FLD (f_imm4x2
)), opval
);
3514 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3521 CASE (sem
, INSN_MOVW6_COMPACT
) : /* mov.w @$rm, $rn */
3523 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3524 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3525 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3526 int UNUSED written
= 0;
3527 IADDR UNUSED pc
= abuf
->addr
;
3528 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3531 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, GET_H_GRC (FLD (f_rm
))));
3532 SET_H_GRC (FLD (f_rn
), opval
);
3533 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3540 CASE (sem
, INSN_MOVW7_COMPACT
) : /* mov.w @${rm}+, $rn */
3542 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3543 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3544 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3545 int UNUSED written
= 0;
3546 IADDR UNUSED pc
= abuf
->addr
;
3547 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3551 tmp_data
= GETMEMHI (current_cpu
, pc
, GET_H_GRC (FLD (f_rm
)));
3552 if (EQSI (FLD (f_rm
), FLD (f_rn
))) {
3554 SI opval
= EXTHISI (tmp_data
);
3555 SET_H_GRC (FLD (f_rm
), opval
);
3556 written
|= (1 << 4);
3557 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3561 SI opval
= ADDSI (GET_H_GRC (FLD (f_rm
)), 2);
3562 SET_H_GRC (FLD (f_rm
), opval
);
3563 written
|= (1 << 4);
3564 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3568 SI opval
= EXTHISI (tmp_data
);
3569 SET_H_GRC (FLD (f_rn
), opval
);
3570 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3574 abuf
->written
= written
;
3579 CASE (sem
, INSN_MOVW8_COMPACT
) : /* mov.w @(r0, $rm), $rn */
3581 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3582 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3583 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3584 int UNUSED written
= 0;
3585 IADDR UNUSED pc
= abuf
->addr
;
3586 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3589 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GRC (FLD (f_rm
)))));
3590 SET_H_GRC (FLD (f_rn
), opval
);
3591 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3598 CASE (sem
, INSN_MOVW9_COMPACT
) : /* mov.w @($imm8x2, gbr), r0 */
3600 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3601 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3602 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
3603 int UNUSED written
= 0;
3604 IADDR UNUSED pc
= abuf
->addr
;
3605 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3608 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GBR (), FLD (f_imm8x2
))));
3609 SET_H_GRC (((UINT
) 0), opval
);
3610 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3617 CASE (sem
, INSN_MOVW10_COMPACT
) : /* mov.w @($imm8x2, pc), $rn */
3619 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3620 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3621 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
3622 int UNUSED written
= 0;
3623 IADDR UNUSED pc
= abuf
->addr
;
3624 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3627 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, ADDDI (ADDDI (pc
, 4), FLD (f_imm8x2
))));
3628 SET_H_GRC (FLD (f_rn
), opval
);
3629 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3636 CASE (sem
, INSN_MOVW11_COMPACT
) : /* mov.w @($imm4x2, $rm), r0 */
3638 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3639 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3640 #define FLD(f) abuf->fields.sfmt_movw5_compact.f
3641 int UNUSED written
= 0;
3642 IADDR UNUSED pc
= abuf
->addr
;
3643 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3646 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GRC (FLD (f_rm
)), FLD (f_imm4x2
))));
3647 SET_H_GRC (((UINT
) 0), opval
);
3648 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3655 CASE (sem
, INSN_MOVA_COMPACT
) : /* mova @($imm8x4, pc), r0 */
3657 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3658 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3659 #define FLD(f) abuf->fields.sfmt_movl10_compact.f
3660 int UNUSED written
= 0;
3661 IADDR UNUSED pc
= abuf
->addr
;
3662 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3665 SI opval
= ADDDI (ANDDI (ADDDI (pc
, 4), INVSI (3)), FLD (f_imm8x4
));
3666 SET_H_GRC (((UINT
) 0), opval
);
3667 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3674 CASE (sem
, INSN_MOVCAL_COMPACT
) : /* movca.l r0, @$rn */
3676 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3677 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3678 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
3679 int UNUSED written
= 0;
3680 IADDR UNUSED pc
= abuf
->addr
;
3681 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3684 SI opval
= GET_H_GRC (((UINT
) 0));
3685 SETMEMSI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)), opval
);
3686 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3693 CASE (sem
, INSN_MOVCOL_COMPACT
) : /* movco.l r0, @$rn */
3695 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3696 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3697 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
3698 int UNUSED written
= 0;
3699 IADDR UNUSED pc
= abuf
->addr
;
3700 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3703 SI opval
= GET_H_GRC (FLD (f_rn
));
3704 SET_H_GRC (FLD (f_rn
), opval
);
3705 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3712 CASE (sem
, INSN_MOVT_COMPACT
) : /* movt $rn */
3714 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3715 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3716 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
3717 int UNUSED written
= 0;
3718 IADDR UNUSED pc
= abuf
->addr
;
3719 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3722 SI opval
= ZEXTBISI (GET_H_TBIT ());
3723 SET_H_GRC (FLD (f_rn
), opval
);
3724 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3731 CASE (sem
, INSN_MOVUAL_COMPACT
) : /* movua.l @$rn, r0 */
3733 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3734 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3735 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
3736 int UNUSED written
= 0;
3737 IADDR UNUSED pc
= abuf
->addr
;
3738 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3741 SI opval
= sh64_movua (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)));
3742 SET_H_GRC (((UINT
) 0), opval
);
3743 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3750 CASE (sem
, INSN_MOVUAL2_COMPACT
) : /* movua.l @$rn+, r0 */
3752 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3753 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3754 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
3755 int UNUSED written
= 0;
3756 IADDR UNUSED pc
= abuf
->addr
;
3757 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3761 SI opval
= sh64_movua (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)));
3762 SET_H_GRC (((UINT
) 0), opval
);
3763 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3766 SI opval
= ADDSI (GET_H_GRC (FLD (f_rn
)), 4);
3767 SET_H_GRC (FLD (f_rn
), opval
);
3768 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3776 CASE (sem
, INSN_MULL_COMPACT
) : /* mul.l $rm, $rn */
3778 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3779 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3780 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3781 int UNUSED written
= 0;
3782 IADDR UNUSED pc
= abuf
->addr
;
3783 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3786 SI opval
= MULSI (GET_H_GRC (FLD (f_rm
)), GET_H_GRC (FLD (f_rn
)));
3788 CGEN_TRACE_RESULT (current_cpu
, abuf
, "macl", 'x', opval
);
3795 CASE (sem
, INSN_MULSW_COMPACT
) : /* muls.w $rm, $rn */
3797 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3798 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3799 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3800 int UNUSED written
= 0;
3801 IADDR UNUSED pc
= abuf
->addr
;
3802 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3805 SI opval
= MULSI (EXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm
)), 1)), EXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rn
)), 1)));
3807 CGEN_TRACE_RESULT (current_cpu
, abuf
, "macl", 'x', opval
);
3814 CASE (sem
, INSN_MULUW_COMPACT
) : /* mulu.w $rm, $rn */
3816 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3817 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3818 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3819 int UNUSED written
= 0;
3820 IADDR UNUSED pc
= abuf
->addr
;
3821 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3824 SI opval
= MULSI (ZEXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rm
)), 1)), ZEXTHISI (SUBWORDSIHI (GET_H_GRC (FLD (f_rn
)), 1)));
3826 CGEN_TRACE_RESULT (current_cpu
, abuf
, "macl", 'x', opval
);
3833 CASE (sem
, INSN_NEG_COMPACT
) : /* neg $rm, $rn */
3835 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3836 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3837 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3838 int UNUSED written
= 0;
3839 IADDR UNUSED pc
= abuf
->addr
;
3840 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3843 SI opval
= NEGSI (GET_H_GRC (FLD (f_rm
)));
3844 SET_H_GRC (FLD (f_rn
), opval
);
3845 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3852 CASE (sem
, INSN_NEGC_COMPACT
) : /* negc $rm, $rn */
3854 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3855 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3856 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3857 int UNUSED written
= 0;
3858 IADDR UNUSED pc
= abuf
->addr
;
3859 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3863 tmp_flag
= SUBCFSI (0, GET_H_GRC (FLD (f_rm
)), GET_H_TBIT ());
3865 SI opval
= SUBCSI (0, GET_H_GRC (FLD (f_rm
)), GET_H_TBIT ());
3866 SET_H_GRC (FLD (f_rn
), opval
);
3867 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3870 BI opval
= tmp_flag
;
3872 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
3880 CASE (sem
, INSN_NOP_COMPACT
) : /* nop */
3882 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3883 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3884 #define FLD(f) abuf->fields.sfmt_empty.f
3885 int UNUSED written
= 0;
3886 IADDR UNUSED pc
= abuf
->addr
;
3887 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3895 CASE (sem
, INSN_NOT_COMPACT
) : /* not $rm64, $rn64 */
3897 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3898 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3899 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3900 int UNUSED written
= 0;
3901 IADDR UNUSED pc
= abuf
->addr
;
3902 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3905 DI opval
= INVDI (GET_H_GR (FLD (f_rm
)));
3906 SET_H_GR (FLD (f_rn
), opval
);
3907 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'D', opval
);
3914 CASE (sem
, INSN_OCBI_COMPACT
) : /* ocbi @$rn */
3916 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3917 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3918 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
3919 int UNUSED written
= 0;
3920 IADDR UNUSED pc
= abuf
->addr
;
3921 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3925 SI opval
= GET_H_GRC (FLD (f_rn
));
3926 SET_H_GRC (FLD (f_rn
), opval
);
3927 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3936 CASE (sem
, INSN_OCBP_COMPACT
) : /* ocbp @$rn */
3938 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3939 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3940 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
3941 int UNUSED written
= 0;
3942 IADDR UNUSED pc
= abuf
->addr
;
3943 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3947 SI opval
= GET_H_GRC (FLD (f_rn
));
3948 SET_H_GRC (FLD (f_rn
), opval
);
3949 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3958 CASE (sem
, INSN_OCBWB_COMPACT
) : /* ocbwb @$rn */
3960 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3961 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3962 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
3963 int UNUSED written
= 0;
3964 IADDR UNUSED pc
= abuf
->addr
;
3965 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3969 SI opval
= GET_H_GRC (FLD (f_rn
));
3970 SET_H_GRC (FLD (f_rn
), opval
);
3971 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
3980 CASE (sem
, INSN_OR_COMPACT
) : /* or $rm64, $rn64 */
3982 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3983 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3984 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
3985 int UNUSED written
= 0;
3986 IADDR UNUSED pc
= abuf
->addr
;
3987 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3990 DI opval
= ORDI (GET_H_GR (FLD (f_rm
)), GET_H_GR (FLD (f_rn
)));
3991 SET_H_GR (FLD (f_rn
), opval
);
3992 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'D', opval
);
3999 CASE (sem
, INSN_ORI_COMPACT
) : /* or #$uimm8, r0 */
4001 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4002 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4003 #define FLD(f) abuf->fields.sfmt_addi_compact.f
4004 int UNUSED written
= 0;
4005 IADDR UNUSED pc
= abuf
->addr
;
4006 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4009 SI opval
= ORSI (GET_H_GRC (((UINT
) 0)), ZEXTSIDI (FLD (f_imm8
)));
4010 SET_H_GRC (((UINT
) 0), opval
);
4011 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4018 CASE (sem
, INSN_ORB_COMPACT
) : /* or.b #$imm8, @(r0, gbr) */
4020 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4021 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4022 #define FLD(f) abuf->fields.sfmt_addi_compact.f
4023 int UNUSED written
= 0;
4024 IADDR UNUSED pc
= abuf
->addr
;
4025 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4030 tmp_addr
= ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GBR ());
4031 tmp_data
= ORQI (GETMEMUQI (current_cpu
, pc
, tmp_addr
), FLD (f_imm8
));
4033 UQI opval
= tmp_data
;
4034 SETMEMUQI (current_cpu
, pc
, tmp_addr
, opval
);
4035 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4043 CASE (sem
, INSN_PREF_COMPACT
) : /* pref @$rn */
4045 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4046 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4047 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4048 int UNUSED written
= 0;
4049 IADDR UNUSED pc
= abuf
->addr
;
4050 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4052 sh64_pref (current_cpu
, GET_H_GRC (FLD (f_rn
)));
4058 CASE (sem
, INSN_ROTCL_COMPACT
) : /* rotcl $rn */
4060 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4061 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4062 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4063 int UNUSED written
= 0;
4064 IADDR UNUSED pc
= abuf
->addr
;
4065 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4069 tmp_temp
= SRLSI (GET_H_GRC (FLD (f_rn
)), 31);
4071 SI opval
= ORSI (SLLSI (GET_H_GRC (FLD (f_rn
)), 1), GET_H_TBIT ());
4072 SET_H_GRC (FLD (f_rn
), opval
);
4073 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4076 BI opval
= ((tmp_temp
) ? (1) : (0));
4078 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
4086 CASE (sem
, INSN_ROTCR_COMPACT
) : /* rotcr $rn */
4088 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4089 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4090 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4091 int UNUSED written
= 0;
4092 IADDR UNUSED pc
= abuf
->addr
;
4093 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4098 tmp_lsbit
= ((EQSI (ANDSI (GET_H_GRC (FLD (f_rn
)), 1), 0)) ? (0) : (1));
4099 tmp_temp
= GET_H_TBIT ();
4101 SI opval
= ORSI (SRLSI (GET_H_GRC (FLD (f_rn
)), 1), SLLSI (tmp_temp
, 31));
4102 SET_H_GRC (FLD (f_rn
), opval
);
4103 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4106 BI opval
= ((tmp_lsbit
) ? (1) : (0));
4108 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
4116 CASE (sem
, INSN_ROTL_COMPACT
) : /* rotl $rn */
4118 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4119 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4120 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4121 int UNUSED written
= 0;
4122 IADDR UNUSED pc
= abuf
->addr
;
4123 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4127 tmp_temp
= SRLSI (GET_H_GRC (FLD (f_rn
)), 31);
4129 SI opval
= ORSI (SLLSI (GET_H_GRC (FLD (f_rn
)), 1), tmp_temp
);
4130 SET_H_GRC (FLD (f_rn
), opval
);
4131 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4134 BI opval
= ((tmp_temp
) ? (1) : (0));
4136 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
4144 CASE (sem
, INSN_ROTR_COMPACT
) : /* rotr $rn */
4146 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4147 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4148 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4149 int UNUSED written
= 0;
4150 IADDR UNUSED pc
= abuf
->addr
;
4151 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4156 tmp_lsbit
= ((EQSI (ANDSI (GET_H_GRC (FLD (f_rn
)), 1), 0)) ? (0) : (1));
4157 tmp_temp
= tmp_lsbit
;
4159 SI opval
= ORSI (SRLSI (GET_H_GRC (FLD (f_rn
)), 1), SLLSI (tmp_temp
, 31));
4160 SET_H_GRC (FLD (f_rn
), opval
);
4161 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4164 BI opval
= ((tmp_lsbit
) ? (1) : (0));
4166 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
4174 CASE (sem
, INSN_RTS_COMPACT
) : /* rts */
4176 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4177 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4178 #define FLD(f) abuf->fields.sfmt_empty.f
4179 int UNUSED written
= 0;
4180 IADDR UNUSED pc
= abuf
->addr
;
4182 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4186 UDI opval
= ADDDI (pc
, 2);
4187 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
4188 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
4193 UDI opval
= GET_H_PR ();
4194 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
4195 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'D', opval
);
4201 SEM_BRANCH_FINI (vpc
);
4206 CASE (sem
, INSN_SETS_COMPACT
) : /* sets */
4208 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4209 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4210 #define FLD(f) abuf->fields.sfmt_empty.f
4211 int UNUSED written
= 0;
4212 IADDR UNUSED pc
= abuf
->addr
;
4213 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4218 CGEN_TRACE_RESULT (current_cpu
, abuf
, "sbit", 'x', opval
);
4225 CASE (sem
, INSN_SETT_COMPACT
) : /* sett */
4227 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4228 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4229 #define FLD(f) abuf->fields.sfmt_empty.f
4230 int UNUSED written
= 0;
4231 IADDR UNUSED pc
= abuf
->addr
;
4232 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4237 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
4244 CASE (sem
, INSN_SHAD_COMPACT
) : /* shad $rm, $rn */
4246 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4247 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4248 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
4249 int UNUSED written
= 0;
4250 IADDR UNUSED pc
= abuf
->addr
;
4251 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4255 tmp_shamt
= ANDSI (GET_H_GRC (FLD (f_rm
)), 31);
4256 if (GESI (GET_H_GRC (FLD (f_rm
)), 0)) {
4258 SI opval
= SLLSI (GET_H_GRC (FLD (f_rn
)), tmp_shamt
);
4259 SET_H_GRC (FLD (f_rn
), opval
);
4260 written
|= (1 << 2);
4261 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4264 if (NESI (tmp_shamt
, 0)) {
4266 SI opval
= SRASI (GET_H_GRC (FLD (f_rn
)), SUBSI (32, tmp_shamt
));
4267 SET_H_GRC (FLD (f_rn
), opval
);
4268 written
|= (1 << 2);
4269 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4272 if (LTSI (GET_H_GRC (FLD (f_rn
)), 0)) {
4274 SI opval
= NEGSI (1);
4275 SET_H_GRC (FLD (f_rn
), opval
);
4276 written
|= (1 << 2);
4277 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4282 SET_H_GRC (FLD (f_rn
), opval
);
4283 written
|= (1 << 2);
4284 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4291 abuf
->written
= written
;
4296 CASE (sem
, INSN_SHAL_COMPACT
) : /* shal $rn */
4298 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4299 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4300 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4301 int UNUSED written
= 0;
4302 IADDR UNUSED pc
= abuf
->addr
;
4303 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4307 tmp_t
= SRLSI (GET_H_GRC (FLD (f_rn
)), 31);
4309 SI opval
= SLLSI (GET_H_GRC (FLD (f_rn
)), 1);
4310 SET_H_GRC (FLD (f_rn
), opval
);
4311 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4314 BI opval
= ((tmp_t
) ? (1) : (0));
4316 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
4324 CASE (sem
, INSN_SHAR_COMPACT
) : /* shar $rn */
4326 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4327 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4328 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4329 int UNUSED written
= 0;
4330 IADDR UNUSED pc
= abuf
->addr
;
4331 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4335 tmp_t
= ANDSI (GET_H_GRC (FLD (f_rn
)), 1);
4337 SI opval
= SRASI (GET_H_GRC (FLD (f_rn
)), 1);
4338 SET_H_GRC (FLD (f_rn
), opval
);
4339 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4342 BI opval
= ((tmp_t
) ? (1) : (0));
4344 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
4352 CASE (sem
, INSN_SHLD_COMPACT
) : /* shld $rm, $rn */
4354 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4355 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4356 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
4357 int UNUSED written
= 0;
4358 IADDR UNUSED pc
= abuf
->addr
;
4359 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4363 tmp_shamt
= ANDSI (GET_H_GRC (FLD (f_rm
)), 31);
4364 if (GESI (GET_H_GRC (FLD (f_rm
)), 0)) {
4366 SI opval
= SLLSI (GET_H_GRC (FLD (f_rn
)), tmp_shamt
);
4367 SET_H_GRC (FLD (f_rn
), opval
);
4368 written
|= (1 << 2);
4369 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4372 if (NESI (tmp_shamt
, 0)) {
4374 SI opval
= SRLSI (GET_H_GRC (FLD (f_rn
)), SUBSI (32, tmp_shamt
));
4375 SET_H_GRC (FLD (f_rn
), opval
);
4376 written
|= (1 << 2);
4377 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4382 SET_H_GRC (FLD (f_rn
), opval
);
4383 written
|= (1 << 2);
4384 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4390 abuf
->written
= written
;
4395 CASE (sem
, INSN_SHLL_COMPACT
) : /* shll $rn */
4397 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4398 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4399 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4400 int UNUSED written
= 0;
4401 IADDR UNUSED pc
= abuf
->addr
;
4402 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4406 tmp_t
= SRLSI (GET_H_GRC (FLD (f_rn
)), 31);
4408 SI opval
= SLLSI (GET_H_GRC (FLD (f_rn
)), 1);
4409 SET_H_GRC (FLD (f_rn
), opval
);
4410 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4413 BI opval
= ((tmp_t
) ? (1) : (0));
4415 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
4423 CASE (sem
, INSN_SHLL2_COMPACT
) : /* shll2 $rn */
4425 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4426 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4427 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4428 int UNUSED written
= 0;
4429 IADDR UNUSED pc
= abuf
->addr
;
4430 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4433 SI opval
= SLLSI (GET_H_GRC (FLD (f_rn
)), 2);
4434 SET_H_GRC (FLD (f_rn
), opval
);
4435 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4442 CASE (sem
, INSN_SHLL8_COMPACT
) : /* shll8 $rn */
4444 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4445 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4446 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4447 int UNUSED written
= 0;
4448 IADDR UNUSED pc
= abuf
->addr
;
4449 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4452 SI opval
= SLLSI (GET_H_GRC (FLD (f_rn
)), 8);
4453 SET_H_GRC (FLD (f_rn
), opval
);
4454 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4461 CASE (sem
, INSN_SHLL16_COMPACT
) : /* shll16 $rn */
4463 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4464 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4465 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4466 int UNUSED written
= 0;
4467 IADDR UNUSED pc
= abuf
->addr
;
4468 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4471 SI opval
= SLLSI (GET_H_GRC (FLD (f_rn
)), 16);
4472 SET_H_GRC (FLD (f_rn
), opval
);
4473 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4480 CASE (sem
, INSN_SHLR_COMPACT
) : /* shlr $rn */
4482 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4483 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4484 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4485 int UNUSED written
= 0;
4486 IADDR UNUSED pc
= abuf
->addr
;
4487 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4491 tmp_t
= ANDSI (GET_H_GRC (FLD (f_rn
)), 1);
4493 SI opval
= SRLSI (GET_H_GRC (FLD (f_rn
)), 1);
4494 SET_H_GRC (FLD (f_rn
), opval
);
4495 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4498 BI opval
= ((tmp_t
) ? (1) : (0));
4500 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
4508 CASE (sem
, INSN_SHLR2_COMPACT
) : /* shlr2 $rn */
4510 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4511 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4512 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4513 int UNUSED written
= 0;
4514 IADDR UNUSED pc
= abuf
->addr
;
4515 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4518 SI opval
= SRLSI (GET_H_GRC (FLD (f_rn
)), 2);
4519 SET_H_GRC (FLD (f_rn
), opval
);
4520 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4527 CASE (sem
, INSN_SHLR8_COMPACT
) : /* shlr8 $rn */
4529 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4530 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4531 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4532 int UNUSED written
= 0;
4533 IADDR UNUSED pc
= abuf
->addr
;
4534 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4537 SI opval
= SRLSI (GET_H_GRC (FLD (f_rn
)), 8);
4538 SET_H_GRC (FLD (f_rn
), opval
);
4539 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4546 CASE (sem
, INSN_SHLR16_COMPACT
) : /* shlr16 $rn */
4548 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4549 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4550 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4551 int UNUSED written
= 0;
4552 IADDR UNUSED pc
= abuf
->addr
;
4553 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4556 SI opval
= SRLSI (GET_H_GRC (FLD (f_rn
)), 16);
4557 SET_H_GRC (FLD (f_rn
), opval
);
4558 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4565 CASE (sem
, INSN_STC_GBR_COMPACT
) : /* stc gbr, $rn */
4567 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4568 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4569 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4570 int UNUSED written
= 0;
4571 IADDR UNUSED pc
= abuf
->addr
;
4572 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4575 SI opval
= GET_H_GBR ();
4576 SET_H_GRC (FLD (f_rn
), opval
);
4577 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4584 CASE (sem
, INSN_STC_VBR_COMPACT
) : /* stc vbr, $rn */
4586 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4587 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4588 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4589 int UNUSED written
= 0;
4590 IADDR UNUSED pc
= abuf
->addr
;
4591 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4594 SI opval
= GET_H_VBR ();
4595 SET_H_GRC (FLD (f_rn
), opval
);
4596 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4603 CASE (sem
, INSN_STCL_GBR_COMPACT
) : /* stc.l gbr, @-$rn */
4605 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4606 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4607 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4608 int UNUSED written
= 0;
4609 IADDR UNUSED pc
= abuf
->addr
;
4610 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4614 tmp_addr
= SUBSI (GET_H_GRC (FLD (f_rn
)), 4);
4616 SI opval
= GET_H_GBR ();
4617 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4618 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4621 SI opval
= tmp_addr
;
4622 SET_H_GRC (FLD (f_rn
), opval
);
4623 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4631 CASE (sem
, INSN_STCL_VBR_COMPACT
) : /* stc.l vbr, @-$rn */
4633 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4634 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4635 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4636 int UNUSED written
= 0;
4637 IADDR UNUSED pc
= abuf
->addr
;
4638 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4642 tmp_addr
= SUBSI (GET_H_GRC (FLD (f_rn
)), 4);
4644 SI opval
= GET_H_VBR ();
4645 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4646 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4649 SI opval
= tmp_addr
;
4650 SET_H_GRC (FLD (f_rn
), opval
);
4651 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4659 CASE (sem
, INSN_STS_FPSCR_COMPACT
) : /* sts fpscr, $rn */
4661 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4662 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4663 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4664 int UNUSED written
= 0;
4665 IADDR UNUSED pc
= abuf
->addr
;
4666 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4669 SI opval
= CPU (h_fpscr
);
4670 SET_H_GRC (FLD (f_rn
), opval
);
4671 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4678 CASE (sem
, INSN_STSL_FPSCR_COMPACT
) : /* sts.l fpscr, @-$rn */
4680 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4681 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4682 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4683 int UNUSED written
= 0;
4684 IADDR UNUSED pc
= abuf
->addr
;
4685 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4689 tmp_addr
= SUBSI (GET_H_GRC (FLD (f_rn
)), 4);
4691 SI opval
= CPU (h_fpscr
);
4692 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4693 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4696 SI opval
= tmp_addr
;
4697 SET_H_GRC (FLD (f_rn
), opval
);
4698 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4706 CASE (sem
, INSN_STS_FPUL_COMPACT
) : /* sts fpul, $rn */
4708 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4709 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4710 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4711 int UNUSED written
= 0;
4712 IADDR UNUSED pc
= abuf
->addr
;
4713 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4716 SI opval
= SUBWORDSFSI (CPU (h_fr
[((UINT
) 32)]));
4717 SET_H_GRC (FLD (f_rn
), opval
);
4718 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4725 CASE (sem
, INSN_STSL_FPUL_COMPACT
) : /* sts.l fpul, @-$rn */
4727 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4728 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4729 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4730 int UNUSED written
= 0;
4731 IADDR UNUSED pc
= abuf
->addr
;
4732 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4736 tmp_addr
= SUBSI (GET_H_GRC (FLD (f_rn
)), 4);
4738 SF opval
= CPU (h_fr
[((UINT
) 32)]);
4739 SETMEMSF (current_cpu
, pc
, tmp_addr
, opval
);
4740 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'f', opval
);
4743 SI opval
= tmp_addr
;
4744 SET_H_GRC (FLD (f_rn
), opval
);
4745 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4753 CASE (sem
, INSN_STS_MACH_COMPACT
) : /* sts mach, $rn */
4755 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4756 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4757 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4758 int UNUSED written
= 0;
4759 IADDR UNUSED pc
= abuf
->addr
;
4760 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4763 SI opval
= GET_H_MACH ();
4764 SET_H_GRC (FLD (f_rn
), opval
);
4765 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4772 CASE (sem
, INSN_STSL_MACH_COMPACT
) : /* sts.l mach, @-$rn */
4774 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4775 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4776 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4777 int UNUSED written
= 0;
4778 IADDR UNUSED pc
= abuf
->addr
;
4779 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4783 tmp_addr
= SUBSI (GET_H_GRC (FLD (f_rn
)), 4);
4785 SI opval
= GET_H_MACH ();
4786 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4787 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4790 SI opval
= tmp_addr
;
4791 SET_H_GRC (FLD (f_rn
), opval
);
4792 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4800 CASE (sem
, INSN_STS_MACL_COMPACT
) : /* sts macl, $rn */
4802 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4803 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4804 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4805 int UNUSED written
= 0;
4806 IADDR UNUSED pc
= abuf
->addr
;
4807 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4810 SI opval
= GET_H_MACL ();
4811 SET_H_GRC (FLD (f_rn
), opval
);
4812 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4819 CASE (sem
, INSN_STSL_MACL_COMPACT
) : /* sts.l macl, @-$rn */
4821 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4822 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4823 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4824 int UNUSED written
= 0;
4825 IADDR UNUSED pc
= abuf
->addr
;
4826 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4830 tmp_addr
= SUBSI (GET_H_GRC (FLD (f_rn
)), 4);
4832 SI opval
= GET_H_MACL ();
4833 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4834 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4837 SI opval
= tmp_addr
;
4838 SET_H_GRC (FLD (f_rn
), opval
);
4839 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4847 CASE (sem
, INSN_STS_PR_COMPACT
) : /* sts pr, $rn */
4849 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4850 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4851 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4852 int UNUSED written
= 0;
4853 IADDR UNUSED pc
= abuf
->addr
;
4854 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4857 SI opval
= GET_H_PR ();
4858 SET_H_GRC (FLD (f_rn
), opval
);
4859 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4866 CASE (sem
, INSN_STSL_PR_COMPACT
) : /* sts.l pr, @-$rn */
4868 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4869 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4870 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
4871 int UNUSED written
= 0;
4872 IADDR UNUSED pc
= abuf
->addr
;
4873 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4877 tmp_addr
= SUBSI (GET_H_GRC (FLD (f_rn
)), 4);
4879 SI opval
= GET_H_PR ();
4880 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4881 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4884 SI opval
= tmp_addr
;
4885 SET_H_GRC (FLD (f_rn
), opval
);
4886 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4894 CASE (sem
, INSN_SUB_COMPACT
) : /* sub $rm, $rn */
4896 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4897 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4898 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
4899 int UNUSED written
= 0;
4900 IADDR UNUSED pc
= abuf
->addr
;
4901 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4904 SI opval
= SUBSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)));
4905 SET_H_GRC (FLD (f_rn
), opval
);
4906 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4913 CASE (sem
, INSN_SUBC_COMPACT
) : /* subc $rm, $rn */
4915 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4916 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4917 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
4918 int UNUSED written
= 0;
4919 IADDR UNUSED pc
= abuf
->addr
;
4920 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4924 tmp_flag
= SUBCFSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)), GET_H_TBIT ());
4926 SI opval
= SUBCSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)), GET_H_TBIT ());
4927 SET_H_GRC (FLD (f_rn
), opval
);
4928 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4931 BI opval
= tmp_flag
;
4933 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
4941 CASE (sem
, INSN_SUBV_COMPACT
) : /* subv $rm, $rn */
4943 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4944 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4945 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
4946 int UNUSED written
= 0;
4947 IADDR UNUSED pc
= abuf
->addr
;
4948 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4952 tmp_t
= SUBOFSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)), 0);
4954 SI opval
= SUBSI (GET_H_GRC (FLD (f_rn
)), GET_H_GRC (FLD (f_rm
)));
4955 SET_H_GRC (FLD (f_rn
), opval
);
4956 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4959 BI opval
= ((tmp_t
) ? (1) : (0));
4961 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
4969 CASE (sem
, INSN_SWAPB_COMPACT
) : /* swap.b $rm, $rn */
4971 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4972 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4973 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
4974 int UNUSED written
= 0;
4975 IADDR UNUSED pc
= abuf
->addr
;
4976 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4982 tmp_top_half
= SUBWORDSIHI (GET_H_GRC (FLD (f_rm
)), 0);
4983 tmp_byte1
= SUBWORDSIQI (GET_H_GRC (FLD (f_rm
)), 2);
4984 tmp_byte0
= SUBWORDSIQI (GET_H_GRC (FLD (f_rm
)), 3);
4986 SI opval
= ORSI (SLLSI (tmp_top_half
, 16), ORSI (SLLSI (tmp_byte0
, 8), tmp_byte1
));
4987 SET_H_GRC (FLD (f_rn
), opval
);
4988 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
4996 CASE (sem
, INSN_SWAPW_COMPACT
) : /* swap.w $rm, $rn */
4998 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4999 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5000 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
5001 int UNUSED written
= 0;
5002 IADDR UNUSED pc
= abuf
->addr
;
5003 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5006 SI opval
= ORSI (SRLSI (GET_H_GRC (FLD (f_rm
)), 16), SLLSI (GET_H_GRC (FLD (f_rm
)), 16));
5007 SET_H_GRC (FLD (f_rn
), opval
);
5008 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
5015 CASE (sem
, INSN_TASB_COMPACT
) : /* tas.b @$rn */
5017 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5018 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5019 #define FLD(f) abuf->fields.sfmt_movw10_compact.f
5020 int UNUSED written
= 0;
5021 IADDR UNUSED pc
= abuf
->addr
;
5022 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5026 tmp_byte
= GETMEMUQI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)));
5028 BI opval
= ((EQQI (tmp_byte
, 0)) ? (1) : (0));
5030 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
5032 tmp_byte
= ORQI (tmp_byte
, 128);
5034 UQI opval
= tmp_byte
;
5035 SETMEMUQI (current_cpu
, pc
, GET_H_GRC (FLD (f_rn
)), opval
);
5036 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5044 CASE (sem
, INSN_TRAPA_COMPACT
) : /* trapa #$uimm8 */
5046 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5047 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5048 #define FLD(f) abuf->fields.sfmt_addi_compact.f
5049 int UNUSED written
= 0;
5050 IADDR UNUSED pc
= abuf
->addr
;
5051 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5053 sh64_compact_trapa (current_cpu
, FLD (f_imm8
), pc
);
5059 CASE (sem
, INSN_TST_COMPACT
) : /* tst $rm, $rn */
5061 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5062 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5063 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
5064 int UNUSED written
= 0;
5065 IADDR UNUSED pc
= abuf
->addr
;
5066 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5069 BI opval
= ((EQSI (ANDSI (GET_H_GRC (FLD (f_rm
)), GET_H_GRC (FLD (f_rn
))), 0)) ? (1) : (0));
5071 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
5078 CASE (sem
, INSN_TSTI_COMPACT
) : /* tst #$uimm8, r0 */
5080 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5081 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5082 #define FLD(f) abuf->fields.sfmt_addi_compact.f
5083 int UNUSED written
= 0;
5084 IADDR UNUSED pc
= abuf
->addr
;
5085 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5088 BI opval
= ((EQSI (ANDSI (GET_H_GRC (((UINT
) 0)), ZEXTSISI (FLD (f_imm8
))), 0)) ? (1) : (0));
5090 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
5097 CASE (sem
, INSN_TSTB_COMPACT
) : /* tst.b #$imm8, @(r0, gbr) */
5099 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5100 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5101 #define FLD(f) abuf->fields.sfmt_addi_compact.f
5102 int UNUSED written
= 0;
5103 IADDR UNUSED pc
= abuf
->addr
;
5104 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5108 tmp_addr
= ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GBR ());
5110 BI opval
= ((EQQI (ANDQI (GETMEMUQI (current_cpu
, pc
, tmp_addr
), FLD (f_imm8
)), 0)) ? (1) : (0));
5112 CGEN_TRACE_RESULT (current_cpu
, abuf
, "tbit", 'x', opval
);
5120 CASE (sem
, INSN_XOR_COMPACT
) : /* xor $rm64, $rn64 */
5122 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5123 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5124 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
5125 int UNUSED written
= 0;
5126 IADDR UNUSED pc
= abuf
->addr
;
5127 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5130 DI opval
= XORDI (GET_H_GR (FLD (f_rn
)), GET_H_GR (FLD (f_rm
)));
5131 SET_H_GR (FLD (f_rn
), opval
);
5132 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'D', opval
);
5139 CASE (sem
, INSN_XORI_COMPACT
) : /* xor #$uimm8, r0 */
5141 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5142 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5143 #define FLD(f) abuf->fields.sfmt_addi_compact.f
5144 int UNUSED written
= 0;
5145 IADDR UNUSED pc
= abuf
->addr
;
5146 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5149 SI opval
= XORSI (GET_H_GRC (((UINT
) 0)), ZEXTSIDI (FLD (f_imm8
)));
5150 SET_H_GRC (((UINT
) 0), opval
);
5151 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
5158 CASE (sem
, INSN_XORB_COMPACT
) : /* xor.b #$imm8, @(r0, gbr) */
5160 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5161 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5162 #define FLD(f) abuf->fields.sfmt_addi_compact.f
5163 int UNUSED written
= 0;
5164 IADDR UNUSED pc
= abuf
->addr
;
5165 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5170 tmp_addr
= ADDSI (GET_H_GRC (((UINT
) 0)), GET_H_GBR ());
5171 tmp_data
= XORQI (GETMEMUQI (current_cpu
, pc
, tmp_addr
), FLD (f_imm8
));
5173 UQI opval
= tmp_data
;
5174 SETMEMUQI (current_cpu
, pc
, tmp_addr
, opval
);
5175 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5183 CASE (sem
, INSN_XTRCT_COMPACT
) : /* xtrct $rm, $rn */
5185 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5186 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5187 #define FLD(f) abuf->fields.sfmt_movl12_compact.f
5188 int UNUSED written
= 0;
5189 IADDR UNUSED pc
= abuf
->addr
;
5190 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5193 SI opval
= ORSI (SLLSI (GET_H_GRC (FLD (f_rm
)), 16), SRLSI (GET_H_GRC (FLD (f_rn
)), 16));
5194 SET_H_GRC (FLD (f_rn
), opval
);
5195 CGEN_TRACE_RESULT (current_cpu
, abuf
, "grc", 'x', opval
);
5204 ENDSWITCH (sem
) /* End of semantic switch. */
5206 /* At this point `vpc' contains the next insn to execute. */
5209 #undef DEFINE_SWITCH
5210 #endif /* DEFINE_SWITCH */