1 /* Simulator instruction semantics for crisv32f.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996-2007 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
9 This file is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
14 It is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
27 /* The labels have the case they have because the enum of insn types
28 is all uppercase and in the non-stdc case the insn symbol is built
29 into the enum name. */
35 { CRISV32F_INSN_X_INVALID
, && case_sem_INSN_X_INVALID
},
36 { CRISV32F_INSN_X_AFTER
, && case_sem_INSN_X_AFTER
},
37 { CRISV32F_INSN_X_BEFORE
, && case_sem_INSN_X_BEFORE
},
38 { CRISV32F_INSN_X_CTI_CHAIN
, && case_sem_INSN_X_CTI_CHAIN
},
39 { CRISV32F_INSN_X_CHAIN
, && case_sem_INSN_X_CHAIN
},
40 { CRISV32F_INSN_X_BEGIN
, && case_sem_INSN_X_BEGIN
},
41 { CRISV32F_INSN_MOVE_B_R
, && case_sem_INSN_MOVE_B_R
},
42 { CRISV32F_INSN_MOVE_W_R
, && case_sem_INSN_MOVE_W_R
},
43 { CRISV32F_INSN_MOVE_D_R
, && case_sem_INSN_MOVE_D_R
},
44 { CRISV32F_INSN_MOVEQ
, && case_sem_INSN_MOVEQ
},
45 { CRISV32F_INSN_MOVS_B_R
, && case_sem_INSN_MOVS_B_R
},
46 { CRISV32F_INSN_MOVS_W_R
, && case_sem_INSN_MOVS_W_R
},
47 { CRISV32F_INSN_MOVU_B_R
, && case_sem_INSN_MOVU_B_R
},
48 { CRISV32F_INSN_MOVU_W_R
, && case_sem_INSN_MOVU_W_R
},
49 { CRISV32F_INSN_MOVECBR
, && case_sem_INSN_MOVECBR
},
50 { CRISV32F_INSN_MOVECWR
, && case_sem_INSN_MOVECWR
},
51 { CRISV32F_INSN_MOVECDR
, && case_sem_INSN_MOVECDR
},
52 { CRISV32F_INSN_MOVSCBR
, && case_sem_INSN_MOVSCBR
},
53 { CRISV32F_INSN_MOVSCWR
, && case_sem_INSN_MOVSCWR
},
54 { CRISV32F_INSN_MOVUCBR
, && case_sem_INSN_MOVUCBR
},
55 { CRISV32F_INSN_MOVUCWR
, && case_sem_INSN_MOVUCWR
},
56 { CRISV32F_INSN_ADDQ
, && case_sem_INSN_ADDQ
},
57 { CRISV32F_INSN_SUBQ
, && case_sem_INSN_SUBQ
},
58 { CRISV32F_INSN_CMP_R_B_R
, && case_sem_INSN_CMP_R_B_R
},
59 { CRISV32F_INSN_CMP_R_W_R
, && case_sem_INSN_CMP_R_W_R
},
60 { CRISV32F_INSN_CMP_R_D_R
, && case_sem_INSN_CMP_R_D_R
},
61 { CRISV32F_INSN_CMP_M_B_M
, && case_sem_INSN_CMP_M_B_M
},
62 { CRISV32F_INSN_CMP_M_W_M
, && case_sem_INSN_CMP_M_W_M
},
63 { CRISV32F_INSN_CMP_M_D_M
, && case_sem_INSN_CMP_M_D_M
},
64 { CRISV32F_INSN_CMPCBR
, && case_sem_INSN_CMPCBR
},
65 { CRISV32F_INSN_CMPCWR
, && case_sem_INSN_CMPCWR
},
66 { CRISV32F_INSN_CMPCDR
, && case_sem_INSN_CMPCDR
},
67 { CRISV32F_INSN_CMPQ
, && case_sem_INSN_CMPQ
},
68 { CRISV32F_INSN_CMPS_M_B_M
, && case_sem_INSN_CMPS_M_B_M
},
69 { CRISV32F_INSN_CMPS_M_W_M
, && case_sem_INSN_CMPS_M_W_M
},
70 { CRISV32F_INSN_CMPSCBR
, && case_sem_INSN_CMPSCBR
},
71 { CRISV32F_INSN_CMPSCWR
, && case_sem_INSN_CMPSCWR
},
72 { CRISV32F_INSN_CMPU_M_B_M
, && case_sem_INSN_CMPU_M_B_M
},
73 { CRISV32F_INSN_CMPU_M_W_M
, && case_sem_INSN_CMPU_M_W_M
},
74 { CRISV32F_INSN_CMPUCBR
, && case_sem_INSN_CMPUCBR
},
75 { CRISV32F_INSN_CMPUCWR
, && case_sem_INSN_CMPUCWR
},
76 { CRISV32F_INSN_MOVE_M_B_M
, && case_sem_INSN_MOVE_M_B_M
},
77 { CRISV32F_INSN_MOVE_M_W_M
, && case_sem_INSN_MOVE_M_W_M
},
78 { CRISV32F_INSN_MOVE_M_D_M
, && case_sem_INSN_MOVE_M_D_M
},
79 { CRISV32F_INSN_MOVS_M_B_M
, && case_sem_INSN_MOVS_M_B_M
},
80 { CRISV32F_INSN_MOVS_M_W_M
, && case_sem_INSN_MOVS_M_W_M
},
81 { CRISV32F_INSN_MOVU_M_B_M
, && case_sem_INSN_MOVU_M_B_M
},
82 { CRISV32F_INSN_MOVU_M_W_M
, && case_sem_INSN_MOVU_M_W_M
},
83 { CRISV32F_INSN_MOVE_R_SPRV32
, && case_sem_INSN_MOVE_R_SPRV32
},
84 { CRISV32F_INSN_MOVE_SPR_RV32
, && case_sem_INSN_MOVE_SPR_RV32
},
85 { CRISV32F_INSN_MOVE_M_SPRV32
, && case_sem_INSN_MOVE_M_SPRV32
},
86 { CRISV32F_INSN_MOVE_C_SPRV32_P2
, && case_sem_INSN_MOVE_C_SPRV32_P2
},
87 { CRISV32F_INSN_MOVE_C_SPRV32_P3
, && case_sem_INSN_MOVE_C_SPRV32_P3
},
88 { CRISV32F_INSN_MOVE_C_SPRV32_P5
, && case_sem_INSN_MOVE_C_SPRV32_P5
},
89 { CRISV32F_INSN_MOVE_C_SPRV32_P6
, && case_sem_INSN_MOVE_C_SPRV32_P6
},
90 { CRISV32F_INSN_MOVE_C_SPRV32_P7
, && case_sem_INSN_MOVE_C_SPRV32_P7
},
91 { CRISV32F_INSN_MOVE_C_SPRV32_P9
, && case_sem_INSN_MOVE_C_SPRV32_P9
},
92 { CRISV32F_INSN_MOVE_C_SPRV32_P10
, && case_sem_INSN_MOVE_C_SPRV32_P10
},
93 { CRISV32F_INSN_MOVE_C_SPRV32_P11
, && case_sem_INSN_MOVE_C_SPRV32_P11
},
94 { CRISV32F_INSN_MOVE_C_SPRV32_P12
, && case_sem_INSN_MOVE_C_SPRV32_P12
},
95 { CRISV32F_INSN_MOVE_C_SPRV32_P13
, && case_sem_INSN_MOVE_C_SPRV32_P13
},
96 { CRISV32F_INSN_MOVE_C_SPRV32_P14
, && case_sem_INSN_MOVE_C_SPRV32_P14
},
97 { CRISV32F_INSN_MOVE_C_SPRV32_P15
, && case_sem_INSN_MOVE_C_SPRV32_P15
},
98 { CRISV32F_INSN_MOVE_SPR_MV32
, && case_sem_INSN_MOVE_SPR_MV32
},
99 { CRISV32F_INSN_MOVE_SS_R
, && case_sem_INSN_MOVE_SS_R
},
100 { CRISV32F_INSN_MOVE_R_SS
, && case_sem_INSN_MOVE_R_SS
},
101 { CRISV32F_INSN_MOVEM_R_M_V32
, && case_sem_INSN_MOVEM_R_M_V32
},
102 { CRISV32F_INSN_MOVEM_M_R_V32
, && case_sem_INSN_MOVEM_M_R_V32
},
103 { CRISV32F_INSN_ADD_B_R
, && case_sem_INSN_ADD_B_R
},
104 { CRISV32F_INSN_ADD_W_R
, && case_sem_INSN_ADD_W_R
},
105 { CRISV32F_INSN_ADD_D_R
, && case_sem_INSN_ADD_D_R
},
106 { CRISV32F_INSN_ADD_M_B_M
, && case_sem_INSN_ADD_M_B_M
},
107 { CRISV32F_INSN_ADD_M_W_M
, && case_sem_INSN_ADD_M_W_M
},
108 { CRISV32F_INSN_ADD_M_D_M
, && case_sem_INSN_ADD_M_D_M
},
109 { CRISV32F_INSN_ADDCBR
, && case_sem_INSN_ADDCBR
},
110 { CRISV32F_INSN_ADDCWR
, && case_sem_INSN_ADDCWR
},
111 { CRISV32F_INSN_ADDCDR
, && case_sem_INSN_ADDCDR
},
112 { CRISV32F_INSN_ADDS_B_R
, && case_sem_INSN_ADDS_B_R
},
113 { CRISV32F_INSN_ADDS_W_R
, && case_sem_INSN_ADDS_W_R
},
114 { CRISV32F_INSN_ADDS_M_B_M
, && case_sem_INSN_ADDS_M_B_M
},
115 { CRISV32F_INSN_ADDS_M_W_M
, && case_sem_INSN_ADDS_M_W_M
},
116 { CRISV32F_INSN_ADDSCBR
, && case_sem_INSN_ADDSCBR
},
117 { CRISV32F_INSN_ADDSCWR
, && case_sem_INSN_ADDSCWR
},
118 { CRISV32F_INSN_ADDU_B_R
, && case_sem_INSN_ADDU_B_R
},
119 { CRISV32F_INSN_ADDU_W_R
, && case_sem_INSN_ADDU_W_R
},
120 { CRISV32F_INSN_ADDU_M_B_M
, && case_sem_INSN_ADDU_M_B_M
},
121 { CRISV32F_INSN_ADDU_M_W_M
, && case_sem_INSN_ADDU_M_W_M
},
122 { CRISV32F_INSN_ADDUCBR
, && case_sem_INSN_ADDUCBR
},
123 { CRISV32F_INSN_ADDUCWR
, && case_sem_INSN_ADDUCWR
},
124 { CRISV32F_INSN_SUB_B_R
, && case_sem_INSN_SUB_B_R
},
125 { CRISV32F_INSN_SUB_W_R
, && case_sem_INSN_SUB_W_R
},
126 { CRISV32F_INSN_SUB_D_R
, && case_sem_INSN_SUB_D_R
},
127 { CRISV32F_INSN_SUB_M_B_M
, && case_sem_INSN_SUB_M_B_M
},
128 { CRISV32F_INSN_SUB_M_W_M
, && case_sem_INSN_SUB_M_W_M
},
129 { CRISV32F_INSN_SUB_M_D_M
, && case_sem_INSN_SUB_M_D_M
},
130 { CRISV32F_INSN_SUBCBR
, && case_sem_INSN_SUBCBR
},
131 { CRISV32F_INSN_SUBCWR
, && case_sem_INSN_SUBCWR
},
132 { CRISV32F_INSN_SUBCDR
, && case_sem_INSN_SUBCDR
},
133 { CRISV32F_INSN_SUBS_B_R
, && case_sem_INSN_SUBS_B_R
},
134 { CRISV32F_INSN_SUBS_W_R
, && case_sem_INSN_SUBS_W_R
},
135 { CRISV32F_INSN_SUBS_M_B_M
, && case_sem_INSN_SUBS_M_B_M
},
136 { CRISV32F_INSN_SUBS_M_W_M
, && case_sem_INSN_SUBS_M_W_M
},
137 { CRISV32F_INSN_SUBSCBR
, && case_sem_INSN_SUBSCBR
},
138 { CRISV32F_INSN_SUBSCWR
, && case_sem_INSN_SUBSCWR
},
139 { CRISV32F_INSN_SUBU_B_R
, && case_sem_INSN_SUBU_B_R
},
140 { CRISV32F_INSN_SUBU_W_R
, && case_sem_INSN_SUBU_W_R
},
141 { CRISV32F_INSN_SUBU_M_B_M
, && case_sem_INSN_SUBU_M_B_M
},
142 { CRISV32F_INSN_SUBU_M_W_M
, && case_sem_INSN_SUBU_M_W_M
},
143 { CRISV32F_INSN_SUBUCBR
, && case_sem_INSN_SUBUCBR
},
144 { CRISV32F_INSN_SUBUCWR
, && case_sem_INSN_SUBUCWR
},
145 { CRISV32F_INSN_ADDC_R
, && case_sem_INSN_ADDC_R
},
146 { CRISV32F_INSN_ADDC_M
, && case_sem_INSN_ADDC_M
},
147 { CRISV32F_INSN_ADDC_C
, && case_sem_INSN_ADDC_C
},
148 { CRISV32F_INSN_LAPC_D
, && case_sem_INSN_LAPC_D
},
149 { CRISV32F_INSN_LAPCQ
, && case_sem_INSN_LAPCQ
},
150 { CRISV32F_INSN_ADDI_B_R
, && case_sem_INSN_ADDI_B_R
},
151 { CRISV32F_INSN_ADDI_W_R
, && case_sem_INSN_ADDI_W_R
},
152 { CRISV32F_INSN_ADDI_D_R
, && case_sem_INSN_ADDI_D_R
},
153 { CRISV32F_INSN_NEG_B_R
, && case_sem_INSN_NEG_B_R
},
154 { CRISV32F_INSN_NEG_W_R
, && case_sem_INSN_NEG_W_R
},
155 { CRISV32F_INSN_NEG_D_R
, && case_sem_INSN_NEG_D_R
},
156 { CRISV32F_INSN_TEST_M_B_M
, && case_sem_INSN_TEST_M_B_M
},
157 { CRISV32F_INSN_TEST_M_W_M
, && case_sem_INSN_TEST_M_W_M
},
158 { CRISV32F_INSN_TEST_M_D_M
, && case_sem_INSN_TEST_M_D_M
},
159 { CRISV32F_INSN_MOVE_R_M_B_M
, && case_sem_INSN_MOVE_R_M_B_M
},
160 { CRISV32F_INSN_MOVE_R_M_W_M
, && case_sem_INSN_MOVE_R_M_W_M
},
161 { CRISV32F_INSN_MOVE_R_M_D_M
, && case_sem_INSN_MOVE_R_M_D_M
},
162 { CRISV32F_INSN_MULS_B
, && case_sem_INSN_MULS_B
},
163 { CRISV32F_INSN_MULS_W
, && case_sem_INSN_MULS_W
},
164 { CRISV32F_INSN_MULS_D
, && case_sem_INSN_MULS_D
},
165 { CRISV32F_INSN_MULU_B
, && case_sem_INSN_MULU_B
},
166 { CRISV32F_INSN_MULU_W
, && case_sem_INSN_MULU_W
},
167 { CRISV32F_INSN_MULU_D
, && case_sem_INSN_MULU_D
},
168 { CRISV32F_INSN_MCP
, && case_sem_INSN_MCP
},
169 { CRISV32F_INSN_DSTEP
, && case_sem_INSN_DSTEP
},
170 { CRISV32F_INSN_ABS
, && case_sem_INSN_ABS
},
171 { CRISV32F_INSN_AND_B_R
, && case_sem_INSN_AND_B_R
},
172 { CRISV32F_INSN_AND_W_R
, && case_sem_INSN_AND_W_R
},
173 { CRISV32F_INSN_AND_D_R
, && case_sem_INSN_AND_D_R
},
174 { CRISV32F_INSN_AND_M_B_M
, && case_sem_INSN_AND_M_B_M
},
175 { CRISV32F_INSN_AND_M_W_M
, && case_sem_INSN_AND_M_W_M
},
176 { CRISV32F_INSN_AND_M_D_M
, && case_sem_INSN_AND_M_D_M
},
177 { CRISV32F_INSN_ANDCBR
, && case_sem_INSN_ANDCBR
},
178 { CRISV32F_INSN_ANDCWR
, && case_sem_INSN_ANDCWR
},
179 { CRISV32F_INSN_ANDCDR
, && case_sem_INSN_ANDCDR
},
180 { CRISV32F_INSN_ANDQ
, && case_sem_INSN_ANDQ
},
181 { CRISV32F_INSN_ORR_B_R
, && case_sem_INSN_ORR_B_R
},
182 { CRISV32F_INSN_ORR_W_R
, && case_sem_INSN_ORR_W_R
},
183 { CRISV32F_INSN_ORR_D_R
, && case_sem_INSN_ORR_D_R
},
184 { CRISV32F_INSN_OR_M_B_M
, && case_sem_INSN_OR_M_B_M
},
185 { CRISV32F_INSN_OR_M_W_M
, && case_sem_INSN_OR_M_W_M
},
186 { CRISV32F_INSN_OR_M_D_M
, && case_sem_INSN_OR_M_D_M
},
187 { CRISV32F_INSN_ORCBR
, && case_sem_INSN_ORCBR
},
188 { CRISV32F_INSN_ORCWR
, && case_sem_INSN_ORCWR
},
189 { CRISV32F_INSN_ORCDR
, && case_sem_INSN_ORCDR
},
190 { CRISV32F_INSN_ORQ
, && case_sem_INSN_ORQ
},
191 { CRISV32F_INSN_XOR
, && case_sem_INSN_XOR
},
192 { CRISV32F_INSN_SWAP
, && case_sem_INSN_SWAP
},
193 { CRISV32F_INSN_ASRR_B_R
, && case_sem_INSN_ASRR_B_R
},
194 { CRISV32F_INSN_ASRR_W_R
, && case_sem_INSN_ASRR_W_R
},
195 { CRISV32F_INSN_ASRR_D_R
, && case_sem_INSN_ASRR_D_R
},
196 { CRISV32F_INSN_ASRQ
, && case_sem_INSN_ASRQ
},
197 { CRISV32F_INSN_LSRR_B_R
, && case_sem_INSN_LSRR_B_R
},
198 { CRISV32F_INSN_LSRR_W_R
, && case_sem_INSN_LSRR_W_R
},
199 { CRISV32F_INSN_LSRR_D_R
, && case_sem_INSN_LSRR_D_R
},
200 { CRISV32F_INSN_LSRQ
, && case_sem_INSN_LSRQ
},
201 { CRISV32F_INSN_LSLR_B_R
, && case_sem_INSN_LSLR_B_R
},
202 { CRISV32F_INSN_LSLR_W_R
, && case_sem_INSN_LSLR_W_R
},
203 { CRISV32F_INSN_LSLR_D_R
, && case_sem_INSN_LSLR_D_R
},
204 { CRISV32F_INSN_LSLQ
, && case_sem_INSN_LSLQ
},
205 { CRISV32F_INSN_BTST
, && case_sem_INSN_BTST
},
206 { CRISV32F_INSN_BTSTQ
, && case_sem_INSN_BTSTQ
},
207 { CRISV32F_INSN_SETF
, && case_sem_INSN_SETF
},
208 { CRISV32F_INSN_CLEARF
, && case_sem_INSN_CLEARF
},
209 { CRISV32F_INSN_RFE
, && case_sem_INSN_RFE
},
210 { CRISV32F_INSN_SFE
, && case_sem_INSN_SFE
},
211 { CRISV32F_INSN_RFG
, && case_sem_INSN_RFG
},
212 { CRISV32F_INSN_RFN
, && case_sem_INSN_RFN
},
213 { CRISV32F_INSN_HALT
, && case_sem_INSN_HALT
},
214 { CRISV32F_INSN_BCC_B
, && case_sem_INSN_BCC_B
},
215 { CRISV32F_INSN_BA_B
, && case_sem_INSN_BA_B
},
216 { CRISV32F_INSN_BCC_W
, && case_sem_INSN_BCC_W
},
217 { CRISV32F_INSN_BA_W
, && case_sem_INSN_BA_W
},
218 { CRISV32F_INSN_JAS_R
, && case_sem_INSN_JAS_R
},
219 { CRISV32F_INSN_JAS_C
, && case_sem_INSN_JAS_C
},
220 { CRISV32F_INSN_JUMP_P
, && case_sem_INSN_JUMP_P
},
221 { CRISV32F_INSN_BAS_C
, && case_sem_INSN_BAS_C
},
222 { CRISV32F_INSN_JASC_R
, && case_sem_INSN_JASC_R
},
223 { CRISV32F_INSN_JASC_C
, && case_sem_INSN_JASC_C
},
224 { CRISV32F_INSN_BASC_C
, && case_sem_INSN_BASC_C
},
225 { CRISV32F_INSN_BREAK
, && case_sem_INSN_BREAK
},
226 { CRISV32F_INSN_BOUND_R_B_R
, && case_sem_INSN_BOUND_R_B_R
},
227 { CRISV32F_INSN_BOUND_R_W_R
, && case_sem_INSN_BOUND_R_W_R
},
228 { CRISV32F_INSN_BOUND_R_D_R
, && case_sem_INSN_BOUND_R_D_R
},
229 { CRISV32F_INSN_BOUND_CB
, && case_sem_INSN_BOUND_CB
},
230 { CRISV32F_INSN_BOUND_CW
, && case_sem_INSN_BOUND_CW
},
231 { CRISV32F_INSN_BOUND_CD
, && case_sem_INSN_BOUND_CD
},
232 { CRISV32F_INSN_SCC
, && case_sem_INSN_SCC
},
233 { CRISV32F_INSN_LZ
, && case_sem_INSN_LZ
},
234 { CRISV32F_INSN_ADDOQ
, && case_sem_INSN_ADDOQ
},
235 { CRISV32F_INSN_ADDO_M_B_M
, && case_sem_INSN_ADDO_M_B_M
},
236 { CRISV32F_INSN_ADDO_M_W_M
, && case_sem_INSN_ADDO_M_W_M
},
237 { CRISV32F_INSN_ADDO_M_D_M
, && case_sem_INSN_ADDO_M_D_M
},
238 { CRISV32F_INSN_ADDO_CB
, && case_sem_INSN_ADDO_CB
},
239 { CRISV32F_INSN_ADDO_CW
, && case_sem_INSN_ADDO_CW
},
240 { CRISV32F_INSN_ADDO_CD
, && case_sem_INSN_ADDO_CD
},
241 { CRISV32F_INSN_ADDI_ACR_B_R
, && case_sem_INSN_ADDI_ACR_B_R
},
242 { CRISV32F_INSN_ADDI_ACR_W_R
, && case_sem_INSN_ADDI_ACR_W_R
},
243 { CRISV32F_INSN_ADDI_ACR_D_R
, && case_sem_INSN_ADDI_ACR_D_R
},
244 { CRISV32F_INSN_FIDXI
, && case_sem_INSN_FIDXI
},
245 { CRISV32F_INSN_FTAGI
, && case_sem_INSN_FTAGI
},
246 { CRISV32F_INSN_FIDXD
, && case_sem_INSN_FIDXD
},
247 { CRISV32F_INSN_FTAGD
, && case_sem_INSN_FTAGD
},
252 for (i
= 0; labels
[i
].label
!= 0; ++i
)
255 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_fast_lab
= labels
[i
].label
;
257 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_full_lab
= labels
[i
].label
;
262 #endif /* DEFINE_LABELS */
266 /* If hyper-fast [well not unnecessarily slow] execution is selected, turn
267 off frills like tracing and profiling. */
268 /* FIXME: A better way would be to have TRACE_RESULT check for something
269 that can cause it to be optimized out. Another way would be to emit
270 special handlers into the instruction "stream". */
274 #define TRACE_RESULT(cpu, abuf, name, type, val)
278 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
279 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
281 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
288 /* Branch to next handler without going around main loop. */
289 #define NEXT(vpc) goto * SEM_ARGBUF (vpc) -> semantic.sem_case
290 SWITCH (sem
, SEM_ARGBUF (vpc
) -> semantic
.sem_case
)
292 #else /* ! WITH_SCACHE_PBB */
294 #define NEXT(vpc) BREAK (sem)
297 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_fast_lab
)
299 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_full_lab
)
302 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->num
)
305 #endif /* ! WITH_SCACHE_PBB */
309 CASE (sem
, INSN_X_INVALID
) : /* --invalid-- */
311 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
312 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
313 #define FLD(f) abuf->fields.fmt_empty.f
314 int UNUSED written
= 0;
315 IADDR UNUSED pc
= abuf
->addr
;
316 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
319 /* Update the recorded pc in the cpu state struct.
320 Only necessary for WITH_SCACHE case, but to avoid the
321 conditional compilation .... */
323 /* Virtual insns have zero size. Overwrite vpc with address of next insn
324 using the default-insn-bitsize spec. When executing insns in parallel
325 we may want to queue the fault and continue execution. */
326 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
327 vpc
= sim_engine_invalid_insn (current_cpu
, pc
, vpc
);
334 CASE (sem
, INSN_X_AFTER
) : /* --after-- */
336 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
337 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
338 #define FLD(f) abuf->fields.fmt_empty.f
339 int UNUSED written
= 0;
340 IADDR UNUSED pc
= abuf
->addr
;
341 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
344 #if WITH_SCACHE_PBB_CRISV32F
345 crisv32f_pbb_after (current_cpu
, sem_arg
);
353 CASE (sem
, INSN_X_BEFORE
) : /* --before-- */
355 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
356 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
357 #define FLD(f) abuf->fields.fmt_empty.f
358 int UNUSED written
= 0;
359 IADDR UNUSED pc
= abuf
->addr
;
360 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
363 #if WITH_SCACHE_PBB_CRISV32F
364 crisv32f_pbb_before (current_cpu
, sem_arg
);
372 CASE (sem
, INSN_X_CTI_CHAIN
) : /* --cti-chain-- */
374 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
375 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
376 #define FLD(f) abuf->fields.fmt_empty.f
377 int UNUSED written
= 0;
378 IADDR UNUSED pc
= abuf
->addr
;
379 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
382 #if WITH_SCACHE_PBB_CRISV32F
384 vpc
= crisv32f_pbb_cti_chain (current_cpu
, sem_arg
,
385 pbb_br_type
, pbb_br_npc
);
388 /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
389 vpc
= crisv32f_pbb_cti_chain (current_cpu
, sem_arg
,
390 CPU_PBB_BR_TYPE (current_cpu
),
391 CPU_PBB_BR_NPC (current_cpu
));
400 CASE (sem
, INSN_X_CHAIN
) : /* --chain-- */
402 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
403 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
404 #define FLD(f) abuf->fields.fmt_empty.f
405 int UNUSED written
= 0;
406 IADDR UNUSED pc
= abuf
->addr
;
407 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
410 #if WITH_SCACHE_PBB_CRISV32F
411 vpc
= crisv32f_pbb_chain (current_cpu
, sem_arg
);
422 CASE (sem
, INSN_X_BEGIN
) : /* --begin-- */
424 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
425 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
426 #define FLD(f) abuf->fields.fmt_empty.f
427 int UNUSED written
= 0;
428 IADDR UNUSED pc
= abuf
->addr
;
429 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
432 #if WITH_SCACHE_PBB_CRISV32F
433 #if defined DEFINE_SWITCH || defined FAST_P
434 /* In the switch case FAST_P is a constant, allowing several optimizations
435 in any called inline functions. */
436 vpc
= crisv32f_pbb_begin (current_cpu
, FAST_P
);
438 #if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
439 vpc
= crisv32f_pbb_begin (current_cpu
, STATE_RUN_FAST_P (CPU_STATE (current_cpu
)));
441 vpc
= crisv32f_pbb_begin (current_cpu
, 0);
451 CASE (sem
, INSN_MOVE_B_R
) : /* move.b move.m ${Rs},${Rd} */
453 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
454 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
455 #define FLD(f) abuf->fields.sfmt_addc_m.f
456 int UNUSED written
= 0;
457 IADDR UNUSED pc
= abuf
->addr
;
458 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
462 tmp_newval
= GET_H_GR (FLD (f_operand1
));
465 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
467 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
468 SET_H_GR (FLD (f_operand2
), opval
);
469 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
474 BI opval
= LTQI (tmp_newval
, 0);
475 CPU (h_nbit
) = opval
;
476 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
479 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
480 CPU (h_zbit
) = opval
;
481 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
488 CPU (h_xbit
) = opval
;
489 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
493 SET_H_INSN_PREFIXED_P (opval
);
494 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
504 CASE (sem
, INSN_MOVE_W_R
) : /* move.w move.m ${Rs},${Rd} */
506 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
507 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
508 #define FLD(f) abuf->fields.sfmt_addc_m.f
509 int UNUSED written
= 0;
510 IADDR UNUSED pc
= abuf
->addr
;
511 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
515 tmp_newval
= GET_H_GR (FLD (f_operand1
));
518 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
520 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
521 SET_H_GR (FLD (f_operand2
), opval
);
522 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
527 BI opval
= LTHI (tmp_newval
, 0);
528 CPU (h_nbit
) = opval
;
529 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
532 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
533 CPU (h_zbit
) = opval
;
534 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
541 CPU (h_xbit
) = opval
;
542 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
546 SET_H_INSN_PREFIXED_P (opval
);
547 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
557 CASE (sem
, INSN_MOVE_D_R
) : /* move.d move.m ${Rs},${Rd} */
559 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
560 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
561 #define FLD(f) abuf->fields.sfmt_addc_m.f
562 int UNUSED written
= 0;
563 IADDR UNUSED pc
= abuf
->addr
;
564 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
568 tmp_newval
= GET_H_GR (FLD (f_operand1
));
570 SI opval
= tmp_newval
;
571 SET_H_GR (FLD (f_operand2
), opval
);
572 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
576 BI opval
= LTSI (tmp_newval
, 0);
577 CPU (h_nbit
) = opval
;
578 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
581 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
582 CPU (h_zbit
) = opval
;
583 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
590 CPU (h_xbit
) = opval
;
591 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
595 SET_H_INSN_PREFIXED_P (opval
);
596 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
606 CASE (sem
, INSN_MOVEQ
) : /* moveq $i,$Rd */
608 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
609 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
610 #define FLD(f) abuf->fields.sfmt_moveq.f
611 int UNUSED written
= 0;
612 IADDR UNUSED pc
= abuf
->addr
;
613 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
617 tmp_newval
= FLD (f_s6
);
619 SI opval
= tmp_newval
;
620 SET_H_GR (FLD (f_operand2
), opval
);
621 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
624 SET_H_NBIT_MOVE (LTSI (tmp_newval
, 0));
625 SET_H_ZBIT_MOVE (ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1))));
631 CPU (h_xbit
) = opval
;
632 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
636 SET_H_INSN_PREFIXED_P (opval
);
637 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
647 CASE (sem
, INSN_MOVS_B_R
) : /* movs.b movs.m ${Rs},${Rd} */
649 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
650 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
651 #define FLD(f) abuf->fields.sfmt_muls_b.f
652 int UNUSED written
= 0;
653 IADDR UNUSED pc
= abuf
->addr
;
654 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
659 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
660 tmp_newval
= EXTQISI (tmp_tmpops
);
662 SI opval
= tmp_newval
;
663 SET_H_GR (FLD (f_operand2
), opval
);
664 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
668 BI opval
= LTSI (tmp_newval
, 0);
669 CPU (h_nbit
) = opval
;
670 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
673 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
674 CPU (h_zbit
) = opval
;
675 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
682 CPU (h_xbit
) = opval
;
683 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
687 SET_H_INSN_PREFIXED_P (opval
);
688 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
698 CASE (sem
, INSN_MOVS_W_R
) : /* movs.w movs.m ${Rs},${Rd} */
700 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
701 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
702 #define FLD(f) abuf->fields.sfmt_muls_b.f
703 int UNUSED written
= 0;
704 IADDR UNUSED pc
= abuf
->addr
;
705 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
710 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
711 tmp_newval
= EXTHISI (tmp_tmpops
);
713 SI opval
= tmp_newval
;
714 SET_H_GR (FLD (f_operand2
), opval
);
715 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
719 BI opval
= LTSI (tmp_newval
, 0);
720 CPU (h_nbit
) = opval
;
721 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
724 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
725 CPU (h_zbit
) = opval
;
726 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
733 CPU (h_xbit
) = opval
;
734 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
738 SET_H_INSN_PREFIXED_P (opval
);
739 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
749 CASE (sem
, INSN_MOVU_B_R
) : /* movu.b movu.m ${Rs},${Rd} */
751 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
752 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
753 #define FLD(f) abuf->fields.sfmt_muls_b.f
754 int UNUSED written
= 0;
755 IADDR UNUSED pc
= abuf
->addr
;
756 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
761 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
762 tmp_newval
= ZEXTQISI (tmp_tmpops
);
764 SI opval
= tmp_newval
;
765 SET_H_GR (FLD (f_operand2
), opval
);
766 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
770 BI opval
= LTSI (tmp_newval
, 0);
771 CPU (h_nbit
) = opval
;
772 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
775 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
776 CPU (h_zbit
) = opval
;
777 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
784 CPU (h_xbit
) = opval
;
785 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
789 SET_H_INSN_PREFIXED_P (opval
);
790 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
800 CASE (sem
, INSN_MOVU_W_R
) : /* movu.w movu.m ${Rs},${Rd} */
802 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
803 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
804 #define FLD(f) abuf->fields.sfmt_muls_b.f
805 int UNUSED written
= 0;
806 IADDR UNUSED pc
= abuf
->addr
;
807 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
812 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
813 tmp_newval
= ZEXTHISI (tmp_tmpops
);
815 SI opval
= tmp_newval
;
816 SET_H_GR (FLD (f_operand2
), opval
);
817 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
821 BI opval
= LTSI (tmp_newval
, 0);
822 CPU (h_nbit
) = opval
;
823 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
826 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
827 CPU (h_zbit
) = opval
;
828 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
835 CPU (h_xbit
) = opval
;
836 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
840 SET_H_INSN_PREFIXED_P (opval
);
841 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
851 CASE (sem
, INSN_MOVECBR
) : /* move.b ${sconst8},${Rd} */
853 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
854 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
855 #define FLD(f) abuf->fields.sfmt_addcbr.f
856 int UNUSED written
= 0;
857 IADDR UNUSED pc
= abuf
->addr
;
858 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
862 tmp_newval
= FLD (f_indir_pc__byte
);
865 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
867 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
868 SET_H_GR (FLD (f_operand2
), opval
);
869 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
874 BI opval
= LTQI (tmp_newval
, 0);
875 CPU (h_nbit
) = opval
;
876 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
879 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
880 CPU (h_zbit
) = opval
;
881 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
888 CPU (h_xbit
) = opval
;
889 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
893 SET_H_INSN_PREFIXED_P (opval
);
894 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
904 CASE (sem
, INSN_MOVECWR
) : /* move.w ${sconst16},${Rd} */
906 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
907 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
908 #define FLD(f) abuf->fields.sfmt_addcwr.f
909 int UNUSED written
= 0;
910 IADDR UNUSED pc
= abuf
->addr
;
911 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
915 tmp_newval
= FLD (f_indir_pc__word
);
918 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
920 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
921 SET_H_GR (FLD (f_operand2
), opval
);
922 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
927 BI opval
= LTHI (tmp_newval
, 0);
928 CPU (h_nbit
) = opval
;
929 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
932 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
933 CPU (h_zbit
) = opval
;
934 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
941 CPU (h_xbit
) = opval
;
942 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
946 SET_H_INSN_PREFIXED_P (opval
);
947 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
957 CASE (sem
, INSN_MOVECDR
) : /* move.d ${const32},${Rd} */
959 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
960 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
961 #define FLD(f) abuf->fields.sfmt_bound_cd.f
962 int UNUSED written
= 0;
963 IADDR UNUSED pc
= abuf
->addr
;
964 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
968 tmp_newval
= FLD (f_indir_pc__dword
);
970 SI opval
= tmp_newval
;
971 SET_H_GR (FLD (f_operand2
), opval
);
972 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
976 BI opval
= LTSI (tmp_newval
, 0);
977 CPU (h_nbit
) = opval
;
978 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
981 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
982 CPU (h_zbit
) = opval
;
983 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
990 CPU (h_xbit
) = opval
;
991 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
995 SET_H_INSN_PREFIXED_P (opval
);
996 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1006 CASE (sem
, INSN_MOVSCBR
) : /* movs.b ${sconst8},${Rd} */
1008 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1009 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1010 #define FLD(f) abuf->fields.sfmt_bound_cb.f
1011 int UNUSED written
= 0;
1012 IADDR UNUSED pc
= abuf
->addr
;
1013 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1017 tmp_newval
= EXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
1019 SI opval
= tmp_newval
;
1020 SET_H_GR (FLD (f_operand2
), opval
);
1021 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1025 BI opval
= LTSI (tmp_newval
, 0);
1026 CPU (h_nbit
) = opval
;
1027 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1030 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
1031 CPU (h_zbit
) = opval
;
1032 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1034 SET_H_CBIT_MOVE (0);
1035 SET_H_VBIT_MOVE (0);
1039 CPU (h_xbit
) = opval
;
1040 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1044 SET_H_INSN_PREFIXED_P (opval
);
1045 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1055 CASE (sem
, INSN_MOVSCWR
) : /* movs.w ${sconst16},${Rd} */
1057 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1058 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1059 #define FLD(f) abuf->fields.sfmt_bound_cw.f
1060 int UNUSED written
= 0;
1061 IADDR UNUSED pc
= abuf
->addr
;
1062 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1066 tmp_newval
= EXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
1068 SI opval
= tmp_newval
;
1069 SET_H_GR (FLD (f_operand2
), opval
);
1070 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1074 BI opval
= LTSI (tmp_newval
, 0);
1075 CPU (h_nbit
) = opval
;
1076 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1079 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
1080 CPU (h_zbit
) = opval
;
1081 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1083 SET_H_CBIT_MOVE (0);
1084 SET_H_VBIT_MOVE (0);
1088 CPU (h_xbit
) = opval
;
1089 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1093 SET_H_INSN_PREFIXED_P (opval
);
1094 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1104 CASE (sem
, INSN_MOVUCBR
) : /* movu.b ${uconst8},${Rd} */
1106 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1107 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1108 #define FLD(f) abuf->fields.sfmt_bound_cb.f
1109 int UNUSED written
= 0;
1110 IADDR UNUSED pc
= abuf
->addr
;
1111 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1115 tmp_newval
= ZEXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
1117 SI opval
= tmp_newval
;
1118 SET_H_GR (FLD (f_operand2
), opval
);
1119 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1123 BI opval
= LTSI (tmp_newval
, 0);
1124 CPU (h_nbit
) = opval
;
1125 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1128 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
1129 CPU (h_zbit
) = opval
;
1130 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1132 SET_H_CBIT_MOVE (0);
1133 SET_H_VBIT_MOVE (0);
1137 CPU (h_xbit
) = opval
;
1138 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1142 SET_H_INSN_PREFIXED_P (opval
);
1143 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1153 CASE (sem
, INSN_MOVUCWR
) : /* movu.w ${uconst16},${Rd} */
1155 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1156 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1157 #define FLD(f) abuf->fields.sfmt_bound_cw.f
1158 int UNUSED written
= 0;
1159 IADDR UNUSED pc
= abuf
->addr
;
1160 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1164 tmp_newval
= ZEXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
1166 SI opval
= tmp_newval
;
1167 SET_H_GR (FLD (f_operand2
), opval
);
1168 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1172 BI opval
= LTSI (tmp_newval
, 0);
1173 CPU (h_nbit
) = opval
;
1174 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1177 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
1178 CPU (h_zbit
) = opval
;
1179 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1181 SET_H_CBIT_MOVE (0);
1182 SET_H_VBIT_MOVE (0);
1186 CPU (h_xbit
) = opval
;
1187 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1191 SET_H_INSN_PREFIXED_P (opval
);
1192 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1202 CASE (sem
, INSN_ADDQ
) : /* addq $j,$Rd */
1204 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1205 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1206 #define FLD(f) abuf->fields.sfmt_addq.f
1207 int UNUSED written
= 0;
1208 IADDR UNUSED pc
= abuf
->addr
;
1209 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1216 tmp_tmpops
= FLD (f_u6
);
1217 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1218 tmp_carry
= CPU (h_cbit
);
1219 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1221 SI opval
= tmp_newval
;
1222 SET_H_GR (FLD (f_operand2
), opval
);
1223 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1227 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
1228 CPU (h_cbit
) = opval
;
1229 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1232 BI opval
= LTSI (tmp_newval
, 0);
1233 CPU (h_nbit
) = opval
;
1234 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1237 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1238 CPU (h_zbit
) = opval
;
1239 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1242 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
1243 CPU (h_vbit
) = opval
;
1244 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1249 CPU (h_xbit
) = opval
;
1250 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1254 SET_H_INSN_PREFIXED_P (opval
);
1255 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1265 CASE (sem
, INSN_SUBQ
) : /* subq $j,$Rd */
1267 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1268 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1269 #define FLD(f) abuf->fields.sfmt_addq.f
1270 int UNUSED written
= 0;
1271 IADDR UNUSED pc
= abuf
->addr
;
1272 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1279 tmp_tmpops
= FLD (f_u6
);
1280 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1281 tmp_carry
= CPU (h_cbit
);
1282 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1284 SI opval
= tmp_newval
;
1285 SET_H_GR (FLD (f_operand2
), opval
);
1286 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1290 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
1291 CPU (h_cbit
) = opval
;
1292 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1295 BI opval
= LTSI (tmp_newval
, 0);
1296 CPU (h_nbit
) = opval
;
1297 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1300 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1301 CPU (h_zbit
) = opval
;
1302 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1305 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
1306 CPU (h_vbit
) = opval
;
1307 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1312 CPU (h_xbit
) = opval
;
1313 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1317 SET_H_INSN_PREFIXED_P (opval
);
1318 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1328 CASE (sem
, INSN_CMP_R_B_R
) : /* cmp-r.b $Rs,$Rd */
1330 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1331 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1332 #define FLD(f) abuf->fields.sfmt_muls_b.f
1333 int UNUSED written
= 0;
1334 IADDR UNUSED pc
= abuf
->addr
;
1335 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1342 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
1343 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1344 tmp_carry
= CPU (h_cbit
);
1345 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1349 BI opval
= ORIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEQI (tmp_tmpopd
, 0), LTQI (tmp_newval
, 0)), ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_newval
, 0))));
1350 CPU (h_cbit
) = opval
;
1351 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1354 BI opval
= LTQI (tmp_newval
, 0);
1355 CPU (h_nbit
) = opval
;
1356 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1359 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1360 CPU (h_zbit
) = opval
;
1361 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1364 BI opval
= ORIF (ANDIF (ANDIF (GEQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), GEQI (tmp_newval
, 0)), ANDIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), LTQI (tmp_newval
, 0)));
1365 CPU (h_vbit
) = opval
;
1366 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1371 CPU (h_xbit
) = opval
;
1372 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1376 SET_H_INSN_PREFIXED_P (opval
);
1377 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1387 CASE (sem
, INSN_CMP_R_W_R
) : /* cmp-r.w $Rs,$Rd */
1389 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1390 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1391 #define FLD(f) abuf->fields.sfmt_muls_b.f
1392 int UNUSED written
= 0;
1393 IADDR UNUSED pc
= abuf
->addr
;
1394 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1401 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
1402 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1403 tmp_carry
= CPU (h_cbit
);
1404 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1408 BI opval
= ORIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEHI (tmp_tmpopd
, 0), LTHI (tmp_newval
, 0)), ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_newval
, 0))));
1409 CPU (h_cbit
) = opval
;
1410 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1413 BI opval
= LTHI (tmp_newval
, 0);
1414 CPU (h_nbit
) = opval
;
1415 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1418 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1419 CPU (h_zbit
) = opval
;
1420 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1423 BI opval
= ORIF (ANDIF (ANDIF (GEHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), GEHI (tmp_newval
, 0)), ANDIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), LTHI (tmp_newval
, 0)));
1424 CPU (h_vbit
) = opval
;
1425 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1430 CPU (h_xbit
) = opval
;
1431 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1435 SET_H_INSN_PREFIXED_P (opval
);
1436 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1446 CASE (sem
, INSN_CMP_R_D_R
) : /* cmp-r.d $Rs,$Rd */
1448 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1449 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1450 #define FLD(f) abuf->fields.sfmt_muls_b.f
1451 int UNUSED written
= 0;
1452 IADDR UNUSED pc
= abuf
->addr
;
1453 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1460 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
1461 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1462 tmp_carry
= CPU (h_cbit
);
1463 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1467 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
1468 CPU (h_cbit
) = opval
;
1469 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1472 BI opval
= LTSI (tmp_newval
, 0);
1473 CPU (h_nbit
) = opval
;
1474 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1477 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1478 CPU (h_zbit
) = opval
;
1479 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1482 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
1483 CPU (h_vbit
) = opval
;
1484 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1489 CPU (h_xbit
) = opval
;
1490 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1494 SET_H_INSN_PREFIXED_P (opval
);
1495 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1505 CASE (sem
, INSN_CMP_M_B_M
) : /* cmp-m.b [${Rs}${inc}],${Rd} */
1507 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1508 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1509 #define FLD(f) abuf->fields.sfmt_addc_m.f
1510 int UNUSED written
= 0;
1511 IADDR UNUSED pc
= abuf
->addr
;
1512 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1519 tmp_tmpops
= ({ SI tmp_addr
;
1522 tmp_postinc
= FLD (f_memmode
);
1523 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
1524 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
1525 ; if (NEBI (tmp_postinc
, 0)) {
1527 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
1528 tmp_addr
= ADDSI (tmp_addr
, 1);
1531 SI opval
= tmp_addr
;
1532 SET_H_GR (FLD (f_operand1
), opval
);
1533 written
|= (1 << 9);
1534 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1539 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1540 tmp_carry
= CPU (h_cbit
);
1541 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1545 BI opval
= ORIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEQI (tmp_tmpopd
, 0), LTQI (tmp_newval
, 0)), ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_newval
, 0))));
1546 CPU (h_cbit
) = opval
;
1547 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1550 BI opval
= LTQI (tmp_newval
, 0);
1551 CPU (h_nbit
) = opval
;
1552 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1555 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1556 CPU (h_zbit
) = opval
;
1557 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1560 BI opval
= ORIF (ANDIF (ANDIF (GEQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), GEQI (tmp_newval
, 0)), ANDIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), LTQI (tmp_newval
, 0)));
1561 CPU (h_vbit
) = opval
;
1562 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1567 CPU (h_xbit
) = opval
;
1568 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1572 SET_H_INSN_PREFIXED_P (opval
);
1573 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1579 abuf
->written
= written
;
1584 CASE (sem
, INSN_CMP_M_W_M
) : /* cmp-m.w [${Rs}${inc}],${Rd} */
1586 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1587 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1588 #define FLD(f) abuf->fields.sfmt_addc_m.f
1589 int UNUSED written
= 0;
1590 IADDR UNUSED pc
= abuf
->addr
;
1591 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1598 tmp_tmpops
= ({ SI tmp_addr
;
1601 tmp_postinc
= FLD (f_memmode
);
1602 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
1603 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
1604 ; if (NEBI (tmp_postinc
, 0)) {
1606 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
1607 tmp_addr
= ADDSI (tmp_addr
, 2);
1610 SI opval
= tmp_addr
;
1611 SET_H_GR (FLD (f_operand1
), opval
);
1612 written
|= (1 << 9);
1613 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1618 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1619 tmp_carry
= CPU (h_cbit
);
1620 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1624 BI opval
= ORIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEHI (tmp_tmpopd
, 0), LTHI (tmp_newval
, 0)), ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_newval
, 0))));
1625 CPU (h_cbit
) = opval
;
1626 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1629 BI opval
= LTHI (tmp_newval
, 0);
1630 CPU (h_nbit
) = opval
;
1631 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1634 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1635 CPU (h_zbit
) = opval
;
1636 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1639 BI opval
= ORIF (ANDIF (ANDIF (GEHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), GEHI (tmp_newval
, 0)), ANDIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), LTHI (tmp_newval
, 0)));
1640 CPU (h_vbit
) = opval
;
1641 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1646 CPU (h_xbit
) = opval
;
1647 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1651 SET_H_INSN_PREFIXED_P (opval
);
1652 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1658 abuf
->written
= written
;
1663 CASE (sem
, INSN_CMP_M_D_M
) : /* cmp-m.d [${Rs}${inc}],${Rd} */
1665 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1666 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1667 #define FLD(f) abuf->fields.sfmt_addc_m.f
1668 int UNUSED written
= 0;
1669 IADDR UNUSED pc
= abuf
->addr
;
1670 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1677 tmp_tmpops
= ({ SI tmp_addr
;
1680 tmp_postinc
= FLD (f_memmode
);
1681 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
1682 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
1683 ; if (NEBI (tmp_postinc
, 0)) {
1685 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
1686 tmp_addr
= ADDSI (tmp_addr
, 4);
1689 SI opval
= tmp_addr
;
1690 SET_H_GR (FLD (f_operand1
), opval
);
1691 written
|= (1 << 9);
1692 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1697 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1698 tmp_carry
= CPU (h_cbit
);
1699 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1703 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
1704 CPU (h_cbit
) = opval
;
1705 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1708 BI opval
= LTSI (tmp_newval
, 0);
1709 CPU (h_nbit
) = opval
;
1710 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1713 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1714 CPU (h_zbit
) = opval
;
1715 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1718 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
1719 CPU (h_vbit
) = opval
;
1720 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1725 CPU (h_xbit
) = opval
;
1726 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1730 SET_H_INSN_PREFIXED_P (opval
);
1731 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1737 abuf
->written
= written
;
1742 CASE (sem
, INSN_CMPCBR
) : /* cmp.b $sconst8,$Rd */
1744 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1745 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1746 #define FLD(f) abuf->fields.sfmt_bound_cb.f
1747 int UNUSED written
= 0;
1748 IADDR UNUSED pc
= abuf
->addr
;
1749 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1756 tmp_tmpops
= TRUNCSIQI (FLD (f_indir_pc__byte
));
1757 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1758 tmp_carry
= CPU (h_cbit
);
1759 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1763 BI opval
= ORIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEQI (tmp_tmpopd
, 0), LTQI (tmp_newval
, 0)), ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_newval
, 0))));
1764 CPU (h_cbit
) = opval
;
1765 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1768 BI opval
= LTQI (tmp_newval
, 0);
1769 CPU (h_nbit
) = opval
;
1770 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1773 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1774 CPU (h_zbit
) = opval
;
1775 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1778 BI opval
= ORIF (ANDIF (ANDIF (GEQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), GEQI (tmp_newval
, 0)), ANDIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), LTQI (tmp_newval
, 0)));
1779 CPU (h_vbit
) = opval
;
1780 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1785 CPU (h_xbit
) = opval
;
1786 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1790 SET_H_INSN_PREFIXED_P (opval
);
1791 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1801 CASE (sem
, INSN_CMPCWR
) : /* cmp.w $sconst16,$Rd */
1803 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1804 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1805 #define FLD(f) abuf->fields.sfmt_bound_cw.f
1806 int UNUSED written
= 0;
1807 IADDR UNUSED pc
= abuf
->addr
;
1808 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1815 tmp_tmpops
= TRUNCSIHI (FLD (f_indir_pc__word
));
1816 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1817 tmp_carry
= CPU (h_cbit
);
1818 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1822 BI opval
= ORIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEHI (tmp_tmpopd
, 0), LTHI (tmp_newval
, 0)), ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_newval
, 0))));
1823 CPU (h_cbit
) = opval
;
1824 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1827 BI opval
= LTHI (tmp_newval
, 0);
1828 CPU (h_nbit
) = opval
;
1829 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1832 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1833 CPU (h_zbit
) = opval
;
1834 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1837 BI opval
= ORIF (ANDIF (ANDIF (GEHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), GEHI (tmp_newval
, 0)), ANDIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), LTHI (tmp_newval
, 0)));
1838 CPU (h_vbit
) = opval
;
1839 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1844 CPU (h_xbit
) = opval
;
1845 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1849 SET_H_INSN_PREFIXED_P (opval
);
1850 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1860 CASE (sem
, INSN_CMPCDR
) : /* cmp.d $const32,$Rd */
1862 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1863 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1864 #define FLD(f) abuf->fields.sfmt_bound_cd.f
1865 int UNUSED written
= 0;
1866 IADDR UNUSED pc
= abuf
->addr
;
1867 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
1874 tmp_tmpops
= FLD (f_indir_pc__dword
);
1875 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1876 tmp_carry
= CPU (h_cbit
);
1877 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1881 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
1882 CPU (h_cbit
) = opval
;
1883 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1886 BI opval
= LTSI (tmp_newval
, 0);
1887 CPU (h_nbit
) = opval
;
1888 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1891 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1892 CPU (h_zbit
) = opval
;
1893 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1896 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
1897 CPU (h_vbit
) = opval
;
1898 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1903 CPU (h_xbit
) = opval
;
1904 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1908 SET_H_INSN_PREFIXED_P (opval
);
1909 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1919 CASE (sem
, INSN_CMPQ
) : /* cmpq $i,$Rd */
1921 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1922 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1923 #define FLD(f) abuf->fields.sfmt_andq.f
1924 int UNUSED written
= 0;
1925 IADDR UNUSED pc
= abuf
->addr
;
1926 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1933 tmp_tmpops
= FLD (f_s6
);
1934 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1935 tmp_carry
= CPU (h_cbit
);
1936 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1940 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
1941 CPU (h_cbit
) = opval
;
1942 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1945 BI opval
= LTSI (tmp_newval
, 0);
1946 CPU (h_nbit
) = opval
;
1947 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1950 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1951 CPU (h_zbit
) = opval
;
1952 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1955 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
1956 CPU (h_vbit
) = opval
;
1957 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1962 CPU (h_xbit
) = opval
;
1963 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1967 SET_H_INSN_PREFIXED_P (opval
);
1968 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1978 CASE (sem
, INSN_CMPS_M_B_M
) : /* cmps-m.b [${Rs}${inc}],$Rd */
1980 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1981 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1982 #define FLD(f) abuf->fields.sfmt_addc_m.f
1983 int UNUSED written
= 0;
1984 IADDR UNUSED pc
= abuf
->addr
;
1985 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1992 tmp_tmpops
= EXTQISI (({ SI tmp_addr
;
1995 tmp_postinc
= FLD (f_memmode
);
1996 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
1997 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
1998 ; if (NEBI (tmp_postinc
, 0)) {
2000 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2001 tmp_addr
= ADDSI (tmp_addr
, 1);
2004 SI opval
= tmp_addr
;
2005 SET_H_GR (FLD (f_operand1
), opval
);
2006 written
|= (1 << 9);
2007 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2012 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2013 tmp_carry
= CPU (h_cbit
);
2014 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2018 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
2019 CPU (h_cbit
) = opval
;
2020 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2023 BI opval
= LTSI (tmp_newval
, 0);
2024 CPU (h_nbit
) = opval
;
2025 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2028 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2029 CPU (h_zbit
) = opval
;
2030 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2033 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
2034 CPU (h_vbit
) = opval
;
2035 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2040 CPU (h_xbit
) = opval
;
2041 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2045 SET_H_INSN_PREFIXED_P (opval
);
2046 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2052 abuf
->written
= written
;
2057 CASE (sem
, INSN_CMPS_M_W_M
) : /* cmps-m.w [${Rs}${inc}],$Rd */
2059 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2060 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2061 #define FLD(f) abuf->fields.sfmt_addc_m.f
2062 int UNUSED written
= 0;
2063 IADDR UNUSED pc
= abuf
->addr
;
2064 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2071 tmp_tmpops
= EXTHISI (({ SI tmp_addr
;
2074 tmp_postinc
= FLD (f_memmode
);
2075 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
2076 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
2077 ; if (NEBI (tmp_postinc
, 0)) {
2079 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2080 tmp_addr
= ADDSI (tmp_addr
, 2);
2083 SI opval
= tmp_addr
;
2084 SET_H_GR (FLD (f_operand1
), opval
);
2085 written
|= (1 << 9);
2086 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2091 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2092 tmp_carry
= CPU (h_cbit
);
2093 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2097 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
2098 CPU (h_cbit
) = opval
;
2099 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2102 BI opval
= LTSI (tmp_newval
, 0);
2103 CPU (h_nbit
) = opval
;
2104 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2107 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2108 CPU (h_zbit
) = opval
;
2109 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2112 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
2113 CPU (h_vbit
) = opval
;
2114 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2119 CPU (h_xbit
) = opval
;
2120 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2124 SET_H_INSN_PREFIXED_P (opval
);
2125 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2131 abuf
->written
= written
;
2136 CASE (sem
, INSN_CMPSCBR
) : /* [${Rs}${inc}],$Rd */
2138 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2139 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2140 #define FLD(f) abuf->fields.sfmt_bound_cb.f
2141 int UNUSED written
= 0;
2142 IADDR UNUSED pc
= abuf
->addr
;
2143 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2150 tmp_tmpops
= EXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
2151 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2152 tmp_carry
= CPU (h_cbit
);
2153 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2157 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
2158 CPU (h_cbit
) = opval
;
2159 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2162 BI opval
= LTSI (tmp_newval
, 0);
2163 CPU (h_nbit
) = opval
;
2164 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2167 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2168 CPU (h_zbit
) = opval
;
2169 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2172 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
2173 CPU (h_vbit
) = opval
;
2174 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2179 CPU (h_xbit
) = opval
;
2180 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2184 SET_H_INSN_PREFIXED_P (opval
);
2185 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2195 CASE (sem
, INSN_CMPSCWR
) : /* [${Rs}${inc}],$Rd */
2197 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2198 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2199 #define FLD(f) abuf->fields.sfmt_bound_cw.f
2200 int UNUSED written
= 0;
2201 IADDR UNUSED pc
= abuf
->addr
;
2202 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2209 tmp_tmpops
= EXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
2210 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2211 tmp_carry
= CPU (h_cbit
);
2212 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2216 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
2217 CPU (h_cbit
) = opval
;
2218 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2221 BI opval
= LTSI (tmp_newval
, 0);
2222 CPU (h_nbit
) = opval
;
2223 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2226 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2227 CPU (h_zbit
) = opval
;
2228 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2231 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
2232 CPU (h_vbit
) = opval
;
2233 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2238 CPU (h_xbit
) = opval
;
2239 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2243 SET_H_INSN_PREFIXED_P (opval
);
2244 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2254 CASE (sem
, INSN_CMPU_M_B_M
) : /* cmpu-m.b [${Rs}${inc}],$Rd */
2256 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2257 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2258 #define FLD(f) abuf->fields.sfmt_addc_m.f
2259 int UNUSED written
= 0;
2260 IADDR UNUSED pc
= abuf
->addr
;
2261 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2268 tmp_tmpops
= ZEXTQISI (({ SI tmp_addr
;
2271 tmp_postinc
= FLD (f_memmode
);
2272 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
2273 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
2274 ; if (NEBI (tmp_postinc
, 0)) {
2276 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2277 tmp_addr
= ADDSI (tmp_addr
, 1);
2280 SI opval
= tmp_addr
;
2281 SET_H_GR (FLD (f_operand1
), opval
);
2282 written
|= (1 << 9);
2283 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2288 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2289 tmp_carry
= CPU (h_cbit
);
2290 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2294 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
2295 CPU (h_cbit
) = opval
;
2296 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2299 BI opval
= LTSI (tmp_newval
, 0);
2300 CPU (h_nbit
) = opval
;
2301 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2304 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2305 CPU (h_zbit
) = opval
;
2306 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2309 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
2310 CPU (h_vbit
) = opval
;
2311 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2316 CPU (h_xbit
) = opval
;
2317 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2321 SET_H_INSN_PREFIXED_P (opval
);
2322 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2328 abuf
->written
= written
;
2333 CASE (sem
, INSN_CMPU_M_W_M
) : /* cmpu-m.w [${Rs}${inc}],$Rd */
2335 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2336 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2337 #define FLD(f) abuf->fields.sfmt_addc_m.f
2338 int UNUSED written
= 0;
2339 IADDR UNUSED pc
= abuf
->addr
;
2340 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2347 tmp_tmpops
= ZEXTHISI (({ SI tmp_addr
;
2350 tmp_postinc
= FLD (f_memmode
);
2351 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
2352 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
2353 ; if (NEBI (tmp_postinc
, 0)) {
2355 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2356 tmp_addr
= ADDSI (tmp_addr
, 2);
2359 SI opval
= tmp_addr
;
2360 SET_H_GR (FLD (f_operand1
), opval
);
2361 written
|= (1 << 9);
2362 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2367 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2368 tmp_carry
= CPU (h_cbit
);
2369 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2373 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
2374 CPU (h_cbit
) = opval
;
2375 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2378 BI opval
= LTSI (tmp_newval
, 0);
2379 CPU (h_nbit
) = opval
;
2380 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2383 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2384 CPU (h_zbit
) = opval
;
2385 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2388 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
2389 CPU (h_vbit
) = opval
;
2390 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2395 CPU (h_xbit
) = opval
;
2396 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2400 SET_H_INSN_PREFIXED_P (opval
);
2401 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2407 abuf
->written
= written
;
2412 CASE (sem
, INSN_CMPUCBR
) : /* [${Rs}${inc}],$Rd */
2414 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2415 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2416 #define FLD(f) abuf->fields.sfmt_bound_cb.f
2417 int UNUSED written
= 0;
2418 IADDR UNUSED pc
= abuf
->addr
;
2419 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2426 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
2427 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2428 tmp_carry
= CPU (h_cbit
);
2429 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2433 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
2434 CPU (h_cbit
) = opval
;
2435 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2438 BI opval
= LTSI (tmp_newval
, 0);
2439 CPU (h_nbit
) = opval
;
2440 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2443 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2444 CPU (h_zbit
) = opval
;
2445 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2448 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
2449 CPU (h_vbit
) = opval
;
2450 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2455 CPU (h_xbit
) = opval
;
2456 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2460 SET_H_INSN_PREFIXED_P (opval
);
2461 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2471 CASE (sem
, INSN_CMPUCWR
) : /* [${Rs}${inc}],$Rd */
2473 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2474 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2475 #define FLD(f) abuf->fields.sfmt_bound_cw.f
2476 int UNUSED written
= 0;
2477 IADDR UNUSED pc
= abuf
->addr
;
2478 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2485 tmp_tmpops
= ZEXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
2486 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2487 tmp_carry
= CPU (h_cbit
);
2488 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2492 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
2493 CPU (h_cbit
) = opval
;
2494 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2497 BI opval
= LTSI (tmp_newval
, 0);
2498 CPU (h_nbit
) = opval
;
2499 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2502 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2503 CPU (h_zbit
) = opval
;
2504 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2507 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
2508 CPU (h_vbit
) = opval
;
2509 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2514 CPU (h_xbit
) = opval
;
2515 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2519 SET_H_INSN_PREFIXED_P (opval
);
2520 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2530 CASE (sem
, INSN_MOVE_M_B_M
) : /* move-m.b [${Rs}${inc}],${Rd} */
2532 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2533 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2534 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2535 int UNUSED written
= 0;
2536 IADDR UNUSED pc
= abuf
->addr
;
2537 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2541 tmp_tmp
= ({ SI tmp_addr
;
2544 tmp_postinc
= FLD (f_memmode
);
2545 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
2546 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
2547 ; if (NEBI (tmp_postinc
, 0)) {
2549 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2550 tmp_addr
= ADDSI (tmp_addr
, 1);
2553 SI opval
= tmp_addr
;
2554 SET_H_GR (FLD (f_operand1
), opval
);
2555 written
|= (1 << 10);
2556 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2563 tmp_oldregval
= GET_H_RAW_GR_ACR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
2565 SI opval
= ORSI (ANDSI (tmp_tmp
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
2566 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
2567 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2572 BI opval
= LTQI (tmp_tmp
, 0);
2573 CPU (h_nbit
) = opval
;
2574 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2577 BI opval
= ANDIF (EQQI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
2578 CPU (h_zbit
) = opval
;
2579 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2581 SET_H_CBIT_MOVE (0);
2582 SET_H_VBIT_MOVE (0);
2586 CPU (h_xbit
) = opval
;
2587 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2591 SET_H_INSN_PREFIXED_P (opval
);
2592 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2598 abuf
->written
= written
;
2603 CASE (sem
, INSN_MOVE_M_W_M
) : /* move-m.w [${Rs}${inc}],${Rd} */
2605 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2606 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2607 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2608 int UNUSED written
= 0;
2609 IADDR UNUSED pc
= abuf
->addr
;
2610 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2614 tmp_tmp
= ({ SI tmp_addr
;
2617 tmp_postinc
= FLD (f_memmode
);
2618 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
2619 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
2620 ; if (NEBI (tmp_postinc
, 0)) {
2622 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2623 tmp_addr
= ADDSI (tmp_addr
, 2);
2626 SI opval
= tmp_addr
;
2627 SET_H_GR (FLD (f_operand1
), opval
);
2628 written
|= (1 << 10);
2629 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2636 tmp_oldregval
= GET_H_RAW_GR_ACR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
2638 SI opval
= ORSI (ANDSI (tmp_tmp
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
2639 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
2640 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2645 BI opval
= LTHI (tmp_tmp
, 0);
2646 CPU (h_nbit
) = opval
;
2647 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2650 BI opval
= ANDIF (EQHI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
2651 CPU (h_zbit
) = opval
;
2652 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2654 SET_H_CBIT_MOVE (0);
2655 SET_H_VBIT_MOVE (0);
2659 CPU (h_xbit
) = opval
;
2660 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2664 SET_H_INSN_PREFIXED_P (opval
);
2665 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2671 abuf
->written
= written
;
2676 CASE (sem
, INSN_MOVE_M_D_M
) : /* move-m.d [${Rs}${inc}],${Rd} */
2678 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2679 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2680 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2681 int UNUSED written
= 0;
2682 IADDR UNUSED pc
= abuf
->addr
;
2683 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2687 tmp_tmp
= ({ SI tmp_addr
;
2690 tmp_postinc
= FLD (f_memmode
);
2691 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
2692 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
2693 ; if (NEBI (tmp_postinc
, 0)) {
2695 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2696 tmp_addr
= ADDSI (tmp_addr
, 4);
2699 SI opval
= tmp_addr
;
2700 SET_H_GR (FLD (f_operand1
), opval
);
2701 written
|= (1 << 9);
2702 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2709 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
2710 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2714 BI opval
= LTSI (tmp_tmp
, 0);
2715 CPU (h_nbit
) = opval
;
2716 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2719 BI opval
= ANDIF (EQSI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
2720 CPU (h_zbit
) = opval
;
2721 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2723 SET_H_CBIT_MOVE (0);
2724 SET_H_VBIT_MOVE (0);
2728 CPU (h_xbit
) = opval
;
2729 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2733 SET_H_INSN_PREFIXED_P (opval
);
2734 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2740 abuf
->written
= written
;
2745 CASE (sem
, INSN_MOVS_M_B_M
) : /* movs-m.b [${Rs}${inc}],${Rd} */
2747 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2748 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2749 #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f
2750 int UNUSED written
= 0;
2751 IADDR UNUSED pc
= abuf
->addr
;
2752 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2756 tmp_tmp
= EXTQISI (({ SI tmp_addr
;
2759 tmp_postinc
= FLD (f_memmode
);
2760 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
2761 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
2762 ; if (NEBI (tmp_postinc
, 0)) {
2764 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2765 tmp_addr
= ADDSI (tmp_addr
, 1);
2768 SI opval
= tmp_addr
;
2769 SET_H_GR (FLD (f_operand1
), opval
);
2770 written
|= (1 << 8);
2771 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2776 if (ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) {
2779 SET_H_GR (FLD (f_operand1
), opval
);
2780 written
|= (1 << 8);
2781 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2786 SET_H_GR (FLD (f_operand2
), opval
);
2787 written
|= (1 << 7);
2788 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2793 BI opval
= LTSI (tmp_tmp
, 0);
2794 CPU (h_nbit
) = opval
;
2795 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2798 BI opval
= ANDIF (EQSI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
2799 CPU (h_zbit
) = opval
;
2800 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2802 SET_H_CBIT_MOVE (0);
2803 SET_H_VBIT_MOVE (0);
2807 CPU (h_xbit
) = opval
;
2808 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2812 SET_H_INSN_PREFIXED_P (opval
);
2813 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2819 abuf
->written
= written
;
2824 CASE (sem
, INSN_MOVS_M_W_M
) : /* movs-m.w [${Rs}${inc}],${Rd} */
2826 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2827 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2828 #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f
2829 int UNUSED written
= 0;
2830 IADDR UNUSED pc
= abuf
->addr
;
2831 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2835 tmp_tmp
= EXTHISI (({ SI tmp_addr
;
2838 tmp_postinc
= FLD (f_memmode
);
2839 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
2840 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
2841 ; if (NEBI (tmp_postinc
, 0)) {
2843 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2844 tmp_addr
= ADDSI (tmp_addr
, 2);
2847 SI opval
= tmp_addr
;
2848 SET_H_GR (FLD (f_operand1
), opval
);
2849 written
|= (1 << 8);
2850 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2855 if (ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) {
2858 SET_H_GR (FLD (f_operand1
), opval
);
2859 written
|= (1 << 8);
2860 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2865 SET_H_GR (FLD (f_operand2
), opval
);
2866 written
|= (1 << 7);
2867 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2872 BI opval
= LTSI (tmp_tmp
, 0);
2873 CPU (h_nbit
) = opval
;
2874 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2877 BI opval
= ANDIF (EQSI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
2878 CPU (h_zbit
) = opval
;
2879 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2881 SET_H_CBIT_MOVE (0);
2882 SET_H_VBIT_MOVE (0);
2886 CPU (h_xbit
) = opval
;
2887 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2891 SET_H_INSN_PREFIXED_P (opval
);
2892 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2898 abuf
->written
= written
;
2903 CASE (sem
, INSN_MOVU_M_B_M
) : /* movu-m.b [${Rs}${inc}],${Rd} */
2905 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2906 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2907 #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f
2908 int UNUSED written
= 0;
2909 IADDR UNUSED pc
= abuf
->addr
;
2910 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2914 tmp_tmp
= ZEXTQISI (({ SI tmp_addr
;
2917 tmp_postinc
= FLD (f_memmode
);
2918 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
2919 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
2920 ; if (NEBI (tmp_postinc
, 0)) {
2922 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2923 tmp_addr
= ADDSI (tmp_addr
, 1);
2926 SI opval
= tmp_addr
;
2927 SET_H_GR (FLD (f_operand1
), opval
);
2928 written
|= (1 << 8);
2929 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2934 if (ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) {
2937 SET_H_GR (FLD (f_operand1
), opval
);
2938 written
|= (1 << 8);
2939 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2944 SET_H_GR (FLD (f_operand2
), opval
);
2945 written
|= (1 << 7);
2946 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2951 BI opval
= LTSI (tmp_tmp
, 0);
2952 CPU (h_nbit
) = opval
;
2953 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2956 BI opval
= ANDIF (EQSI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
2957 CPU (h_zbit
) = opval
;
2958 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2960 SET_H_CBIT_MOVE (0);
2961 SET_H_VBIT_MOVE (0);
2965 CPU (h_xbit
) = opval
;
2966 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2970 SET_H_INSN_PREFIXED_P (opval
);
2971 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2977 abuf
->written
= written
;
2982 CASE (sem
, INSN_MOVU_M_W_M
) : /* movu-m.w [${Rs}${inc}],${Rd} */
2984 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2985 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2986 #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f
2987 int UNUSED written
= 0;
2988 IADDR UNUSED pc
= abuf
->addr
;
2989 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2993 tmp_tmp
= ZEXTHISI (({ SI tmp_addr
;
2996 tmp_postinc
= FLD (f_memmode
);
2997 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
2998 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
2999 ; if (NEBI (tmp_postinc
, 0)) {
3001 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3002 tmp_addr
= ADDSI (tmp_addr
, 2);
3005 SI opval
= tmp_addr
;
3006 SET_H_GR (FLD (f_operand1
), opval
);
3007 written
|= (1 << 8);
3008 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3013 if (ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) {
3016 SET_H_GR (FLD (f_operand1
), opval
);
3017 written
|= (1 << 8);
3018 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3023 SET_H_GR (FLD (f_operand2
), opval
);
3024 written
|= (1 << 7);
3025 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3030 BI opval
= LTSI (tmp_tmp
, 0);
3031 CPU (h_nbit
) = opval
;
3032 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
3035 BI opval
= ANDIF (EQSI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
3036 CPU (h_zbit
) = opval
;
3037 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
3039 SET_H_CBIT_MOVE (0);
3040 SET_H_VBIT_MOVE (0);
3044 CPU (h_xbit
) = opval
;
3045 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3049 SET_H_INSN_PREFIXED_P (opval
);
3050 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3056 abuf
->written
= written
;
3061 CASE (sem
, INSN_MOVE_R_SPRV32
) : /* move ${Rs},${Pd} */
3063 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3064 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3065 #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f
3066 int UNUSED written
= 0;
3067 IADDR UNUSED pc
= abuf
->addr
;
3068 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3073 tmp_tmp
= GET_H_GR (FLD (f_operand1
));
3074 tmp_rno
= FLD (f_operand2
);
3075 if (ORIF (ORIF (EQSI (tmp_rno
, 0), EQSI (tmp_rno
, 1)), ORIF (EQSI (tmp_rno
, 4), EQSI (tmp_rno
, 8)))) {
3076 cgen_rtx_error (current_cpu
, "move-r-spr: trying to set a read-only special register");
3081 SET_H_SR (FLD (f_operand2
), opval
);
3082 written
|= (1 << 2);
3083 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3089 CPU (h_xbit
) = opval
;
3090 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3094 SET_H_INSN_PREFIXED_P (opval
);
3095 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3100 abuf
->written
= written
;
3105 CASE (sem
, INSN_MOVE_SPR_RV32
) : /* move ${Ps},${Rd-sfield} */
3107 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3108 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3109 #define FLD(f) abuf->fields.sfmt_mcp.f
3110 int UNUSED written
= 0;
3111 IADDR UNUSED pc
= abuf
->addr
;
3112 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3118 tmp_prno
= FLD (f_operand2
);
3119 tmp_newval
= GET_H_SR (FLD (f_operand2
));
3120 if (EQSI (tmp_prno
, 2)) {
3122 SI opval
= tmp_newval
;
3123 SET_H_GR (FLD (f_operand1
), opval
);
3124 written
|= (1 << 4);
3125 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3128 else if (EQSI (tmp_prno
, 3)) {
3131 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand1
));
3133 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
3134 SET_H_GR (FLD (f_operand1
), opval
);
3135 written
|= (1 << 4);
3136 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3140 else if (EQSI (tmp_prno
, 5)) {
3142 SI opval
= tmp_newval
;
3143 SET_H_GR (FLD (f_operand1
), opval
);
3144 written
|= (1 << 4);
3145 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3148 else if (EQSI (tmp_prno
, 6)) {
3150 SI opval
= tmp_newval
;
3151 SET_H_GR (FLD (f_operand1
), opval
);
3152 written
|= (1 << 4);
3153 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3156 else if (EQSI (tmp_prno
, 7)) {
3158 SI opval
= tmp_newval
;
3159 SET_H_GR (FLD (f_operand1
), opval
);
3160 written
|= (1 << 4);
3161 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3164 else if (EQSI (tmp_prno
, 9)) {
3166 SI opval
= tmp_newval
;
3167 SET_H_GR (FLD (f_operand1
), opval
);
3168 written
|= (1 << 4);
3169 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3172 else if (EQSI (tmp_prno
, 10)) {
3174 SI opval
= tmp_newval
;
3175 SET_H_GR (FLD (f_operand1
), opval
);
3176 written
|= (1 << 4);
3177 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3180 else if (EQSI (tmp_prno
, 11)) {
3182 SI opval
= tmp_newval
;
3183 SET_H_GR (FLD (f_operand1
), opval
);
3184 written
|= (1 << 4);
3185 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3188 else if (EQSI (tmp_prno
, 12)) {
3190 SI opval
= tmp_newval
;
3191 SET_H_GR (FLD (f_operand1
), opval
);
3192 written
|= (1 << 4);
3193 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3196 else if (EQSI (tmp_prno
, 13)) {
3198 SI opval
= tmp_newval
;
3199 SET_H_GR (FLD (f_operand1
), opval
);
3200 written
|= (1 << 4);
3201 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3204 else if (EQSI (tmp_prno
, 14)) {
3206 SI opval
= tmp_newval
;
3207 SET_H_GR (FLD (f_operand1
), opval
);
3208 written
|= (1 << 4);
3209 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3212 else if (EQSI (tmp_prno
, 15)) {
3214 SI opval
= tmp_newval
;
3215 SET_H_GR (FLD (f_operand1
), opval
);
3216 written
|= (1 << 4);
3217 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3220 else if (EQSI (tmp_prno
, 0)) {
3223 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand1
));
3225 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
3226 SET_H_GR (FLD (f_operand1
), opval
);
3227 written
|= (1 << 4);
3228 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3232 else if (EQSI (tmp_prno
, 1)) {
3235 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand1
));
3237 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
3238 SET_H_GR (FLD (f_operand1
), opval
);
3239 written
|= (1 << 4);
3240 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3244 else if (EQSI (tmp_prno
, 4)) {
3247 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand1
));
3249 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
3250 SET_H_GR (FLD (f_operand1
), opval
);
3251 written
|= (1 << 4);
3252 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3256 else if (EQSI (tmp_prno
, 8)) {
3258 SI opval
= tmp_newval
;
3259 SET_H_GR (FLD (f_operand1
), opval
);
3260 written
|= (1 << 4);
3261 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3265 cgen_rtx_error (current_cpu
, "move-spr-r from unimplemented register");
3270 CPU (h_xbit
) = opval
;
3271 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3275 SET_H_INSN_PREFIXED_P (opval
);
3276 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3281 abuf
->written
= written
;
3286 CASE (sem
, INSN_MOVE_M_SPRV32
) : /* move [${Rs}${inc}],${Pd} */
3288 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3289 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3290 #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f
3291 int UNUSED written
= 0;
3292 IADDR UNUSED pc
= abuf
->addr
;
3293 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3298 tmp_rno
= FLD (f_operand2
);
3299 if (EQSI (tmp_rno
, 2)) {
3300 tmp_newval
= ({ SI tmp_addr
;
3303 tmp_postinc
= FLD (f_memmode
);
3304 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
3305 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3306 ; if (NEBI (tmp_postinc
, 0)) {
3308 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3309 tmp_addr
= ADDSI (tmp_addr
, 4);
3312 SI opval
= tmp_addr
;
3313 SET_H_GR (FLD (f_operand1
), opval
);
3314 written
|= (1 << 8);
3315 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3321 else if (EQSI (tmp_rno
, 3)) {
3322 tmp_newval
= EXTQISI (({ SI tmp_addr
;
3325 tmp_postinc
= FLD (f_memmode
);
3326 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
3327 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
3328 ; if (NEBI (tmp_postinc
, 0)) {
3330 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3331 tmp_addr
= ADDSI (tmp_addr
, 1);
3334 SI opval
= tmp_addr
;
3335 SET_H_GR (FLD (f_operand1
), opval
);
3336 written
|= (1 << 8);
3337 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3343 else if (EQSI (tmp_rno
, 5)) {
3344 tmp_newval
= ({ SI tmp_addr
;
3347 tmp_postinc
= FLD (f_memmode
);
3348 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
3349 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3350 ; if (NEBI (tmp_postinc
, 0)) {
3352 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3353 tmp_addr
= ADDSI (tmp_addr
, 4);
3356 SI opval
= tmp_addr
;
3357 SET_H_GR (FLD (f_operand1
), opval
);
3358 written
|= (1 << 8);
3359 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3365 else if (EQSI (tmp_rno
, 6)) {
3366 tmp_newval
= ({ SI tmp_addr
;
3369 tmp_postinc
= FLD (f_memmode
);
3370 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
3371 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3372 ; if (NEBI (tmp_postinc
, 0)) {
3374 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3375 tmp_addr
= ADDSI (tmp_addr
, 4);
3378 SI opval
= tmp_addr
;
3379 SET_H_GR (FLD (f_operand1
), opval
);
3380 written
|= (1 << 8);
3381 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3387 else if (EQSI (tmp_rno
, 7)) {
3388 tmp_newval
= ({ SI tmp_addr
;
3391 tmp_postinc
= FLD (f_memmode
);
3392 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
3393 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3394 ; if (NEBI (tmp_postinc
, 0)) {
3396 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3397 tmp_addr
= ADDSI (tmp_addr
, 4);
3400 SI opval
= tmp_addr
;
3401 SET_H_GR (FLD (f_operand1
), opval
);
3402 written
|= (1 << 8);
3403 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3409 else if (EQSI (tmp_rno
, 9)) {
3410 tmp_newval
= ({ SI tmp_addr
;
3413 tmp_postinc
= FLD (f_memmode
);
3414 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
3415 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3416 ; if (NEBI (tmp_postinc
, 0)) {
3418 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3419 tmp_addr
= ADDSI (tmp_addr
, 4);
3422 SI opval
= tmp_addr
;
3423 SET_H_GR (FLD (f_operand1
), opval
);
3424 written
|= (1 << 8);
3425 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3431 else if (EQSI (tmp_rno
, 10)) {
3432 tmp_newval
= ({ SI tmp_addr
;
3435 tmp_postinc
= FLD (f_memmode
);
3436 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
3437 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3438 ; if (NEBI (tmp_postinc
, 0)) {
3440 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3441 tmp_addr
= ADDSI (tmp_addr
, 4);
3444 SI opval
= tmp_addr
;
3445 SET_H_GR (FLD (f_operand1
), opval
);
3446 written
|= (1 << 8);
3447 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3453 else if (EQSI (tmp_rno
, 11)) {
3454 tmp_newval
= ({ SI tmp_addr
;
3457 tmp_postinc
= FLD (f_memmode
);
3458 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
3459 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3460 ; if (NEBI (tmp_postinc
, 0)) {
3462 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3463 tmp_addr
= ADDSI (tmp_addr
, 4);
3466 SI opval
= tmp_addr
;
3467 SET_H_GR (FLD (f_operand1
), opval
);
3468 written
|= (1 << 8);
3469 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3475 else if (EQSI (tmp_rno
, 12)) {
3476 tmp_newval
= ({ SI tmp_addr
;
3479 tmp_postinc
= FLD (f_memmode
);
3480 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
3481 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3482 ; if (NEBI (tmp_postinc
, 0)) {
3484 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3485 tmp_addr
= ADDSI (tmp_addr
, 4);
3488 SI opval
= tmp_addr
;
3489 SET_H_GR (FLD (f_operand1
), opval
);
3490 written
|= (1 << 8);
3491 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3497 else if (EQSI (tmp_rno
, 13)) {
3498 tmp_newval
= ({ SI tmp_addr
;
3501 tmp_postinc
= FLD (f_memmode
);
3502 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
3503 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3504 ; if (NEBI (tmp_postinc
, 0)) {
3506 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3507 tmp_addr
= ADDSI (tmp_addr
, 4);
3510 SI opval
= tmp_addr
;
3511 SET_H_GR (FLD (f_operand1
), opval
);
3512 written
|= (1 << 8);
3513 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3519 else if (EQSI (tmp_rno
, 14)) {
3520 tmp_newval
= ({ SI tmp_addr
;
3523 tmp_postinc
= FLD (f_memmode
);
3524 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
3525 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3526 ; if (NEBI (tmp_postinc
, 0)) {
3528 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3529 tmp_addr
= ADDSI (tmp_addr
, 4);
3532 SI opval
= tmp_addr
;
3533 SET_H_GR (FLD (f_operand1
), opval
);
3534 written
|= (1 << 8);
3535 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3541 else if (EQSI (tmp_rno
, 15)) {
3542 tmp_newval
= ({ SI tmp_addr
;
3545 tmp_postinc
= FLD (f_memmode
);
3546 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
3547 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3548 ; if (NEBI (tmp_postinc
, 0)) {
3550 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3551 tmp_addr
= ADDSI (tmp_addr
, 4);
3554 SI opval
= tmp_addr
;
3555 SET_H_GR (FLD (f_operand1
), opval
);
3556 written
|= (1 << 8);
3557 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3564 cgen_rtx_error (current_cpu
, "Trying to set unimplemented special register");
3567 SI opval
= tmp_newval
;
3568 SET_H_SR (FLD (f_operand2
), opval
);
3569 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3574 CPU (h_xbit
) = opval
;
3575 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3579 SET_H_INSN_PREFIXED_P (opval
);
3580 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3585 abuf
->written
= written
;
3590 CASE (sem
, INSN_MOVE_C_SPRV32_P2
) : /* move ${const32},${Pd} */
3592 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3593 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3594 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
3595 int UNUSED written
= 0;
3596 IADDR UNUSED pc
= abuf
->addr
;
3597 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3601 SI opval
= FLD (f_indir_pc__dword
);
3602 SET_H_SR (FLD (f_operand2
), opval
);
3603 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3608 CPU (h_xbit
) = opval
;
3609 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3613 SET_H_INSN_PREFIXED_P (opval
);
3614 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3623 CASE (sem
, INSN_MOVE_C_SPRV32_P3
) : /* move ${const32},${Pd} */
3625 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3626 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3627 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
3628 int UNUSED written
= 0;
3629 IADDR UNUSED pc
= abuf
->addr
;
3630 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3634 SI opval
= FLD (f_indir_pc__dword
);
3635 SET_H_SR (FLD (f_operand2
), opval
);
3636 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3641 CPU (h_xbit
) = opval
;
3642 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3646 SET_H_INSN_PREFIXED_P (opval
);
3647 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3656 CASE (sem
, INSN_MOVE_C_SPRV32_P5
) : /* move ${const32},${Pd} */
3658 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3659 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3660 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
3661 int UNUSED written
= 0;
3662 IADDR UNUSED pc
= abuf
->addr
;
3663 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3667 SI opval
= FLD (f_indir_pc__dword
);
3668 SET_H_SR (FLD (f_operand2
), opval
);
3669 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3674 CPU (h_xbit
) = opval
;
3675 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3679 SET_H_INSN_PREFIXED_P (opval
);
3680 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3689 CASE (sem
, INSN_MOVE_C_SPRV32_P6
) : /* move ${const32},${Pd} */
3691 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3692 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3693 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
3694 int UNUSED written
= 0;
3695 IADDR UNUSED pc
= abuf
->addr
;
3696 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3700 SI opval
= FLD (f_indir_pc__dword
);
3701 SET_H_SR (FLD (f_operand2
), opval
);
3702 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3707 CPU (h_xbit
) = opval
;
3708 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3712 SET_H_INSN_PREFIXED_P (opval
);
3713 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3722 CASE (sem
, INSN_MOVE_C_SPRV32_P7
) : /* move ${const32},${Pd} */
3724 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3725 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3726 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
3727 int UNUSED written
= 0;
3728 IADDR UNUSED pc
= abuf
->addr
;
3729 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3733 SI opval
= FLD (f_indir_pc__dword
);
3734 SET_H_SR (FLD (f_operand2
), opval
);
3735 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3740 CPU (h_xbit
) = opval
;
3741 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3745 SET_H_INSN_PREFIXED_P (opval
);
3746 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3755 CASE (sem
, INSN_MOVE_C_SPRV32_P9
) : /* move ${const32},${Pd} */
3757 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3758 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3759 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
3760 int UNUSED written
= 0;
3761 IADDR UNUSED pc
= abuf
->addr
;
3762 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3766 SI opval
= FLD (f_indir_pc__dword
);
3767 SET_H_SR (FLD (f_operand2
), opval
);
3768 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3773 CPU (h_xbit
) = opval
;
3774 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3778 SET_H_INSN_PREFIXED_P (opval
);
3779 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3788 CASE (sem
, INSN_MOVE_C_SPRV32_P10
) : /* move ${const32},${Pd} */
3790 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3791 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3792 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
3793 int UNUSED written
= 0;
3794 IADDR UNUSED pc
= abuf
->addr
;
3795 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3799 SI opval
= FLD (f_indir_pc__dword
);
3800 SET_H_SR (FLD (f_operand2
), opval
);
3801 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3806 CPU (h_xbit
) = opval
;
3807 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3811 SET_H_INSN_PREFIXED_P (opval
);
3812 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3821 CASE (sem
, INSN_MOVE_C_SPRV32_P11
) : /* move ${const32},${Pd} */
3823 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3824 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3825 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
3826 int UNUSED written
= 0;
3827 IADDR UNUSED pc
= abuf
->addr
;
3828 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3832 SI opval
= FLD (f_indir_pc__dword
);
3833 SET_H_SR (FLD (f_operand2
), opval
);
3834 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3839 CPU (h_xbit
) = opval
;
3840 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3844 SET_H_INSN_PREFIXED_P (opval
);
3845 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3854 CASE (sem
, INSN_MOVE_C_SPRV32_P12
) : /* move ${const32},${Pd} */
3856 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3857 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3858 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
3859 int UNUSED written
= 0;
3860 IADDR UNUSED pc
= abuf
->addr
;
3861 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3865 SI opval
= FLD (f_indir_pc__dword
);
3866 SET_H_SR (FLD (f_operand2
), opval
);
3867 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3872 CPU (h_xbit
) = opval
;
3873 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3877 SET_H_INSN_PREFIXED_P (opval
);
3878 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3887 CASE (sem
, INSN_MOVE_C_SPRV32_P13
) : /* move ${const32},${Pd} */
3889 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3890 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3891 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
3892 int UNUSED written
= 0;
3893 IADDR UNUSED pc
= abuf
->addr
;
3894 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3898 SI opval
= FLD (f_indir_pc__dword
);
3899 SET_H_SR (FLD (f_operand2
), opval
);
3900 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3905 CPU (h_xbit
) = opval
;
3906 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3910 SET_H_INSN_PREFIXED_P (opval
);
3911 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3920 CASE (sem
, INSN_MOVE_C_SPRV32_P14
) : /* move ${const32},${Pd} */
3922 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3923 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3924 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
3925 int UNUSED written
= 0;
3926 IADDR UNUSED pc
= abuf
->addr
;
3927 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3931 SI opval
= FLD (f_indir_pc__dword
);
3932 SET_H_SR (FLD (f_operand2
), opval
);
3933 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3938 CPU (h_xbit
) = opval
;
3939 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3943 SET_H_INSN_PREFIXED_P (opval
);
3944 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3953 CASE (sem
, INSN_MOVE_C_SPRV32_P15
) : /* move ${const32},${Pd} */
3955 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3956 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3957 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
3958 int UNUSED written
= 0;
3959 IADDR UNUSED pc
= abuf
->addr
;
3960 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3964 SI opval
= FLD (f_indir_pc__dword
);
3965 SET_H_SR (FLD (f_operand2
), opval
);
3966 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3971 CPU (h_xbit
) = opval
;
3972 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3976 SET_H_INSN_PREFIXED_P (opval
);
3977 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3986 CASE (sem
, INSN_MOVE_SPR_MV32
) : /* move ${Ps},[${Rd-sfield}${inc}] */
3988 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3989 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3990 #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
3991 int UNUSED written
= 0;
3992 IADDR UNUSED pc
= abuf
->addr
;
3993 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3997 tmp_rno
= FLD (f_operand2
);
3998 if (EQSI (tmp_rno
, 2)) {
4002 tmp_postinc
= FLD (f_memmode
);
4003 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4004 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4005 if (EQBI (CPU (h_pbit
), 0)) {
4008 SI opval
= GET_H_SR (FLD (f_operand2
));
4009 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4010 written
|= (1 << 13);
4011 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4014 BI opval
= CPU (h_pbit
);
4015 CPU (h_cbit
) = opval
;
4016 written
|= (1 << 10);
4017 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4023 CPU (h_cbit
) = opval
;
4024 written
|= (1 << 10);
4025 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4030 SI opval
= GET_H_SR (FLD (f_operand2
));
4031 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4032 written
|= (1 << 13);
4033 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4036 if (NEBI (tmp_postinc
, 0)) {
4038 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4039 tmp_addr
= ADDSI (tmp_addr
, 4);
4042 SI opval
= tmp_addr
;
4043 SET_H_GR (FLD (f_operand1
), opval
);
4044 written
|= (1 << 9);
4045 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4051 else if (EQSI (tmp_rno
, 3)) {
4055 tmp_postinc
= FLD (f_memmode
);
4056 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4057 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4058 if (EQBI (CPU (h_pbit
), 0)) {
4061 QI opval
= GET_H_SR (FLD (f_operand2
));
4062 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
4063 written
|= (1 << 12);
4064 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4067 BI opval
= CPU (h_pbit
);
4068 CPU (h_cbit
) = opval
;
4069 written
|= (1 << 10);
4070 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4076 CPU (h_cbit
) = opval
;
4077 written
|= (1 << 10);
4078 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4083 QI opval
= GET_H_SR (FLD (f_operand2
));
4084 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
4085 written
|= (1 << 12);
4086 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4089 if (NEBI (tmp_postinc
, 0)) {
4091 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4092 tmp_addr
= ADDSI (tmp_addr
, 1);
4095 SI opval
= tmp_addr
;
4096 SET_H_GR (FLD (f_operand1
), opval
);
4097 written
|= (1 << 9);
4098 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4104 else if (EQSI (tmp_rno
, 5)) {
4108 tmp_postinc
= FLD (f_memmode
);
4109 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4110 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4111 if (EQBI (CPU (h_pbit
), 0)) {
4114 SI opval
= GET_H_SR (FLD (f_operand2
));
4115 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4116 written
|= (1 << 13);
4117 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4120 BI opval
= CPU (h_pbit
);
4121 CPU (h_cbit
) = opval
;
4122 written
|= (1 << 10);
4123 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4129 CPU (h_cbit
) = opval
;
4130 written
|= (1 << 10);
4131 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4136 SI opval
= GET_H_SR (FLD (f_operand2
));
4137 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4138 written
|= (1 << 13);
4139 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4142 if (NEBI (tmp_postinc
, 0)) {
4144 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4145 tmp_addr
= ADDSI (tmp_addr
, 4);
4148 SI opval
= tmp_addr
;
4149 SET_H_GR (FLD (f_operand1
), opval
);
4150 written
|= (1 << 9);
4151 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4157 else if (EQSI (tmp_rno
, 6)) {
4161 tmp_postinc
= FLD (f_memmode
);
4162 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4163 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4164 if (EQBI (CPU (h_pbit
), 0)) {
4167 SI opval
= GET_H_SR (FLD (f_operand2
));
4168 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4169 written
|= (1 << 13);
4170 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4173 BI opval
= CPU (h_pbit
);
4174 CPU (h_cbit
) = opval
;
4175 written
|= (1 << 10);
4176 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4182 CPU (h_cbit
) = opval
;
4183 written
|= (1 << 10);
4184 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4189 SI opval
= GET_H_SR (FLD (f_operand2
));
4190 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4191 written
|= (1 << 13);
4192 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4195 if (NEBI (tmp_postinc
, 0)) {
4197 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4198 tmp_addr
= ADDSI (tmp_addr
, 4);
4201 SI opval
= tmp_addr
;
4202 SET_H_GR (FLD (f_operand1
), opval
);
4203 written
|= (1 << 9);
4204 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4210 else if (EQSI (tmp_rno
, 7)) {
4214 tmp_postinc
= FLD (f_memmode
);
4215 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4216 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4217 if (EQBI (CPU (h_pbit
), 0)) {
4220 SI opval
= GET_H_SR (FLD (f_operand2
));
4221 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4222 written
|= (1 << 13);
4223 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4226 BI opval
= CPU (h_pbit
);
4227 CPU (h_cbit
) = opval
;
4228 written
|= (1 << 10);
4229 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4235 CPU (h_cbit
) = opval
;
4236 written
|= (1 << 10);
4237 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4242 SI opval
= GET_H_SR (FLD (f_operand2
));
4243 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4244 written
|= (1 << 13);
4245 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4248 if (NEBI (tmp_postinc
, 0)) {
4250 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4251 tmp_addr
= ADDSI (tmp_addr
, 4);
4254 SI opval
= tmp_addr
;
4255 SET_H_GR (FLD (f_operand1
), opval
);
4256 written
|= (1 << 9);
4257 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4263 else if (EQSI (tmp_rno
, 9)) {
4267 tmp_postinc
= FLD (f_memmode
);
4268 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4269 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4270 if (EQBI (CPU (h_pbit
), 0)) {
4273 SI opval
= GET_H_SR (FLD (f_operand2
));
4274 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4275 written
|= (1 << 13);
4276 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4279 BI opval
= CPU (h_pbit
);
4280 CPU (h_cbit
) = opval
;
4281 written
|= (1 << 10);
4282 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4288 CPU (h_cbit
) = opval
;
4289 written
|= (1 << 10);
4290 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4295 SI opval
= GET_H_SR (FLD (f_operand2
));
4296 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4297 written
|= (1 << 13);
4298 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4301 if (NEBI (tmp_postinc
, 0)) {
4303 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4304 tmp_addr
= ADDSI (tmp_addr
, 4);
4307 SI opval
= tmp_addr
;
4308 SET_H_GR (FLD (f_operand1
), opval
);
4309 written
|= (1 << 9);
4310 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4316 else if (EQSI (tmp_rno
, 10)) {
4320 tmp_postinc
= FLD (f_memmode
);
4321 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4322 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4323 if (EQBI (CPU (h_pbit
), 0)) {
4326 SI opval
= GET_H_SR (FLD (f_operand2
));
4327 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4328 written
|= (1 << 13);
4329 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4332 BI opval
= CPU (h_pbit
);
4333 CPU (h_cbit
) = opval
;
4334 written
|= (1 << 10);
4335 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4341 CPU (h_cbit
) = opval
;
4342 written
|= (1 << 10);
4343 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4348 SI opval
= GET_H_SR (FLD (f_operand2
));
4349 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4350 written
|= (1 << 13);
4351 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4354 if (NEBI (tmp_postinc
, 0)) {
4356 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4357 tmp_addr
= ADDSI (tmp_addr
, 4);
4360 SI opval
= tmp_addr
;
4361 SET_H_GR (FLD (f_operand1
), opval
);
4362 written
|= (1 << 9);
4363 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4369 else if (EQSI (tmp_rno
, 11)) {
4373 tmp_postinc
= FLD (f_memmode
);
4374 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4375 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4376 if (EQBI (CPU (h_pbit
), 0)) {
4379 SI opval
= GET_H_SR (FLD (f_operand2
));
4380 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4381 written
|= (1 << 13);
4382 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4385 BI opval
= CPU (h_pbit
);
4386 CPU (h_cbit
) = opval
;
4387 written
|= (1 << 10);
4388 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4394 CPU (h_cbit
) = opval
;
4395 written
|= (1 << 10);
4396 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4401 SI opval
= GET_H_SR (FLD (f_operand2
));
4402 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4403 written
|= (1 << 13);
4404 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4407 if (NEBI (tmp_postinc
, 0)) {
4409 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4410 tmp_addr
= ADDSI (tmp_addr
, 4);
4413 SI opval
= tmp_addr
;
4414 SET_H_GR (FLD (f_operand1
), opval
);
4415 written
|= (1 << 9);
4416 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4422 else if (EQSI (tmp_rno
, 12)) {
4426 tmp_postinc
= FLD (f_memmode
);
4427 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4428 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4429 if (EQBI (CPU (h_pbit
), 0)) {
4432 SI opval
= GET_H_SR (FLD (f_operand2
));
4433 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4434 written
|= (1 << 13);
4435 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4438 BI opval
= CPU (h_pbit
);
4439 CPU (h_cbit
) = opval
;
4440 written
|= (1 << 10);
4441 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4447 CPU (h_cbit
) = opval
;
4448 written
|= (1 << 10);
4449 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4454 SI opval
= GET_H_SR (FLD (f_operand2
));
4455 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4456 written
|= (1 << 13);
4457 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4460 if (NEBI (tmp_postinc
, 0)) {
4462 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4463 tmp_addr
= ADDSI (tmp_addr
, 4);
4466 SI opval
= tmp_addr
;
4467 SET_H_GR (FLD (f_operand1
), opval
);
4468 written
|= (1 << 9);
4469 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4475 else if (EQSI (tmp_rno
, 13)) {
4479 tmp_postinc
= FLD (f_memmode
);
4480 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4481 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4482 if (EQBI (CPU (h_pbit
), 0)) {
4485 SI opval
= GET_H_SR (FLD (f_operand2
));
4486 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4487 written
|= (1 << 13);
4488 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4491 BI opval
= CPU (h_pbit
);
4492 CPU (h_cbit
) = opval
;
4493 written
|= (1 << 10);
4494 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4500 CPU (h_cbit
) = opval
;
4501 written
|= (1 << 10);
4502 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4507 SI opval
= GET_H_SR (FLD (f_operand2
));
4508 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4509 written
|= (1 << 13);
4510 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4513 if (NEBI (tmp_postinc
, 0)) {
4515 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4516 tmp_addr
= ADDSI (tmp_addr
, 4);
4519 SI opval
= tmp_addr
;
4520 SET_H_GR (FLD (f_operand1
), opval
);
4521 written
|= (1 << 9);
4522 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4528 else if (EQSI (tmp_rno
, 14)) {
4532 tmp_postinc
= FLD (f_memmode
);
4533 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4534 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4535 if (EQBI (CPU (h_pbit
), 0)) {
4538 SI opval
= GET_H_SR (FLD (f_operand2
));
4539 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4540 written
|= (1 << 13);
4541 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4544 BI opval
= CPU (h_pbit
);
4545 CPU (h_cbit
) = opval
;
4546 written
|= (1 << 10);
4547 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4553 CPU (h_cbit
) = opval
;
4554 written
|= (1 << 10);
4555 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4560 SI opval
= GET_H_SR (FLD (f_operand2
));
4561 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4562 written
|= (1 << 13);
4563 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4566 if (NEBI (tmp_postinc
, 0)) {
4568 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4569 tmp_addr
= ADDSI (tmp_addr
, 4);
4572 SI opval
= tmp_addr
;
4573 SET_H_GR (FLD (f_operand1
), opval
);
4574 written
|= (1 << 9);
4575 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4581 else if (EQSI (tmp_rno
, 15)) {
4585 tmp_postinc
= FLD (f_memmode
);
4586 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4587 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4588 if (EQBI (CPU (h_pbit
), 0)) {
4591 SI opval
= GET_H_SR (FLD (f_operand2
));
4592 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4593 written
|= (1 << 13);
4594 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4597 BI opval
= CPU (h_pbit
);
4598 CPU (h_cbit
) = opval
;
4599 written
|= (1 << 10);
4600 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4606 CPU (h_cbit
) = opval
;
4607 written
|= (1 << 10);
4608 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4613 SI opval
= GET_H_SR (FLD (f_operand2
));
4614 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4615 written
|= (1 << 13);
4616 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4619 if (NEBI (tmp_postinc
, 0)) {
4621 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4622 tmp_addr
= ADDSI (tmp_addr
, 4);
4625 SI opval
= tmp_addr
;
4626 SET_H_GR (FLD (f_operand1
), opval
);
4627 written
|= (1 << 9);
4628 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4634 else if (EQSI (tmp_rno
, 0)) {
4638 tmp_postinc
= FLD (f_memmode
);
4639 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4640 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4641 if (EQBI (CPU (h_pbit
), 0)) {
4644 QI opval
= GET_H_SR (FLD (f_operand2
));
4645 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
4646 written
|= (1 << 12);
4647 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4650 BI opval
= CPU (h_pbit
);
4651 CPU (h_cbit
) = opval
;
4652 written
|= (1 << 10);
4653 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4659 CPU (h_cbit
) = opval
;
4660 written
|= (1 << 10);
4661 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4666 QI opval
= GET_H_SR (FLD (f_operand2
));
4667 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
4668 written
|= (1 << 12);
4669 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4672 if (NEBI (tmp_postinc
, 0)) {
4674 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4675 tmp_addr
= ADDSI (tmp_addr
, 1);
4678 SI opval
= tmp_addr
;
4679 SET_H_GR (FLD (f_operand1
), opval
);
4680 written
|= (1 << 9);
4681 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4687 else if (EQSI (tmp_rno
, 1)) {
4691 tmp_postinc
= FLD (f_memmode
);
4692 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4693 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4694 if (EQBI (CPU (h_pbit
), 0)) {
4697 QI opval
= GET_H_SR (FLD (f_operand2
));
4698 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
4699 written
|= (1 << 12);
4700 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4703 BI opval
= CPU (h_pbit
);
4704 CPU (h_cbit
) = opval
;
4705 written
|= (1 << 10);
4706 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4712 CPU (h_cbit
) = opval
;
4713 written
|= (1 << 10);
4714 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4719 QI opval
= GET_H_SR (FLD (f_operand2
));
4720 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
4721 written
|= (1 << 12);
4722 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4725 if (NEBI (tmp_postinc
, 0)) {
4727 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4728 tmp_addr
= ADDSI (tmp_addr
, 1);
4731 SI opval
= tmp_addr
;
4732 SET_H_GR (FLD (f_operand1
), opval
);
4733 written
|= (1 << 9);
4734 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4740 else if (EQSI (tmp_rno
, 4)) {
4744 tmp_postinc
= FLD (f_memmode
);
4745 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4746 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4747 if (EQBI (CPU (h_pbit
), 0)) {
4750 HI opval
= GET_H_SR (FLD (f_operand2
));
4751 SETMEMHI (current_cpu
, pc
, tmp_addr
, opval
);
4752 written
|= (1 << 11);
4753 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4756 BI opval
= CPU (h_pbit
);
4757 CPU (h_cbit
) = opval
;
4758 written
|= (1 << 10);
4759 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4765 CPU (h_cbit
) = opval
;
4766 written
|= (1 << 10);
4767 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4772 HI opval
= GET_H_SR (FLD (f_operand2
));
4773 SETMEMHI (current_cpu
, pc
, tmp_addr
, opval
);
4774 written
|= (1 << 11);
4775 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4778 if (NEBI (tmp_postinc
, 0)) {
4780 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4781 tmp_addr
= ADDSI (tmp_addr
, 2);
4784 SI opval
= tmp_addr
;
4785 SET_H_GR (FLD (f_operand1
), opval
);
4786 written
|= (1 << 9);
4787 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4793 else if (EQSI (tmp_rno
, 8)) {
4797 tmp_postinc
= FLD (f_memmode
);
4798 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
4799 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
4800 if (EQBI (CPU (h_pbit
), 0)) {
4803 SI opval
= GET_H_SR (FLD (f_operand2
));
4804 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4805 written
|= (1 << 13);
4806 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4809 BI opval
= CPU (h_pbit
);
4810 CPU (h_cbit
) = opval
;
4811 written
|= (1 << 10);
4812 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4818 CPU (h_cbit
) = opval
;
4819 written
|= (1 << 10);
4820 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4825 SI opval
= GET_H_SR (FLD (f_operand2
));
4826 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4827 written
|= (1 << 13);
4828 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4831 if (NEBI (tmp_postinc
, 0)) {
4833 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4834 tmp_addr
= ADDSI (tmp_addr
, 4);
4837 SI opval
= tmp_addr
;
4838 SET_H_GR (FLD (f_operand1
), opval
);
4839 written
|= (1 << 9);
4840 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4847 cgen_rtx_error (current_cpu
, "write from unimplemented special register");
4852 CPU (h_xbit
) = opval
;
4853 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
4857 SET_H_INSN_PREFIXED_P (opval
);
4858 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
4863 abuf
->written
= written
;
4868 CASE (sem
, INSN_MOVE_SS_R
) : /* move ${Ss},${Rd-sfield} */
4870 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4871 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4872 #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
4873 int UNUSED written
= 0;
4874 IADDR UNUSED pc
= abuf
->addr
;
4875 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4879 SI opval
= GET_H_SUPR (FLD (f_operand2
));
4880 SET_H_GR (FLD (f_operand1
), opval
);
4881 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4886 CPU (h_xbit
) = opval
;
4887 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
4891 SET_H_INSN_PREFIXED_P (opval
);
4892 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
4901 CASE (sem
, INSN_MOVE_R_SS
) : /* move ${Rs},${Sd} */
4903 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4904 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4905 #define FLD(f) abuf->fields.sfmt_mcp.f
4906 int UNUSED written
= 0;
4907 IADDR UNUSED pc
= abuf
->addr
;
4908 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4912 SI opval
= GET_H_GR (FLD (f_operand1
));
4913 SET_H_SUPR (FLD (f_operand2
), opval
);
4914 TRACE_RESULT (current_cpu
, abuf
, "supr", 'x', opval
);
4919 CPU (h_xbit
) = opval
;
4920 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
4924 SET_H_INSN_PREFIXED_P (opval
);
4925 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
4934 CASE (sem
, INSN_MOVEM_R_M_V32
) : /* movem ${Rs-dfield},[${Rd-sfield}${inc}] */
4936 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4937 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4938 #define FLD(f) abuf->fields.sfmt_movem_r_m_v32.f
4939 int UNUSED written
= 0;
4940 IADDR UNUSED pc
= abuf
->addr
;
4941 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4946 tmp_postinc
= FLD (f_memmode
);
4949 tmp_dummy
= GET_H_GR (FLD (f_operand2
));
4951 tmp_addr
= GET_H_GR (FLD (f_operand1
));
4953 if (GESI (FLD (f_operand2
), 0)) {
4956 tmp_tmp
= GET_H_GR (((UINT
) 0));
4959 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4960 written
|= (1 << 21);
4961 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4963 tmp_addr
= ADDSI (tmp_addr
, 4);
4966 if (GESI (FLD (f_operand2
), 1)) {
4969 tmp_tmp
= GET_H_GR (((UINT
) 1));
4972 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4973 written
|= (1 << 21);
4974 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4976 tmp_addr
= ADDSI (tmp_addr
, 4);
4979 if (GESI (FLD (f_operand2
), 2)) {
4982 tmp_tmp
= GET_H_GR (((UINT
) 2));
4985 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4986 written
|= (1 << 21);
4987 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4989 tmp_addr
= ADDSI (tmp_addr
, 4);
4992 if (GESI (FLD (f_operand2
), 3)) {
4995 tmp_tmp
= GET_H_GR (((UINT
) 3));
4998 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4999 written
|= (1 << 21);
5000 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5002 tmp_addr
= ADDSI (tmp_addr
, 4);
5005 if (GESI (FLD (f_operand2
), 4)) {
5008 tmp_tmp
= GET_H_GR (((UINT
) 4));
5011 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
5012 written
|= (1 << 21);
5013 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5015 tmp_addr
= ADDSI (tmp_addr
, 4);
5018 if (GESI (FLD (f_operand2
), 5)) {
5021 tmp_tmp
= GET_H_GR (((UINT
) 5));
5024 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
5025 written
|= (1 << 21);
5026 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5028 tmp_addr
= ADDSI (tmp_addr
, 4);
5031 if (GESI (FLD (f_operand2
), 6)) {
5034 tmp_tmp
= GET_H_GR (((UINT
) 6));
5037 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
5038 written
|= (1 << 21);
5039 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5041 tmp_addr
= ADDSI (tmp_addr
, 4);
5044 if (GESI (FLD (f_operand2
), 7)) {
5047 tmp_tmp
= GET_H_GR (((UINT
) 7));
5050 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
5051 written
|= (1 << 21);
5052 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5054 tmp_addr
= ADDSI (tmp_addr
, 4);
5057 if (GESI (FLD (f_operand2
), 8)) {
5060 tmp_tmp
= GET_H_GR (((UINT
) 8));
5063 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
5064 written
|= (1 << 21);
5065 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5067 tmp_addr
= ADDSI (tmp_addr
, 4);
5070 if (GESI (FLD (f_operand2
), 9)) {
5073 tmp_tmp
= GET_H_GR (((UINT
) 9));
5076 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
5077 written
|= (1 << 21);
5078 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5080 tmp_addr
= ADDSI (tmp_addr
, 4);
5083 if (GESI (FLD (f_operand2
), 10)) {
5086 tmp_tmp
= GET_H_GR (((UINT
) 10));
5089 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
5090 written
|= (1 << 21);
5091 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5093 tmp_addr
= ADDSI (tmp_addr
, 4);
5096 if (GESI (FLD (f_operand2
), 11)) {
5099 tmp_tmp
= GET_H_GR (((UINT
) 11));
5102 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
5103 written
|= (1 << 21);
5104 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5106 tmp_addr
= ADDSI (tmp_addr
, 4);
5109 if (GESI (FLD (f_operand2
), 12)) {
5112 tmp_tmp
= GET_H_GR (((UINT
) 12));
5115 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
5116 written
|= (1 << 21);
5117 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5119 tmp_addr
= ADDSI (tmp_addr
, 4);
5122 if (GESI (FLD (f_operand2
), 13)) {
5125 tmp_tmp
= GET_H_GR (((UINT
) 13));
5128 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
5129 written
|= (1 << 21);
5130 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5132 tmp_addr
= ADDSI (tmp_addr
, 4);
5135 if (GESI (FLD (f_operand2
), 14)) {
5138 tmp_tmp
= GET_H_GR (((UINT
) 14));
5141 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
5142 written
|= (1 << 21);
5143 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5145 tmp_addr
= ADDSI (tmp_addr
, 4);
5148 if (GESI (FLD (f_operand2
), 15)) {
5151 tmp_tmp
= GET_H_GR (((UINT
) 15));
5154 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
5155 written
|= (1 << 21);
5156 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5158 tmp_addr
= ADDSI (tmp_addr
, 4);
5162 if (NEBI (tmp_postinc
, 0)) {
5164 SI opval
= tmp_addr
;
5165 SET_H_GR (FLD (f_operand1
), opval
);
5166 written
|= (1 << 20);
5167 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5173 CPU (h_xbit
) = opval
;
5174 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5178 SET_H_INSN_PREFIXED_P (opval
);
5179 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5184 abuf
->written
= written
;
5189 CASE (sem
, INSN_MOVEM_M_R_V32
) : /* movem [${Rs}${inc}],${Rd} */
5191 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5192 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5193 #define FLD(f) abuf->fields.sfmt_movem_m_r_v32.f
5194 int UNUSED written
= 0;
5195 IADDR UNUSED pc
= abuf
->addr
;
5196 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5201 tmp_postinc
= FLD (f_memmode
);
5202 tmp_addr
= GET_H_GR (FLD (f_operand1
));
5205 tmp_dummy
= GET_H_GR (FLD (f_operand2
));
5208 if (GESI (FLD (f_operand2
), 0)) {
5211 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5214 SET_H_GR (((UINT
) 0), opval
);
5215 written
|= (1 << 6);
5216 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5218 tmp_addr
= ADDSI (tmp_addr
, 4);
5221 if (GESI (FLD (f_operand2
), 1)) {
5224 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5227 SET_H_GR (((UINT
) 1), opval
);
5228 written
|= (1 << 7);
5229 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5231 tmp_addr
= ADDSI (tmp_addr
, 4);
5234 if (GESI (FLD (f_operand2
), 2)) {
5237 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5240 SET_H_GR (((UINT
) 2), opval
);
5241 written
|= (1 << 14);
5242 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5244 tmp_addr
= ADDSI (tmp_addr
, 4);
5247 if (GESI (FLD (f_operand2
), 3)) {
5250 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5253 SET_H_GR (((UINT
) 3), opval
);
5254 written
|= (1 << 15);
5255 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5257 tmp_addr
= ADDSI (tmp_addr
, 4);
5260 if (GESI (FLD (f_operand2
), 4)) {
5263 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5266 SET_H_GR (((UINT
) 4), opval
);
5267 written
|= (1 << 16);
5268 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5270 tmp_addr
= ADDSI (tmp_addr
, 4);
5273 if (GESI (FLD (f_operand2
), 5)) {
5276 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5279 SET_H_GR (((UINT
) 5), opval
);
5280 written
|= (1 << 17);
5281 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5283 tmp_addr
= ADDSI (tmp_addr
, 4);
5286 if (GESI (FLD (f_operand2
), 6)) {
5289 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5292 SET_H_GR (((UINT
) 6), opval
);
5293 written
|= (1 << 18);
5294 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5296 tmp_addr
= ADDSI (tmp_addr
, 4);
5299 if (GESI (FLD (f_operand2
), 7)) {
5302 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5305 SET_H_GR (((UINT
) 7), opval
);
5306 written
|= (1 << 19);
5307 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5309 tmp_addr
= ADDSI (tmp_addr
, 4);
5312 if (GESI (FLD (f_operand2
), 8)) {
5315 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5318 SET_H_GR (((UINT
) 8), opval
);
5319 written
|= (1 << 20);
5320 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5322 tmp_addr
= ADDSI (tmp_addr
, 4);
5325 if (GESI (FLD (f_operand2
), 9)) {
5328 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5331 SET_H_GR (((UINT
) 9), opval
);
5332 written
|= (1 << 21);
5333 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5335 tmp_addr
= ADDSI (tmp_addr
, 4);
5338 if (GESI (FLD (f_operand2
), 10)) {
5341 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5344 SET_H_GR (((UINT
) 10), opval
);
5345 written
|= (1 << 8);
5346 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5348 tmp_addr
= ADDSI (tmp_addr
, 4);
5351 if (GESI (FLD (f_operand2
), 11)) {
5354 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5357 SET_H_GR (((UINT
) 11), opval
);
5358 written
|= (1 << 9);
5359 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5361 tmp_addr
= ADDSI (tmp_addr
, 4);
5364 if (GESI (FLD (f_operand2
), 12)) {
5367 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5370 SET_H_GR (((UINT
) 12), opval
);
5371 written
|= (1 << 10);
5372 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5374 tmp_addr
= ADDSI (tmp_addr
, 4);
5377 if (GESI (FLD (f_operand2
), 13)) {
5380 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5383 SET_H_GR (((UINT
) 13), opval
);
5384 written
|= (1 << 11);
5385 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5387 tmp_addr
= ADDSI (tmp_addr
, 4);
5390 if (GESI (FLD (f_operand2
), 14)) {
5393 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5396 SET_H_GR (((UINT
) 14), opval
);
5397 written
|= (1 << 12);
5398 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5400 tmp_addr
= ADDSI (tmp_addr
, 4);
5403 if (GESI (FLD (f_operand2
), 15)) {
5406 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5409 SET_H_GR (((UINT
) 15), opval
);
5410 written
|= (1 << 13);
5411 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5413 tmp_addr
= ADDSI (tmp_addr
, 4);
5417 if (NEBI (tmp_postinc
, 0)) {
5419 SI opval
= tmp_addr
;
5420 SET_H_GR (FLD (f_operand1
), opval
);
5421 written
|= (1 << 5);
5422 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5428 CPU (h_xbit
) = opval
;
5429 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5433 SET_H_INSN_PREFIXED_P (opval
);
5434 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5439 abuf
->written
= written
;
5444 CASE (sem
, INSN_ADD_B_R
) : /* add.b $Rs,$Rd */
5446 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5447 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5448 #define FLD(f) abuf->fields.sfmt_addc_m.f
5449 int UNUSED written
= 0;
5450 IADDR UNUSED pc
= abuf
->addr
;
5451 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5458 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
5459 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5460 tmp_carry
= CPU (h_cbit
);
5461 tmp_newval
= ADDCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5464 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
5466 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
5467 SET_H_GR (FLD (f_operand2
), opval
);
5468 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5473 BI opval
= ORIF (ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTQI (tmp_tmpopd
, 0), GEQI (tmp_newval
, 0)), ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_newval
, 0))));
5474 CPU (h_cbit
) = opval
;
5475 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5478 BI opval
= LTQI (tmp_newval
, 0);
5479 CPU (h_nbit
) = opval
;
5480 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5483 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5484 CPU (h_zbit
) = opval
;
5485 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5488 BI opval
= ORIF (ANDIF (ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), GEQI (tmp_newval
, 0)), ANDIF (ANDIF (GEQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), LTQI (tmp_newval
, 0)));
5489 CPU (h_vbit
) = opval
;
5490 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5495 CPU (h_xbit
) = opval
;
5496 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5500 SET_H_INSN_PREFIXED_P (opval
);
5501 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5511 CASE (sem
, INSN_ADD_W_R
) : /* add.w $Rs,$Rd */
5513 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5514 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5515 #define FLD(f) abuf->fields.sfmt_addc_m.f
5516 int UNUSED written
= 0;
5517 IADDR UNUSED pc
= abuf
->addr
;
5518 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5525 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
5526 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5527 tmp_carry
= CPU (h_cbit
);
5528 tmp_newval
= ADDCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5531 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
5533 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
5534 SET_H_GR (FLD (f_operand2
), opval
);
5535 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5540 BI opval
= ORIF (ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTHI (tmp_tmpopd
, 0), GEHI (tmp_newval
, 0)), ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_newval
, 0))));
5541 CPU (h_cbit
) = opval
;
5542 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5545 BI opval
= LTHI (tmp_newval
, 0);
5546 CPU (h_nbit
) = opval
;
5547 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5550 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5551 CPU (h_zbit
) = opval
;
5552 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5555 BI opval
= ORIF (ANDIF (ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), GEHI (tmp_newval
, 0)), ANDIF (ANDIF (GEHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), LTHI (tmp_newval
, 0)));
5556 CPU (h_vbit
) = opval
;
5557 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5562 CPU (h_xbit
) = opval
;
5563 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5567 SET_H_INSN_PREFIXED_P (opval
);
5568 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5578 CASE (sem
, INSN_ADD_D_R
) : /* add.d $Rs,$Rd */
5580 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5581 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5582 #define FLD(f) abuf->fields.sfmt_addc_m.f
5583 int UNUSED written
= 0;
5584 IADDR UNUSED pc
= abuf
->addr
;
5585 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5592 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
5593 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5594 tmp_carry
= CPU (h_cbit
);
5595 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5597 SI opval
= tmp_newval
;
5598 SET_H_GR (FLD (f_operand2
), opval
);
5599 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5603 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
5604 CPU (h_cbit
) = opval
;
5605 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5608 BI opval
= LTSI (tmp_newval
, 0);
5609 CPU (h_nbit
) = opval
;
5610 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5613 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5614 CPU (h_zbit
) = opval
;
5615 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5618 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
5619 CPU (h_vbit
) = opval
;
5620 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5625 CPU (h_xbit
) = opval
;
5626 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5630 SET_H_INSN_PREFIXED_P (opval
);
5631 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5641 CASE (sem
, INSN_ADD_M_B_M
) : /* add-m.b [${Rs}${inc}],${Rd} */
5643 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5644 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5645 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
5646 int UNUSED written
= 0;
5647 IADDR UNUSED pc
= abuf
->addr
;
5648 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5655 tmp_tmpops
= ({ SI tmp_addr
;
5658 tmp_postinc
= FLD (f_memmode
);
5659 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
5660 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
5661 ; if (NEBI (tmp_postinc
, 0)) {
5663 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
5664 tmp_addr
= ADDSI (tmp_addr
, 1);
5667 SI opval
= tmp_addr
;
5668 SET_H_GR (FLD (f_operand1
), opval
);
5669 written
|= (1 << 12);
5670 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5675 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5676 tmp_carry
= CPU (h_cbit
);
5677 tmp_newval
= ADDCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5680 tmp_oldregval
= GET_H_RAW_GR_ACR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
5682 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
5683 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
5684 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5689 BI opval
= ORIF (ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTQI (tmp_tmpopd
, 0), GEQI (tmp_newval
, 0)), ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_newval
, 0))));
5690 CPU (h_cbit
) = opval
;
5691 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5694 BI opval
= LTQI (tmp_newval
, 0);
5695 CPU (h_nbit
) = opval
;
5696 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5699 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5700 CPU (h_zbit
) = opval
;
5701 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5704 BI opval
= ORIF (ANDIF (ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), GEQI (tmp_newval
, 0)), ANDIF (ANDIF (GEQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), LTQI (tmp_newval
, 0)));
5705 CPU (h_vbit
) = opval
;
5706 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5711 CPU (h_xbit
) = opval
;
5712 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5716 SET_H_INSN_PREFIXED_P (opval
);
5717 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5723 abuf
->written
= written
;
5728 CASE (sem
, INSN_ADD_M_W_M
) : /* add-m.w [${Rs}${inc}],${Rd} */
5730 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5731 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5732 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
5733 int UNUSED written
= 0;
5734 IADDR UNUSED pc
= abuf
->addr
;
5735 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5742 tmp_tmpops
= ({ SI tmp_addr
;
5745 tmp_postinc
= FLD (f_memmode
);
5746 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
5747 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
5748 ; if (NEBI (tmp_postinc
, 0)) {
5750 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
5751 tmp_addr
= ADDSI (tmp_addr
, 2);
5754 SI opval
= tmp_addr
;
5755 SET_H_GR (FLD (f_operand1
), opval
);
5756 written
|= (1 << 12);
5757 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5762 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5763 tmp_carry
= CPU (h_cbit
);
5764 tmp_newval
= ADDCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5767 tmp_oldregval
= GET_H_RAW_GR_ACR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
5769 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
5770 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
5771 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5776 BI opval
= ORIF (ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTHI (tmp_tmpopd
, 0), GEHI (tmp_newval
, 0)), ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_newval
, 0))));
5777 CPU (h_cbit
) = opval
;
5778 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5781 BI opval
= LTHI (tmp_newval
, 0);
5782 CPU (h_nbit
) = opval
;
5783 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5786 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5787 CPU (h_zbit
) = opval
;
5788 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5791 BI opval
= ORIF (ANDIF (ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), GEHI (tmp_newval
, 0)), ANDIF (ANDIF (GEHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), LTHI (tmp_newval
, 0)));
5792 CPU (h_vbit
) = opval
;
5793 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5798 CPU (h_xbit
) = opval
;
5799 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5803 SET_H_INSN_PREFIXED_P (opval
);
5804 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5810 abuf
->written
= written
;
5815 CASE (sem
, INSN_ADD_M_D_M
) : /* add-m.d [${Rs}${inc}],${Rd} */
5817 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5818 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5819 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
5820 int UNUSED written
= 0;
5821 IADDR UNUSED pc
= abuf
->addr
;
5822 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5829 tmp_tmpops
= ({ SI tmp_addr
;
5832 tmp_postinc
= FLD (f_memmode
);
5833 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
5834 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5835 ; if (NEBI (tmp_postinc
, 0)) {
5837 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
5838 tmp_addr
= ADDSI (tmp_addr
, 4);
5841 SI opval
= tmp_addr
;
5842 SET_H_GR (FLD (f_operand1
), opval
);
5843 written
|= (1 << 11);
5844 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5849 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5850 tmp_carry
= CPU (h_cbit
);
5851 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5853 SI opval
= tmp_newval
;
5854 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
5855 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5859 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
5860 CPU (h_cbit
) = opval
;
5861 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5864 BI opval
= LTSI (tmp_newval
, 0);
5865 CPU (h_nbit
) = opval
;
5866 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5869 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5870 CPU (h_zbit
) = opval
;
5871 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5874 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
5875 CPU (h_vbit
) = opval
;
5876 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5881 CPU (h_xbit
) = opval
;
5882 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5886 SET_H_INSN_PREFIXED_P (opval
);
5887 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5893 abuf
->written
= written
;
5898 CASE (sem
, INSN_ADDCBR
) : /* add.b ${sconst8}],${Rd} */
5900 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5901 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5902 #define FLD(f) abuf->fields.sfmt_addcbr.f
5903 int UNUSED written
= 0;
5904 IADDR UNUSED pc
= abuf
->addr
;
5905 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
5912 tmp_tmpops
= FLD (f_indir_pc__byte
);
5913 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5914 tmp_carry
= CPU (h_cbit
);
5915 tmp_newval
= ADDCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5918 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
5920 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
5921 SET_H_GR (FLD (f_operand2
), opval
);
5922 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5927 BI opval
= ORIF (ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTQI (tmp_tmpopd
, 0), GEQI (tmp_newval
, 0)), ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_newval
, 0))));
5928 CPU (h_cbit
) = opval
;
5929 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5932 BI opval
= LTQI (tmp_newval
, 0);
5933 CPU (h_nbit
) = opval
;
5934 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5937 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5938 CPU (h_zbit
) = opval
;
5939 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5942 BI opval
= ORIF (ANDIF (ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), GEQI (tmp_newval
, 0)), ANDIF (ANDIF (GEQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), LTQI (tmp_newval
, 0)));
5943 CPU (h_vbit
) = opval
;
5944 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5949 CPU (h_xbit
) = opval
;
5950 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5954 SET_H_INSN_PREFIXED_P (opval
);
5955 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5965 CASE (sem
, INSN_ADDCWR
) : /* add.w ${sconst16}],${Rd} */
5967 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5968 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5969 #define FLD(f) abuf->fields.sfmt_addcwr.f
5970 int UNUSED written
= 0;
5971 IADDR UNUSED pc
= abuf
->addr
;
5972 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
5979 tmp_tmpops
= FLD (f_indir_pc__word
);
5980 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5981 tmp_carry
= CPU (h_cbit
);
5982 tmp_newval
= ADDCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5985 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
5987 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
5988 SET_H_GR (FLD (f_operand2
), opval
);
5989 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5994 BI opval
= ORIF (ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTHI (tmp_tmpopd
, 0), GEHI (tmp_newval
, 0)), ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_newval
, 0))));
5995 CPU (h_cbit
) = opval
;
5996 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5999 BI opval
= LTHI (tmp_newval
, 0);
6000 CPU (h_nbit
) = opval
;
6001 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6004 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6005 CPU (h_zbit
) = opval
;
6006 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6009 BI opval
= ORIF (ANDIF (ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), GEHI (tmp_newval
, 0)), ANDIF (ANDIF (GEHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), LTHI (tmp_newval
, 0)));
6010 CPU (h_vbit
) = opval
;
6011 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6016 CPU (h_xbit
) = opval
;
6017 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6021 SET_H_INSN_PREFIXED_P (opval
);
6022 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6032 CASE (sem
, INSN_ADDCDR
) : /* add.d ${const32}],${Rd} */
6034 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6035 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6036 #define FLD(f) abuf->fields.sfmt_addcdr.f
6037 int UNUSED written
= 0;
6038 IADDR UNUSED pc
= abuf
->addr
;
6039 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
6046 tmp_tmpops
= FLD (f_indir_pc__dword
);
6047 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6048 tmp_carry
= CPU (h_cbit
);
6049 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6051 SI opval
= tmp_newval
;
6052 SET_H_GR (FLD (f_operand2
), opval
);
6053 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6057 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6058 CPU (h_cbit
) = opval
;
6059 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6062 BI opval
= LTSI (tmp_newval
, 0);
6063 CPU (h_nbit
) = opval
;
6064 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6067 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6068 CPU (h_zbit
) = opval
;
6069 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6072 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6073 CPU (h_vbit
) = opval
;
6074 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6079 CPU (h_xbit
) = opval
;
6080 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6084 SET_H_INSN_PREFIXED_P (opval
);
6085 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6095 CASE (sem
, INSN_ADDS_B_R
) : /* adds.b $Rs,$Rd */
6097 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6098 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6099 #define FLD(f) abuf->fields.sfmt_addc_m.f
6100 int UNUSED written
= 0;
6101 IADDR UNUSED pc
= abuf
->addr
;
6102 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6109 tmp_tmpops
= EXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
6110 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6111 tmp_carry
= CPU (h_cbit
);
6112 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6114 SI opval
= tmp_newval
;
6115 SET_H_GR (FLD (f_operand2
), opval
);
6116 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6120 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6121 CPU (h_cbit
) = opval
;
6122 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6125 BI opval
= LTSI (tmp_newval
, 0);
6126 CPU (h_nbit
) = opval
;
6127 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6130 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6131 CPU (h_zbit
) = opval
;
6132 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6135 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6136 CPU (h_vbit
) = opval
;
6137 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6142 CPU (h_xbit
) = opval
;
6143 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6147 SET_H_INSN_PREFIXED_P (opval
);
6148 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6158 CASE (sem
, INSN_ADDS_W_R
) : /* adds.w $Rs,$Rd */
6160 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6161 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6162 #define FLD(f) abuf->fields.sfmt_addc_m.f
6163 int UNUSED written
= 0;
6164 IADDR UNUSED pc
= abuf
->addr
;
6165 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6172 tmp_tmpops
= EXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
6173 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6174 tmp_carry
= CPU (h_cbit
);
6175 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6177 SI opval
= tmp_newval
;
6178 SET_H_GR (FLD (f_operand2
), opval
);
6179 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6183 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6184 CPU (h_cbit
) = opval
;
6185 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6188 BI opval
= LTSI (tmp_newval
, 0);
6189 CPU (h_nbit
) = opval
;
6190 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6193 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6194 CPU (h_zbit
) = opval
;
6195 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6198 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6199 CPU (h_vbit
) = opval
;
6200 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6205 CPU (h_xbit
) = opval
;
6206 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6210 SET_H_INSN_PREFIXED_P (opval
);
6211 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6221 CASE (sem
, INSN_ADDS_M_B_M
) : /* adds-m.b [${Rs}${inc}],$Rd */
6223 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6224 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6225 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
6226 int UNUSED written
= 0;
6227 IADDR UNUSED pc
= abuf
->addr
;
6228 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6235 tmp_tmpops
= EXTQISI (({ SI tmp_addr
;
6238 tmp_postinc
= FLD (f_memmode
);
6239 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
6240 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
6241 ; if (NEBI (tmp_postinc
, 0)) {
6243 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
6244 tmp_addr
= ADDSI (tmp_addr
, 1);
6247 SI opval
= tmp_addr
;
6248 SET_H_GR (FLD (f_operand1
), opval
);
6249 written
|= (1 << 11);
6250 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6255 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6256 tmp_carry
= CPU (h_cbit
);
6257 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6259 SI opval
= tmp_newval
;
6260 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
6261 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6265 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6266 CPU (h_cbit
) = opval
;
6267 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6270 BI opval
= LTSI (tmp_newval
, 0);
6271 CPU (h_nbit
) = opval
;
6272 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6275 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6276 CPU (h_zbit
) = opval
;
6277 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6280 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6281 CPU (h_vbit
) = opval
;
6282 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6287 CPU (h_xbit
) = opval
;
6288 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6292 SET_H_INSN_PREFIXED_P (opval
);
6293 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6299 abuf
->written
= written
;
6304 CASE (sem
, INSN_ADDS_M_W_M
) : /* adds-m.w [${Rs}${inc}],$Rd */
6306 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6307 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6308 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
6309 int UNUSED written
= 0;
6310 IADDR UNUSED pc
= abuf
->addr
;
6311 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6318 tmp_tmpops
= EXTHISI (({ SI tmp_addr
;
6321 tmp_postinc
= FLD (f_memmode
);
6322 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
6323 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
6324 ; if (NEBI (tmp_postinc
, 0)) {
6326 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
6327 tmp_addr
= ADDSI (tmp_addr
, 2);
6330 SI opval
= tmp_addr
;
6331 SET_H_GR (FLD (f_operand1
), opval
);
6332 written
|= (1 << 11);
6333 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6338 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6339 tmp_carry
= CPU (h_cbit
);
6340 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6342 SI opval
= tmp_newval
;
6343 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
6344 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6348 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6349 CPU (h_cbit
) = opval
;
6350 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6353 BI opval
= LTSI (tmp_newval
, 0);
6354 CPU (h_nbit
) = opval
;
6355 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6358 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6359 CPU (h_zbit
) = opval
;
6360 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6363 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6364 CPU (h_vbit
) = opval
;
6365 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6370 CPU (h_xbit
) = opval
;
6371 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6375 SET_H_INSN_PREFIXED_P (opval
);
6376 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6382 abuf
->written
= written
;
6387 CASE (sem
, INSN_ADDSCBR
) : /* [${Rs}${inc}],$Rd */
6389 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6390 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6391 #define FLD(f) abuf->fields.sfmt_addcbr.f
6392 int UNUSED written
= 0;
6393 IADDR UNUSED pc
= abuf
->addr
;
6394 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
6401 tmp_tmpops
= EXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
6402 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6403 tmp_carry
= CPU (h_cbit
);
6404 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6406 SI opval
= tmp_newval
;
6407 SET_H_GR (FLD (f_operand2
), opval
);
6408 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6412 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6413 CPU (h_cbit
) = opval
;
6414 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6417 BI opval
= LTSI (tmp_newval
, 0);
6418 CPU (h_nbit
) = opval
;
6419 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6422 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6423 CPU (h_zbit
) = opval
;
6424 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6427 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6428 CPU (h_vbit
) = opval
;
6429 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6434 CPU (h_xbit
) = opval
;
6435 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6439 SET_H_INSN_PREFIXED_P (opval
);
6440 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6450 CASE (sem
, INSN_ADDSCWR
) : /* [${Rs}${inc}],$Rd */
6452 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6453 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6454 #define FLD(f) abuf->fields.sfmt_addcwr.f
6455 int UNUSED written
= 0;
6456 IADDR UNUSED pc
= abuf
->addr
;
6457 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
6464 tmp_tmpops
= EXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
6465 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6466 tmp_carry
= CPU (h_cbit
);
6467 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6469 SI opval
= tmp_newval
;
6470 SET_H_GR (FLD (f_operand2
), opval
);
6471 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6475 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6476 CPU (h_cbit
) = opval
;
6477 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6480 BI opval
= LTSI (tmp_newval
, 0);
6481 CPU (h_nbit
) = opval
;
6482 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6485 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6486 CPU (h_zbit
) = opval
;
6487 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6490 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6491 CPU (h_vbit
) = opval
;
6492 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6497 CPU (h_xbit
) = opval
;
6498 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6502 SET_H_INSN_PREFIXED_P (opval
);
6503 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6513 CASE (sem
, INSN_ADDU_B_R
) : /* addu.b $Rs,$Rd */
6515 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6516 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6517 #define FLD(f) abuf->fields.sfmt_addc_m.f
6518 int UNUSED written
= 0;
6519 IADDR UNUSED pc
= abuf
->addr
;
6520 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6527 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
6528 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6529 tmp_carry
= CPU (h_cbit
);
6530 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6532 SI opval
= tmp_newval
;
6533 SET_H_GR (FLD (f_operand2
), opval
);
6534 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6538 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6539 CPU (h_cbit
) = opval
;
6540 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6543 BI opval
= LTSI (tmp_newval
, 0);
6544 CPU (h_nbit
) = opval
;
6545 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6548 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6549 CPU (h_zbit
) = opval
;
6550 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6553 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6554 CPU (h_vbit
) = opval
;
6555 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6560 CPU (h_xbit
) = opval
;
6561 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6565 SET_H_INSN_PREFIXED_P (opval
);
6566 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6576 CASE (sem
, INSN_ADDU_W_R
) : /* addu.w $Rs,$Rd */
6578 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6579 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6580 #define FLD(f) abuf->fields.sfmt_addc_m.f
6581 int UNUSED written
= 0;
6582 IADDR UNUSED pc
= abuf
->addr
;
6583 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6590 tmp_tmpops
= ZEXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
6591 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6592 tmp_carry
= CPU (h_cbit
);
6593 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6595 SI opval
= tmp_newval
;
6596 SET_H_GR (FLD (f_operand2
), opval
);
6597 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6601 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6602 CPU (h_cbit
) = opval
;
6603 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6606 BI opval
= LTSI (tmp_newval
, 0);
6607 CPU (h_nbit
) = opval
;
6608 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6611 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6612 CPU (h_zbit
) = opval
;
6613 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6616 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6617 CPU (h_vbit
) = opval
;
6618 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6623 CPU (h_xbit
) = opval
;
6624 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6628 SET_H_INSN_PREFIXED_P (opval
);
6629 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6639 CASE (sem
, INSN_ADDU_M_B_M
) : /* addu-m.b [${Rs}${inc}],$Rd */
6641 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6642 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6643 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
6644 int UNUSED written
= 0;
6645 IADDR UNUSED pc
= abuf
->addr
;
6646 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6653 tmp_tmpops
= ZEXTQISI (({ SI tmp_addr
;
6656 tmp_postinc
= FLD (f_memmode
);
6657 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
6658 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
6659 ; if (NEBI (tmp_postinc
, 0)) {
6661 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
6662 tmp_addr
= ADDSI (tmp_addr
, 1);
6665 SI opval
= tmp_addr
;
6666 SET_H_GR (FLD (f_operand1
), opval
);
6667 written
|= (1 << 11);
6668 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6673 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6674 tmp_carry
= CPU (h_cbit
);
6675 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6677 SI opval
= tmp_newval
;
6678 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
6679 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6683 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6684 CPU (h_cbit
) = opval
;
6685 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6688 BI opval
= LTSI (tmp_newval
, 0);
6689 CPU (h_nbit
) = opval
;
6690 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6693 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6694 CPU (h_zbit
) = opval
;
6695 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6698 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6699 CPU (h_vbit
) = opval
;
6700 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6705 CPU (h_xbit
) = opval
;
6706 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6710 SET_H_INSN_PREFIXED_P (opval
);
6711 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6717 abuf
->written
= written
;
6722 CASE (sem
, INSN_ADDU_M_W_M
) : /* addu-m.w [${Rs}${inc}],$Rd */
6724 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6725 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6726 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
6727 int UNUSED written
= 0;
6728 IADDR UNUSED pc
= abuf
->addr
;
6729 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6736 tmp_tmpops
= ZEXTHISI (({ SI tmp_addr
;
6739 tmp_postinc
= FLD (f_memmode
);
6740 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
6741 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
6742 ; if (NEBI (tmp_postinc
, 0)) {
6744 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
6745 tmp_addr
= ADDSI (tmp_addr
, 2);
6748 SI opval
= tmp_addr
;
6749 SET_H_GR (FLD (f_operand1
), opval
);
6750 written
|= (1 << 11);
6751 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6756 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6757 tmp_carry
= CPU (h_cbit
);
6758 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6760 SI opval
= tmp_newval
;
6761 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
6762 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6766 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6767 CPU (h_cbit
) = opval
;
6768 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6771 BI opval
= LTSI (tmp_newval
, 0);
6772 CPU (h_nbit
) = opval
;
6773 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6776 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6777 CPU (h_zbit
) = opval
;
6778 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6781 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6782 CPU (h_vbit
) = opval
;
6783 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6788 CPU (h_xbit
) = opval
;
6789 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6793 SET_H_INSN_PREFIXED_P (opval
);
6794 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6800 abuf
->written
= written
;
6805 CASE (sem
, INSN_ADDUCBR
) : /* [${Rs}${inc}],$Rd */
6807 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6808 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6809 #define FLD(f) abuf->fields.sfmt_addcbr.f
6810 int UNUSED written
= 0;
6811 IADDR UNUSED pc
= abuf
->addr
;
6812 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
6819 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
6820 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6821 tmp_carry
= CPU (h_cbit
);
6822 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6824 SI opval
= tmp_newval
;
6825 SET_H_GR (FLD (f_operand2
), opval
);
6826 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6830 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6831 CPU (h_cbit
) = opval
;
6832 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6835 BI opval
= LTSI (tmp_newval
, 0);
6836 CPU (h_nbit
) = opval
;
6837 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6840 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6841 CPU (h_zbit
) = opval
;
6842 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6845 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6846 CPU (h_vbit
) = opval
;
6847 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6852 CPU (h_xbit
) = opval
;
6853 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6857 SET_H_INSN_PREFIXED_P (opval
);
6858 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6868 CASE (sem
, INSN_ADDUCWR
) : /* [${Rs}${inc}],$Rd */
6870 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6871 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6872 #define FLD(f) abuf->fields.sfmt_addcwr.f
6873 int UNUSED written
= 0;
6874 IADDR UNUSED pc
= abuf
->addr
;
6875 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
6882 tmp_tmpops
= ZEXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
6883 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6884 tmp_carry
= CPU (h_cbit
);
6885 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6887 SI opval
= tmp_newval
;
6888 SET_H_GR (FLD (f_operand2
), opval
);
6889 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6893 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
6894 CPU (h_cbit
) = opval
;
6895 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6898 BI opval
= LTSI (tmp_newval
, 0);
6899 CPU (h_nbit
) = opval
;
6900 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6903 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6904 CPU (h_zbit
) = opval
;
6905 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6908 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
6909 CPU (h_vbit
) = opval
;
6910 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6915 CPU (h_xbit
) = opval
;
6916 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6920 SET_H_INSN_PREFIXED_P (opval
);
6921 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6931 CASE (sem
, INSN_SUB_B_R
) : /* sub.b $Rs,$Rd */
6933 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6934 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6935 #define FLD(f) abuf->fields.sfmt_addc_m.f
6936 int UNUSED written
= 0;
6937 IADDR UNUSED pc
= abuf
->addr
;
6938 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6945 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
6946 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6947 tmp_carry
= CPU (h_cbit
);
6948 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6951 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
6953 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
6954 SET_H_GR (FLD (f_operand2
), opval
);
6955 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6960 BI opval
= ORIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEQI (tmp_tmpopd
, 0), LTQI (tmp_newval
, 0)), ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_newval
, 0))));
6961 CPU (h_cbit
) = opval
;
6962 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6965 BI opval
= LTQI (tmp_newval
, 0);
6966 CPU (h_nbit
) = opval
;
6967 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6970 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6971 CPU (h_zbit
) = opval
;
6972 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6975 BI opval
= ORIF (ANDIF (ANDIF (GEQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), GEQI (tmp_newval
, 0)), ANDIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), LTQI (tmp_newval
, 0)));
6976 CPU (h_vbit
) = opval
;
6977 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6982 CPU (h_xbit
) = opval
;
6983 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6987 SET_H_INSN_PREFIXED_P (opval
);
6988 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6998 CASE (sem
, INSN_SUB_W_R
) : /* sub.w $Rs,$Rd */
7000 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7001 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7002 #define FLD(f) abuf->fields.sfmt_addc_m.f
7003 int UNUSED written
= 0;
7004 IADDR UNUSED pc
= abuf
->addr
;
7005 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7012 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
7013 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7014 tmp_carry
= CPU (h_cbit
);
7015 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7018 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
7020 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
7021 SET_H_GR (FLD (f_operand2
), opval
);
7022 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7027 BI opval
= ORIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEHI (tmp_tmpopd
, 0), LTHI (tmp_newval
, 0)), ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_newval
, 0))));
7028 CPU (h_cbit
) = opval
;
7029 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7032 BI opval
= LTHI (tmp_newval
, 0);
7033 CPU (h_nbit
) = opval
;
7034 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7037 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7038 CPU (h_zbit
) = opval
;
7039 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7042 BI opval
= ORIF (ANDIF (ANDIF (GEHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), GEHI (tmp_newval
, 0)), ANDIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), LTHI (tmp_newval
, 0)));
7043 CPU (h_vbit
) = opval
;
7044 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7049 CPU (h_xbit
) = opval
;
7050 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7054 SET_H_INSN_PREFIXED_P (opval
);
7055 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7065 CASE (sem
, INSN_SUB_D_R
) : /* sub.d $Rs,$Rd */
7067 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7068 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7069 #define FLD(f) abuf->fields.sfmt_addc_m.f
7070 int UNUSED written
= 0;
7071 IADDR UNUSED pc
= abuf
->addr
;
7072 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7079 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
7080 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7081 tmp_carry
= CPU (h_cbit
);
7082 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7084 SI opval
= tmp_newval
;
7085 SET_H_GR (FLD (f_operand2
), opval
);
7086 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7090 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
7091 CPU (h_cbit
) = opval
;
7092 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7095 BI opval
= LTSI (tmp_newval
, 0);
7096 CPU (h_nbit
) = opval
;
7097 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7100 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7101 CPU (h_zbit
) = opval
;
7102 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7105 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
7106 CPU (h_vbit
) = opval
;
7107 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7112 CPU (h_xbit
) = opval
;
7113 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7117 SET_H_INSN_PREFIXED_P (opval
);
7118 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7128 CASE (sem
, INSN_SUB_M_B_M
) : /* sub-m.b [${Rs}${inc}],${Rd} */
7130 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7131 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7132 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
7133 int UNUSED written
= 0;
7134 IADDR UNUSED pc
= abuf
->addr
;
7135 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7142 tmp_tmpops
= ({ SI tmp_addr
;
7145 tmp_postinc
= FLD (f_memmode
);
7146 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
7147 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
7148 ; if (NEBI (tmp_postinc
, 0)) {
7150 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
7151 tmp_addr
= ADDSI (tmp_addr
, 1);
7154 SI opval
= tmp_addr
;
7155 SET_H_GR (FLD (f_operand1
), opval
);
7156 written
|= (1 << 12);
7157 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7162 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7163 tmp_carry
= CPU (h_cbit
);
7164 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7167 tmp_oldregval
= GET_H_RAW_GR_ACR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
7169 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
7170 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
7171 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7176 BI opval
= ORIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEQI (tmp_tmpopd
, 0), LTQI (tmp_newval
, 0)), ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_newval
, 0))));
7177 CPU (h_cbit
) = opval
;
7178 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7181 BI opval
= LTQI (tmp_newval
, 0);
7182 CPU (h_nbit
) = opval
;
7183 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7186 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7187 CPU (h_zbit
) = opval
;
7188 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7191 BI opval
= ORIF (ANDIF (ANDIF (GEQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), GEQI (tmp_newval
, 0)), ANDIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), LTQI (tmp_newval
, 0)));
7192 CPU (h_vbit
) = opval
;
7193 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7198 CPU (h_xbit
) = opval
;
7199 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7203 SET_H_INSN_PREFIXED_P (opval
);
7204 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7210 abuf
->written
= written
;
7215 CASE (sem
, INSN_SUB_M_W_M
) : /* sub-m.w [${Rs}${inc}],${Rd} */
7217 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7218 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7219 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
7220 int UNUSED written
= 0;
7221 IADDR UNUSED pc
= abuf
->addr
;
7222 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7229 tmp_tmpops
= ({ SI tmp_addr
;
7232 tmp_postinc
= FLD (f_memmode
);
7233 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
7234 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
7235 ; if (NEBI (tmp_postinc
, 0)) {
7237 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
7238 tmp_addr
= ADDSI (tmp_addr
, 2);
7241 SI opval
= tmp_addr
;
7242 SET_H_GR (FLD (f_operand1
), opval
);
7243 written
|= (1 << 12);
7244 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7249 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7250 tmp_carry
= CPU (h_cbit
);
7251 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7254 tmp_oldregval
= GET_H_RAW_GR_ACR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
7256 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
7257 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
7258 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7263 BI opval
= ORIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEHI (tmp_tmpopd
, 0), LTHI (tmp_newval
, 0)), ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_newval
, 0))));
7264 CPU (h_cbit
) = opval
;
7265 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7268 BI opval
= LTHI (tmp_newval
, 0);
7269 CPU (h_nbit
) = opval
;
7270 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7273 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7274 CPU (h_zbit
) = opval
;
7275 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7278 BI opval
= ORIF (ANDIF (ANDIF (GEHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), GEHI (tmp_newval
, 0)), ANDIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), LTHI (tmp_newval
, 0)));
7279 CPU (h_vbit
) = opval
;
7280 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7285 CPU (h_xbit
) = opval
;
7286 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7290 SET_H_INSN_PREFIXED_P (opval
);
7291 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7297 abuf
->written
= written
;
7302 CASE (sem
, INSN_SUB_M_D_M
) : /* sub-m.d [${Rs}${inc}],${Rd} */
7304 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7305 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7306 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
7307 int UNUSED written
= 0;
7308 IADDR UNUSED pc
= abuf
->addr
;
7309 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7316 tmp_tmpops
= ({ SI tmp_addr
;
7319 tmp_postinc
= FLD (f_memmode
);
7320 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
7321 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
7322 ; if (NEBI (tmp_postinc
, 0)) {
7324 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
7325 tmp_addr
= ADDSI (tmp_addr
, 4);
7328 SI opval
= tmp_addr
;
7329 SET_H_GR (FLD (f_operand1
), opval
);
7330 written
|= (1 << 11);
7331 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7336 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7337 tmp_carry
= CPU (h_cbit
);
7338 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7340 SI opval
= tmp_newval
;
7341 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
7342 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7346 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
7347 CPU (h_cbit
) = opval
;
7348 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7351 BI opval
= LTSI (tmp_newval
, 0);
7352 CPU (h_nbit
) = opval
;
7353 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7356 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7357 CPU (h_zbit
) = opval
;
7358 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7361 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
7362 CPU (h_vbit
) = opval
;
7363 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7368 CPU (h_xbit
) = opval
;
7369 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7373 SET_H_INSN_PREFIXED_P (opval
);
7374 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7380 abuf
->written
= written
;
7385 CASE (sem
, INSN_SUBCBR
) : /* sub.b ${sconst8}],${Rd} */
7387 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7388 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7389 #define FLD(f) abuf->fields.sfmt_addcbr.f
7390 int UNUSED written
= 0;
7391 IADDR UNUSED pc
= abuf
->addr
;
7392 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
7399 tmp_tmpops
= FLD (f_indir_pc__byte
);
7400 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7401 tmp_carry
= CPU (h_cbit
);
7402 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7405 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
7407 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
7408 SET_H_GR (FLD (f_operand2
), opval
);
7409 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7414 BI opval
= ORIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEQI (tmp_tmpopd
, 0), LTQI (tmp_newval
, 0)), ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_newval
, 0))));
7415 CPU (h_cbit
) = opval
;
7416 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7419 BI opval
= LTQI (tmp_newval
, 0);
7420 CPU (h_nbit
) = opval
;
7421 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7424 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7425 CPU (h_zbit
) = opval
;
7426 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7429 BI opval
= ORIF (ANDIF (ANDIF (GEQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), GEQI (tmp_newval
, 0)), ANDIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), LTQI (tmp_newval
, 0)));
7430 CPU (h_vbit
) = opval
;
7431 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7436 CPU (h_xbit
) = opval
;
7437 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7441 SET_H_INSN_PREFIXED_P (opval
);
7442 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7452 CASE (sem
, INSN_SUBCWR
) : /* sub.w ${sconst16}],${Rd} */
7454 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7455 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7456 #define FLD(f) abuf->fields.sfmt_addcwr.f
7457 int UNUSED written
= 0;
7458 IADDR UNUSED pc
= abuf
->addr
;
7459 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
7466 tmp_tmpops
= FLD (f_indir_pc__word
);
7467 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7468 tmp_carry
= CPU (h_cbit
);
7469 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7472 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
7474 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
7475 SET_H_GR (FLD (f_operand2
), opval
);
7476 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7481 BI opval
= ORIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEHI (tmp_tmpopd
, 0), LTHI (tmp_newval
, 0)), ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_newval
, 0))));
7482 CPU (h_cbit
) = opval
;
7483 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7486 BI opval
= LTHI (tmp_newval
, 0);
7487 CPU (h_nbit
) = opval
;
7488 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7491 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7492 CPU (h_zbit
) = opval
;
7493 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7496 BI opval
= ORIF (ANDIF (ANDIF (GEHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), GEHI (tmp_newval
, 0)), ANDIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), LTHI (tmp_newval
, 0)));
7497 CPU (h_vbit
) = opval
;
7498 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7503 CPU (h_xbit
) = opval
;
7504 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7508 SET_H_INSN_PREFIXED_P (opval
);
7509 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7519 CASE (sem
, INSN_SUBCDR
) : /* sub.d ${const32}],${Rd} */
7521 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7522 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7523 #define FLD(f) abuf->fields.sfmt_addcdr.f
7524 int UNUSED written
= 0;
7525 IADDR UNUSED pc
= abuf
->addr
;
7526 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
7533 tmp_tmpops
= FLD (f_indir_pc__dword
);
7534 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7535 tmp_carry
= CPU (h_cbit
);
7536 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7538 SI opval
= tmp_newval
;
7539 SET_H_GR (FLD (f_operand2
), opval
);
7540 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7544 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
7545 CPU (h_cbit
) = opval
;
7546 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7549 BI opval
= LTSI (tmp_newval
, 0);
7550 CPU (h_nbit
) = opval
;
7551 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7554 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7555 CPU (h_zbit
) = opval
;
7556 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7559 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
7560 CPU (h_vbit
) = opval
;
7561 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7566 CPU (h_xbit
) = opval
;
7567 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7571 SET_H_INSN_PREFIXED_P (opval
);
7572 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7582 CASE (sem
, INSN_SUBS_B_R
) : /* subs.b $Rs,$Rd */
7584 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7585 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7586 #define FLD(f) abuf->fields.sfmt_addc_m.f
7587 int UNUSED written
= 0;
7588 IADDR UNUSED pc
= abuf
->addr
;
7589 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7596 tmp_tmpops
= EXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
7597 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7598 tmp_carry
= CPU (h_cbit
);
7599 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7601 SI opval
= tmp_newval
;
7602 SET_H_GR (FLD (f_operand2
), opval
);
7603 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7607 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
7608 CPU (h_cbit
) = opval
;
7609 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7612 BI opval
= LTSI (tmp_newval
, 0);
7613 CPU (h_nbit
) = opval
;
7614 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7617 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7618 CPU (h_zbit
) = opval
;
7619 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7622 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
7623 CPU (h_vbit
) = opval
;
7624 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7629 CPU (h_xbit
) = opval
;
7630 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7634 SET_H_INSN_PREFIXED_P (opval
);
7635 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7645 CASE (sem
, INSN_SUBS_W_R
) : /* subs.w $Rs,$Rd */
7647 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7648 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7649 #define FLD(f) abuf->fields.sfmt_addc_m.f
7650 int UNUSED written
= 0;
7651 IADDR UNUSED pc
= abuf
->addr
;
7652 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7659 tmp_tmpops
= EXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
7660 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7661 tmp_carry
= CPU (h_cbit
);
7662 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7664 SI opval
= tmp_newval
;
7665 SET_H_GR (FLD (f_operand2
), opval
);
7666 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7670 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
7671 CPU (h_cbit
) = opval
;
7672 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7675 BI opval
= LTSI (tmp_newval
, 0);
7676 CPU (h_nbit
) = opval
;
7677 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7680 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7681 CPU (h_zbit
) = opval
;
7682 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7685 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
7686 CPU (h_vbit
) = opval
;
7687 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7692 CPU (h_xbit
) = opval
;
7693 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7697 SET_H_INSN_PREFIXED_P (opval
);
7698 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7708 CASE (sem
, INSN_SUBS_M_B_M
) : /* subs-m.b [${Rs}${inc}],$Rd */
7710 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7711 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7712 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
7713 int UNUSED written
= 0;
7714 IADDR UNUSED pc
= abuf
->addr
;
7715 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7722 tmp_tmpops
= EXTQISI (({ SI tmp_addr
;
7725 tmp_postinc
= FLD (f_memmode
);
7726 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
7727 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
7728 ; if (NEBI (tmp_postinc
, 0)) {
7730 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
7731 tmp_addr
= ADDSI (tmp_addr
, 1);
7734 SI opval
= tmp_addr
;
7735 SET_H_GR (FLD (f_operand1
), opval
);
7736 written
|= (1 << 11);
7737 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7742 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7743 tmp_carry
= CPU (h_cbit
);
7744 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7746 SI opval
= tmp_newval
;
7747 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
7748 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7752 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
7753 CPU (h_cbit
) = opval
;
7754 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7757 BI opval
= LTSI (tmp_newval
, 0);
7758 CPU (h_nbit
) = opval
;
7759 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7762 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7763 CPU (h_zbit
) = opval
;
7764 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7767 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
7768 CPU (h_vbit
) = opval
;
7769 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7774 CPU (h_xbit
) = opval
;
7775 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7779 SET_H_INSN_PREFIXED_P (opval
);
7780 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7786 abuf
->written
= written
;
7791 CASE (sem
, INSN_SUBS_M_W_M
) : /* subs-m.w [${Rs}${inc}],$Rd */
7793 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7794 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7795 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
7796 int UNUSED written
= 0;
7797 IADDR UNUSED pc
= abuf
->addr
;
7798 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7805 tmp_tmpops
= EXTHISI (({ SI tmp_addr
;
7808 tmp_postinc
= FLD (f_memmode
);
7809 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
7810 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
7811 ; if (NEBI (tmp_postinc
, 0)) {
7813 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
7814 tmp_addr
= ADDSI (tmp_addr
, 2);
7817 SI opval
= tmp_addr
;
7818 SET_H_GR (FLD (f_operand1
), opval
);
7819 written
|= (1 << 11);
7820 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7825 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7826 tmp_carry
= CPU (h_cbit
);
7827 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7829 SI opval
= tmp_newval
;
7830 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
7831 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7835 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
7836 CPU (h_cbit
) = opval
;
7837 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7840 BI opval
= LTSI (tmp_newval
, 0);
7841 CPU (h_nbit
) = opval
;
7842 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7845 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7846 CPU (h_zbit
) = opval
;
7847 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7850 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
7851 CPU (h_vbit
) = opval
;
7852 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7857 CPU (h_xbit
) = opval
;
7858 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7862 SET_H_INSN_PREFIXED_P (opval
);
7863 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7869 abuf
->written
= written
;
7874 CASE (sem
, INSN_SUBSCBR
) : /* [${Rs}${inc}],$Rd */
7876 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7877 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7878 #define FLD(f) abuf->fields.sfmt_addcbr.f
7879 int UNUSED written
= 0;
7880 IADDR UNUSED pc
= abuf
->addr
;
7881 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
7888 tmp_tmpops
= EXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
7889 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7890 tmp_carry
= CPU (h_cbit
);
7891 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7893 SI opval
= tmp_newval
;
7894 SET_H_GR (FLD (f_operand2
), opval
);
7895 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7899 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
7900 CPU (h_cbit
) = opval
;
7901 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7904 BI opval
= LTSI (tmp_newval
, 0);
7905 CPU (h_nbit
) = opval
;
7906 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7909 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7910 CPU (h_zbit
) = opval
;
7911 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7914 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
7915 CPU (h_vbit
) = opval
;
7916 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7921 CPU (h_xbit
) = opval
;
7922 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7926 SET_H_INSN_PREFIXED_P (opval
);
7927 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7937 CASE (sem
, INSN_SUBSCWR
) : /* [${Rs}${inc}],$Rd */
7939 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7940 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7941 #define FLD(f) abuf->fields.sfmt_addcwr.f
7942 int UNUSED written
= 0;
7943 IADDR UNUSED pc
= abuf
->addr
;
7944 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
7951 tmp_tmpops
= EXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
7952 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7953 tmp_carry
= CPU (h_cbit
);
7954 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7956 SI opval
= tmp_newval
;
7957 SET_H_GR (FLD (f_operand2
), opval
);
7958 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7962 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
7963 CPU (h_cbit
) = opval
;
7964 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7967 BI opval
= LTSI (tmp_newval
, 0);
7968 CPU (h_nbit
) = opval
;
7969 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7972 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7973 CPU (h_zbit
) = opval
;
7974 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7977 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
7978 CPU (h_vbit
) = opval
;
7979 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7984 CPU (h_xbit
) = opval
;
7985 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7989 SET_H_INSN_PREFIXED_P (opval
);
7990 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8000 CASE (sem
, INSN_SUBU_B_R
) : /* subu.b $Rs,$Rd */
8002 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8003 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8004 #define FLD(f) abuf->fields.sfmt_addc_m.f
8005 int UNUSED written
= 0;
8006 IADDR UNUSED pc
= abuf
->addr
;
8007 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8014 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
8015 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8016 tmp_carry
= CPU (h_cbit
);
8017 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8019 SI opval
= tmp_newval
;
8020 SET_H_GR (FLD (f_operand2
), opval
);
8021 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8025 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
8026 CPU (h_cbit
) = opval
;
8027 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8030 BI opval
= LTSI (tmp_newval
, 0);
8031 CPU (h_nbit
) = opval
;
8032 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8035 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8036 CPU (h_zbit
) = opval
;
8037 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8040 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
8041 CPU (h_vbit
) = opval
;
8042 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8047 CPU (h_xbit
) = opval
;
8048 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8052 SET_H_INSN_PREFIXED_P (opval
);
8053 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8063 CASE (sem
, INSN_SUBU_W_R
) : /* subu.w $Rs,$Rd */
8065 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8066 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8067 #define FLD(f) abuf->fields.sfmt_addc_m.f
8068 int UNUSED written
= 0;
8069 IADDR UNUSED pc
= abuf
->addr
;
8070 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8077 tmp_tmpops
= ZEXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
8078 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8079 tmp_carry
= CPU (h_cbit
);
8080 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8082 SI opval
= tmp_newval
;
8083 SET_H_GR (FLD (f_operand2
), opval
);
8084 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8088 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
8089 CPU (h_cbit
) = opval
;
8090 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8093 BI opval
= LTSI (tmp_newval
, 0);
8094 CPU (h_nbit
) = opval
;
8095 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8098 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8099 CPU (h_zbit
) = opval
;
8100 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8103 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
8104 CPU (h_vbit
) = opval
;
8105 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8110 CPU (h_xbit
) = opval
;
8111 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8115 SET_H_INSN_PREFIXED_P (opval
);
8116 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8126 CASE (sem
, INSN_SUBU_M_B_M
) : /* subu-m.b [${Rs}${inc}],$Rd */
8128 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8129 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8130 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
8131 int UNUSED written
= 0;
8132 IADDR UNUSED pc
= abuf
->addr
;
8133 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8140 tmp_tmpops
= ZEXTQISI (({ SI tmp_addr
;
8143 tmp_postinc
= FLD (f_memmode
);
8144 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
8145 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
8146 ; if (NEBI (tmp_postinc
, 0)) {
8148 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
8149 tmp_addr
= ADDSI (tmp_addr
, 1);
8152 SI opval
= tmp_addr
;
8153 SET_H_GR (FLD (f_operand1
), opval
);
8154 written
|= (1 << 11);
8155 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8160 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8161 tmp_carry
= CPU (h_cbit
);
8162 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8164 SI opval
= tmp_newval
;
8165 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
8166 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8170 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
8171 CPU (h_cbit
) = opval
;
8172 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8175 BI opval
= LTSI (tmp_newval
, 0);
8176 CPU (h_nbit
) = opval
;
8177 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8180 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8181 CPU (h_zbit
) = opval
;
8182 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8185 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
8186 CPU (h_vbit
) = opval
;
8187 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8192 CPU (h_xbit
) = opval
;
8193 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8197 SET_H_INSN_PREFIXED_P (opval
);
8198 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8204 abuf
->written
= written
;
8209 CASE (sem
, INSN_SUBU_M_W_M
) : /* subu-m.w [${Rs}${inc}],$Rd */
8211 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8212 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8213 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
8214 int UNUSED written
= 0;
8215 IADDR UNUSED pc
= abuf
->addr
;
8216 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8223 tmp_tmpops
= ZEXTHISI (({ SI tmp_addr
;
8226 tmp_postinc
= FLD (f_memmode
);
8227 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
8228 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
8229 ; if (NEBI (tmp_postinc
, 0)) {
8231 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
8232 tmp_addr
= ADDSI (tmp_addr
, 2);
8235 SI opval
= tmp_addr
;
8236 SET_H_GR (FLD (f_operand1
), opval
);
8237 written
|= (1 << 11);
8238 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8243 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8244 tmp_carry
= CPU (h_cbit
);
8245 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8247 SI opval
= tmp_newval
;
8248 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
8249 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8253 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
8254 CPU (h_cbit
) = opval
;
8255 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8258 BI opval
= LTSI (tmp_newval
, 0);
8259 CPU (h_nbit
) = opval
;
8260 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8263 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8264 CPU (h_zbit
) = opval
;
8265 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8268 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
8269 CPU (h_vbit
) = opval
;
8270 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8275 CPU (h_xbit
) = opval
;
8276 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8280 SET_H_INSN_PREFIXED_P (opval
);
8281 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8287 abuf
->written
= written
;
8292 CASE (sem
, INSN_SUBUCBR
) : /* [${Rs}${inc}],$Rd */
8294 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8295 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8296 #define FLD(f) abuf->fields.sfmt_addcbr.f
8297 int UNUSED written
= 0;
8298 IADDR UNUSED pc
= abuf
->addr
;
8299 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
8306 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
8307 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8308 tmp_carry
= CPU (h_cbit
);
8309 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8311 SI opval
= tmp_newval
;
8312 SET_H_GR (FLD (f_operand2
), opval
);
8313 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8317 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
8318 CPU (h_cbit
) = opval
;
8319 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8322 BI opval
= LTSI (tmp_newval
, 0);
8323 CPU (h_nbit
) = opval
;
8324 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8327 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8328 CPU (h_zbit
) = opval
;
8329 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8332 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
8333 CPU (h_vbit
) = opval
;
8334 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8339 CPU (h_xbit
) = opval
;
8340 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8344 SET_H_INSN_PREFIXED_P (opval
);
8345 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8355 CASE (sem
, INSN_SUBUCWR
) : /* [${Rs}${inc}],$Rd */
8357 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8358 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8359 #define FLD(f) abuf->fields.sfmt_addcwr.f
8360 int UNUSED written
= 0;
8361 IADDR UNUSED pc
= abuf
->addr
;
8362 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
8369 tmp_tmpops
= ZEXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
8370 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8371 tmp_carry
= CPU (h_cbit
);
8372 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8374 SI opval
= tmp_newval
;
8375 SET_H_GR (FLD (f_operand2
), opval
);
8376 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8380 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
8381 CPU (h_cbit
) = opval
;
8382 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8385 BI opval
= LTSI (tmp_newval
, 0);
8386 CPU (h_nbit
) = opval
;
8387 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8390 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8391 CPU (h_zbit
) = opval
;
8392 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8395 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
8396 CPU (h_vbit
) = opval
;
8397 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8402 CPU (h_xbit
) = opval
;
8403 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8407 SET_H_INSN_PREFIXED_P (opval
);
8408 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8418 CASE (sem
, INSN_ADDC_R
) : /* addc $Rs,$Rd */
8420 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8421 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8422 #define FLD(f) abuf->fields.sfmt_addc_m.f
8423 int UNUSED written
= 0;
8424 IADDR UNUSED pc
= abuf
->addr
;
8425 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8434 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
8435 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8436 tmp_carry
= CPU (h_cbit
);
8437 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8439 SI opval
= tmp_newval
;
8440 SET_H_GR (FLD (f_operand2
), opval
);
8441 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8445 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
8446 CPU (h_cbit
) = opval
;
8447 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8450 BI opval
= LTSI (tmp_newval
, 0);
8451 CPU (h_nbit
) = opval
;
8452 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8455 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8456 CPU (h_zbit
) = opval
;
8457 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8460 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
8461 CPU (h_vbit
) = opval
;
8462 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8467 CPU (h_xbit
) = opval
;
8468 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8472 SET_H_INSN_PREFIXED_P (opval
);
8473 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8484 CASE (sem
, INSN_ADDC_M
) : /* addc [${Rs}${inc}],${Rd} */
8486 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8487 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8488 #define FLD(f) abuf->fields.sfmt_addc_m.f
8489 int UNUSED written
= 0;
8490 IADDR UNUSED pc
= abuf
->addr
;
8491 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8500 tmp_tmpops
= ({ SI tmp_addr
;
8503 tmp_postinc
= FLD (f_memmode
);
8504 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
8505 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
8506 ; if (NEBI (tmp_postinc
, 0)) {
8508 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
8509 tmp_addr
= ADDSI (tmp_addr
, 4);
8512 SI opval
= tmp_addr
;
8513 SET_H_GR (FLD (f_operand1
), opval
);
8514 written
|= (1 << 10);
8515 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8520 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8521 tmp_carry
= CPU (h_cbit
);
8522 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8524 SI opval
= tmp_newval
;
8525 SET_H_GR (FLD (f_operand2
), opval
);
8526 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8530 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
8531 CPU (h_cbit
) = opval
;
8532 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8535 BI opval
= LTSI (tmp_newval
, 0);
8536 CPU (h_nbit
) = opval
;
8537 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8540 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8541 CPU (h_zbit
) = opval
;
8542 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8545 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
8546 CPU (h_vbit
) = opval
;
8547 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8552 CPU (h_xbit
) = opval
;
8553 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8557 SET_H_INSN_PREFIXED_P (opval
);
8558 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8565 abuf
->written
= written
;
8570 CASE (sem
, INSN_ADDC_C
) : /* addc ${const32},${Rd} */
8572 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8573 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8574 #define FLD(f) abuf->fields.sfmt_addcdr.f
8575 int UNUSED written
= 0;
8576 IADDR UNUSED pc
= abuf
->addr
;
8577 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
8586 tmp_tmpops
= FLD (f_indir_pc__dword
);
8587 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8588 tmp_carry
= CPU (h_cbit
);
8589 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8591 SI opval
= tmp_newval
;
8592 SET_H_GR (FLD (f_operand2
), opval
);
8593 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8597 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
8598 CPU (h_cbit
) = opval
;
8599 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8602 BI opval
= LTSI (tmp_newval
, 0);
8603 CPU (h_nbit
) = opval
;
8604 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8607 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8608 CPU (h_zbit
) = opval
;
8609 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8612 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
8613 CPU (h_vbit
) = opval
;
8614 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8619 CPU (h_xbit
) = opval
;
8620 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8624 SET_H_INSN_PREFIXED_P (opval
);
8625 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8636 CASE (sem
, INSN_LAPC_D
) : /* lapc.d ${const32-pcrel},${Rd} */
8638 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8639 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8640 #define FLD(f) abuf->fields.sfmt_lapc_d.f
8641 int UNUSED written
= 0;
8642 IADDR UNUSED pc
= abuf
->addr
;
8643 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
8647 SI opval
= FLD (i_const32_pcrel
);
8648 SET_H_GR (FLD (f_operand2
), opval
);
8649 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8654 CPU (h_xbit
) = opval
;
8655 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8659 SET_H_INSN_PREFIXED_P (opval
);
8660 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8669 CASE (sem
, INSN_LAPCQ
) : /* lapcq ${qo},${Rd} */
8671 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8672 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8673 #define FLD(f) abuf->fields.sfmt_lapcq.f
8674 int UNUSED written
= 0;
8675 IADDR UNUSED pc
= abuf
->addr
;
8676 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8680 SI opval
= FLD (i_qo
);
8681 SET_H_GR (FLD (f_operand2
), opval
);
8682 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8687 CPU (h_xbit
) = opval
;
8688 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8692 SET_H_INSN_PREFIXED_P (opval
);
8693 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8702 CASE (sem
, INSN_ADDI_B_R
) : /* addi.b ${Rs-dfield}.m,${Rd-sfield} */
8704 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8705 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8706 #define FLD(f) abuf->fields.sfmt_addc_m.f
8707 int UNUSED written
= 0;
8708 IADDR UNUSED pc
= abuf
->addr
;
8709 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8713 SI opval
= ADDSI (GET_H_GR (FLD (f_operand1
)), MULSI (GET_H_GR (FLD (f_operand2
)), 1));
8714 SET_H_GR (FLD (f_operand1
), opval
);
8715 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8720 CPU (h_xbit
) = opval
;
8721 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8725 SET_H_INSN_PREFIXED_P (opval
);
8726 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8735 CASE (sem
, INSN_ADDI_W_R
) : /* addi.w ${Rs-dfield}.m,${Rd-sfield} */
8737 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8738 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8739 #define FLD(f) abuf->fields.sfmt_addc_m.f
8740 int UNUSED written
= 0;
8741 IADDR UNUSED pc
= abuf
->addr
;
8742 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8746 SI opval
= ADDSI (GET_H_GR (FLD (f_operand1
)), MULSI (GET_H_GR (FLD (f_operand2
)), 2));
8747 SET_H_GR (FLD (f_operand1
), opval
);
8748 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8753 CPU (h_xbit
) = opval
;
8754 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8758 SET_H_INSN_PREFIXED_P (opval
);
8759 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8768 CASE (sem
, INSN_ADDI_D_R
) : /* addi.d ${Rs-dfield}.m,${Rd-sfield} */
8770 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8771 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8772 #define FLD(f) abuf->fields.sfmt_addc_m.f
8773 int UNUSED written
= 0;
8774 IADDR UNUSED pc
= abuf
->addr
;
8775 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8779 SI opval
= ADDSI (GET_H_GR (FLD (f_operand1
)), MULSI (GET_H_GR (FLD (f_operand2
)), 4));
8780 SET_H_GR (FLD (f_operand1
), opval
);
8781 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8786 CPU (h_xbit
) = opval
;
8787 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8791 SET_H_INSN_PREFIXED_P (opval
);
8792 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8801 CASE (sem
, INSN_NEG_B_R
) : /* neg.b $Rs,$Rd */
8803 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8804 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8805 #define FLD(f) abuf->fields.sfmt_addc_m.f
8806 int UNUSED written
= 0;
8807 IADDR UNUSED pc
= abuf
->addr
;
8808 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8815 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
8817 tmp_carry
= CPU (h_cbit
);
8818 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8821 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
8823 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
8824 SET_H_GR (FLD (f_operand2
), opval
);
8825 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8830 BI opval
= ORIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEQI (tmp_tmpopd
, 0), LTQI (tmp_newval
, 0)), ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_newval
, 0))));
8831 CPU (h_cbit
) = opval
;
8832 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8835 BI opval
= LTQI (tmp_newval
, 0);
8836 CPU (h_nbit
) = opval
;
8837 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8840 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8841 CPU (h_zbit
) = opval
;
8842 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8845 BI opval
= ORIF (ANDIF (ANDIF (GEQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), GEQI (tmp_newval
, 0)), ANDIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), LTQI (tmp_newval
, 0)));
8846 CPU (h_vbit
) = opval
;
8847 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8852 CPU (h_xbit
) = opval
;
8853 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8857 SET_H_INSN_PREFIXED_P (opval
);
8858 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8868 CASE (sem
, INSN_NEG_W_R
) : /* neg.w $Rs,$Rd */
8870 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8871 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8872 #define FLD(f) abuf->fields.sfmt_addc_m.f
8873 int UNUSED written
= 0;
8874 IADDR UNUSED pc
= abuf
->addr
;
8875 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8882 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
8884 tmp_carry
= CPU (h_cbit
);
8885 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8888 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
8890 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
8891 SET_H_GR (FLD (f_operand2
), opval
);
8892 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8897 BI opval
= ORIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEHI (tmp_tmpopd
, 0), LTHI (tmp_newval
, 0)), ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_newval
, 0))));
8898 CPU (h_cbit
) = opval
;
8899 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8902 BI opval
= LTHI (tmp_newval
, 0);
8903 CPU (h_nbit
) = opval
;
8904 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8907 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8908 CPU (h_zbit
) = opval
;
8909 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8912 BI opval
= ORIF (ANDIF (ANDIF (GEHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), GEHI (tmp_newval
, 0)), ANDIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), LTHI (tmp_newval
, 0)));
8913 CPU (h_vbit
) = opval
;
8914 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8919 CPU (h_xbit
) = opval
;
8920 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8924 SET_H_INSN_PREFIXED_P (opval
);
8925 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8935 CASE (sem
, INSN_NEG_D_R
) : /* neg.d $Rs,$Rd */
8937 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8938 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8939 #define FLD(f) abuf->fields.sfmt_addc_m.f
8940 int UNUSED written
= 0;
8941 IADDR UNUSED pc
= abuf
->addr
;
8942 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8949 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
8951 tmp_carry
= CPU (h_cbit
);
8952 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8954 SI opval
= tmp_newval
;
8955 SET_H_GR (FLD (f_operand2
), opval
);
8956 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8960 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
8961 CPU (h_cbit
) = opval
;
8962 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8965 BI opval
= LTSI (tmp_newval
, 0);
8966 CPU (h_nbit
) = opval
;
8967 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8970 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8971 CPU (h_zbit
) = opval
;
8972 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8975 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
8976 CPU (h_vbit
) = opval
;
8977 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8982 CPU (h_xbit
) = opval
;
8983 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8987 SET_H_INSN_PREFIXED_P (opval
);
8988 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8998 CASE (sem
, INSN_TEST_M_B_M
) : /* test-m.b [${Rs}${inc}] */
9000 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9001 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9002 #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
9003 int UNUSED written
= 0;
9004 IADDR UNUSED pc
= abuf
->addr
;
9005 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9009 tmp_tmpd
= ({ SI tmp_addr
;
9012 tmp_postinc
= FLD (f_memmode
);
9013 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
9014 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
9015 ; if (NEBI (tmp_postinc
, 0)) {
9017 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
9018 tmp_addr
= ADDSI (tmp_addr
, 1);
9021 SI opval
= tmp_addr
;
9022 SET_H_GR (FLD (f_operand1
), opval
);
9023 written
|= (1 << 8);
9024 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9035 tmp_tmpopd
= tmp_tmpd
;
9036 tmp_carry
= CPU (h_cbit
);
9037 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
9041 BI opval
= ORIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEQI (tmp_tmpopd
, 0), LTQI (tmp_newval
, 0)), ANDIF (LTQI (tmp_tmpops
, 0), LTQI (tmp_newval
, 0))));
9042 CPU (h_cbit
) = opval
;
9043 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9046 BI opval
= LTQI (tmp_newval
, 0);
9047 CPU (h_nbit
) = opval
;
9048 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9051 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9052 CPU (h_zbit
) = opval
;
9053 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9056 BI opval
= ORIF (ANDIF (ANDIF (GEQI (tmp_tmpops
, 0), LTQI (tmp_tmpopd
, 0)), GEQI (tmp_newval
, 0)), ANDIF (ANDIF (LTQI (tmp_tmpops
, 0), GEQI (tmp_tmpopd
, 0)), LTQI (tmp_newval
, 0)));
9057 CPU (h_vbit
) = opval
;
9058 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9063 CPU (h_xbit
) = opval
;
9064 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9068 SET_H_INSN_PREFIXED_P (opval
);
9069 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9076 abuf
->written
= written
;
9081 CASE (sem
, INSN_TEST_M_W_M
) : /* test-m.w [${Rs}${inc}] */
9083 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9084 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9085 #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
9086 int UNUSED written
= 0;
9087 IADDR UNUSED pc
= abuf
->addr
;
9088 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9092 tmp_tmpd
= ({ SI tmp_addr
;
9095 tmp_postinc
= FLD (f_memmode
);
9096 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
9097 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
9098 ; if (NEBI (tmp_postinc
, 0)) {
9100 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
9101 tmp_addr
= ADDSI (tmp_addr
, 2);
9104 SI opval
= tmp_addr
;
9105 SET_H_GR (FLD (f_operand1
), opval
);
9106 written
|= (1 << 8);
9107 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9118 tmp_tmpopd
= tmp_tmpd
;
9119 tmp_carry
= CPU (h_cbit
);
9120 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
9124 BI opval
= ORIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), ORIF (ANDIF (GEHI (tmp_tmpopd
, 0), LTHI (tmp_newval
, 0)), ANDIF (LTHI (tmp_tmpops
, 0), LTHI (tmp_newval
, 0))));
9125 CPU (h_cbit
) = opval
;
9126 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9129 BI opval
= LTHI (tmp_newval
, 0);
9130 CPU (h_nbit
) = opval
;
9131 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9134 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9135 CPU (h_zbit
) = opval
;
9136 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9139 BI opval
= ORIF (ANDIF (ANDIF (GEHI (tmp_tmpops
, 0), LTHI (tmp_tmpopd
, 0)), GEHI (tmp_newval
, 0)), ANDIF (ANDIF (LTHI (tmp_tmpops
, 0), GEHI (tmp_tmpopd
, 0)), LTHI (tmp_newval
, 0)));
9140 CPU (h_vbit
) = opval
;
9141 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9146 CPU (h_xbit
) = opval
;
9147 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9151 SET_H_INSN_PREFIXED_P (opval
);
9152 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9159 abuf
->written
= written
;
9164 CASE (sem
, INSN_TEST_M_D_M
) : /* test-m.d [${Rs}${inc}] */
9166 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9167 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9168 #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
9169 int UNUSED written
= 0;
9170 IADDR UNUSED pc
= abuf
->addr
;
9171 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9175 tmp_tmpd
= ({ SI tmp_addr
;
9178 tmp_postinc
= FLD (f_memmode
);
9179 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
9180 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
9181 ; if (NEBI (tmp_postinc
, 0)) {
9183 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
9184 tmp_addr
= ADDSI (tmp_addr
, 4);
9187 SI opval
= tmp_addr
;
9188 SET_H_GR (FLD (f_operand1
), opval
);
9189 written
|= (1 << 8);
9190 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9201 tmp_tmpopd
= tmp_tmpd
;
9202 tmp_carry
= CPU (h_cbit
);
9203 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
9207 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), ORIF (ANDIF (GESI (tmp_tmpopd
, 0), LTSI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_newval
, 0))));
9208 CPU (h_cbit
) = opval
;
9209 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9212 BI opval
= LTSI (tmp_newval
, 0);
9213 CPU (h_nbit
) = opval
;
9214 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9217 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9218 CPU (h_zbit
) = opval
;
9219 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9222 BI opval
= ORIF (ANDIF (ANDIF (GESI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
9223 CPU (h_vbit
) = opval
;
9224 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9229 CPU (h_xbit
) = opval
;
9230 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9234 SET_H_INSN_PREFIXED_P (opval
);
9235 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9242 abuf
->written
= written
;
9247 CASE (sem
, INSN_MOVE_R_M_B_M
) : /* move-r-m.b ${Rs-dfield},[${Rd-sfield}${inc}] */
9249 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9250 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9251 #define FLD(f) abuf->fields.sfmt_addc_m.f
9252 int UNUSED written
= 0;
9253 IADDR UNUSED pc
= abuf
->addr
;
9254 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9258 tmp_tmpd
= GET_H_GR (FLD (f_operand2
));
9262 tmp_postinc
= FLD (f_memmode
);
9263 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
9264 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
9265 if (EQBI (CPU (h_pbit
), 0)) {
9268 QI opval
= tmp_tmpd
;
9269 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
9270 written
|= (1 << 10);
9271 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
9274 BI opval
= CPU (h_pbit
);
9275 CPU (h_cbit
) = opval
;
9276 written
|= (1 << 9);
9277 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9283 CPU (h_cbit
) = opval
;
9284 written
|= (1 << 9);
9285 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9290 QI opval
= tmp_tmpd
;
9291 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
9292 written
|= (1 << 10);
9293 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
9296 if (NEBI (tmp_postinc
, 0)) {
9298 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
9299 tmp_addr
= ADDSI (tmp_addr
, 1);
9302 SI opval
= tmp_addr
;
9303 SET_H_GR (FLD (f_operand1
), opval
);
9304 written
|= (1 << 8);
9305 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9313 CPU (h_xbit
) = opval
;
9314 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9318 SET_H_INSN_PREFIXED_P (opval
);
9319 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9324 abuf
->written
= written
;
9329 CASE (sem
, INSN_MOVE_R_M_W_M
) : /* move-r-m.w ${Rs-dfield},[${Rd-sfield}${inc}] */
9331 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9332 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9333 #define FLD(f) abuf->fields.sfmt_addc_m.f
9334 int UNUSED written
= 0;
9335 IADDR UNUSED pc
= abuf
->addr
;
9336 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9340 tmp_tmpd
= GET_H_GR (FLD (f_operand2
));
9344 tmp_postinc
= FLD (f_memmode
);
9345 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
9346 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
9347 if (EQBI (CPU (h_pbit
), 0)) {
9350 HI opval
= tmp_tmpd
;
9351 SETMEMHI (current_cpu
, pc
, tmp_addr
, opval
);
9352 written
|= (1 << 10);
9353 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
9356 BI opval
= CPU (h_pbit
);
9357 CPU (h_cbit
) = opval
;
9358 written
|= (1 << 9);
9359 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9365 CPU (h_cbit
) = opval
;
9366 written
|= (1 << 9);
9367 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9372 HI opval
= tmp_tmpd
;
9373 SETMEMHI (current_cpu
, pc
, tmp_addr
, opval
);
9374 written
|= (1 << 10);
9375 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
9378 if (NEBI (tmp_postinc
, 0)) {
9380 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
9381 tmp_addr
= ADDSI (tmp_addr
, 2);
9384 SI opval
= tmp_addr
;
9385 SET_H_GR (FLD (f_operand1
), opval
);
9386 written
|= (1 << 8);
9387 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9395 CPU (h_xbit
) = opval
;
9396 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9400 SET_H_INSN_PREFIXED_P (opval
);
9401 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9406 abuf
->written
= written
;
9411 CASE (sem
, INSN_MOVE_R_M_D_M
) : /* move-r-m.d ${Rs-dfield},[${Rd-sfield}${inc}] */
9413 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9414 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9415 #define FLD(f) abuf->fields.sfmt_addc_m.f
9416 int UNUSED written
= 0;
9417 IADDR UNUSED pc
= abuf
->addr
;
9418 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9422 tmp_tmpd
= GET_H_GR (FLD (f_operand2
));
9426 tmp_postinc
= FLD (f_memmode
);
9427 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
9428 if (ANDIF (GET_H_V32_V32 (), NEBI (CPU (h_xbit
), 0))) {
9429 if (EQBI (CPU (h_pbit
), 0)) {
9432 SI opval
= tmp_tmpd
;
9433 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
9434 written
|= (1 << 10);
9435 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
9438 BI opval
= CPU (h_pbit
);
9439 CPU (h_cbit
) = opval
;
9440 written
|= (1 << 9);
9441 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9447 CPU (h_cbit
) = opval
;
9448 written
|= (1 << 9);
9449 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9454 SI opval
= tmp_tmpd
;
9455 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
9456 written
|= (1 << 10);
9457 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
9460 if (NEBI (tmp_postinc
, 0)) {
9462 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
9463 tmp_addr
= ADDSI (tmp_addr
, 4);
9466 SI opval
= tmp_addr
;
9467 SET_H_GR (FLD (f_operand1
), opval
);
9468 written
|= (1 << 8);
9469 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9477 CPU (h_xbit
) = opval
;
9478 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9482 SET_H_INSN_PREFIXED_P (opval
);
9483 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9488 abuf
->written
= written
;
9493 CASE (sem
, INSN_MULS_B
) : /* muls.b $Rs,$Rd */
9495 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9496 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9497 #define FLD(f) abuf->fields.sfmt_muls_b.f
9498 int UNUSED written
= 0;
9499 IADDR UNUSED pc
= abuf
->addr
;
9500 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9506 tmp_src1
= EXTQIDI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
9507 tmp_src2
= EXTQIDI (TRUNCSIQI (GET_H_GR (FLD (f_operand2
))));
9508 tmp_tmpr
= MULDI (tmp_src1
, tmp_src2
);
9510 SI opval
= TRUNCDISI (tmp_tmpr
);
9511 SET_H_GR (FLD (f_operand2
), opval
);
9512 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9515 SI opval
= TRUNCDISI (SRLDI (tmp_tmpr
, 32));
9516 SET_H_SR (((UINT
) 7), opval
);
9517 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
9521 BI opval
= ANDIF (GET_H_V32_V32 (), CPU (h_cbit
));
9522 CPU (h_cbit
) = opval
;
9523 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9526 BI opval
= LTDI (tmp_tmpr
, 0);
9527 CPU (h_nbit
) = opval
;
9528 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9531 BI opval
= ANDIF (EQDI (tmp_tmpr
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9532 CPU (h_zbit
) = opval
;
9533 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9536 BI opval
= NEDI (tmp_tmpr
, EXTSIDI (TRUNCDISI (tmp_tmpr
)));
9537 CPU (h_vbit
) = opval
;
9538 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9543 CPU (h_xbit
) = opval
;
9544 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9548 SET_H_INSN_PREFIXED_P (opval
);
9549 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9559 CASE (sem
, INSN_MULS_W
) : /* muls.w $Rs,$Rd */
9561 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9562 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9563 #define FLD(f) abuf->fields.sfmt_muls_b.f
9564 int UNUSED written
= 0;
9565 IADDR UNUSED pc
= abuf
->addr
;
9566 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9572 tmp_src1
= EXTHIDI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
9573 tmp_src2
= EXTHIDI (TRUNCSIHI (GET_H_GR (FLD (f_operand2
))));
9574 tmp_tmpr
= MULDI (tmp_src1
, tmp_src2
);
9576 SI opval
= TRUNCDISI (tmp_tmpr
);
9577 SET_H_GR (FLD (f_operand2
), opval
);
9578 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9581 SI opval
= TRUNCDISI (SRLDI (tmp_tmpr
, 32));
9582 SET_H_SR (((UINT
) 7), opval
);
9583 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
9587 BI opval
= ANDIF (GET_H_V32_V32 (), CPU (h_cbit
));
9588 CPU (h_cbit
) = opval
;
9589 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9592 BI opval
= LTDI (tmp_tmpr
, 0);
9593 CPU (h_nbit
) = opval
;
9594 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9597 BI opval
= ANDIF (EQDI (tmp_tmpr
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9598 CPU (h_zbit
) = opval
;
9599 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9602 BI opval
= NEDI (tmp_tmpr
, EXTSIDI (TRUNCDISI (tmp_tmpr
)));
9603 CPU (h_vbit
) = opval
;
9604 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9609 CPU (h_xbit
) = opval
;
9610 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9614 SET_H_INSN_PREFIXED_P (opval
);
9615 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9625 CASE (sem
, INSN_MULS_D
) : /* muls.d $Rs,$Rd */
9627 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9628 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9629 #define FLD(f) abuf->fields.sfmt_muls_b.f
9630 int UNUSED written
= 0;
9631 IADDR UNUSED pc
= abuf
->addr
;
9632 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9638 tmp_src1
= EXTSIDI (TRUNCSISI (GET_H_GR (FLD (f_operand1
))));
9639 tmp_src2
= EXTSIDI (TRUNCSISI (GET_H_GR (FLD (f_operand2
))));
9640 tmp_tmpr
= MULDI (tmp_src1
, tmp_src2
);
9642 SI opval
= TRUNCDISI (tmp_tmpr
);
9643 SET_H_GR (FLD (f_operand2
), opval
);
9644 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9647 SI opval
= TRUNCDISI (SRLDI (tmp_tmpr
, 32));
9648 SET_H_SR (((UINT
) 7), opval
);
9649 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
9653 BI opval
= ANDIF (GET_H_V32_V32 (), CPU (h_cbit
));
9654 CPU (h_cbit
) = opval
;
9655 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9658 BI opval
= LTDI (tmp_tmpr
, 0);
9659 CPU (h_nbit
) = opval
;
9660 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9663 BI opval
= ANDIF (EQDI (tmp_tmpr
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9664 CPU (h_zbit
) = opval
;
9665 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9668 BI opval
= NEDI (tmp_tmpr
, EXTSIDI (TRUNCDISI (tmp_tmpr
)));
9669 CPU (h_vbit
) = opval
;
9670 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9675 CPU (h_xbit
) = opval
;
9676 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9680 SET_H_INSN_PREFIXED_P (opval
);
9681 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9691 CASE (sem
, INSN_MULU_B
) : /* mulu.b $Rs,$Rd */
9693 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9694 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9695 #define FLD(f) abuf->fields.sfmt_muls_b.f
9696 int UNUSED written
= 0;
9697 IADDR UNUSED pc
= abuf
->addr
;
9698 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9704 tmp_src1
= ZEXTQIDI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
9705 tmp_src2
= ZEXTQIDI (TRUNCSIQI (GET_H_GR (FLD (f_operand2
))));
9706 tmp_tmpr
= MULDI (tmp_src1
, tmp_src2
);
9708 SI opval
= TRUNCDISI (tmp_tmpr
);
9709 SET_H_GR (FLD (f_operand2
), opval
);
9710 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9713 SI opval
= TRUNCDISI (SRLDI (tmp_tmpr
, 32));
9714 SET_H_SR (((UINT
) 7), opval
);
9715 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
9719 BI opval
= ANDIF (GET_H_V32_V32 (), CPU (h_cbit
));
9720 CPU (h_cbit
) = opval
;
9721 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9724 BI opval
= LTDI (tmp_tmpr
, 0);
9725 CPU (h_nbit
) = opval
;
9726 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9729 BI opval
= ANDIF (EQDI (tmp_tmpr
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9730 CPU (h_zbit
) = opval
;
9731 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9734 BI opval
= NEDI (tmp_tmpr
, ZEXTSIDI (TRUNCDISI (tmp_tmpr
)));
9735 CPU (h_vbit
) = opval
;
9736 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9741 CPU (h_xbit
) = opval
;
9742 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9746 SET_H_INSN_PREFIXED_P (opval
);
9747 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9757 CASE (sem
, INSN_MULU_W
) : /* mulu.w $Rs,$Rd */
9759 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9760 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9761 #define FLD(f) abuf->fields.sfmt_muls_b.f
9762 int UNUSED written
= 0;
9763 IADDR UNUSED pc
= abuf
->addr
;
9764 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9770 tmp_src1
= ZEXTHIDI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
9771 tmp_src2
= ZEXTHIDI (TRUNCSIHI (GET_H_GR (FLD (f_operand2
))));
9772 tmp_tmpr
= MULDI (tmp_src1
, tmp_src2
);
9774 SI opval
= TRUNCDISI (tmp_tmpr
);
9775 SET_H_GR (FLD (f_operand2
), opval
);
9776 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9779 SI opval
= TRUNCDISI (SRLDI (tmp_tmpr
, 32));
9780 SET_H_SR (((UINT
) 7), opval
);
9781 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
9785 BI opval
= ANDIF (GET_H_V32_V32 (), CPU (h_cbit
));
9786 CPU (h_cbit
) = opval
;
9787 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9790 BI opval
= LTDI (tmp_tmpr
, 0);
9791 CPU (h_nbit
) = opval
;
9792 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9795 BI opval
= ANDIF (EQDI (tmp_tmpr
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9796 CPU (h_zbit
) = opval
;
9797 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9800 BI opval
= NEDI (tmp_tmpr
, ZEXTSIDI (TRUNCDISI (tmp_tmpr
)));
9801 CPU (h_vbit
) = opval
;
9802 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9807 CPU (h_xbit
) = opval
;
9808 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9812 SET_H_INSN_PREFIXED_P (opval
);
9813 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9823 CASE (sem
, INSN_MULU_D
) : /* mulu.d $Rs,$Rd */
9825 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9826 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9827 #define FLD(f) abuf->fields.sfmt_muls_b.f
9828 int UNUSED written
= 0;
9829 IADDR UNUSED pc
= abuf
->addr
;
9830 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9836 tmp_src1
= ZEXTSIDI (TRUNCSISI (GET_H_GR (FLD (f_operand1
))));
9837 tmp_src2
= ZEXTSIDI (TRUNCSISI (GET_H_GR (FLD (f_operand2
))));
9838 tmp_tmpr
= MULDI (tmp_src1
, tmp_src2
);
9840 SI opval
= TRUNCDISI (tmp_tmpr
);
9841 SET_H_GR (FLD (f_operand2
), opval
);
9842 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9845 SI opval
= TRUNCDISI (SRLDI (tmp_tmpr
, 32));
9846 SET_H_SR (((UINT
) 7), opval
);
9847 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
9851 BI opval
= ANDIF (GET_H_V32_V32 (), CPU (h_cbit
));
9852 CPU (h_cbit
) = opval
;
9853 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9856 BI opval
= LTDI (tmp_tmpr
, 0);
9857 CPU (h_nbit
) = opval
;
9858 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9861 BI opval
= ANDIF (EQDI (tmp_tmpr
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9862 CPU (h_zbit
) = opval
;
9863 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9866 BI opval
= NEDI (tmp_tmpr
, ZEXTSIDI (TRUNCDISI (tmp_tmpr
)));
9867 CPU (h_vbit
) = opval
;
9868 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9873 CPU (h_xbit
) = opval
;
9874 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9878 SET_H_INSN_PREFIXED_P (opval
);
9879 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9889 CASE (sem
, INSN_MCP
) : /* mcp $Ps,$Rd */
9891 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9892 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9893 #define FLD(f) abuf->fields.sfmt_mcp.f
9894 int UNUSED written
= 0;
9895 IADDR UNUSED pc
= abuf
->addr
;
9896 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9906 tmp_tmpops
= GET_H_SR (FLD (f_operand2
));
9907 tmp_tmpopd
= GET_H_GR (FLD (f_operand1
));
9908 tmp_carry
= CPU (h_rbit
);
9909 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
9911 SI opval
= tmp_newval
;
9912 SET_H_GR (FLD (f_operand1
), opval
);
9913 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9917 BI opval
= ORIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), ORIF (ANDIF (LTSI (tmp_tmpopd
, 0), GESI (tmp_newval
, 0)), ANDIF (LTSI (tmp_tmpops
, 0), GESI (tmp_newval
, 0))));
9918 CPU (h_rbit
) = opval
;
9919 TRACE_RESULT (current_cpu
, abuf
, "rbit", 'x', opval
);
9922 BI opval
= LTSI (tmp_newval
, 0);
9923 CPU (h_nbit
) = opval
;
9924 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9927 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9928 CPU (h_zbit
) = opval
;
9929 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9932 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_tmpops
, 0), LTSI (tmp_tmpopd
, 0)), GESI (tmp_newval
, 0)), ANDIF (ANDIF (GESI (tmp_tmpops
, 0), GESI (tmp_tmpopd
, 0)), LTSI (tmp_newval
, 0)));
9933 CPU (h_vbit
) = opval
;
9934 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9939 CPU (h_xbit
) = opval
;
9940 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9944 SET_H_INSN_PREFIXED_P (opval
);
9945 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9956 CASE (sem
, INSN_DSTEP
) : /* dstep $Rs,$Rd */
9958 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9959 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9960 #define FLD(f) abuf->fields.sfmt_muls_b.f
9961 int UNUSED written
= 0;
9962 IADDR UNUSED pc
= abuf
->addr
;
9963 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9969 tmp_tmps
= GET_H_GR (FLD (f_operand1
));
9970 tmp_tmp
= SLLSI (GET_H_GR (FLD (f_operand2
)), 1);
9971 tmp_tmpd
= ((GEUSI (tmp_tmp
, tmp_tmps
)) ? (SUBSI (tmp_tmp
, tmp_tmps
)) : (tmp_tmp
));
9973 SI opval
= tmp_tmpd
;
9974 SET_H_GR (FLD (f_operand2
), opval
);
9975 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9979 BI opval
= LTSI (tmp_tmpd
, 0);
9980 CPU (h_nbit
) = opval
;
9981 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9984 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
9985 CPU (h_zbit
) = opval
;
9986 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9988 SET_H_CBIT_MOVE (0);
9989 SET_H_VBIT_MOVE (0);
9993 CPU (h_xbit
) = opval
;
9994 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9998 SET_H_INSN_PREFIXED_P (opval
);
9999 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10009 CASE (sem
, INSN_ABS
) : /* abs $Rs,$Rd */
10011 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10012 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10013 #define FLD(f) abuf->fields.sfmt_muls_b.f
10014 int UNUSED written
= 0;
10015 IADDR UNUSED pc
= abuf
->addr
;
10016 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10020 tmp_tmpd
= ABSSI (GET_H_GR (FLD (f_operand1
)));
10022 SI opval
= tmp_tmpd
;
10023 SET_H_GR (FLD (f_operand2
), opval
);
10024 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10028 BI opval
= LTSI (tmp_tmpd
, 0);
10029 CPU (h_nbit
) = opval
;
10030 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10033 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10034 CPU (h_zbit
) = opval
;
10035 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10037 SET_H_CBIT_MOVE (0);
10038 SET_H_VBIT_MOVE (0);
10042 CPU (h_xbit
) = opval
;
10043 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10047 SET_H_INSN_PREFIXED_P (opval
);
10048 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10058 CASE (sem
, INSN_AND_B_R
) : /* and.b $Rs,$Rd */
10060 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10061 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10062 #define FLD(f) abuf->fields.sfmt_addc_m.f
10063 int UNUSED written
= 0;
10064 IADDR UNUSED pc
= abuf
->addr
;
10065 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10069 tmp_tmpd
= ANDQI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
10072 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
10074 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
10075 SET_H_GR (FLD (f_operand2
), opval
);
10076 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10081 BI opval
= LTQI (tmp_tmpd
, 0);
10082 CPU (h_nbit
) = opval
;
10083 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10086 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10087 CPU (h_zbit
) = opval
;
10088 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10090 SET_H_CBIT_MOVE (0);
10091 SET_H_VBIT_MOVE (0);
10095 CPU (h_xbit
) = opval
;
10096 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10100 SET_H_INSN_PREFIXED_P (opval
);
10101 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10111 CASE (sem
, INSN_AND_W_R
) : /* and.w $Rs,$Rd */
10113 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10114 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10115 #define FLD(f) abuf->fields.sfmt_addc_m.f
10116 int UNUSED written
= 0;
10117 IADDR UNUSED pc
= abuf
->addr
;
10118 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10122 tmp_tmpd
= ANDHI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
10125 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
10127 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
10128 SET_H_GR (FLD (f_operand2
), opval
);
10129 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10134 BI opval
= LTHI (tmp_tmpd
, 0);
10135 CPU (h_nbit
) = opval
;
10136 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10139 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10140 CPU (h_zbit
) = opval
;
10141 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10143 SET_H_CBIT_MOVE (0);
10144 SET_H_VBIT_MOVE (0);
10148 CPU (h_xbit
) = opval
;
10149 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10153 SET_H_INSN_PREFIXED_P (opval
);
10154 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10164 CASE (sem
, INSN_AND_D_R
) : /* and.d $Rs,$Rd */
10166 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10167 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10168 #define FLD(f) abuf->fields.sfmt_addc_m.f
10169 int UNUSED written
= 0;
10170 IADDR UNUSED pc
= abuf
->addr
;
10171 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10175 tmp_tmpd
= ANDSI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
10177 SI opval
= tmp_tmpd
;
10178 SET_H_GR (FLD (f_operand2
), opval
);
10179 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10183 BI opval
= LTSI (tmp_tmpd
, 0);
10184 CPU (h_nbit
) = opval
;
10185 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10188 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10189 CPU (h_zbit
) = opval
;
10190 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10192 SET_H_CBIT_MOVE (0);
10193 SET_H_VBIT_MOVE (0);
10197 CPU (h_xbit
) = opval
;
10198 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10202 SET_H_INSN_PREFIXED_P (opval
);
10203 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10213 CASE (sem
, INSN_AND_M_B_M
) : /* and-m.b [${Rs}${inc}],${Rd} */
10215 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10216 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10217 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
10218 int UNUSED written
= 0;
10219 IADDR UNUSED pc
= abuf
->addr
;
10220 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10224 tmp_tmpd
= ANDQI (GET_H_GR (FLD (f_operand2
)), ({ SI tmp_addr
;
10227 tmp_postinc
= FLD (f_memmode
);
10228 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
10229 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
10230 ; if (NEBI (tmp_postinc
, 0)) {
10232 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
10233 tmp_addr
= ADDSI (tmp_addr
, 1);
10236 SI opval
= tmp_addr
;
10237 SET_H_GR (FLD (f_operand1
), opval
);
10238 written
|= (1 << 11);
10239 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10243 ; tmp_tmp_mem
; }));
10246 tmp_oldregval
= GET_H_RAW_GR_ACR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
10248 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
10249 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
10250 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10255 BI opval
= LTQI (tmp_tmpd
, 0);
10256 CPU (h_nbit
) = opval
;
10257 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10260 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10261 CPU (h_zbit
) = opval
;
10262 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10264 SET_H_CBIT_MOVE (0);
10265 SET_H_VBIT_MOVE (0);
10269 CPU (h_xbit
) = opval
;
10270 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10274 SET_H_INSN_PREFIXED_P (opval
);
10275 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10281 abuf
->written
= written
;
10286 CASE (sem
, INSN_AND_M_W_M
) : /* and-m.w [${Rs}${inc}],${Rd} */
10288 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10289 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10290 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
10291 int UNUSED written
= 0;
10292 IADDR UNUSED pc
= abuf
->addr
;
10293 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10297 tmp_tmpd
= ANDHI (GET_H_GR (FLD (f_operand2
)), ({ SI tmp_addr
;
10300 tmp_postinc
= FLD (f_memmode
);
10301 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
10302 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
10303 ; if (NEBI (tmp_postinc
, 0)) {
10305 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
10306 tmp_addr
= ADDSI (tmp_addr
, 2);
10309 SI opval
= tmp_addr
;
10310 SET_H_GR (FLD (f_operand1
), opval
);
10311 written
|= (1 << 11);
10312 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10316 ; tmp_tmp_mem
; }));
10319 tmp_oldregval
= GET_H_RAW_GR_ACR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
10321 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
10322 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
10323 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10328 BI opval
= LTHI (tmp_tmpd
, 0);
10329 CPU (h_nbit
) = opval
;
10330 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10333 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10334 CPU (h_zbit
) = opval
;
10335 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10337 SET_H_CBIT_MOVE (0);
10338 SET_H_VBIT_MOVE (0);
10342 CPU (h_xbit
) = opval
;
10343 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10347 SET_H_INSN_PREFIXED_P (opval
);
10348 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10354 abuf
->written
= written
;
10359 CASE (sem
, INSN_AND_M_D_M
) : /* and-m.d [${Rs}${inc}],${Rd} */
10361 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10362 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10363 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
10364 int UNUSED written
= 0;
10365 IADDR UNUSED pc
= abuf
->addr
;
10366 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10370 tmp_tmpd
= ANDSI (GET_H_GR (FLD (f_operand2
)), ({ SI tmp_addr
;
10373 tmp_postinc
= FLD (f_memmode
);
10374 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
10375 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
10376 ; if (NEBI (tmp_postinc
, 0)) {
10378 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
10379 tmp_addr
= ADDSI (tmp_addr
, 4);
10382 SI opval
= tmp_addr
;
10383 SET_H_GR (FLD (f_operand1
), opval
);
10384 written
|= (1 << 10);
10385 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10389 ; tmp_tmp_mem
; }));
10391 SI opval
= tmp_tmpd
;
10392 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
10393 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10397 BI opval
= LTSI (tmp_tmpd
, 0);
10398 CPU (h_nbit
) = opval
;
10399 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10402 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10403 CPU (h_zbit
) = opval
;
10404 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10406 SET_H_CBIT_MOVE (0);
10407 SET_H_VBIT_MOVE (0);
10411 CPU (h_xbit
) = opval
;
10412 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10416 SET_H_INSN_PREFIXED_P (opval
);
10417 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10423 abuf
->written
= written
;
10428 CASE (sem
, INSN_ANDCBR
) : /* and.b ${sconst8}],${Rd} */
10430 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10431 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10432 #define FLD(f) abuf->fields.sfmt_addcbr.f
10433 int UNUSED written
= 0;
10434 IADDR UNUSED pc
= abuf
->addr
;
10435 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
10439 tmp_tmpd
= ANDQI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__byte
));
10442 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
10444 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
10445 SET_H_GR (FLD (f_operand2
), opval
);
10446 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10451 BI opval
= LTQI (tmp_tmpd
, 0);
10452 CPU (h_nbit
) = opval
;
10453 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10456 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10457 CPU (h_zbit
) = opval
;
10458 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10460 SET_H_CBIT_MOVE (0);
10461 SET_H_VBIT_MOVE (0);
10465 CPU (h_xbit
) = opval
;
10466 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10470 SET_H_INSN_PREFIXED_P (opval
);
10471 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10481 CASE (sem
, INSN_ANDCWR
) : /* and.w ${sconst16}],${Rd} */
10483 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10484 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10485 #define FLD(f) abuf->fields.sfmt_addcwr.f
10486 int UNUSED written
= 0;
10487 IADDR UNUSED pc
= abuf
->addr
;
10488 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
10492 tmp_tmpd
= ANDHI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__word
));
10495 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
10497 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
10498 SET_H_GR (FLD (f_operand2
), opval
);
10499 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10504 BI opval
= LTHI (tmp_tmpd
, 0);
10505 CPU (h_nbit
) = opval
;
10506 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10509 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10510 CPU (h_zbit
) = opval
;
10511 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10513 SET_H_CBIT_MOVE (0);
10514 SET_H_VBIT_MOVE (0);
10518 CPU (h_xbit
) = opval
;
10519 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10523 SET_H_INSN_PREFIXED_P (opval
);
10524 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10534 CASE (sem
, INSN_ANDCDR
) : /* and.d ${const32}],${Rd} */
10536 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10537 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10538 #define FLD(f) abuf->fields.sfmt_addcdr.f
10539 int UNUSED written
= 0;
10540 IADDR UNUSED pc
= abuf
->addr
;
10541 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
10545 tmp_tmpd
= ANDSI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__dword
));
10547 SI opval
= tmp_tmpd
;
10548 SET_H_GR (FLD (f_operand2
), opval
);
10549 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10553 BI opval
= LTSI (tmp_tmpd
, 0);
10554 CPU (h_nbit
) = opval
;
10555 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10558 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10559 CPU (h_zbit
) = opval
;
10560 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10562 SET_H_CBIT_MOVE (0);
10563 SET_H_VBIT_MOVE (0);
10567 CPU (h_xbit
) = opval
;
10568 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10572 SET_H_INSN_PREFIXED_P (opval
);
10573 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10583 CASE (sem
, INSN_ANDQ
) : /* andq $i,$Rd */
10585 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10586 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10587 #define FLD(f) abuf->fields.sfmt_andq.f
10588 int UNUSED written
= 0;
10589 IADDR UNUSED pc
= abuf
->addr
;
10590 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10594 tmp_tmpd
= ANDSI (GET_H_GR (FLD (f_operand2
)), FLD (f_s6
));
10596 SI opval
= tmp_tmpd
;
10597 SET_H_GR (FLD (f_operand2
), opval
);
10598 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10602 BI opval
= LTSI (tmp_tmpd
, 0);
10603 CPU (h_nbit
) = opval
;
10604 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10607 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10608 CPU (h_zbit
) = opval
;
10609 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10611 SET_H_CBIT_MOVE (0);
10612 SET_H_VBIT_MOVE (0);
10616 CPU (h_xbit
) = opval
;
10617 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10621 SET_H_INSN_PREFIXED_P (opval
);
10622 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10632 CASE (sem
, INSN_ORR_B_R
) : /* orr.b $Rs,$Rd */
10634 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10635 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10636 #define FLD(f) abuf->fields.sfmt_addc_m.f
10637 int UNUSED written
= 0;
10638 IADDR UNUSED pc
= abuf
->addr
;
10639 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10643 tmp_tmpd
= ORQI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
10646 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
10648 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
10649 SET_H_GR (FLD (f_operand2
), opval
);
10650 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10655 BI opval
= LTQI (tmp_tmpd
, 0);
10656 CPU (h_nbit
) = opval
;
10657 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10660 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10661 CPU (h_zbit
) = opval
;
10662 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10664 SET_H_CBIT_MOVE (0);
10665 SET_H_VBIT_MOVE (0);
10669 CPU (h_xbit
) = opval
;
10670 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10674 SET_H_INSN_PREFIXED_P (opval
);
10675 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10685 CASE (sem
, INSN_ORR_W_R
) : /* orr.w $Rs,$Rd */
10687 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10688 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10689 #define FLD(f) abuf->fields.sfmt_addc_m.f
10690 int UNUSED written
= 0;
10691 IADDR UNUSED pc
= abuf
->addr
;
10692 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10696 tmp_tmpd
= ORHI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
10699 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
10701 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
10702 SET_H_GR (FLD (f_operand2
), opval
);
10703 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10708 BI opval
= LTHI (tmp_tmpd
, 0);
10709 CPU (h_nbit
) = opval
;
10710 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10713 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10714 CPU (h_zbit
) = opval
;
10715 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10717 SET_H_CBIT_MOVE (0);
10718 SET_H_VBIT_MOVE (0);
10722 CPU (h_xbit
) = opval
;
10723 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10727 SET_H_INSN_PREFIXED_P (opval
);
10728 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10738 CASE (sem
, INSN_ORR_D_R
) : /* orr.d $Rs,$Rd */
10740 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10741 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10742 #define FLD(f) abuf->fields.sfmt_addc_m.f
10743 int UNUSED written
= 0;
10744 IADDR UNUSED pc
= abuf
->addr
;
10745 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10749 tmp_tmpd
= ORSI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
10751 SI opval
= tmp_tmpd
;
10752 SET_H_GR (FLD (f_operand2
), opval
);
10753 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10757 BI opval
= LTSI (tmp_tmpd
, 0);
10758 CPU (h_nbit
) = opval
;
10759 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10762 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10763 CPU (h_zbit
) = opval
;
10764 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10766 SET_H_CBIT_MOVE (0);
10767 SET_H_VBIT_MOVE (0);
10771 CPU (h_xbit
) = opval
;
10772 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10776 SET_H_INSN_PREFIXED_P (opval
);
10777 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10787 CASE (sem
, INSN_OR_M_B_M
) : /* or-m.b [${Rs}${inc}],${Rd} */
10789 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10790 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10791 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
10792 int UNUSED written
= 0;
10793 IADDR UNUSED pc
= abuf
->addr
;
10794 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10798 tmp_tmpd
= ORQI (GET_H_GR (FLD (f_operand2
)), ({ SI tmp_addr
;
10801 tmp_postinc
= FLD (f_memmode
);
10802 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
10803 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
10804 ; if (NEBI (tmp_postinc
, 0)) {
10806 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
10807 tmp_addr
= ADDSI (tmp_addr
, 1);
10810 SI opval
= tmp_addr
;
10811 SET_H_GR (FLD (f_operand1
), opval
);
10812 written
|= (1 << 11);
10813 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10817 ; tmp_tmp_mem
; }));
10820 tmp_oldregval
= GET_H_RAW_GR_ACR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
10822 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
10823 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
10824 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10829 BI opval
= LTQI (tmp_tmpd
, 0);
10830 CPU (h_nbit
) = opval
;
10831 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10834 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10835 CPU (h_zbit
) = opval
;
10836 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10838 SET_H_CBIT_MOVE (0);
10839 SET_H_VBIT_MOVE (0);
10843 CPU (h_xbit
) = opval
;
10844 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10848 SET_H_INSN_PREFIXED_P (opval
);
10849 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10855 abuf
->written
= written
;
10860 CASE (sem
, INSN_OR_M_W_M
) : /* or-m.w [${Rs}${inc}],${Rd} */
10862 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10863 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10864 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
10865 int UNUSED written
= 0;
10866 IADDR UNUSED pc
= abuf
->addr
;
10867 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10871 tmp_tmpd
= ORHI (GET_H_GR (FLD (f_operand2
)), ({ SI tmp_addr
;
10874 tmp_postinc
= FLD (f_memmode
);
10875 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
10876 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
10877 ; if (NEBI (tmp_postinc
, 0)) {
10879 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
10880 tmp_addr
= ADDSI (tmp_addr
, 2);
10883 SI opval
= tmp_addr
;
10884 SET_H_GR (FLD (f_operand1
), opval
);
10885 written
|= (1 << 11);
10886 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10890 ; tmp_tmp_mem
; }));
10893 tmp_oldregval
= GET_H_RAW_GR_ACR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
10895 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
10896 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
10897 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10902 BI opval
= LTHI (tmp_tmpd
, 0);
10903 CPU (h_nbit
) = opval
;
10904 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10907 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10908 CPU (h_zbit
) = opval
;
10909 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10911 SET_H_CBIT_MOVE (0);
10912 SET_H_VBIT_MOVE (0);
10916 CPU (h_xbit
) = opval
;
10917 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10921 SET_H_INSN_PREFIXED_P (opval
);
10922 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10928 abuf
->written
= written
;
10933 CASE (sem
, INSN_OR_M_D_M
) : /* or-m.d [${Rs}${inc}],${Rd} */
10935 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10936 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10937 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
10938 int UNUSED written
= 0;
10939 IADDR UNUSED pc
= abuf
->addr
;
10940 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10944 tmp_tmpd
= ORSI (GET_H_GR (FLD (f_operand2
)), ({ SI tmp_addr
;
10947 tmp_postinc
= FLD (f_memmode
);
10948 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
10949 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
10950 ; if (NEBI (tmp_postinc
, 0)) {
10952 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
10953 tmp_addr
= ADDSI (tmp_addr
, 4);
10956 SI opval
= tmp_addr
;
10957 SET_H_GR (FLD (f_operand1
), opval
);
10958 written
|= (1 << 10);
10959 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10963 ; tmp_tmp_mem
; }));
10965 SI opval
= tmp_tmpd
;
10966 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
10967 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10971 BI opval
= LTSI (tmp_tmpd
, 0);
10972 CPU (h_nbit
) = opval
;
10973 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10976 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10977 CPU (h_zbit
) = opval
;
10978 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10980 SET_H_CBIT_MOVE (0);
10981 SET_H_VBIT_MOVE (0);
10985 CPU (h_xbit
) = opval
;
10986 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10990 SET_H_INSN_PREFIXED_P (opval
);
10991 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10997 abuf
->written
= written
;
11002 CASE (sem
, INSN_ORCBR
) : /* or.b ${sconst8}],${Rd} */
11004 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11005 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11006 #define FLD(f) abuf->fields.sfmt_addcbr.f
11007 int UNUSED written
= 0;
11008 IADDR UNUSED pc
= abuf
->addr
;
11009 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
11013 tmp_tmpd
= ORQI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__byte
));
11016 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
11018 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
11019 SET_H_GR (FLD (f_operand2
), opval
);
11020 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11025 BI opval
= LTQI (tmp_tmpd
, 0);
11026 CPU (h_nbit
) = opval
;
11027 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11030 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11031 CPU (h_zbit
) = opval
;
11032 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11034 SET_H_CBIT_MOVE (0);
11035 SET_H_VBIT_MOVE (0);
11039 CPU (h_xbit
) = opval
;
11040 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11044 SET_H_INSN_PREFIXED_P (opval
);
11045 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11055 CASE (sem
, INSN_ORCWR
) : /* or.w ${sconst16}],${Rd} */
11057 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11058 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11059 #define FLD(f) abuf->fields.sfmt_addcwr.f
11060 int UNUSED written
= 0;
11061 IADDR UNUSED pc
= abuf
->addr
;
11062 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
11066 tmp_tmpd
= ORHI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__word
));
11069 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
11071 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
11072 SET_H_GR (FLD (f_operand2
), opval
);
11073 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11078 BI opval
= LTHI (tmp_tmpd
, 0);
11079 CPU (h_nbit
) = opval
;
11080 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11083 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11084 CPU (h_zbit
) = opval
;
11085 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11087 SET_H_CBIT_MOVE (0);
11088 SET_H_VBIT_MOVE (0);
11092 CPU (h_xbit
) = opval
;
11093 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11097 SET_H_INSN_PREFIXED_P (opval
);
11098 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11108 CASE (sem
, INSN_ORCDR
) : /* or.d ${const32}],${Rd} */
11110 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11111 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11112 #define FLD(f) abuf->fields.sfmt_addcdr.f
11113 int UNUSED written
= 0;
11114 IADDR UNUSED pc
= abuf
->addr
;
11115 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
11119 tmp_tmpd
= ORSI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__dword
));
11121 SI opval
= tmp_tmpd
;
11122 SET_H_GR (FLD (f_operand2
), opval
);
11123 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11127 BI opval
= LTSI (tmp_tmpd
, 0);
11128 CPU (h_nbit
) = opval
;
11129 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11132 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11133 CPU (h_zbit
) = opval
;
11134 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11136 SET_H_CBIT_MOVE (0);
11137 SET_H_VBIT_MOVE (0);
11141 CPU (h_xbit
) = opval
;
11142 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11146 SET_H_INSN_PREFIXED_P (opval
);
11147 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11157 CASE (sem
, INSN_ORQ
) : /* orq $i,$Rd */
11159 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11160 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11161 #define FLD(f) abuf->fields.sfmt_andq.f
11162 int UNUSED written
= 0;
11163 IADDR UNUSED pc
= abuf
->addr
;
11164 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11168 tmp_tmpd
= ORSI (GET_H_GR (FLD (f_operand2
)), FLD (f_s6
));
11170 SI opval
= tmp_tmpd
;
11171 SET_H_GR (FLD (f_operand2
), opval
);
11172 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11176 BI opval
= LTSI (tmp_tmpd
, 0);
11177 CPU (h_nbit
) = opval
;
11178 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11181 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11182 CPU (h_zbit
) = opval
;
11183 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11185 SET_H_CBIT_MOVE (0);
11186 SET_H_VBIT_MOVE (0);
11190 CPU (h_xbit
) = opval
;
11191 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11195 SET_H_INSN_PREFIXED_P (opval
);
11196 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11206 CASE (sem
, INSN_XOR
) : /* xor $Rs,$Rd */
11208 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11209 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11210 #define FLD(f) abuf->fields.sfmt_muls_b.f
11211 int UNUSED written
= 0;
11212 IADDR UNUSED pc
= abuf
->addr
;
11213 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11217 tmp_tmpd
= XORSI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
11219 SI opval
= tmp_tmpd
;
11220 SET_H_GR (FLD (f_operand2
), opval
);
11221 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11225 BI opval
= LTSI (tmp_tmpd
, 0);
11226 CPU (h_nbit
) = opval
;
11227 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11230 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11231 CPU (h_zbit
) = opval
;
11232 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11234 SET_H_CBIT_MOVE (0);
11235 SET_H_VBIT_MOVE (0);
11239 CPU (h_xbit
) = opval
;
11240 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11244 SET_H_INSN_PREFIXED_P (opval
);
11245 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11255 CASE (sem
, INSN_SWAP
) : /* swap${swapoption} ${Rs} */
11257 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11258 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11259 #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
11260 int UNUSED written
= 0;
11261 IADDR UNUSED pc
= abuf
->addr
;
11262 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11267 tmp_tmps
= GET_H_GR (FLD (f_operand1
));
11268 tmp_tmpd
= ({ SI tmp_tmpcode
;
11271 tmp_tmpcode
= FLD (f_operand2
);
11272 ; tmp_tmpval
= tmp_tmps
;
11273 ; if (EQSI (tmp_tmpcode
, 0)) {
11274 tmp_tmpres
= (cgen_rtx_error (current_cpu
, "SWAP without swap modifier isn't implemented"), 0);
11276 else if (EQSI (tmp_tmpcode
, 1)) {
11277 tmp_tmpres
= ({ SI tmp_tmpr
;
11278 tmp_tmpr
= tmp_tmpval
;
11279 ; ORSI (SLLSI (ANDSI (tmp_tmpr
, 16843009), 7), ORSI (SLLSI (ANDSI (tmp_tmpr
, 33686018), 5), ORSI (SLLSI (ANDSI (tmp_tmpr
, 67372036), 3), ORSI (SLLSI (ANDSI (tmp_tmpr
, 134744072), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 269488144), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 538976288), 3), ORSI (SRLSI (ANDSI (tmp_tmpr
, 1077952576), 5), SRLSI (ANDSI (tmp_tmpr
, 0x80808080), 7)))))))); });
11281 else if (EQSI (tmp_tmpcode
, 2)) {
11282 tmp_tmpres
= ({ SI tmp_tmpb
;
11283 tmp_tmpb
= tmp_tmpval
;
11284 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11286 else if (EQSI (tmp_tmpcode
, 3)) {
11287 tmp_tmpres
= ({ SI tmp_tmpr
;
11288 tmp_tmpr
= ({ SI tmp_tmpb
;
11289 tmp_tmpb
= tmp_tmpval
;
11290 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11291 ; ORSI (SLLSI (ANDSI (tmp_tmpr
, 16843009), 7), ORSI (SLLSI (ANDSI (tmp_tmpr
, 33686018), 5), ORSI (SLLSI (ANDSI (tmp_tmpr
, 67372036), 3), ORSI (SLLSI (ANDSI (tmp_tmpr
, 134744072), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 269488144), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 538976288), 3), ORSI (SRLSI (ANDSI (tmp_tmpr
, 1077952576), 5), SRLSI (ANDSI (tmp_tmpr
, 0x80808080), 7)))))))); });
11293 else if (EQSI (tmp_tmpcode
, 4)) {
11294 tmp_tmpres
= ({ SI tmp_tmpb
;
11295 tmp_tmpb
= tmp_tmpval
;
11296 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11298 else if (EQSI (tmp_tmpcode
, 5)) {
11299 tmp_tmpres
= ({ SI tmp_tmpr
;
11300 tmp_tmpr
= ({ SI tmp_tmpb
;
11301 tmp_tmpb
= tmp_tmpval
;
11302 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11303 ; ORSI (SLLSI (ANDSI (tmp_tmpr
, 16843009), 7), ORSI (SLLSI (ANDSI (tmp_tmpr
, 33686018), 5), ORSI (SLLSI (ANDSI (tmp_tmpr
, 67372036), 3), ORSI (SLLSI (ANDSI (tmp_tmpr
, 134744072), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 269488144), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 538976288), 3), ORSI (SRLSI (ANDSI (tmp_tmpr
, 1077952576), 5), SRLSI (ANDSI (tmp_tmpr
, 0x80808080), 7)))))))); });
11305 else if (EQSI (tmp_tmpcode
, 6)) {
11306 tmp_tmpres
= ({ SI tmp_tmpb
;
11307 tmp_tmpb
= ({ SI tmp_tmpb
;
11308 tmp_tmpb
= tmp_tmpval
;
11309 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11310 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11312 else if (EQSI (tmp_tmpcode
, 7)) {
11313 tmp_tmpres
= ({ SI tmp_tmpr
;
11314 tmp_tmpr
= ({ SI tmp_tmpb
;
11315 tmp_tmpb
= ({ SI tmp_tmpb
;
11316 tmp_tmpb
= tmp_tmpval
;
11317 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11318 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11319 ; ORSI (SLLSI (ANDSI (tmp_tmpr
, 16843009), 7), ORSI (SLLSI (ANDSI (tmp_tmpr
, 33686018), 5), ORSI (SLLSI (ANDSI (tmp_tmpr
, 67372036), 3), ORSI (SLLSI (ANDSI (tmp_tmpr
, 134744072), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 269488144), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 538976288), 3), ORSI (SRLSI (ANDSI (tmp_tmpr
, 1077952576), 5), SRLSI (ANDSI (tmp_tmpr
, 0x80808080), 7)))))))); });
11321 else if (EQSI (tmp_tmpcode
, 8)) {
11322 tmp_tmpres
= INVSI (tmp_tmpval
);
11324 else if (EQSI (tmp_tmpcode
, 9)) {
11325 tmp_tmpres
= ({ SI tmp_tmpr
;
11326 tmp_tmpr
= INVSI (tmp_tmpval
);
11327 ; ORSI (SLLSI (ANDSI (tmp_tmpr
, 16843009), 7), ORSI (SLLSI (ANDSI (tmp_tmpr
, 33686018), 5), ORSI (SLLSI (ANDSI (tmp_tmpr
, 67372036), 3), ORSI (SLLSI (ANDSI (tmp_tmpr
, 134744072), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 269488144), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 538976288), 3), ORSI (SRLSI (ANDSI (tmp_tmpr
, 1077952576), 5), SRLSI (ANDSI (tmp_tmpr
, 0x80808080), 7)))))))); });
11329 else if (EQSI (tmp_tmpcode
, 10)) {
11330 tmp_tmpres
= ({ SI tmp_tmpb
;
11331 tmp_tmpb
= INVSI (tmp_tmpval
);
11332 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11334 else if (EQSI (tmp_tmpcode
, 11)) {
11335 tmp_tmpres
= ({ SI tmp_tmpr
;
11336 tmp_tmpr
= ({ SI tmp_tmpb
;
11337 tmp_tmpb
= INVSI (tmp_tmpval
);
11338 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11339 ; ORSI (SLLSI (ANDSI (tmp_tmpr
, 16843009), 7), ORSI (SLLSI (ANDSI (tmp_tmpr
, 33686018), 5), ORSI (SLLSI (ANDSI (tmp_tmpr
, 67372036), 3), ORSI (SLLSI (ANDSI (tmp_tmpr
, 134744072), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 269488144), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 538976288), 3), ORSI (SRLSI (ANDSI (tmp_tmpr
, 1077952576), 5), SRLSI (ANDSI (tmp_tmpr
, 0x80808080), 7)))))))); });
11341 else if (EQSI (tmp_tmpcode
, 12)) {
11342 tmp_tmpres
= ({ SI tmp_tmpb
;
11343 tmp_tmpb
= INVSI (tmp_tmpval
);
11344 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11346 else if (EQSI (tmp_tmpcode
, 13)) {
11347 tmp_tmpres
= ({ SI tmp_tmpr
;
11348 tmp_tmpr
= ({ SI tmp_tmpb
;
11349 tmp_tmpb
= INVSI (tmp_tmpval
);
11350 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11351 ; ORSI (SLLSI (ANDSI (tmp_tmpr
, 16843009), 7), ORSI (SLLSI (ANDSI (tmp_tmpr
, 33686018), 5), ORSI (SLLSI (ANDSI (tmp_tmpr
, 67372036), 3), ORSI (SLLSI (ANDSI (tmp_tmpr
, 134744072), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 269488144), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 538976288), 3), ORSI (SRLSI (ANDSI (tmp_tmpr
, 1077952576), 5), SRLSI (ANDSI (tmp_tmpr
, 0x80808080), 7)))))))); });
11353 else if (EQSI (tmp_tmpcode
, 14)) {
11354 tmp_tmpres
= ({ SI tmp_tmpb
;
11355 tmp_tmpb
= ({ SI tmp_tmpb
;
11356 tmp_tmpb
= INVSI (tmp_tmpval
);
11357 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11358 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11360 else if (EQSI (tmp_tmpcode
, 15)) {
11361 tmp_tmpres
= ({ SI tmp_tmpr
;
11362 tmp_tmpr
= ({ SI tmp_tmpb
;
11363 tmp_tmpb
= ({ SI tmp_tmpb
;
11364 tmp_tmpb
= INVSI (tmp_tmpval
);
11365 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11366 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11367 ; ORSI (SLLSI (ANDSI (tmp_tmpr
, 16843009), 7), ORSI (SLLSI (ANDSI (tmp_tmpr
, 33686018), 5), ORSI (SLLSI (ANDSI (tmp_tmpr
, 67372036), 3), ORSI (SLLSI (ANDSI (tmp_tmpr
, 134744072), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 269488144), 1), ORSI (SRLSI (ANDSI (tmp_tmpr
, 538976288), 3), ORSI (SRLSI (ANDSI (tmp_tmpr
, 1077952576), 5), SRLSI (ANDSI (tmp_tmpr
, 0x80808080), 7)))))))); });
11371 SI opval
= tmp_tmpd
;
11372 SET_H_GR (FLD (f_operand1
), opval
);
11373 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11377 BI opval
= LTSI (tmp_tmpd
, 0);
11378 CPU (h_nbit
) = opval
;
11379 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11382 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11383 CPU (h_zbit
) = opval
;
11384 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11386 SET_H_CBIT_MOVE (0);
11387 SET_H_VBIT_MOVE (0);
11391 CPU (h_xbit
) = opval
;
11392 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11396 SET_H_INSN_PREFIXED_P (opval
);
11397 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11407 CASE (sem
, INSN_ASRR_B_R
) : /* asrr.b $Rs,$Rd */
11409 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11410 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11411 #define FLD(f) abuf->fields.sfmt_addc_m.f
11412 int UNUSED written
= 0;
11413 IADDR UNUSED pc
= abuf
->addr
;
11414 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11420 tmp_cnt1
= GET_H_GR (FLD (f_operand1
));
11421 tmp_cnt2
= ((NESI (ANDSI (tmp_cnt1
, 32), 0)) ? (31) : (ANDSI (tmp_cnt1
, 31)));
11422 tmp_tmpd
= SRASI (EXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand2
)))), tmp_cnt2
);
11425 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
11427 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
11428 SET_H_GR (FLD (f_operand2
), opval
);
11429 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11434 BI opval
= LTQI (tmp_tmpd
, 0);
11435 CPU (h_nbit
) = opval
;
11436 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11439 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11440 CPU (h_zbit
) = opval
;
11441 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11443 SET_H_CBIT_MOVE (0);
11444 SET_H_VBIT_MOVE (0);
11448 CPU (h_xbit
) = opval
;
11449 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11453 SET_H_INSN_PREFIXED_P (opval
);
11454 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11464 CASE (sem
, INSN_ASRR_W_R
) : /* asrr.w $Rs,$Rd */
11466 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11467 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11468 #define FLD(f) abuf->fields.sfmt_addc_m.f
11469 int UNUSED written
= 0;
11470 IADDR UNUSED pc
= abuf
->addr
;
11471 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11477 tmp_cnt1
= GET_H_GR (FLD (f_operand1
));
11478 tmp_cnt2
= ((NESI (ANDSI (tmp_cnt1
, 32), 0)) ? (31) : (ANDSI (tmp_cnt1
, 31)));
11479 tmp_tmpd
= SRASI (EXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand2
)))), tmp_cnt2
);
11482 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
11484 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
11485 SET_H_GR (FLD (f_operand2
), opval
);
11486 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11491 BI opval
= LTHI (tmp_tmpd
, 0);
11492 CPU (h_nbit
) = opval
;
11493 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11496 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11497 CPU (h_zbit
) = opval
;
11498 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11500 SET_H_CBIT_MOVE (0);
11501 SET_H_VBIT_MOVE (0);
11505 CPU (h_xbit
) = opval
;
11506 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11510 SET_H_INSN_PREFIXED_P (opval
);
11511 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11521 CASE (sem
, INSN_ASRR_D_R
) : /* asrr.d $Rs,$Rd */
11523 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11524 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11525 #define FLD(f) abuf->fields.sfmt_addc_m.f
11526 int UNUSED written
= 0;
11527 IADDR UNUSED pc
= abuf
->addr
;
11528 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11534 tmp_cnt1
= GET_H_GR (FLD (f_operand1
));
11535 tmp_cnt2
= ((NESI (ANDSI (tmp_cnt1
, 32), 0)) ? (31) : (ANDSI (tmp_cnt1
, 31)));
11536 tmp_tmpd
= SRASI (EXTSISI (TRUNCSISI (GET_H_GR (FLD (f_operand2
)))), tmp_cnt2
);
11538 SI opval
= tmp_tmpd
;
11539 SET_H_GR (FLD (f_operand2
), opval
);
11540 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11544 BI opval
= LTSI (tmp_tmpd
, 0);
11545 CPU (h_nbit
) = opval
;
11546 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11549 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11550 CPU (h_zbit
) = opval
;
11551 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11553 SET_H_CBIT_MOVE (0);
11554 SET_H_VBIT_MOVE (0);
11558 CPU (h_xbit
) = opval
;
11559 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11563 SET_H_INSN_PREFIXED_P (opval
);
11564 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11574 CASE (sem
, INSN_ASRQ
) : /* asrq $c,${Rd} */
11576 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11577 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11578 #define FLD(f) abuf->fields.sfmt_asrq.f
11579 int UNUSED written
= 0;
11580 IADDR UNUSED pc
= abuf
->addr
;
11581 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11585 tmp_tmpd
= SRASI (GET_H_GR (FLD (f_operand2
)), FLD (f_u5
));
11587 SI opval
= tmp_tmpd
;
11588 SET_H_GR (FLD (f_operand2
), opval
);
11589 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11593 BI opval
= LTSI (tmp_tmpd
, 0);
11594 CPU (h_nbit
) = opval
;
11595 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11598 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11599 CPU (h_zbit
) = opval
;
11600 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11602 SET_H_CBIT_MOVE (0);
11603 SET_H_VBIT_MOVE (0);
11607 CPU (h_xbit
) = opval
;
11608 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11612 SET_H_INSN_PREFIXED_P (opval
);
11613 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11623 CASE (sem
, INSN_LSRR_B_R
) : /* lsrr.b $Rs,$Rd */
11625 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11626 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11627 #define FLD(f) abuf->fields.sfmt_addc_m.f
11628 int UNUSED written
= 0;
11629 IADDR UNUSED pc
= abuf
->addr
;
11630 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11635 tmp_cnt
= ANDSI (GET_H_GR (FLD (f_operand1
)), 63);
11636 tmp_tmpd
= ((NESI (ANDSI (tmp_cnt
, 32), 0)) ? (0) : (SRLSI (ZEXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand2
)))), ANDSI (tmp_cnt
, 31))));
11639 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
11641 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
11642 SET_H_GR (FLD (f_operand2
), opval
);
11643 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11648 BI opval
= LTQI (tmp_tmpd
, 0);
11649 CPU (h_nbit
) = opval
;
11650 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11653 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11654 CPU (h_zbit
) = opval
;
11655 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11657 SET_H_CBIT_MOVE (0);
11658 SET_H_VBIT_MOVE (0);
11662 CPU (h_xbit
) = opval
;
11663 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11667 SET_H_INSN_PREFIXED_P (opval
);
11668 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11678 CASE (sem
, INSN_LSRR_W_R
) : /* lsrr.w $Rs,$Rd */
11680 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11681 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11682 #define FLD(f) abuf->fields.sfmt_addc_m.f
11683 int UNUSED written
= 0;
11684 IADDR UNUSED pc
= abuf
->addr
;
11685 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11690 tmp_cnt
= ANDSI (GET_H_GR (FLD (f_operand1
)), 63);
11691 tmp_tmpd
= ((NESI (ANDSI (tmp_cnt
, 32), 0)) ? (0) : (SRLSI (ZEXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand2
)))), ANDSI (tmp_cnt
, 31))));
11694 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
11696 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
11697 SET_H_GR (FLD (f_operand2
), opval
);
11698 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11703 BI opval
= LTHI (tmp_tmpd
, 0);
11704 CPU (h_nbit
) = opval
;
11705 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11708 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11709 CPU (h_zbit
) = opval
;
11710 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11712 SET_H_CBIT_MOVE (0);
11713 SET_H_VBIT_MOVE (0);
11717 CPU (h_xbit
) = opval
;
11718 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11722 SET_H_INSN_PREFIXED_P (opval
);
11723 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11733 CASE (sem
, INSN_LSRR_D_R
) : /* lsrr.d $Rs,$Rd */
11735 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11736 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11737 #define FLD(f) abuf->fields.sfmt_addc_m.f
11738 int UNUSED written
= 0;
11739 IADDR UNUSED pc
= abuf
->addr
;
11740 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11745 tmp_cnt
= ANDSI (GET_H_GR (FLD (f_operand1
)), 63);
11746 tmp_tmpd
= ((NESI (ANDSI (tmp_cnt
, 32), 0)) ? (0) : (SRLSI (ZEXTSISI (TRUNCSISI (GET_H_GR (FLD (f_operand2
)))), ANDSI (tmp_cnt
, 31))));
11748 SI opval
= tmp_tmpd
;
11749 SET_H_GR (FLD (f_operand2
), opval
);
11750 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11754 BI opval
= LTSI (tmp_tmpd
, 0);
11755 CPU (h_nbit
) = opval
;
11756 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11759 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11760 CPU (h_zbit
) = opval
;
11761 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11763 SET_H_CBIT_MOVE (0);
11764 SET_H_VBIT_MOVE (0);
11768 CPU (h_xbit
) = opval
;
11769 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11773 SET_H_INSN_PREFIXED_P (opval
);
11774 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11784 CASE (sem
, INSN_LSRQ
) : /* lsrq $c,${Rd} */
11786 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11787 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11788 #define FLD(f) abuf->fields.sfmt_asrq.f
11789 int UNUSED written
= 0;
11790 IADDR UNUSED pc
= abuf
->addr
;
11791 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11795 tmp_tmpd
= SRLSI (GET_H_GR (FLD (f_operand2
)), FLD (f_u5
));
11797 SI opval
= tmp_tmpd
;
11798 SET_H_GR (FLD (f_operand2
), opval
);
11799 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11803 BI opval
= LTSI (tmp_tmpd
, 0);
11804 CPU (h_nbit
) = opval
;
11805 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11808 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11809 CPU (h_zbit
) = opval
;
11810 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11812 SET_H_CBIT_MOVE (0);
11813 SET_H_VBIT_MOVE (0);
11817 CPU (h_xbit
) = opval
;
11818 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11822 SET_H_INSN_PREFIXED_P (opval
);
11823 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11833 CASE (sem
, INSN_LSLR_B_R
) : /* lslr.b $Rs,$Rd */
11835 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11836 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11837 #define FLD(f) abuf->fields.sfmt_addc_m.f
11838 int UNUSED written
= 0;
11839 IADDR UNUSED pc
= abuf
->addr
;
11840 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11845 tmp_cnt
= ANDSI (GET_H_GR (FLD (f_operand1
)), 63);
11846 tmp_tmpd
= ((NESI (ANDSI (tmp_cnt
, 32), 0)) ? (0) : (SLLSI (ZEXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand2
)))), ANDSI (tmp_cnt
, 31))));
11849 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
11851 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
11852 SET_H_GR (FLD (f_operand2
), opval
);
11853 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11858 BI opval
= LTQI (tmp_tmpd
, 0);
11859 CPU (h_nbit
) = opval
;
11860 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11863 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11864 CPU (h_zbit
) = opval
;
11865 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11867 SET_H_CBIT_MOVE (0);
11868 SET_H_VBIT_MOVE (0);
11872 CPU (h_xbit
) = opval
;
11873 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11877 SET_H_INSN_PREFIXED_P (opval
);
11878 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11888 CASE (sem
, INSN_LSLR_W_R
) : /* lslr.w $Rs,$Rd */
11890 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11891 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11892 #define FLD(f) abuf->fields.sfmt_addc_m.f
11893 int UNUSED written
= 0;
11894 IADDR UNUSED pc
= abuf
->addr
;
11895 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11900 tmp_cnt
= ANDSI (GET_H_GR (FLD (f_operand1
)), 63);
11901 tmp_tmpd
= ((NESI (ANDSI (tmp_cnt
, 32), 0)) ? (0) : (SLLSI (ZEXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand2
)))), ANDSI (tmp_cnt
, 31))));
11904 tmp_oldregval
= GET_H_RAW_GR_ACR (FLD (f_operand2
));
11906 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
11907 SET_H_GR (FLD (f_operand2
), opval
);
11908 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11913 BI opval
= LTHI (tmp_tmpd
, 0);
11914 CPU (h_nbit
) = opval
;
11915 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11918 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11919 CPU (h_zbit
) = opval
;
11920 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11922 SET_H_CBIT_MOVE (0);
11923 SET_H_VBIT_MOVE (0);
11927 CPU (h_xbit
) = opval
;
11928 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11932 SET_H_INSN_PREFIXED_P (opval
);
11933 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11943 CASE (sem
, INSN_LSLR_D_R
) : /* lslr.d $Rs,$Rd */
11945 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11946 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11947 #define FLD(f) abuf->fields.sfmt_addc_m.f
11948 int UNUSED written
= 0;
11949 IADDR UNUSED pc
= abuf
->addr
;
11950 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11955 tmp_cnt
= ANDSI (GET_H_GR (FLD (f_operand1
)), 63);
11956 tmp_tmpd
= ((NESI (ANDSI (tmp_cnt
, 32), 0)) ? (0) : (SLLSI (ZEXTSISI (TRUNCSISI (GET_H_GR (FLD (f_operand2
)))), ANDSI (tmp_cnt
, 31))));
11958 SI opval
= tmp_tmpd
;
11959 SET_H_GR (FLD (f_operand2
), opval
);
11960 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11964 BI opval
= LTSI (tmp_tmpd
, 0);
11965 CPU (h_nbit
) = opval
;
11966 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11969 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11970 CPU (h_zbit
) = opval
;
11971 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11973 SET_H_CBIT_MOVE (0);
11974 SET_H_VBIT_MOVE (0);
11978 CPU (h_xbit
) = opval
;
11979 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11983 SET_H_INSN_PREFIXED_P (opval
);
11984 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11994 CASE (sem
, INSN_LSLQ
) : /* lslq $c,${Rd} */
11996 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11997 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11998 #define FLD(f) abuf->fields.sfmt_asrq.f
11999 int UNUSED written
= 0;
12000 IADDR UNUSED pc
= abuf
->addr
;
12001 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12005 tmp_tmpd
= SLLSI (GET_H_GR (FLD (f_operand2
)), FLD (f_u5
));
12007 SI opval
= tmp_tmpd
;
12008 SET_H_GR (FLD (f_operand2
), opval
);
12009 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12013 BI opval
= LTSI (tmp_tmpd
, 0);
12014 CPU (h_nbit
) = opval
;
12015 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12018 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
12019 CPU (h_zbit
) = opval
;
12020 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12022 SET_H_CBIT_MOVE (0);
12023 SET_H_VBIT_MOVE (0);
12027 CPU (h_xbit
) = opval
;
12028 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12032 SET_H_INSN_PREFIXED_P (opval
);
12033 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12043 CASE (sem
, INSN_BTST
) : /* $Rs,$Rd */
12045 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12046 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12047 #define FLD(f) abuf->fields.sfmt_muls_b.f
12048 int UNUSED written
= 0;
12049 IADDR UNUSED pc
= abuf
->addr
;
12050 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12055 tmp_tmpd
= SLLSI (GET_H_GR (FLD (f_operand2
)), SUBSI (31, ANDSI (GET_H_GR (FLD (f_operand1
)), 31)));
12058 BI opval
= LTSI (tmp_tmpd
, 0);
12059 CPU (h_nbit
) = opval
;
12060 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12063 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
12064 CPU (h_zbit
) = opval
;
12065 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12067 SET_H_CBIT_MOVE (0);
12068 SET_H_VBIT_MOVE (0);
12072 CPU (h_xbit
) = opval
;
12073 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12077 SET_H_INSN_PREFIXED_P (opval
);
12078 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12088 CASE (sem
, INSN_BTSTQ
) : /* btstq $c,${Rd} */
12090 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12091 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12092 #define FLD(f) abuf->fields.sfmt_asrq.f
12093 int UNUSED written
= 0;
12094 IADDR UNUSED pc
= abuf
->addr
;
12095 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12099 tmp_tmpd
= SLLSI (GET_H_GR (FLD (f_operand2
)), SUBSI (31, FLD (f_u5
)));
12102 BI opval
= LTSI (tmp_tmpd
, 0);
12103 CPU (h_nbit
) = opval
;
12104 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12107 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
12108 CPU (h_zbit
) = opval
;
12109 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12111 SET_H_CBIT_MOVE (0);
12112 SET_H_VBIT_MOVE (0);
12116 CPU (h_xbit
) = opval
;
12117 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12121 SET_H_INSN_PREFIXED_P (opval
);
12122 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12132 CASE (sem
, INSN_SETF
) : /* setf ${list-of-flags} */
12134 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12135 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12136 #define FLD(f) abuf->fields.sfmt_setf.f
12137 int UNUSED written
= 0;
12138 IADDR UNUSED pc
= abuf
->addr
;
12139 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12143 tmp_tmp
= FLD (f_dstsrc
);
12144 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 0)), 0)) {
12147 CPU (h_cbit
) = opval
;
12148 written
|= (1 << 1);
12149 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
12152 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 1)), 0)) {
12155 CPU (h_vbit
) = opval
;
12156 written
|= (1 << 7);
12157 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
12160 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 2)), 0)) {
12163 CPU (h_zbit
) = opval
;
12164 written
|= (1 << 9);
12165 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12168 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 3)), 0)) {
12171 CPU (h_nbit
) = opval
;
12172 written
|= (1 << 3);
12173 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12176 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 4)), 0)) {
12179 CPU (h_xbit
) = opval
;
12180 written
|= (1 << 8);
12181 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12184 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 5)), 0)) {
12187 SET_H_IBIT (opval
);
12188 written
|= (1 << 2);
12189 TRACE_RESULT (current_cpu
, abuf
, "ibit", 'x', opval
);
12192 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 6)), 0)) {
12195 SET_H_UBIT (opval
);
12196 written
|= (1 << 6);
12197 TRACE_RESULT (current_cpu
, abuf
, "ubit", 'x', opval
);
12200 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 7)), 0)) {
12203 CPU (h_pbit
) = opval
;
12204 written
|= (1 << 4);
12205 TRACE_RESULT (current_cpu
, abuf
, "pbit", 'x', opval
);
12210 SET_H_INSN_PREFIXED_P (opval
);
12211 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12213 if (EQSI (ANDSI (tmp_tmp
, SLLSI (1, 4)), 0)) {
12216 CPU (h_xbit
) = opval
;
12217 written
|= (1 << 8);
12218 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12223 abuf
->written
= written
;
12228 CASE (sem
, INSN_CLEARF
) : /* clearf ${list-of-flags} */
12230 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12231 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12232 #define FLD(f) abuf->fields.sfmt_setf.f
12233 int UNUSED written
= 0;
12234 IADDR UNUSED pc
= abuf
->addr
;
12235 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12239 tmp_tmp
= FLD (f_dstsrc
);
12240 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 0)), 0)) {
12243 CPU (h_cbit
) = opval
;
12244 written
|= (1 << 1);
12245 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
12248 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 1)), 0)) {
12251 CPU (h_vbit
) = opval
;
12252 written
|= (1 << 7);
12253 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
12256 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 2)), 0)) {
12259 CPU (h_zbit
) = opval
;
12260 written
|= (1 << 9);
12261 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12264 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 3)), 0)) {
12267 CPU (h_nbit
) = opval
;
12268 written
|= (1 << 3);
12269 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12272 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 4)), 0)) {
12275 CPU (h_xbit
) = opval
;
12276 written
|= (1 << 8);
12277 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12280 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 5)), 0)) {
12283 SET_H_IBIT (opval
);
12284 written
|= (1 << 2);
12285 TRACE_RESULT (current_cpu
, abuf
, "ibit", 'x', opval
);
12288 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 6)), 0)) {
12291 SET_H_UBIT (opval
);
12292 written
|= (1 << 6);
12293 TRACE_RESULT (current_cpu
, abuf
, "ubit", 'x', opval
);
12296 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 7)), 0)) {
12299 CPU (h_pbit
) = opval
;
12300 written
|= (1 << 4);
12301 TRACE_RESULT (current_cpu
, abuf
, "pbit", 'x', opval
);
12307 CPU (h_xbit
) = opval
;
12308 written
|= (1 << 8);
12309 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12313 SET_H_INSN_PREFIXED_P (opval
);
12314 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12319 abuf
->written
= written
;
12324 CASE (sem
, INSN_RFE
) : /* rfe */
12326 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12327 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12328 #define FLD(f) abuf->fields.sfmt_rfe.f
12329 int UNUSED written
= 0;
12330 IADDR UNUSED pc
= abuf
->addr
;
12331 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12339 tmp_oldccs
= GET_H_SR (((UINT
) 13));
12340 tmp_keepmask
= 0xc0000000;
12341 tmp_samebits
= ANDSI (tmp_oldccs
, tmp_keepmask
);
12342 tmp_shiftbits
= ANDSI (SRLSI (ANDSI (tmp_oldccs
, 1073609728), 10), INVSI (tmp_keepmask
));
12343 tmp_p1
= NESI (0, ANDSI (tmp_oldccs
, 131072));
12345 SI opval
= ORSI (ORSI (tmp_samebits
, tmp_shiftbits
), ((ANDBI (CPU (h_rbit
), NOTBI (tmp_p1
))) ? (0) : (128)));
12346 SET_H_SR (((UINT
) 13), opval
);
12347 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
12355 CASE (sem
, INSN_SFE
) : /* sfe */
12357 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12358 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12359 #define FLD(f) abuf->fields.sfmt_rfe.f
12360 int UNUSED written
= 0;
12361 IADDR UNUSED pc
= abuf
->addr
;
12362 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12367 tmp_savemask
= 0xc0000000;
12368 tmp_oldccs
= GET_H_SR (((UINT
) 13));
12370 SI opval
= ORSI (ANDSI (tmp_savemask
, tmp_oldccs
), ANDSI (INVSI (tmp_savemask
), SLLSI (tmp_oldccs
, 10)));
12371 SET_H_SR (((UINT
) 13), opval
);
12372 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
12380 CASE (sem
, INSN_RFG
) : /* rfg */
12382 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12383 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12384 #define FLD(f) abuf->fields.fmt_empty.f
12385 int UNUSED written
= 0;
12386 IADDR UNUSED pc
= abuf
->addr
;
12387 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12389 crisv32f_rfg_handler (current_cpu
, pc
);
12395 CASE (sem
, INSN_RFN
) : /* rfn */
12397 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12398 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12399 #define FLD(f) abuf->fields.sfmt_rfe.f
12400 int UNUSED written
= 0;
12401 IADDR UNUSED pc
= abuf
->addr
;
12402 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12411 tmp_oldccs
= GET_H_SR (((UINT
) 13));
12412 tmp_keepmask
= 0xc0000000;
12413 tmp_samebits
= ANDSI (tmp_oldccs
, tmp_keepmask
);
12414 tmp_shiftbits
= ANDSI (SRLSI (ANDSI (tmp_oldccs
, 1073609728), 10), INVSI (tmp_keepmask
));
12415 tmp_p1
= NESI (0, ANDSI (tmp_oldccs
, 131072));
12417 SI opval
= ORSI (ORSI (tmp_samebits
, tmp_shiftbits
), ((ANDBI (CPU (h_rbit
), NOTBI (tmp_p1
))) ? (0) : (128)));
12418 SET_H_SR (((UINT
) 13), opval
);
12419 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
12424 SET_H_MBIT (opval
);
12425 TRACE_RESULT (current_cpu
, abuf
, "mbit", 'x', opval
);
12433 CASE (sem
, INSN_HALT
) : /* halt */
12435 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12436 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12437 #define FLD(f) abuf->fields.fmt_empty.f
12438 int UNUSED written
= 0;
12439 IADDR UNUSED pc
= abuf
->addr
;
12441 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12444 USI opval
= crisv32f_halt_handler (current_cpu
, pc
);
12445 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
12446 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12449 SEM_BRANCH_FINI (vpc
);
12454 CASE (sem
, INSN_BCC_B
) : /* b${cc} ${o-pcrel} */
12456 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12457 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12458 #define FLD(f) abuf->fields.sfmt_bcc_b.f
12459 int UNUSED written
= 0;
12460 IADDR UNUSED pc
= abuf
->addr
;
12462 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12466 tmp_truthval
= ({ SI tmp_tmpcond
;
12468 tmp_tmpcond
= FLD (f_operand2
);
12469 ; if (EQSI (tmp_tmpcond
, 0)) {
12470 tmp_condres
= NOTBI (CPU (h_cbit
));
12472 else if (EQSI (tmp_tmpcond
, 1)) {
12473 tmp_condres
= CPU (h_cbit
);
12475 else if (EQSI (tmp_tmpcond
, 2)) {
12476 tmp_condres
= NOTBI (CPU (h_zbit
));
12478 else if (EQSI (tmp_tmpcond
, 3)) {
12479 tmp_condres
= CPU (h_zbit
);
12481 else if (EQSI (tmp_tmpcond
, 4)) {
12482 tmp_condres
= NOTBI (CPU (h_vbit
));
12484 else if (EQSI (tmp_tmpcond
, 5)) {
12485 tmp_condres
= CPU (h_vbit
);
12487 else if (EQSI (tmp_tmpcond
, 6)) {
12488 tmp_condres
= NOTBI (CPU (h_nbit
));
12490 else if (EQSI (tmp_tmpcond
, 7)) {
12491 tmp_condres
= CPU (h_nbit
);
12493 else if (EQSI (tmp_tmpcond
, 8)) {
12494 tmp_condres
= ORBI (CPU (h_cbit
), CPU (h_zbit
));
12496 else if (EQSI (tmp_tmpcond
, 9)) {
12497 tmp_condres
= NOTBI (ORBI (CPU (h_cbit
), CPU (h_zbit
)));
12499 else if (EQSI (tmp_tmpcond
, 10)) {
12500 tmp_condres
= NOTBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)));
12502 else if (EQSI (tmp_tmpcond
, 11)) {
12503 tmp_condres
= XORBI (CPU (h_vbit
), CPU (h_nbit
));
12505 else if (EQSI (tmp_tmpcond
, 12)) {
12506 tmp_condres
= NOTBI (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
)));
12508 else if (EQSI (tmp_tmpcond
, 13)) {
12509 tmp_condres
= ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
));
12511 else if (EQSI (tmp_tmpcond
, 14)) {
12514 else if (EQSI (tmp_tmpcond
, 15)) {
12515 tmp_condres
= CPU (h_pbit
);
12518 crisv32f_branch_taken (current_cpu
, pc
, FLD (i_o_pcrel
), tmp_truthval
);
12522 CPU (h_xbit
) = opval
;
12523 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12527 SET_H_INSN_PREFIXED_P (opval
);
12528 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12531 if (tmp_truthval
) {
12534 USI opval
= FLD (i_o_pcrel
);
12535 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
12536 written
|= (1 << 8);
12537 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12543 abuf
->written
= written
;
12544 SEM_BRANCH_FINI (vpc
);
12549 CASE (sem
, INSN_BA_B
) : /* ba ${o-pcrel} */
12551 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12552 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12553 #define FLD(f) abuf->fields.sfmt_bcc_b.f
12554 int UNUSED written
= 0;
12555 IADDR UNUSED pc
= abuf
->addr
;
12557 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12563 CPU (h_xbit
) = opval
;
12564 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12568 SET_H_INSN_PREFIXED_P (opval
);
12569 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12574 USI opval
= FLD (i_o_pcrel
);
12575 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
12576 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12581 SEM_BRANCH_FINI (vpc
);
12586 CASE (sem
, INSN_BCC_W
) : /* b${cc} ${o-word-pcrel} */
12588 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12589 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12590 #define FLD(f) abuf->fields.sfmt_bcc_w.f
12591 int UNUSED written
= 0;
12592 IADDR UNUSED pc
= abuf
->addr
;
12594 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
12598 tmp_truthval
= ({ SI tmp_tmpcond
;
12600 tmp_tmpcond
= FLD (f_operand2
);
12601 ; if (EQSI (tmp_tmpcond
, 0)) {
12602 tmp_condres
= NOTBI (CPU (h_cbit
));
12604 else if (EQSI (tmp_tmpcond
, 1)) {
12605 tmp_condres
= CPU (h_cbit
);
12607 else if (EQSI (tmp_tmpcond
, 2)) {
12608 tmp_condres
= NOTBI (CPU (h_zbit
));
12610 else if (EQSI (tmp_tmpcond
, 3)) {
12611 tmp_condres
= CPU (h_zbit
);
12613 else if (EQSI (tmp_tmpcond
, 4)) {
12614 tmp_condres
= NOTBI (CPU (h_vbit
));
12616 else if (EQSI (tmp_tmpcond
, 5)) {
12617 tmp_condres
= CPU (h_vbit
);
12619 else if (EQSI (tmp_tmpcond
, 6)) {
12620 tmp_condres
= NOTBI (CPU (h_nbit
));
12622 else if (EQSI (tmp_tmpcond
, 7)) {
12623 tmp_condres
= CPU (h_nbit
);
12625 else if (EQSI (tmp_tmpcond
, 8)) {
12626 tmp_condres
= ORBI (CPU (h_cbit
), CPU (h_zbit
));
12628 else if (EQSI (tmp_tmpcond
, 9)) {
12629 tmp_condres
= NOTBI (ORBI (CPU (h_cbit
), CPU (h_zbit
)));
12631 else if (EQSI (tmp_tmpcond
, 10)) {
12632 tmp_condres
= NOTBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)));
12634 else if (EQSI (tmp_tmpcond
, 11)) {
12635 tmp_condres
= XORBI (CPU (h_vbit
), CPU (h_nbit
));
12637 else if (EQSI (tmp_tmpcond
, 12)) {
12638 tmp_condres
= NOTBI (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
)));
12640 else if (EQSI (tmp_tmpcond
, 13)) {
12641 tmp_condres
= ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
));
12643 else if (EQSI (tmp_tmpcond
, 14)) {
12646 else if (EQSI (tmp_tmpcond
, 15)) {
12647 tmp_condres
= CPU (h_pbit
);
12650 crisv32f_branch_taken (current_cpu
, pc
, FLD (i_o_word_pcrel
), tmp_truthval
);
12654 CPU (h_xbit
) = opval
;
12655 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12659 SET_H_INSN_PREFIXED_P (opval
);
12660 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12663 if (tmp_truthval
) {
12666 USI opval
= FLD (i_o_word_pcrel
);
12667 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
12668 written
|= (1 << 8);
12669 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12675 abuf
->written
= written
;
12676 SEM_BRANCH_FINI (vpc
);
12681 CASE (sem
, INSN_BA_W
) : /* ba ${o-word-pcrel} */
12683 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12684 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12685 #define FLD(f) abuf->fields.sfmt_bcc_w.f
12686 int UNUSED written
= 0;
12687 IADDR UNUSED pc
= abuf
->addr
;
12689 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
12695 CPU (h_xbit
) = opval
;
12696 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12700 SET_H_INSN_PREFIXED_P (opval
);
12701 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12706 USI opval
= FLD (i_o_word_pcrel
);
12707 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
12708 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12713 SEM_BRANCH_FINI (vpc
);
12718 CASE (sem
, INSN_JAS_R
) : /* jas ${Rs},${Pd} */
12720 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12721 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12722 #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f
12723 int UNUSED written
= 0;
12724 IADDR UNUSED pc
= abuf
->addr
;
12726 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12732 CPU (h_xbit
) = opval
;
12733 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12737 SET_H_INSN_PREFIXED_P (opval
);
12738 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12741 if (ANDIF (EQSI (FLD (f_operand1
), 1), EQSI (FLD (f_operand2
), 11))) {
12742 cris_flush_simulator_decode_cache (current_cpu
, pc
);
12747 SI opval
= ADDSI (pc
, 4);
12748 SET_H_SR (FLD (f_operand2
), opval
);
12749 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
12752 USI opval
= GET_H_GR (FLD (f_operand1
));
12753 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
12754 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12760 SEM_BRANCH_FINI (vpc
);
12765 CASE (sem
, INSN_JAS_C
) : /* jas ${const32},${Pd} */
12767 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12768 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12769 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
12770 int UNUSED written
= 0;
12771 IADDR UNUSED pc
= abuf
->addr
;
12773 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
12779 CPU (h_xbit
) = opval
;
12780 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12784 SET_H_INSN_PREFIXED_P (opval
);
12785 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12791 SI opval
= ADDSI (pc
, 8);
12792 SET_H_SR (FLD (f_operand2
), opval
);
12793 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
12796 USI opval
= FLD (f_indir_pc__dword
);
12797 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
12798 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12804 SEM_BRANCH_FINI (vpc
);
12809 CASE (sem
, INSN_JUMP_P
) : /* jump ${Ps} */
12811 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12812 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12813 #define FLD(f) abuf->fields.sfmt_mcp.f
12814 int UNUSED written
= 0;
12815 IADDR UNUSED pc
= abuf
->addr
;
12817 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12823 CPU (h_xbit
) = opval
;
12824 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12828 SET_H_INSN_PREFIXED_P (opval
);
12829 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12834 USI opval
= GET_H_SR (FLD (f_operand2
));
12835 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
12836 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12841 SEM_BRANCH_FINI (vpc
);
12846 CASE (sem
, INSN_BAS_C
) : /* bas ${const32},${Pd} */
12848 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12849 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12850 #define FLD(f) abuf->fields.sfmt_bas_c.f
12851 int UNUSED written
= 0;
12852 IADDR UNUSED pc
= abuf
->addr
;
12854 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
12860 CPU (h_xbit
) = opval
;
12861 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12865 SET_H_INSN_PREFIXED_P (opval
);
12866 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12872 SI opval
= ADDSI (pc
, 8);
12873 SET_H_SR (FLD (f_operand2
), opval
);
12874 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
12877 USI opval
= FLD (i_const32_pcrel
);
12878 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
12879 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12885 SEM_BRANCH_FINI (vpc
);
12890 CASE (sem
, INSN_JASC_R
) : /* jasc ${Rs},${Pd} */
12892 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12893 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12894 #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f
12895 int UNUSED written
= 0;
12896 IADDR UNUSED pc
= abuf
->addr
;
12898 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12904 CPU (h_xbit
) = opval
;
12905 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12909 SET_H_INSN_PREFIXED_P (opval
);
12910 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12916 SI opval
= ADDSI (pc
, 8);
12917 SET_H_SR (FLD (f_operand2
), opval
);
12918 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
12921 USI opval
= GET_H_GR (FLD (f_operand1
));
12922 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
12923 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12929 SEM_BRANCH_FINI (vpc
);
12934 CASE (sem
, INSN_JASC_C
) : /* jasc ${const32},${Pd} */
12936 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12937 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12938 #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
12939 int UNUSED written
= 0;
12940 IADDR UNUSED pc
= abuf
->addr
;
12942 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
12948 CPU (h_xbit
) = opval
;
12949 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12953 SET_H_INSN_PREFIXED_P (opval
);
12954 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12960 SI opval
= ADDSI (pc
, 12);
12961 SET_H_SR (FLD (f_operand2
), opval
);
12962 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
12965 USI opval
= FLD (f_indir_pc__dword
);
12966 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
12967 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12973 SEM_BRANCH_FINI (vpc
);
12978 CASE (sem
, INSN_BASC_C
) : /* basc ${const32},${Pd} */
12980 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12981 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12982 #define FLD(f) abuf->fields.sfmt_bas_c.f
12983 int UNUSED written
= 0;
12984 IADDR UNUSED pc
= abuf
->addr
;
12986 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
12992 CPU (h_xbit
) = opval
;
12993 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12997 SET_H_INSN_PREFIXED_P (opval
);
12998 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13004 SI opval
= ADDSI (pc
, 12);
13005 SET_H_SR (FLD (f_operand2
), opval
);
13006 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
13009 USI opval
= FLD (i_const32_pcrel
);
13010 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
13011 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
13017 SEM_BRANCH_FINI (vpc
);
13022 CASE (sem
, INSN_BREAK
) : /* break $n */
13024 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13025 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13026 #define FLD(f) abuf->fields.sfmt_break.f
13027 int UNUSED written
= 0;
13028 IADDR UNUSED pc
= abuf
->addr
;
13030 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13036 CPU (h_xbit
) = opval
;
13037 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13041 SET_H_INSN_PREFIXED_P (opval
);
13042 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13046 USI opval
= crisv32f_break_handler (current_cpu
, FLD (f_u4
), pc
);
13047 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
13048 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
13052 SEM_BRANCH_FINI (vpc
);
13057 CASE (sem
, INSN_BOUND_R_B_R
) : /* bound-r.b ${Rs},${Rd} */
13059 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13060 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13061 #define FLD(f) abuf->fields.sfmt_muls_b.f
13062 int UNUSED written
= 0;
13063 IADDR UNUSED pc
= abuf
->addr
;
13064 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13070 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
13071 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
13072 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
13074 SI opval
= tmp_newval
;
13075 SET_H_GR (FLD (f_operand2
), opval
);
13076 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13080 BI opval
= LTSI (tmp_newval
, 0);
13081 CPU (h_nbit
) = opval
;
13082 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
13085 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
13086 CPU (h_zbit
) = opval
;
13087 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
13089 SET_H_CBIT_MOVE (0);
13090 SET_H_VBIT_MOVE (0);
13094 CPU (h_xbit
) = opval
;
13095 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13099 SET_H_INSN_PREFIXED_P (opval
);
13100 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13110 CASE (sem
, INSN_BOUND_R_W_R
) : /* bound-r.w ${Rs},${Rd} */
13112 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13113 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13114 #define FLD(f) abuf->fields.sfmt_muls_b.f
13115 int UNUSED written
= 0;
13116 IADDR UNUSED pc
= abuf
->addr
;
13117 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13123 tmp_tmpops
= ZEXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
13124 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
13125 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
13127 SI opval
= tmp_newval
;
13128 SET_H_GR (FLD (f_operand2
), opval
);
13129 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13133 BI opval
= LTSI (tmp_newval
, 0);
13134 CPU (h_nbit
) = opval
;
13135 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
13138 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
13139 CPU (h_zbit
) = opval
;
13140 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
13142 SET_H_CBIT_MOVE (0);
13143 SET_H_VBIT_MOVE (0);
13147 CPU (h_xbit
) = opval
;
13148 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13152 SET_H_INSN_PREFIXED_P (opval
);
13153 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13163 CASE (sem
, INSN_BOUND_R_D_R
) : /* bound-r.d ${Rs},${Rd} */
13165 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13166 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13167 #define FLD(f) abuf->fields.sfmt_muls_b.f
13168 int UNUSED written
= 0;
13169 IADDR UNUSED pc
= abuf
->addr
;
13170 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13176 tmp_tmpops
= TRUNCSISI (GET_H_GR (FLD (f_operand1
)));
13177 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
13178 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
13180 SI opval
= tmp_newval
;
13181 SET_H_GR (FLD (f_operand2
), opval
);
13182 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13186 BI opval
= LTSI (tmp_newval
, 0);
13187 CPU (h_nbit
) = opval
;
13188 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
13191 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
13192 CPU (h_zbit
) = opval
;
13193 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
13195 SET_H_CBIT_MOVE (0);
13196 SET_H_VBIT_MOVE (0);
13200 CPU (h_xbit
) = opval
;
13201 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13205 SET_H_INSN_PREFIXED_P (opval
);
13206 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13216 CASE (sem
, INSN_BOUND_CB
) : /* bound.b [PC+],${Rd} */
13218 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13219 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13220 #define FLD(f) abuf->fields.sfmt_bound_cb.f
13221 int UNUSED written
= 0;
13222 IADDR UNUSED pc
= abuf
->addr
;
13223 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
13229 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
13230 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
13231 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
13233 SI opval
= tmp_newval
;
13234 SET_H_GR (FLD (f_operand2
), opval
);
13235 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13239 BI opval
= LTSI (tmp_newval
, 0);
13240 CPU (h_nbit
) = opval
;
13241 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
13244 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
13245 CPU (h_zbit
) = opval
;
13246 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
13248 SET_H_CBIT_MOVE (0);
13249 SET_H_VBIT_MOVE (0);
13253 CPU (h_xbit
) = opval
;
13254 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13258 SET_H_INSN_PREFIXED_P (opval
);
13259 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13269 CASE (sem
, INSN_BOUND_CW
) : /* bound.w [PC+],${Rd} */
13271 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13272 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13273 #define FLD(f) abuf->fields.sfmt_bound_cw.f
13274 int UNUSED written
= 0;
13275 IADDR UNUSED pc
= abuf
->addr
;
13276 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
13282 tmp_tmpops
= ZEXTSISI (FLD (f_indir_pc__word
));
13283 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
13284 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
13286 SI opval
= tmp_newval
;
13287 SET_H_GR (FLD (f_operand2
), opval
);
13288 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13292 BI opval
= LTSI (tmp_newval
, 0);
13293 CPU (h_nbit
) = opval
;
13294 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
13297 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
13298 CPU (h_zbit
) = opval
;
13299 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
13301 SET_H_CBIT_MOVE (0);
13302 SET_H_VBIT_MOVE (0);
13306 CPU (h_xbit
) = opval
;
13307 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13311 SET_H_INSN_PREFIXED_P (opval
);
13312 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13322 CASE (sem
, INSN_BOUND_CD
) : /* bound.d [PC+],${Rd} */
13324 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13325 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13326 #define FLD(f) abuf->fields.sfmt_bound_cd.f
13327 int UNUSED written
= 0;
13328 IADDR UNUSED pc
= abuf
->addr
;
13329 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
13335 tmp_tmpops
= FLD (f_indir_pc__dword
);
13336 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
13337 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
13339 SI opval
= tmp_newval
;
13340 SET_H_GR (FLD (f_operand2
), opval
);
13341 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13345 BI opval
= LTSI (tmp_newval
, 0);
13346 CPU (h_nbit
) = opval
;
13347 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
13350 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
13351 CPU (h_zbit
) = opval
;
13352 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
13354 SET_H_CBIT_MOVE (0);
13355 SET_H_VBIT_MOVE (0);
13359 CPU (h_xbit
) = opval
;
13360 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13364 SET_H_INSN_PREFIXED_P (opval
);
13365 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13375 CASE (sem
, INSN_SCC
) : /* s${cc} ${Rd-sfield} */
13377 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13378 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13379 #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
13380 int UNUSED written
= 0;
13381 IADDR UNUSED pc
= abuf
->addr
;
13382 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13386 tmp_truthval
= ({ SI tmp_tmpcond
;
13388 tmp_tmpcond
= FLD (f_operand2
);
13389 ; if (EQSI (tmp_tmpcond
, 0)) {
13390 tmp_condres
= NOTBI (CPU (h_cbit
));
13392 else if (EQSI (tmp_tmpcond
, 1)) {
13393 tmp_condres
= CPU (h_cbit
);
13395 else if (EQSI (tmp_tmpcond
, 2)) {
13396 tmp_condres
= NOTBI (CPU (h_zbit
));
13398 else if (EQSI (tmp_tmpcond
, 3)) {
13399 tmp_condres
= CPU (h_zbit
);
13401 else if (EQSI (tmp_tmpcond
, 4)) {
13402 tmp_condres
= NOTBI (CPU (h_vbit
));
13404 else if (EQSI (tmp_tmpcond
, 5)) {
13405 tmp_condres
= CPU (h_vbit
);
13407 else if (EQSI (tmp_tmpcond
, 6)) {
13408 tmp_condres
= NOTBI (CPU (h_nbit
));
13410 else if (EQSI (tmp_tmpcond
, 7)) {
13411 tmp_condres
= CPU (h_nbit
);
13413 else if (EQSI (tmp_tmpcond
, 8)) {
13414 tmp_condres
= ORBI (CPU (h_cbit
), CPU (h_zbit
));
13416 else if (EQSI (tmp_tmpcond
, 9)) {
13417 tmp_condres
= NOTBI (ORBI (CPU (h_cbit
), CPU (h_zbit
)));
13419 else if (EQSI (tmp_tmpcond
, 10)) {
13420 tmp_condres
= NOTBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)));
13422 else if (EQSI (tmp_tmpcond
, 11)) {
13423 tmp_condres
= XORBI (CPU (h_vbit
), CPU (h_nbit
));
13425 else if (EQSI (tmp_tmpcond
, 12)) {
13426 tmp_condres
= NOTBI (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
)));
13428 else if (EQSI (tmp_tmpcond
, 13)) {
13429 tmp_condres
= ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
));
13431 else if (EQSI (tmp_tmpcond
, 14)) {
13434 else if (EQSI (tmp_tmpcond
, 15)) {
13435 tmp_condres
= CPU (h_pbit
);
13439 SI opval
= ZEXTBISI (tmp_truthval
);
13440 SET_H_GR (FLD (f_operand1
), opval
);
13441 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13446 CPU (h_xbit
) = opval
;
13447 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13451 SET_H_INSN_PREFIXED_P (opval
);
13452 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13461 CASE (sem
, INSN_LZ
) : /* lz ${Rs},${Rd} */
13463 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13464 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13465 #define FLD(f) abuf->fields.sfmt_muls_b.f
13466 int UNUSED written
= 0;
13467 IADDR UNUSED pc
= abuf
->addr
;
13468 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13473 tmp_tmp
= GET_H_GR (FLD (f_operand1
));
13476 if (GESI (tmp_tmp
, 0)) {
13478 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13479 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13482 if (GESI (tmp_tmp
, 0)) {
13484 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13485 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13488 if (GESI (tmp_tmp
, 0)) {
13490 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13491 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13494 if (GESI (tmp_tmp
, 0)) {
13496 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13497 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13500 if (GESI (tmp_tmp
, 0)) {
13502 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13503 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13506 if (GESI (tmp_tmp
, 0)) {
13508 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13509 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13512 if (GESI (tmp_tmp
, 0)) {
13514 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13515 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13518 if (GESI (tmp_tmp
, 0)) {
13520 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13521 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13524 if (GESI (tmp_tmp
, 0)) {
13526 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13527 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13530 if (GESI (tmp_tmp
, 0)) {
13532 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13533 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13536 if (GESI (tmp_tmp
, 0)) {
13538 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13539 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13542 if (GESI (tmp_tmp
, 0)) {
13544 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13545 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13548 if (GESI (tmp_tmp
, 0)) {
13550 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13551 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13554 if (GESI (tmp_tmp
, 0)) {
13556 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13557 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13560 if (GESI (tmp_tmp
, 0)) {
13562 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13563 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13566 if (GESI (tmp_tmp
, 0)) {
13568 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13569 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13572 if (GESI (tmp_tmp
, 0)) {
13574 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13575 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13578 if (GESI (tmp_tmp
, 0)) {
13580 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13581 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13584 if (GESI (tmp_tmp
, 0)) {
13586 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13587 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13590 if (GESI (tmp_tmp
, 0)) {
13592 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13593 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13596 if (GESI (tmp_tmp
, 0)) {
13598 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13599 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13602 if (GESI (tmp_tmp
, 0)) {
13604 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13605 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13608 if (GESI (tmp_tmp
, 0)) {
13610 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13611 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13614 if (GESI (tmp_tmp
, 0)) {
13616 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13617 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13620 if (GESI (tmp_tmp
, 0)) {
13622 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13623 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13626 if (GESI (tmp_tmp
, 0)) {
13628 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13629 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13632 if (GESI (tmp_tmp
, 0)) {
13634 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13635 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13638 if (GESI (tmp_tmp
, 0)) {
13640 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13641 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13644 if (GESI (tmp_tmp
, 0)) {
13646 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13647 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13650 if (GESI (tmp_tmp
, 0)) {
13652 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13653 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13656 if (GESI (tmp_tmp
, 0)) {
13658 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13659 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13662 if (GESI (tmp_tmp
, 0)) {
13664 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13665 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13670 SI opval
= tmp_tmpd
;
13671 SET_H_GR (FLD (f_operand2
), opval
);
13672 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13676 BI opval
= LTSI (tmp_tmpd
, 0);
13677 CPU (h_nbit
) = opval
;
13678 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
13681 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
13682 CPU (h_zbit
) = opval
;
13683 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
13685 SET_H_CBIT_MOVE (0);
13686 SET_H_VBIT_MOVE (0);
13690 CPU (h_xbit
) = opval
;
13691 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13695 SET_H_INSN_PREFIXED_P (opval
);
13696 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13706 CASE (sem
, INSN_ADDOQ
) : /* addoq $o,$Rs,ACR */
13708 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13709 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13710 #define FLD(f) abuf->fields.sfmt_addoq.f
13711 int UNUSED written
= 0;
13712 IADDR UNUSED pc
= abuf
->addr
;
13713 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13717 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), FLD (f_s8
));
13718 SET_H_PREFIXREG_V32 (opval
);
13719 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13723 SET_H_INSN_PREFIXED_P (opval
);
13724 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13732 CASE (sem
, INSN_ADDO_M_B_M
) : /* addo-m.b [${Rs}${inc}],$Rd,ACR */
13734 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13735 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13736 #define FLD(f) abuf->fields.sfmt_addc_m.f
13737 int UNUSED written
= 0;
13738 IADDR UNUSED pc
= abuf
->addr
;
13739 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13743 tmp_tmps
= ({ SI tmp_addr
;
13746 tmp_postinc
= FLD (f_memmode
);
13747 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
13748 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
13749 ; if (NEBI (tmp_postinc
, 0)) {
13751 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
13752 tmp_addr
= ADDSI (tmp_addr
, 1);
13755 SI opval
= tmp_addr
;
13756 SET_H_GR (FLD (f_operand1
), opval
);
13757 written
|= (1 << 6);
13758 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13764 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), EXTQISI (tmp_tmps
));
13765 SET_H_PREFIXREG_V32 (opval
);
13766 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13770 SET_H_INSN_PREFIXED_P (opval
);
13771 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13775 abuf
->written
= written
;
13780 CASE (sem
, INSN_ADDO_M_W_M
) : /* addo-m.w [${Rs}${inc}],$Rd,ACR */
13782 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13783 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13784 #define FLD(f) abuf->fields.sfmt_addc_m.f
13785 int UNUSED written
= 0;
13786 IADDR UNUSED pc
= abuf
->addr
;
13787 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13791 tmp_tmps
= ({ SI tmp_addr
;
13794 tmp_postinc
= FLD (f_memmode
);
13795 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
13796 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
13797 ; if (NEBI (tmp_postinc
, 0)) {
13799 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
13800 tmp_addr
= ADDSI (tmp_addr
, 2);
13803 SI opval
= tmp_addr
;
13804 SET_H_GR (FLD (f_operand1
), opval
);
13805 written
|= (1 << 6);
13806 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13812 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), EXTHISI (tmp_tmps
));
13813 SET_H_PREFIXREG_V32 (opval
);
13814 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13818 SET_H_INSN_PREFIXED_P (opval
);
13819 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13823 abuf
->written
= written
;
13828 CASE (sem
, INSN_ADDO_M_D_M
) : /* addo-m.d [${Rs}${inc}],$Rd,ACR */
13830 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13831 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13832 #define FLD(f) abuf->fields.sfmt_addc_m.f
13833 int UNUSED written
= 0;
13834 IADDR UNUSED pc
= abuf
->addr
;
13835 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13839 tmp_tmps
= ({ SI tmp_addr
;
13842 tmp_postinc
= FLD (f_memmode
);
13843 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (GET_H_PREFIXREG_V32 ()));
13844 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
13845 ; if (NEBI (tmp_postinc
, 0)) {
13847 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
13848 tmp_addr
= ADDSI (tmp_addr
, 4);
13851 SI opval
= tmp_addr
;
13852 SET_H_GR (FLD (f_operand1
), opval
);
13853 written
|= (1 << 6);
13854 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13860 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), tmp_tmps
);
13861 SET_H_PREFIXREG_V32 (opval
);
13862 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13866 SET_H_INSN_PREFIXED_P (opval
);
13867 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13871 abuf
->written
= written
;
13876 CASE (sem
, INSN_ADDO_CB
) : /* addo.b [PC+],$Rd,ACR */
13878 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13879 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13880 #define FLD(f) abuf->fields.sfmt_bound_cb.f
13881 int UNUSED written
= 0;
13882 IADDR UNUSED pc
= abuf
->addr
;
13883 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
13887 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), EXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
))));
13888 SET_H_PREFIXREG_V32 (opval
);
13889 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13893 SET_H_INSN_PREFIXED_P (opval
);
13894 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13902 CASE (sem
, INSN_ADDO_CW
) : /* addo.w [PC+],$Rd,ACR */
13904 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13905 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13906 #define FLD(f) abuf->fields.sfmt_bound_cw.f
13907 int UNUSED written
= 0;
13908 IADDR UNUSED pc
= abuf
->addr
;
13909 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
13913 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), EXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
))));
13914 SET_H_PREFIXREG_V32 (opval
);
13915 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13919 SET_H_INSN_PREFIXED_P (opval
);
13920 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13928 CASE (sem
, INSN_ADDO_CD
) : /* addo.d [PC+],$Rd,ACR */
13930 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13931 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13932 #define FLD(f) abuf->fields.sfmt_bound_cd.f
13933 int UNUSED written
= 0;
13934 IADDR UNUSED pc
= abuf
->addr
;
13935 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
13939 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__dword
));
13940 SET_H_PREFIXREG_V32 (opval
);
13941 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13945 SET_H_INSN_PREFIXED_P (opval
);
13946 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13954 CASE (sem
, INSN_ADDI_ACR_B_R
) : /* addi-acr.b ${Rs-dfield}.m,${Rd-sfield},ACR */
13956 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13957 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13958 #define FLD(f) abuf->fields.sfmt_muls_b.f
13959 int UNUSED written
= 0;
13960 IADDR UNUSED pc
= abuf
->addr
;
13961 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13965 SI opval
= ADDSI (GET_H_GR (FLD (f_operand1
)), MULSI (GET_H_GR (FLD (f_operand2
)), 1));
13966 SET_H_PREFIXREG_V32 (opval
);
13967 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13971 SET_H_INSN_PREFIXED_P (opval
);
13972 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13980 CASE (sem
, INSN_ADDI_ACR_W_R
) : /* addi-acr.w ${Rs-dfield}.m,${Rd-sfield},ACR */
13982 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13983 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13984 #define FLD(f) abuf->fields.sfmt_muls_b.f
13985 int UNUSED written
= 0;
13986 IADDR UNUSED pc
= abuf
->addr
;
13987 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13991 SI opval
= ADDSI (GET_H_GR (FLD (f_operand1
)), MULSI (GET_H_GR (FLD (f_operand2
)), 2));
13992 SET_H_PREFIXREG_V32 (opval
);
13993 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13997 SET_H_INSN_PREFIXED_P (opval
);
13998 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
14006 CASE (sem
, INSN_ADDI_ACR_D_R
) : /* addi-acr.d ${Rs-dfield}.m,${Rd-sfield},ACR */
14008 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
14009 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
14010 #define FLD(f) abuf->fields.sfmt_muls_b.f
14011 int UNUSED written
= 0;
14012 IADDR UNUSED pc
= abuf
->addr
;
14013 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
14017 SI opval
= ADDSI (GET_H_GR (FLD (f_operand1
)), MULSI (GET_H_GR (FLD (f_operand2
)), 4));
14018 SET_H_PREFIXREG_V32 (opval
);
14019 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
14023 SET_H_INSN_PREFIXED_P (opval
);
14024 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
14032 CASE (sem
, INSN_FIDXI
) : /* fidxi [$Rs] */
14034 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
14035 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
14036 #define FLD(f) abuf->fields.sfmt_mcp.f
14037 int UNUSED written
= 0;
14038 IADDR UNUSED pc
= abuf
->addr
;
14040 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
14043 USI opval
= crisv32f_fidxi_handler (current_cpu
, pc
, GET_H_GR (FLD (f_operand1
)));
14044 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
14045 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
14048 SEM_BRANCH_FINI (vpc
);
14053 CASE (sem
, INSN_FTAGI
) : /* fidxi [$Rs] */
14055 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
14056 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
14057 #define FLD(f) abuf->fields.sfmt_mcp.f
14058 int UNUSED written
= 0;
14059 IADDR UNUSED pc
= abuf
->addr
;
14061 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
14064 USI opval
= crisv32f_ftagi_handler (current_cpu
, pc
, GET_H_GR (FLD (f_operand1
)));
14065 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
14066 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
14069 SEM_BRANCH_FINI (vpc
);
14074 CASE (sem
, INSN_FIDXD
) : /* fidxd [$Rs] */
14076 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
14077 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
14078 #define FLD(f) abuf->fields.sfmt_mcp.f
14079 int UNUSED written
= 0;
14080 IADDR UNUSED pc
= abuf
->addr
;
14082 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
14085 USI opval
= crisv32f_fidxd_handler (current_cpu
, pc
, GET_H_GR (FLD (f_operand1
)));
14086 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
14087 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
14090 SEM_BRANCH_FINI (vpc
);
14095 CASE (sem
, INSN_FTAGD
) : /* ftagd [$Rs] */
14097 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
14098 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
14099 #define FLD(f) abuf->fields.sfmt_mcp.f
14100 int UNUSED written
= 0;
14101 IADDR UNUSED pc
= abuf
->addr
;
14103 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
14106 USI opval
= crisv32f_ftagd_handler (current_cpu
, pc
, GET_H_GR (FLD (f_operand1
)));
14107 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
14108 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
14111 SEM_BRANCH_FINI (vpc
);
14118 ENDSWITCH (sem
) /* End of semantic switch. */
14120 /* At this point `vpc' contains the next insn to execute. */
14123 #undef DEFINE_SWITCH
14124 #endif /* DEFINE_SWITCH */