1 /* Simulator instruction semantics for crisv10f.
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 { CRISV10F_INSN_X_INVALID
, && case_sem_INSN_X_INVALID
},
36 { CRISV10F_INSN_X_AFTER
, && case_sem_INSN_X_AFTER
},
37 { CRISV10F_INSN_X_BEFORE
, && case_sem_INSN_X_BEFORE
},
38 { CRISV10F_INSN_X_CTI_CHAIN
, && case_sem_INSN_X_CTI_CHAIN
},
39 { CRISV10F_INSN_X_CHAIN
, && case_sem_INSN_X_CHAIN
},
40 { CRISV10F_INSN_X_BEGIN
, && case_sem_INSN_X_BEGIN
},
41 { CRISV10F_INSN_NOP
, && case_sem_INSN_NOP
},
42 { CRISV10F_INSN_MOVE_B_R
, && case_sem_INSN_MOVE_B_R
},
43 { CRISV10F_INSN_MOVE_W_R
, && case_sem_INSN_MOVE_W_R
},
44 { CRISV10F_INSN_MOVE_D_R
, && case_sem_INSN_MOVE_D_R
},
45 { CRISV10F_INSN_MOVEPCR
, && case_sem_INSN_MOVEPCR
},
46 { CRISV10F_INSN_MOVEQ
, && case_sem_INSN_MOVEQ
},
47 { CRISV10F_INSN_MOVS_B_R
, && case_sem_INSN_MOVS_B_R
},
48 { CRISV10F_INSN_MOVS_W_R
, && case_sem_INSN_MOVS_W_R
},
49 { CRISV10F_INSN_MOVU_B_R
, && case_sem_INSN_MOVU_B_R
},
50 { CRISV10F_INSN_MOVU_W_R
, && case_sem_INSN_MOVU_W_R
},
51 { CRISV10F_INSN_MOVECBR
, && case_sem_INSN_MOVECBR
},
52 { CRISV10F_INSN_MOVECWR
, && case_sem_INSN_MOVECWR
},
53 { CRISV10F_INSN_MOVECDR
, && case_sem_INSN_MOVECDR
},
54 { CRISV10F_INSN_MOVSCBR
, && case_sem_INSN_MOVSCBR
},
55 { CRISV10F_INSN_MOVSCWR
, && case_sem_INSN_MOVSCWR
},
56 { CRISV10F_INSN_MOVUCBR
, && case_sem_INSN_MOVUCBR
},
57 { CRISV10F_INSN_MOVUCWR
, && case_sem_INSN_MOVUCWR
},
58 { CRISV10F_INSN_ADDQ
, && case_sem_INSN_ADDQ
},
59 { CRISV10F_INSN_SUBQ
, && case_sem_INSN_SUBQ
},
60 { CRISV10F_INSN_CMP_R_B_R
, && case_sem_INSN_CMP_R_B_R
},
61 { CRISV10F_INSN_CMP_R_W_R
, && case_sem_INSN_CMP_R_W_R
},
62 { CRISV10F_INSN_CMP_R_D_R
, && case_sem_INSN_CMP_R_D_R
},
63 { CRISV10F_INSN_CMP_M_B_M
, && case_sem_INSN_CMP_M_B_M
},
64 { CRISV10F_INSN_CMP_M_W_M
, && case_sem_INSN_CMP_M_W_M
},
65 { CRISV10F_INSN_CMP_M_D_M
, && case_sem_INSN_CMP_M_D_M
},
66 { CRISV10F_INSN_CMPCBR
, && case_sem_INSN_CMPCBR
},
67 { CRISV10F_INSN_CMPCWR
, && case_sem_INSN_CMPCWR
},
68 { CRISV10F_INSN_CMPCDR
, && case_sem_INSN_CMPCDR
},
69 { CRISV10F_INSN_CMPQ
, && case_sem_INSN_CMPQ
},
70 { CRISV10F_INSN_CMPS_M_B_M
, && case_sem_INSN_CMPS_M_B_M
},
71 { CRISV10F_INSN_CMPS_M_W_M
, && case_sem_INSN_CMPS_M_W_M
},
72 { CRISV10F_INSN_CMPSCBR
, && case_sem_INSN_CMPSCBR
},
73 { CRISV10F_INSN_CMPSCWR
, && case_sem_INSN_CMPSCWR
},
74 { CRISV10F_INSN_CMPU_M_B_M
, && case_sem_INSN_CMPU_M_B_M
},
75 { CRISV10F_INSN_CMPU_M_W_M
, && case_sem_INSN_CMPU_M_W_M
},
76 { CRISV10F_INSN_CMPUCBR
, && case_sem_INSN_CMPUCBR
},
77 { CRISV10F_INSN_CMPUCWR
, && case_sem_INSN_CMPUCWR
},
78 { CRISV10F_INSN_MOVE_M_B_M
, && case_sem_INSN_MOVE_M_B_M
},
79 { CRISV10F_INSN_MOVE_M_W_M
, && case_sem_INSN_MOVE_M_W_M
},
80 { CRISV10F_INSN_MOVE_M_D_M
, && case_sem_INSN_MOVE_M_D_M
},
81 { CRISV10F_INSN_MOVS_M_B_M
, && case_sem_INSN_MOVS_M_B_M
},
82 { CRISV10F_INSN_MOVS_M_W_M
, && case_sem_INSN_MOVS_M_W_M
},
83 { CRISV10F_INSN_MOVU_M_B_M
, && case_sem_INSN_MOVU_M_B_M
},
84 { CRISV10F_INSN_MOVU_M_W_M
, && case_sem_INSN_MOVU_M_W_M
},
85 { CRISV10F_INSN_MOVE_R_SPRV10
, && case_sem_INSN_MOVE_R_SPRV10
},
86 { CRISV10F_INSN_MOVE_SPR_RV10
, && case_sem_INSN_MOVE_SPR_RV10
},
87 { CRISV10F_INSN_RET_TYPE
, && case_sem_INSN_RET_TYPE
},
88 { CRISV10F_INSN_MOVE_M_SPRV10
, && case_sem_INSN_MOVE_M_SPRV10
},
89 { CRISV10F_INSN_MOVE_C_SPRV10_P5
, && case_sem_INSN_MOVE_C_SPRV10_P5
},
90 { CRISV10F_INSN_MOVE_C_SPRV10_P9
, && case_sem_INSN_MOVE_C_SPRV10_P9
},
91 { CRISV10F_INSN_MOVE_C_SPRV10_P10
, && case_sem_INSN_MOVE_C_SPRV10_P10
},
92 { CRISV10F_INSN_MOVE_C_SPRV10_P11
, && case_sem_INSN_MOVE_C_SPRV10_P11
},
93 { CRISV10F_INSN_MOVE_C_SPRV10_P12
, && case_sem_INSN_MOVE_C_SPRV10_P12
},
94 { CRISV10F_INSN_MOVE_C_SPRV10_P13
, && case_sem_INSN_MOVE_C_SPRV10_P13
},
95 { CRISV10F_INSN_MOVE_C_SPRV10_P7
, && case_sem_INSN_MOVE_C_SPRV10_P7
},
96 { CRISV10F_INSN_MOVE_C_SPRV10_P14
, && case_sem_INSN_MOVE_C_SPRV10_P14
},
97 { CRISV10F_INSN_MOVE_C_SPRV10_P15
, && case_sem_INSN_MOVE_C_SPRV10_P15
},
98 { CRISV10F_INSN_MOVE_SPR_MV10
, && case_sem_INSN_MOVE_SPR_MV10
},
99 { CRISV10F_INSN_SBFS
, && case_sem_INSN_SBFS
},
100 { CRISV10F_INSN_MOVEM_R_M
, && case_sem_INSN_MOVEM_R_M
},
101 { CRISV10F_INSN_MOVEM_M_R
, && case_sem_INSN_MOVEM_M_R
},
102 { CRISV10F_INSN_MOVEM_M_PC
, && case_sem_INSN_MOVEM_M_PC
},
103 { CRISV10F_INSN_ADD_B_R
, && case_sem_INSN_ADD_B_R
},
104 { CRISV10F_INSN_ADD_W_R
, && case_sem_INSN_ADD_W_R
},
105 { CRISV10F_INSN_ADD_D_R
, && case_sem_INSN_ADD_D_R
},
106 { CRISV10F_INSN_ADD_M_B_M
, && case_sem_INSN_ADD_M_B_M
},
107 { CRISV10F_INSN_ADD_M_W_M
, && case_sem_INSN_ADD_M_W_M
},
108 { CRISV10F_INSN_ADD_M_D_M
, && case_sem_INSN_ADD_M_D_M
},
109 { CRISV10F_INSN_ADDCBR
, && case_sem_INSN_ADDCBR
},
110 { CRISV10F_INSN_ADDCWR
, && case_sem_INSN_ADDCWR
},
111 { CRISV10F_INSN_ADDCDR
, && case_sem_INSN_ADDCDR
},
112 { CRISV10F_INSN_ADDCPC
, && case_sem_INSN_ADDCPC
},
113 { CRISV10F_INSN_ADDS_B_R
, && case_sem_INSN_ADDS_B_R
},
114 { CRISV10F_INSN_ADDS_W_R
, && case_sem_INSN_ADDS_W_R
},
115 { CRISV10F_INSN_ADDS_M_B_M
, && case_sem_INSN_ADDS_M_B_M
},
116 { CRISV10F_INSN_ADDS_M_W_M
, && case_sem_INSN_ADDS_M_W_M
},
117 { CRISV10F_INSN_ADDSCBR
, && case_sem_INSN_ADDSCBR
},
118 { CRISV10F_INSN_ADDSCWR
, && case_sem_INSN_ADDSCWR
},
119 { CRISV10F_INSN_ADDSPCPC
, && case_sem_INSN_ADDSPCPC
},
120 { CRISV10F_INSN_ADDU_B_R
, && case_sem_INSN_ADDU_B_R
},
121 { CRISV10F_INSN_ADDU_W_R
, && case_sem_INSN_ADDU_W_R
},
122 { CRISV10F_INSN_ADDU_M_B_M
, && case_sem_INSN_ADDU_M_B_M
},
123 { CRISV10F_INSN_ADDU_M_W_M
, && case_sem_INSN_ADDU_M_W_M
},
124 { CRISV10F_INSN_ADDUCBR
, && case_sem_INSN_ADDUCBR
},
125 { CRISV10F_INSN_ADDUCWR
, && case_sem_INSN_ADDUCWR
},
126 { CRISV10F_INSN_SUB_B_R
, && case_sem_INSN_SUB_B_R
},
127 { CRISV10F_INSN_SUB_W_R
, && case_sem_INSN_SUB_W_R
},
128 { CRISV10F_INSN_SUB_D_R
, && case_sem_INSN_SUB_D_R
},
129 { CRISV10F_INSN_SUB_M_B_M
, && case_sem_INSN_SUB_M_B_M
},
130 { CRISV10F_INSN_SUB_M_W_M
, && case_sem_INSN_SUB_M_W_M
},
131 { CRISV10F_INSN_SUB_M_D_M
, && case_sem_INSN_SUB_M_D_M
},
132 { CRISV10F_INSN_SUBCBR
, && case_sem_INSN_SUBCBR
},
133 { CRISV10F_INSN_SUBCWR
, && case_sem_INSN_SUBCWR
},
134 { CRISV10F_INSN_SUBCDR
, && case_sem_INSN_SUBCDR
},
135 { CRISV10F_INSN_SUBS_B_R
, && case_sem_INSN_SUBS_B_R
},
136 { CRISV10F_INSN_SUBS_W_R
, && case_sem_INSN_SUBS_W_R
},
137 { CRISV10F_INSN_SUBS_M_B_M
, && case_sem_INSN_SUBS_M_B_M
},
138 { CRISV10F_INSN_SUBS_M_W_M
, && case_sem_INSN_SUBS_M_W_M
},
139 { CRISV10F_INSN_SUBSCBR
, && case_sem_INSN_SUBSCBR
},
140 { CRISV10F_INSN_SUBSCWR
, && case_sem_INSN_SUBSCWR
},
141 { CRISV10F_INSN_SUBU_B_R
, && case_sem_INSN_SUBU_B_R
},
142 { CRISV10F_INSN_SUBU_W_R
, && case_sem_INSN_SUBU_W_R
},
143 { CRISV10F_INSN_SUBU_M_B_M
, && case_sem_INSN_SUBU_M_B_M
},
144 { CRISV10F_INSN_SUBU_M_W_M
, && case_sem_INSN_SUBU_M_W_M
},
145 { CRISV10F_INSN_SUBUCBR
, && case_sem_INSN_SUBUCBR
},
146 { CRISV10F_INSN_SUBUCWR
, && case_sem_INSN_SUBUCWR
},
147 { CRISV10F_INSN_ADDI_B_R
, && case_sem_INSN_ADDI_B_R
},
148 { CRISV10F_INSN_ADDI_W_R
, && case_sem_INSN_ADDI_W_R
},
149 { CRISV10F_INSN_ADDI_D_R
, && case_sem_INSN_ADDI_D_R
},
150 { CRISV10F_INSN_NEG_B_R
, && case_sem_INSN_NEG_B_R
},
151 { CRISV10F_INSN_NEG_W_R
, && case_sem_INSN_NEG_W_R
},
152 { CRISV10F_INSN_NEG_D_R
, && case_sem_INSN_NEG_D_R
},
153 { CRISV10F_INSN_TEST_M_B_M
, && case_sem_INSN_TEST_M_B_M
},
154 { CRISV10F_INSN_TEST_M_W_M
, && case_sem_INSN_TEST_M_W_M
},
155 { CRISV10F_INSN_TEST_M_D_M
, && case_sem_INSN_TEST_M_D_M
},
156 { CRISV10F_INSN_MOVE_R_M_B_M
, && case_sem_INSN_MOVE_R_M_B_M
},
157 { CRISV10F_INSN_MOVE_R_M_W_M
, && case_sem_INSN_MOVE_R_M_W_M
},
158 { CRISV10F_INSN_MOVE_R_M_D_M
, && case_sem_INSN_MOVE_R_M_D_M
},
159 { CRISV10F_INSN_MULS_B
, && case_sem_INSN_MULS_B
},
160 { CRISV10F_INSN_MULS_W
, && case_sem_INSN_MULS_W
},
161 { CRISV10F_INSN_MULS_D
, && case_sem_INSN_MULS_D
},
162 { CRISV10F_INSN_MULU_B
, && case_sem_INSN_MULU_B
},
163 { CRISV10F_INSN_MULU_W
, && case_sem_INSN_MULU_W
},
164 { CRISV10F_INSN_MULU_D
, && case_sem_INSN_MULU_D
},
165 { CRISV10F_INSN_MSTEP
, && case_sem_INSN_MSTEP
},
166 { CRISV10F_INSN_DSTEP
, && case_sem_INSN_DSTEP
},
167 { CRISV10F_INSN_ABS
, && case_sem_INSN_ABS
},
168 { CRISV10F_INSN_AND_B_R
, && case_sem_INSN_AND_B_R
},
169 { CRISV10F_INSN_AND_W_R
, && case_sem_INSN_AND_W_R
},
170 { CRISV10F_INSN_AND_D_R
, && case_sem_INSN_AND_D_R
},
171 { CRISV10F_INSN_AND_M_B_M
, && case_sem_INSN_AND_M_B_M
},
172 { CRISV10F_INSN_AND_M_W_M
, && case_sem_INSN_AND_M_W_M
},
173 { CRISV10F_INSN_AND_M_D_M
, && case_sem_INSN_AND_M_D_M
},
174 { CRISV10F_INSN_ANDCBR
, && case_sem_INSN_ANDCBR
},
175 { CRISV10F_INSN_ANDCWR
, && case_sem_INSN_ANDCWR
},
176 { CRISV10F_INSN_ANDCDR
, && case_sem_INSN_ANDCDR
},
177 { CRISV10F_INSN_ANDQ
, && case_sem_INSN_ANDQ
},
178 { CRISV10F_INSN_ORR_B_R
, && case_sem_INSN_ORR_B_R
},
179 { CRISV10F_INSN_ORR_W_R
, && case_sem_INSN_ORR_W_R
},
180 { CRISV10F_INSN_ORR_D_R
, && case_sem_INSN_ORR_D_R
},
181 { CRISV10F_INSN_OR_M_B_M
, && case_sem_INSN_OR_M_B_M
},
182 { CRISV10F_INSN_OR_M_W_M
, && case_sem_INSN_OR_M_W_M
},
183 { CRISV10F_INSN_OR_M_D_M
, && case_sem_INSN_OR_M_D_M
},
184 { CRISV10F_INSN_ORCBR
, && case_sem_INSN_ORCBR
},
185 { CRISV10F_INSN_ORCWR
, && case_sem_INSN_ORCWR
},
186 { CRISV10F_INSN_ORCDR
, && case_sem_INSN_ORCDR
},
187 { CRISV10F_INSN_ORQ
, && case_sem_INSN_ORQ
},
188 { CRISV10F_INSN_XOR
, && case_sem_INSN_XOR
},
189 { CRISV10F_INSN_SWAP
, && case_sem_INSN_SWAP
},
190 { CRISV10F_INSN_ASRR_B_R
, && case_sem_INSN_ASRR_B_R
},
191 { CRISV10F_INSN_ASRR_W_R
, && case_sem_INSN_ASRR_W_R
},
192 { CRISV10F_INSN_ASRR_D_R
, && case_sem_INSN_ASRR_D_R
},
193 { CRISV10F_INSN_ASRQ
, && case_sem_INSN_ASRQ
},
194 { CRISV10F_INSN_LSRR_B_R
, && case_sem_INSN_LSRR_B_R
},
195 { CRISV10F_INSN_LSRR_W_R
, && case_sem_INSN_LSRR_W_R
},
196 { CRISV10F_INSN_LSRR_D_R
, && case_sem_INSN_LSRR_D_R
},
197 { CRISV10F_INSN_LSRQ
, && case_sem_INSN_LSRQ
},
198 { CRISV10F_INSN_LSLR_B_R
, && case_sem_INSN_LSLR_B_R
},
199 { CRISV10F_INSN_LSLR_W_R
, && case_sem_INSN_LSLR_W_R
},
200 { CRISV10F_INSN_LSLR_D_R
, && case_sem_INSN_LSLR_D_R
},
201 { CRISV10F_INSN_LSLQ
, && case_sem_INSN_LSLQ
},
202 { CRISV10F_INSN_BTST
, && case_sem_INSN_BTST
},
203 { CRISV10F_INSN_BTSTQ
, && case_sem_INSN_BTSTQ
},
204 { CRISV10F_INSN_SETF
, && case_sem_INSN_SETF
},
205 { CRISV10F_INSN_CLEARF
, && case_sem_INSN_CLEARF
},
206 { CRISV10F_INSN_BCC_B
, && case_sem_INSN_BCC_B
},
207 { CRISV10F_INSN_BA_B
, && case_sem_INSN_BA_B
},
208 { CRISV10F_INSN_BCC_W
, && case_sem_INSN_BCC_W
},
209 { CRISV10F_INSN_BA_W
, && case_sem_INSN_BA_W
},
210 { CRISV10F_INSN_JUMP_R
, && case_sem_INSN_JUMP_R
},
211 { CRISV10F_INSN_JUMP_M
, && case_sem_INSN_JUMP_M
},
212 { CRISV10F_INSN_JUMP_C
, && case_sem_INSN_JUMP_C
},
213 { CRISV10F_INSN_BREAK
, && case_sem_INSN_BREAK
},
214 { CRISV10F_INSN_BOUND_R_B_R
, && case_sem_INSN_BOUND_R_B_R
},
215 { CRISV10F_INSN_BOUND_R_W_R
, && case_sem_INSN_BOUND_R_W_R
},
216 { CRISV10F_INSN_BOUND_R_D_R
, && case_sem_INSN_BOUND_R_D_R
},
217 { CRISV10F_INSN_BOUND_M_B_M
, && case_sem_INSN_BOUND_M_B_M
},
218 { CRISV10F_INSN_BOUND_M_W_M
, && case_sem_INSN_BOUND_M_W_M
},
219 { CRISV10F_INSN_BOUND_M_D_M
, && case_sem_INSN_BOUND_M_D_M
},
220 { CRISV10F_INSN_BOUND_CB
, && case_sem_INSN_BOUND_CB
},
221 { CRISV10F_INSN_BOUND_CW
, && case_sem_INSN_BOUND_CW
},
222 { CRISV10F_INSN_BOUND_CD
, && case_sem_INSN_BOUND_CD
},
223 { CRISV10F_INSN_SCC
, && case_sem_INSN_SCC
},
224 { CRISV10F_INSN_LZ
, && case_sem_INSN_LZ
},
225 { CRISV10F_INSN_ADDOQ
, && case_sem_INSN_ADDOQ
},
226 { CRISV10F_INSN_BDAPQPC
, && case_sem_INSN_BDAPQPC
},
227 { CRISV10F_INSN_BDAP_32_PC
, && case_sem_INSN_BDAP_32_PC
},
228 { CRISV10F_INSN_MOVE_M_PCPLUS_P0
, && case_sem_INSN_MOVE_M_PCPLUS_P0
},
229 { CRISV10F_INSN_MOVE_M_SPPLUS_P8
, && case_sem_INSN_MOVE_M_SPPLUS_P8
},
230 { CRISV10F_INSN_ADDO_M_B_M
, && case_sem_INSN_ADDO_M_B_M
},
231 { CRISV10F_INSN_ADDO_M_W_M
, && case_sem_INSN_ADDO_M_W_M
},
232 { CRISV10F_INSN_ADDO_M_D_M
, && case_sem_INSN_ADDO_M_D_M
},
233 { CRISV10F_INSN_ADDO_CB
, && case_sem_INSN_ADDO_CB
},
234 { CRISV10F_INSN_ADDO_CW
, && case_sem_INSN_ADDO_CW
},
235 { CRISV10F_INSN_ADDO_CD
, && case_sem_INSN_ADDO_CD
},
236 { CRISV10F_INSN_DIP_M
, && case_sem_INSN_DIP_M
},
237 { CRISV10F_INSN_DIP_C
, && case_sem_INSN_DIP_C
},
238 { CRISV10F_INSN_ADDI_ACR_B_R
, && case_sem_INSN_ADDI_ACR_B_R
},
239 { CRISV10F_INSN_ADDI_ACR_W_R
, && case_sem_INSN_ADDI_ACR_W_R
},
240 { CRISV10F_INSN_ADDI_ACR_D_R
, && case_sem_INSN_ADDI_ACR_D_R
},
241 { CRISV10F_INSN_BIAP_PC_B_R
, && case_sem_INSN_BIAP_PC_B_R
},
242 { CRISV10F_INSN_BIAP_PC_W_R
, && case_sem_INSN_BIAP_PC_W_R
},
243 { CRISV10F_INSN_BIAP_PC_D_R
, && case_sem_INSN_BIAP_PC_D_R
},
248 for (i
= 0; labels
[i
].label
!= 0; ++i
)
251 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_fast_lab
= labels
[i
].label
;
253 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_full_lab
= labels
[i
].label
;
258 #endif /* DEFINE_LABELS */
262 /* If hyper-fast [well not unnecessarily slow] execution is selected, turn
263 off frills like tracing and profiling. */
264 /* FIXME: A better way would be to have TRACE_RESULT check for something
265 that can cause it to be optimized out. Another way would be to emit
266 special handlers into the instruction "stream". */
270 #define TRACE_RESULT(cpu, abuf, name, type, val)
274 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
275 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
277 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
284 /* Branch to next handler without going around main loop. */
285 #define NEXT(vpc) goto * SEM_ARGBUF (vpc) -> semantic.sem_case
286 SWITCH (sem
, SEM_ARGBUF (vpc
) -> semantic
.sem_case
)
288 #else /* ! WITH_SCACHE_PBB */
290 #define NEXT(vpc) BREAK (sem)
293 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_fast_lab
)
295 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_full_lab
)
298 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->num
)
301 #endif /* ! WITH_SCACHE_PBB */
305 CASE (sem
, INSN_X_INVALID
) : /* --invalid-- */
307 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
308 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
309 #define FLD(f) abuf->fields.fmt_empty.f
310 int UNUSED written
= 0;
311 IADDR UNUSED pc
= abuf
->addr
;
312 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
315 /* Update the recorded pc in the cpu state struct.
316 Only necessary for WITH_SCACHE case, but to avoid the
317 conditional compilation .... */
319 /* Virtual insns have zero size. Overwrite vpc with address of next insn
320 using the default-insn-bitsize spec. When executing insns in parallel
321 we may want to queue the fault and continue execution. */
322 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
323 vpc
= sim_engine_invalid_insn (current_cpu
, pc
, vpc
);
330 CASE (sem
, INSN_X_AFTER
) : /* --after-- */
332 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
333 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
334 #define FLD(f) abuf->fields.fmt_empty.f
335 int UNUSED written
= 0;
336 IADDR UNUSED pc
= abuf
->addr
;
337 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
340 #if WITH_SCACHE_PBB_CRISV10F
341 crisv10f_pbb_after (current_cpu
, sem_arg
);
349 CASE (sem
, INSN_X_BEFORE
) : /* --before-- */
351 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
352 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
353 #define FLD(f) abuf->fields.fmt_empty.f
354 int UNUSED written
= 0;
355 IADDR UNUSED pc
= abuf
->addr
;
356 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
359 #if WITH_SCACHE_PBB_CRISV10F
360 crisv10f_pbb_before (current_cpu
, sem_arg
);
368 CASE (sem
, INSN_X_CTI_CHAIN
) : /* --cti-chain-- */
370 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
371 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
372 #define FLD(f) abuf->fields.fmt_empty.f
373 int UNUSED written
= 0;
374 IADDR UNUSED pc
= abuf
->addr
;
375 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
378 #if WITH_SCACHE_PBB_CRISV10F
380 vpc
= crisv10f_pbb_cti_chain (current_cpu
, sem_arg
,
381 pbb_br_type
, pbb_br_npc
);
384 /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
385 vpc
= crisv10f_pbb_cti_chain (current_cpu
, sem_arg
,
386 CPU_PBB_BR_TYPE (current_cpu
),
387 CPU_PBB_BR_NPC (current_cpu
));
396 CASE (sem
, INSN_X_CHAIN
) : /* --chain-- */
398 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
399 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
400 #define FLD(f) abuf->fields.fmt_empty.f
401 int UNUSED written
= 0;
402 IADDR UNUSED pc
= abuf
->addr
;
403 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
406 #if WITH_SCACHE_PBB_CRISV10F
407 vpc
= crisv10f_pbb_chain (current_cpu
, sem_arg
);
418 CASE (sem
, INSN_X_BEGIN
) : /* --begin-- */
420 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
421 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
422 #define FLD(f) abuf->fields.fmt_empty.f
423 int UNUSED written
= 0;
424 IADDR UNUSED pc
= abuf
->addr
;
425 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
428 #if WITH_SCACHE_PBB_CRISV10F
429 #if defined DEFINE_SWITCH || defined FAST_P
430 /* In the switch case FAST_P is a constant, allowing several optimizations
431 in any called inline functions. */
432 vpc
= crisv10f_pbb_begin (current_cpu
, FAST_P
);
434 #if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
435 vpc
= crisv10f_pbb_begin (current_cpu
, STATE_RUN_FAST_P (CPU_STATE (current_cpu
)));
437 vpc
= crisv10f_pbb_begin (current_cpu
, 0);
447 CASE (sem
, INSN_NOP
) : /* nop */
449 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
450 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
451 #define FLD(f) abuf->fields.fmt_empty.f
452 int UNUSED written
= 0;
453 IADDR UNUSED pc
= abuf
->addr
;
454 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
459 CPU (h_xbit
) = opval
;
460 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
464 SET_H_INSN_PREFIXED_P (opval
);
465 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
473 CASE (sem
, INSN_MOVE_B_R
) : /* move.b move.m ${Rs},${Rd} */
475 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
476 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
477 #define FLD(f) abuf->fields.sfmt_add_b_r.f
478 int UNUSED written
= 0;
479 IADDR UNUSED pc
= abuf
->addr
;
480 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
484 tmp_newval
= GET_H_GR (FLD (f_operand1
));
487 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
489 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
490 SET_H_GR (FLD (f_operand2
), opval
);
491 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
496 BI opval
= LTQI (tmp_newval
, 0);
497 CPU (h_nbit
) = opval
;
498 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
501 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
502 CPU (h_zbit
) = opval
;
503 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
510 CPU (h_xbit
) = opval
;
511 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
515 SET_H_INSN_PREFIXED_P (opval
);
516 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
526 CASE (sem
, INSN_MOVE_W_R
) : /* move.w move.m ${Rs},${Rd} */
528 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
529 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
530 #define FLD(f) abuf->fields.sfmt_add_b_r.f
531 int UNUSED written
= 0;
532 IADDR UNUSED pc
= abuf
->addr
;
533 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
537 tmp_newval
= GET_H_GR (FLD (f_operand1
));
540 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
542 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
543 SET_H_GR (FLD (f_operand2
), opval
);
544 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
549 BI opval
= LTHI (tmp_newval
, 0);
550 CPU (h_nbit
) = opval
;
551 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
554 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
555 CPU (h_zbit
) = opval
;
556 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
563 CPU (h_xbit
) = opval
;
564 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
568 SET_H_INSN_PREFIXED_P (opval
);
569 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
579 CASE (sem
, INSN_MOVE_D_R
) : /* move.d move.m ${Rs},${Rd} */
581 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
582 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
583 #define FLD(f) abuf->fields.sfmt_add_b_r.f
584 int UNUSED written
= 0;
585 IADDR UNUSED pc
= abuf
->addr
;
586 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
590 tmp_newval
= GET_H_GR (FLD (f_operand1
));
592 SI opval
= tmp_newval
;
593 SET_H_GR (FLD (f_operand2
), opval
);
594 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
598 BI opval
= LTSI (tmp_newval
, 0);
599 CPU (h_nbit
) = opval
;
600 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
603 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
604 CPU (h_zbit
) = opval
;
605 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
612 CPU (h_xbit
) = opval
;
613 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
617 SET_H_INSN_PREFIXED_P (opval
);
618 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
628 CASE (sem
, INSN_MOVEPCR
) : /* move.d PC,${Rd} */
630 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
631 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
632 #define FLD(f) abuf->fields.sfmt_moveq.f
633 int UNUSED written
= 0;
634 IADDR UNUSED pc
= abuf
->addr
;
636 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
640 tmp_pcval
= ADDSI (pc
, 2);
642 SI opval
= tmp_pcval
;
643 SET_H_GR (FLD (f_operand2
), opval
);
644 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
648 BI opval
= LTSI (tmp_pcval
, 0);
649 CPU (h_nbit
) = opval
;
650 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
653 BI opval
= ANDIF (EQSI (tmp_pcval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
654 CPU (h_zbit
) = opval
;
655 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
662 CPU (h_xbit
) = opval
;
663 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
667 SET_H_INSN_PREFIXED_P (opval
);
668 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
674 SEM_BRANCH_FINI (vpc
);
679 CASE (sem
, INSN_MOVEQ
) : /* moveq $i,$Rd */
681 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
682 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
683 #define FLD(f) abuf->fields.sfmt_moveq.f
684 int UNUSED written
= 0;
685 IADDR UNUSED pc
= abuf
->addr
;
686 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
690 tmp_newval
= FLD (f_s6
);
692 SI opval
= tmp_newval
;
693 SET_H_GR (FLD (f_operand2
), opval
);
694 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
697 SET_H_NBIT_MOVE (LTSI (tmp_newval
, 0));
698 SET_H_ZBIT_MOVE (ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1))));
704 CPU (h_xbit
) = opval
;
705 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
709 SET_H_INSN_PREFIXED_P (opval
);
710 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
720 CASE (sem
, INSN_MOVS_B_R
) : /* movs.b movs.m ${Rs},${Rd} */
722 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
723 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
724 #define FLD(f) abuf->fields.sfmt_muls_b.f
725 int UNUSED written
= 0;
726 IADDR UNUSED pc
= abuf
->addr
;
727 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
732 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
733 tmp_newval
= EXTQISI (tmp_tmpops
);
735 SI opval
= tmp_newval
;
736 SET_H_GR (FLD (f_operand2
), opval
);
737 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
741 BI opval
= LTSI (tmp_newval
, 0);
742 CPU (h_nbit
) = opval
;
743 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
746 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
747 CPU (h_zbit
) = opval
;
748 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
755 CPU (h_xbit
) = opval
;
756 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
760 SET_H_INSN_PREFIXED_P (opval
);
761 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
771 CASE (sem
, INSN_MOVS_W_R
) : /* movs.w movs.m ${Rs},${Rd} */
773 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
774 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
775 #define FLD(f) abuf->fields.sfmt_muls_b.f
776 int UNUSED written
= 0;
777 IADDR UNUSED pc
= abuf
->addr
;
778 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
783 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
784 tmp_newval
= EXTHISI (tmp_tmpops
);
786 SI opval
= tmp_newval
;
787 SET_H_GR (FLD (f_operand2
), opval
);
788 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
792 BI opval
= LTSI (tmp_newval
, 0);
793 CPU (h_nbit
) = opval
;
794 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
797 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
798 CPU (h_zbit
) = opval
;
799 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
806 CPU (h_xbit
) = opval
;
807 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
811 SET_H_INSN_PREFIXED_P (opval
);
812 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
822 CASE (sem
, INSN_MOVU_B_R
) : /* movu.b movu.m ${Rs},${Rd} */
824 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
825 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
826 #define FLD(f) abuf->fields.sfmt_muls_b.f
827 int UNUSED written
= 0;
828 IADDR UNUSED pc
= abuf
->addr
;
829 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
834 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
835 tmp_newval
= ZEXTQISI (tmp_tmpops
);
837 SI opval
= tmp_newval
;
838 SET_H_GR (FLD (f_operand2
), opval
);
839 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
843 BI opval
= LTSI (tmp_newval
, 0);
844 CPU (h_nbit
) = opval
;
845 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
848 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
849 CPU (h_zbit
) = opval
;
850 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
857 CPU (h_xbit
) = opval
;
858 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
862 SET_H_INSN_PREFIXED_P (opval
);
863 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
873 CASE (sem
, INSN_MOVU_W_R
) : /* movu.w movu.m ${Rs},${Rd} */
875 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
876 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
877 #define FLD(f) abuf->fields.sfmt_muls_b.f
878 int UNUSED written
= 0;
879 IADDR UNUSED pc
= abuf
->addr
;
880 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
885 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
886 tmp_newval
= ZEXTHISI (tmp_tmpops
);
888 SI opval
= tmp_newval
;
889 SET_H_GR (FLD (f_operand2
), opval
);
890 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
894 BI opval
= LTSI (tmp_newval
, 0);
895 CPU (h_nbit
) = opval
;
896 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
899 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
900 CPU (h_zbit
) = opval
;
901 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
908 CPU (h_xbit
) = opval
;
909 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
913 SET_H_INSN_PREFIXED_P (opval
);
914 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
924 CASE (sem
, INSN_MOVECBR
) : /* move.b ${sconst8},${Rd} */
926 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
927 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
928 #define FLD(f) abuf->fields.sfmt_addcbr.f
929 int UNUSED written
= 0;
930 IADDR UNUSED pc
= abuf
->addr
;
931 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
935 tmp_newval
= FLD (f_indir_pc__byte
);
938 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
940 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
941 SET_H_GR (FLD (f_operand2
), opval
);
942 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
947 BI opval
= LTQI (tmp_newval
, 0);
948 CPU (h_nbit
) = opval
;
949 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
952 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
953 CPU (h_zbit
) = opval
;
954 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
961 CPU (h_xbit
) = opval
;
962 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
966 SET_H_INSN_PREFIXED_P (opval
);
967 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
977 CASE (sem
, INSN_MOVECWR
) : /* move.w ${sconst16},${Rd} */
979 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
980 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
981 #define FLD(f) abuf->fields.sfmt_addcwr.f
982 int UNUSED written
= 0;
983 IADDR UNUSED pc
= abuf
->addr
;
984 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
988 tmp_newval
= FLD (f_indir_pc__word
);
991 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
993 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
994 SET_H_GR (FLD (f_operand2
), opval
);
995 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1000 BI opval
= LTHI (tmp_newval
, 0);
1001 CPU (h_nbit
) = opval
;
1002 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1005 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
1006 CPU (h_zbit
) = opval
;
1007 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1009 SET_H_CBIT_MOVE (0);
1010 SET_H_VBIT_MOVE (0);
1014 CPU (h_xbit
) = opval
;
1015 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1019 SET_H_INSN_PREFIXED_P (opval
);
1020 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1030 CASE (sem
, INSN_MOVECDR
) : /* move.d ${const32},${Rd} */
1032 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1033 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1034 #define FLD(f) abuf->fields.sfmt_bound_cd.f
1035 int UNUSED written
= 0;
1036 IADDR UNUSED pc
= abuf
->addr
;
1037 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
1041 tmp_newval
= FLD (f_indir_pc__dword
);
1043 SI opval
= tmp_newval
;
1044 SET_H_GR (FLD (f_operand2
), opval
);
1045 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1049 BI opval
= LTSI (tmp_newval
, 0);
1050 CPU (h_nbit
) = opval
;
1051 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1054 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
1055 CPU (h_zbit
) = opval
;
1056 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1058 SET_H_CBIT_MOVE (0);
1059 SET_H_VBIT_MOVE (0);
1063 CPU (h_xbit
) = opval
;
1064 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1068 SET_H_INSN_PREFIXED_P (opval
);
1069 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1079 CASE (sem
, INSN_MOVSCBR
) : /* movs.b ${sconst8},${Rd} */
1081 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1082 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1083 #define FLD(f) abuf->fields.sfmt_bound_cb.f
1084 int UNUSED written
= 0;
1085 IADDR UNUSED pc
= abuf
->addr
;
1086 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1090 tmp_newval
= EXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
1092 SI opval
= tmp_newval
;
1093 SET_H_GR (FLD (f_operand2
), opval
);
1094 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1098 BI opval
= LTSI (tmp_newval
, 0);
1099 CPU (h_nbit
) = opval
;
1100 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1103 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
1104 CPU (h_zbit
) = opval
;
1105 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1107 SET_H_CBIT_MOVE (0);
1108 SET_H_VBIT_MOVE (0);
1112 CPU (h_xbit
) = opval
;
1113 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1117 SET_H_INSN_PREFIXED_P (opval
);
1118 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1128 CASE (sem
, INSN_MOVSCWR
) : /* movs.w ${sconst16},${Rd} */
1130 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1131 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1132 #define FLD(f) abuf->fields.sfmt_bound_cw.f
1133 int UNUSED written
= 0;
1134 IADDR UNUSED pc
= abuf
->addr
;
1135 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1139 tmp_newval
= EXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
1141 SI opval
= tmp_newval
;
1142 SET_H_GR (FLD (f_operand2
), opval
);
1143 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1147 BI opval
= LTSI (tmp_newval
, 0);
1148 CPU (h_nbit
) = opval
;
1149 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1152 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
1153 CPU (h_zbit
) = opval
;
1154 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1156 SET_H_CBIT_MOVE (0);
1157 SET_H_VBIT_MOVE (0);
1161 CPU (h_xbit
) = opval
;
1162 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1166 SET_H_INSN_PREFIXED_P (opval
);
1167 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1177 CASE (sem
, INSN_MOVUCBR
) : /* movu.b ${uconst8},${Rd} */
1179 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1180 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1181 #define FLD(f) abuf->fields.sfmt_bound_cb.f
1182 int UNUSED written
= 0;
1183 IADDR UNUSED pc
= abuf
->addr
;
1184 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1188 tmp_newval
= ZEXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
1190 SI opval
= tmp_newval
;
1191 SET_H_GR (FLD (f_operand2
), opval
);
1192 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1196 BI opval
= LTSI (tmp_newval
, 0);
1197 CPU (h_nbit
) = opval
;
1198 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1201 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
1202 CPU (h_zbit
) = opval
;
1203 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1205 SET_H_CBIT_MOVE (0);
1206 SET_H_VBIT_MOVE (0);
1210 CPU (h_xbit
) = opval
;
1211 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1215 SET_H_INSN_PREFIXED_P (opval
);
1216 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1226 CASE (sem
, INSN_MOVUCWR
) : /* movu.w ${uconst16},${Rd} */
1228 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1229 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1230 #define FLD(f) abuf->fields.sfmt_bound_cw.f
1231 int UNUSED written
= 0;
1232 IADDR UNUSED pc
= abuf
->addr
;
1233 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1237 tmp_newval
= ZEXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
1239 SI opval
= tmp_newval
;
1240 SET_H_GR (FLD (f_operand2
), opval
);
1241 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1245 BI opval
= LTSI (tmp_newval
, 0);
1246 CPU (h_nbit
) = opval
;
1247 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1250 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
1251 CPU (h_zbit
) = opval
;
1252 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1254 SET_H_CBIT_MOVE (0);
1255 SET_H_VBIT_MOVE (0);
1259 CPU (h_xbit
) = opval
;
1260 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1264 SET_H_INSN_PREFIXED_P (opval
);
1265 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1275 CASE (sem
, INSN_ADDQ
) : /* addq $j,$Rd */
1277 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1278 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1279 #define FLD(f) abuf->fields.sfmt_addq.f
1280 int UNUSED written
= 0;
1281 IADDR UNUSED pc
= abuf
->addr
;
1282 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1289 tmp_tmpops
= FLD (f_u6
);
1290 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1291 tmp_carry
= CPU (h_cbit
);
1292 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1294 SI opval
= tmp_newval
;
1295 SET_H_GR (FLD (f_operand2
), opval
);
1296 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1300 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))));
1301 CPU (h_cbit
) = opval
;
1302 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1305 BI opval
= LTSI (tmp_newval
, 0);
1306 CPU (h_nbit
) = opval
;
1307 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1310 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1311 CPU (h_zbit
) = opval
;
1312 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1315 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)));
1316 CPU (h_vbit
) = opval
;
1317 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1322 CPU (h_xbit
) = opval
;
1323 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1327 SET_H_INSN_PREFIXED_P (opval
);
1328 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1338 CASE (sem
, INSN_SUBQ
) : /* subq $j,$Rd */
1340 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1341 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1342 #define FLD(f) abuf->fields.sfmt_addq.f
1343 int UNUSED written
= 0;
1344 IADDR UNUSED pc
= abuf
->addr
;
1345 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1352 tmp_tmpops
= FLD (f_u6
);
1353 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1354 tmp_carry
= CPU (h_cbit
);
1355 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1357 SI opval
= tmp_newval
;
1358 SET_H_GR (FLD (f_operand2
), opval
);
1359 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1363 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))));
1364 CPU (h_cbit
) = opval
;
1365 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1368 BI opval
= LTSI (tmp_newval
, 0);
1369 CPU (h_nbit
) = opval
;
1370 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1373 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1374 CPU (h_zbit
) = opval
;
1375 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1378 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)));
1379 CPU (h_vbit
) = opval
;
1380 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1385 CPU (h_xbit
) = opval
;
1386 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1390 SET_H_INSN_PREFIXED_P (opval
);
1391 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1401 CASE (sem
, INSN_CMP_R_B_R
) : /* cmp-r.b $Rs,$Rd */
1403 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1404 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1405 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1406 int UNUSED written
= 0;
1407 IADDR UNUSED pc
= abuf
->addr
;
1408 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1415 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
1416 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1417 tmp_carry
= CPU (h_cbit
);
1418 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1422 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))));
1423 CPU (h_cbit
) = opval
;
1424 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1427 BI opval
= LTQI (tmp_newval
, 0);
1428 CPU (h_nbit
) = opval
;
1429 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1432 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1433 CPU (h_zbit
) = opval
;
1434 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1437 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)));
1438 CPU (h_vbit
) = opval
;
1439 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1444 CPU (h_xbit
) = opval
;
1445 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1449 SET_H_INSN_PREFIXED_P (opval
);
1450 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1460 CASE (sem
, INSN_CMP_R_W_R
) : /* cmp-r.w $Rs,$Rd */
1462 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1463 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1464 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1465 int UNUSED written
= 0;
1466 IADDR UNUSED pc
= abuf
->addr
;
1467 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1474 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
1475 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1476 tmp_carry
= CPU (h_cbit
);
1477 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1481 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))));
1482 CPU (h_cbit
) = opval
;
1483 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1486 BI opval
= LTHI (tmp_newval
, 0);
1487 CPU (h_nbit
) = opval
;
1488 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1491 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1492 CPU (h_zbit
) = opval
;
1493 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1496 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)));
1497 CPU (h_vbit
) = opval
;
1498 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1503 CPU (h_xbit
) = opval
;
1504 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1508 SET_H_INSN_PREFIXED_P (opval
);
1509 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1519 CASE (sem
, INSN_CMP_R_D_R
) : /* cmp-r.d $Rs,$Rd */
1521 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1522 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1523 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1524 int UNUSED written
= 0;
1525 IADDR UNUSED pc
= abuf
->addr
;
1526 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1533 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
1534 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1535 tmp_carry
= CPU (h_cbit
);
1536 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1540 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))));
1541 CPU (h_cbit
) = opval
;
1542 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1545 BI opval
= LTSI (tmp_newval
, 0);
1546 CPU (h_nbit
) = opval
;
1547 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1550 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1551 CPU (h_zbit
) = opval
;
1552 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1555 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)));
1556 CPU (h_vbit
) = opval
;
1557 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1562 CPU (h_xbit
) = opval
;
1563 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1567 SET_H_INSN_PREFIXED_P (opval
);
1568 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1578 CASE (sem
, INSN_CMP_M_B_M
) : /* cmp-m.b [${Rs}${inc}],${Rd} */
1580 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1581 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1582 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
1583 int UNUSED written
= 0;
1584 IADDR UNUSED pc
= abuf
->addr
;
1585 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1592 tmp_tmpops
= ({ SI tmp_addr
;
1595 tmp_postinc
= FLD (f_memmode
);
1596 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
1597 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
1598 ; if (NEBI (tmp_postinc
, 0)) {
1600 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
1601 tmp_addr
= ADDSI (tmp_addr
, 1);
1604 SI opval
= tmp_addr
;
1605 SET_H_GR (FLD (f_operand1
), opval
);
1606 written
|= (1 << 9);
1607 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1612 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1613 tmp_carry
= CPU (h_cbit
);
1614 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1618 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))));
1619 CPU (h_cbit
) = opval
;
1620 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1623 BI opval
= LTQI (tmp_newval
, 0);
1624 CPU (h_nbit
) = opval
;
1625 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1628 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1629 CPU (h_zbit
) = opval
;
1630 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1633 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)));
1634 CPU (h_vbit
) = opval
;
1635 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1640 CPU (h_xbit
) = opval
;
1641 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1645 SET_H_INSN_PREFIXED_P (opval
);
1646 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1652 abuf
->written
= written
;
1657 CASE (sem
, INSN_CMP_M_W_M
) : /* cmp-m.w [${Rs}${inc}],${Rd} */
1659 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1660 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1661 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
1662 int UNUSED written
= 0;
1663 IADDR UNUSED pc
= abuf
->addr
;
1664 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1671 tmp_tmpops
= ({ SI tmp_addr
;
1674 tmp_postinc
= FLD (f_memmode
);
1675 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
1676 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
1677 ; if (NEBI (tmp_postinc
, 0)) {
1679 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
1680 tmp_addr
= ADDSI (tmp_addr
, 2);
1683 SI opval
= tmp_addr
;
1684 SET_H_GR (FLD (f_operand1
), opval
);
1685 written
|= (1 << 9);
1686 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1691 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1692 tmp_carry
= CPU (h_cbit
);
1693 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1697 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))));
1698 CPU (h_cbit
) = opval
;
1699 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1702 BI opval
= LTHI (tmp_newval
, 0);
1703 CPU (h_nbit
) = opval
;
1704 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1707 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1708 CPU (h_zbit
) = opval
;
1709 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1712 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)));
1713 CPU (h_vbit
) = opval
;
1714 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1719 CPU (h_xbit
) = opval
;
1720 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1724 SET_H_INSN_PREFIXED_P (opval
);
1725 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1731 abuf
->written
= written
;
1736 CASE (sem
, INSN_CMP_M_D_M
) : /* cmp-m.d [${Rs}${inc}],${Rd} */
1738 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1739 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1740 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
1741 int UNUSED written
= 0;
1742 IADDR UNUSED pc
= abuf
->addr
;
1743 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1750 tmp_tmpops
= ({ SI tmp_addr
;
1753 tmp_postinc
= FLD (f_memmode
);
1754 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
1755 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
1756 ; if (NEBI (tmp_postinc
, 0)) {
1758 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
1759 tmp_addr
= ADDSI (tmp_addr
, 4);
1762 SI opval
= tmp_addr
;
1763 SET_H_GR (FLD (f_operand1
), opval
);
1764 written
|= (1 << 9);
1765 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1770 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1771 tmp_carry
= CPU (h_cbit
);
1772 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1776 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))));
1777 CPU (h_cbit
) = opval
;
1778 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1781 BI opval
= LTSI (tmp_newval
, 0);
1782 CPU (h_nbit
) = opval
;
1783 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1786 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1787 CPU (h_zbit
) = opval
;
1788 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1791 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)));
1792 CPU (h_vbit
) = opval
;
1793 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1798 CPU (h_xbit
) = opval
;
1799 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1803 SET_H_INSN_PREFIXED_P (opval
);
1804 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1810 abuf
->written
= written
;
1815 CASE (sem
, INSN_CMPCBR
) : /* cmp.b $sconst8,$Rd */
1817 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1818 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1819 #define FLD(f) abuf->fields.sfmt_bound_cb.f
1820 int UNUSED written
= 0;
1821 IADDR UNUSED pc
= abuf
->addr
;
1822 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1829 tmp_tmpops
= TRUNCSIQI (FLD (f_indir_pc__byte
));
1830 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1831 tmp_carry
= CPU (h_cbit
);
1832 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1836 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))));
1837 CPU (h_cbit
) = opval
;
1838 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1841 BI opval
= LTQI (tmp_newval
, 0);
1842 CPU (h_nbit
) = opval
;
1843 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1846 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1847 CPU (h_zbit
) = opval
;
1848 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1851 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)));
1852 CPU (h_vbit
) = opval
;
1853 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1858 CPU (h_xbit
) = opval
;
1859 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1863 SET_H_INSN_PREFIXED_P (opval
);
1864 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1874 CASE (sem
, INSN_CMPCWR
) : /* cmp.w $sconst16,$Rd */
1876 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1877 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1878 #define FLD(f) abuf->fields.sfmt_bound_cw.f
1879 int UNUSED written
= 0;
1880 IADDR UNUSED pc
= abuf
->addr
;
1881 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1888 tmp_tmpops
= TRUNCSIHI (FLD (f_indir_pc__word
));
1889 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1890 tmp_carry
= CPU (h_cbit
);
1891 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1895 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))));
1896 CPU (h_cbit
) = opval
;
1897 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1900 BI opval
= LTHI (tmp_newval
, 0);
1901 CPU (h_nbit
) = opval
;
1902 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1905 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1906 CPU (h_zbit
) = opval
;
1907 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1910 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)));
1911 CPU (h_vbit
) = opval
;
1912 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1917 CPU (h_xbit
) = opval
;
1918 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1922 SET_H_INSN_PREFIXED_P (opval
);
1923 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1933 CASE (sem
, INSN_CMPCDR
) : /* cmp.d $const32,$Rd */
1935 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1936 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1937 #define FLD(f) abuf->fields.sfmt_bound_cd.f
1938 int UNUSED written
= 0;
1939 IADDR UNUSED pc
= abuf
->addr
;
1940 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
1947 tmp_tmpops
= FLD (f_indir_pc__dword
);
1948 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
1949 tmp_carry
= CPU (h_cbit
);
1950 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
1954 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))));
1955 CPU (h_cbit
) = opval
;
1956 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1959 BI opval
= LTSI (tmp_newval
, 0);
1960 CPU (h_nbit
) = opval
;
1961 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1964 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
1965 CPU (h_zbit
) = opval
;
1966 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1969 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)));
1970 CPU (h_vbit
) = opval
;
1971 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1976 CPU (h_xbit
) = opval
;
1977 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
1981 SET_H_INSN_PREFIXED_P (opval
);
1982 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
1992 CASE (sem
, INSN_CMPQ
) : /* cmpq $i,$Rd */
1994 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1995 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1996 #define FLD(f) abuf->fields.sfmt_andq.f
1997 int UNUSED written
= 0;
1998 IADDR UNUSED pc
= abuf
->addr
;
1999 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2006 tmp_tmpops
= FLD (f_s6
);
2007 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2008 tmp_carry
= CPU (h_cbit
);
2009 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2013 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))));
2014 CPU (h_cbit
) = opval
;
2015 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2018 BI opval
= LTSI (tmp_newval
, 0);
2019 CPU (h_nbit
) = opval
;
2020 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2023 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2024 CPU (h_zbit
) = opval
;
2025 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2028 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)));
2029 CPU (h_vbit
) = opval
;
2030 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2035 CPU (h_xbit
) = opval
;
2036 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2040 SET_H_INSN_PREFIXED_P (opval
);
2041 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2051 CASE (sem
, INSN_CMPS_M_B_M
) : /* cmps-m.b [${Rs}${inc}],$Rd */
2053 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2054 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2055 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2056 int UNUSED written
= 0;
2057 IADDR UNUSED pc
= abuf
->addr
;
2058 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2065 tmp_tmpops
= EXTQISI (({ SI tmp_addr
;
2068 tmp_postinc
= FLD (f_memmode
);
2069 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
2070 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
2071 ; if (NEBI (tmp_postinc
, 0)) {
2073 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2074 tmp_addr
= ADDSI (tmp_addr
, 1);
2077 SI opval
= tmp_addr
;
2078 SET_H_GR (FLD (f_operand1
), opval
);
2079 written
|= (1 << 9);
2080 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2085 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2086 tmp_carry
= CPU (h_cbit
);
2087 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2091 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))));
2092 CPU (h_cbit
) = opval
;
2093 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2096 BI opval
= LTSI (tmp_newval
, 0);
2097 CPU (h_nbit
) = opval
;
2098 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2101 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2102 CPU (h_zbit
) = opval
;
2103 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2106 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)));
2107 CPU (h_vbit
) = opval
;
2108 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2113 CPU (h_xbit
) = opval
;
2114 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2118 SET_H_INSN_PREFIXED_P (opval
);
2119 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2125 abuf
->written
= written
;
2130 CASE (sem
, INSN_CMPS_M_W_M
) : /* cmps-m.w [${Rs}${inc}],$Rd */
2132 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2133 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2134 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2135 int UNUSED written
= 0;
2136 IADDR UNUSED pc
= abuf
->addr
;
2137 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2144 tmp_tmpops
= EXTHISI (({ SI tmp_addr
;
2147 tmp_postinc
= FLD (f_memmode
);
2148 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
2149 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
2150 ; if (NEBI (tmp_postinc
, 0)) {
2152 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2153 tmp_addr
= ADDSI (tmp_addr
, 2);
2156 SI opval
= tmp_addr
;
2157 SET_H_GR (FLD (f_operand1
), opval
);
2158 written
|= (1 << 9);
2159 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2164 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2165 tmp_carry
= CPU (h_cbit
);
2166 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2170 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))));
2171 CPU (h_cbit
) = opval
;
2172 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2175 BI opval
= LTSI (tmp_newval
, 0);
2176 CPU (h_nbit
) = opval
;
2177 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2180 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2181 CPU (h_zbit
) = opval
;
2182 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2185 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)));
2186 CPU (h_vbit
) = opval
;
2187 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2192 CPU (h_xbit
) = opval
;
2193 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2197 SET_H_INSN_PREFIXED_P (opval
);
2198 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2204 abuf
->written
= written
;
2209 CASE (sem
, INSN_CMPSCBR
) : /* [${Rs}${inc}],$Rd */
2211 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2212 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2213 #define FLD(f) abuf->fields.sfmt_bound_cb.f
2214 int UNUSED written
= 0;
2215 IADDR UNUSED pc
= abuf
->addr
;
2216 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2223 tmp_tmpops
= EXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
2224 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2225 tmp_carry
= CPU (h_cbit
);
2226 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2230 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))));
2231 CPU (h_cbit
) = opval
;
2232 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2235 BI opval
= LTSI (tmp_newval
, 0);
2236 CPU (h_nbit
) = opval
;
2237 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2240 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2241 CPU (h_zbit
) = opval
;
2242 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2245 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)));
2246 CPU (h_vbit
) = opval
;
2247 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2252 CPU (h_xbit
) = opval
;
2253 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2257 SET_H_INSN_PREFIXED_P (opval
);
2258 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2268 CASE (sem
, INSN_CMPSCWR
) : /* [${Rs}${inc}],$Rd */
2270 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2271 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2272 #define FLD(f) abuf->fields.sfmt_bound_cw.f
2273 int UNUSED written
= 0;
2274 IADDR UNUSED pc
= abuf
->addr
;
2275 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2282 tmp_tmpops
= EXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
2283 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2284 tmp_carry
= CPU (h_cbit
);
2285 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2289 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))));
2290 CPU (h_cbit
) = opval
;
2291 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2294 BI opval
= LTSI (tmp_newval
, 0);
2295 CPU (h_nbit
) = opval
;
2296 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2299 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2300 CPU (h_zbit
) = opval
;
2301 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2304 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)));
2305 CPU (h_vbit
) = opval
;
2306 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2311 CPU (h_xbit
) = opval
;
2312 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2316 SET_H_INSN_PREFIXED_P (opval
);
2317 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2327 CASE (sem
, INSN_CMPU_M_B_M
) : /* cmpu-m.b [${Rs}${inc}],$Rd */
2329 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2330 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2331 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2332 int UNUSED written
= 0;
2333 IADDR UNUSED pc
= abuf
->addr
;
2334 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2341 tmp_tmpops
= ZEXTQISI (({ SI tmp_addr
;
2344 tmp_postinc
= FLD (f_memmode
);
2345 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
2346 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
2347 ; if (NEBI (tmp_postinc
, 0)) {
2349 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2350 tmp_addr
= ADDSI (tmp_addr
, 1);
2353 SI opval
= tmp_addr
;
2354 SET_H_GR (FLD (f_operand1
), opval
);
2355 written
|= (1 << 9);
2356 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2361 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2362 tmp_carry
= CPU (h_cbit
);
2363 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2367 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))));
2368 CPU (h_cbit
) = opval
;
2369 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2372 BI opval
= LTSI (tmp_newval
, 0);
2373 CPU (h_nbit
) = opval
;
2374 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2377 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2378 CPU (h_zbit
) = opval
;
2379 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2382 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)));
2383 CPU (h_vbit
) = opval
;
2384 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2389 CPU (h_xbit
) = opval
;
2390 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2394 SET_H_INSN_PREFIXED_P (opval
);
2395 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2401 abuf
->written
= written
;
2406 CASE (sem
, INSN_CMPU_M_W_M
) : /* cmpu-m.w [${Rs}${inc}],$Rd */
2408 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2409 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2410 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2411 int UNUSED written
= 0;
2412 IADDR UNUSED pc
= abuf
->addr
;
2413 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2420 tmp_tmpops
= ZEXTHISI (({ SI tmp_addr
;
2423 tmp_postinc
= FLD (f_memmode
);
2424 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
2425 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
2426 ; if (NEBI (tmp_postinc
, 0)) {
2428 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2429 tmp_addr
= ADDSI (tmp_addr
, 2);
2432 SI opval
= tmp_addr
;
2433 SET_H_GR (FLD (f_operand1
), opval
);
2434 written
|= (1 << 9);
2435 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2440 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2441 tmp_carry
= CPU (h_cbit
);
2442 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2446 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))));
2447 CPU (h_cbit
) = opval
;
2448 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2451 BI opval
= LTSI (tmp_newval
, 0);
2452 CPU (h_nbit
) = opval
;
2453 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2456 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2457 CPU (h_zbit
) = opval
;
2458 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2461 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)));
2462 CPU (h_vbit
) = opval
;
2463 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2468 CPU (h_xbit
) = opval
;
2469 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2473 SET_H_INSN_PREFIXED_P (opval
);
2474 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2480 abuf
->written
= written
;
2485 CASE (sem
, INSN_CMPUCBR
) : /* [${Rs}${inc}],$Rd */
2487 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2488 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2489 #define FLD(f) abuf->fields.sfmt_bound_cb.f
2490 int UNUSED written
= 0;
2491 IADDR UNUSED pc
= abuf
->addr
;
2492 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2499 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
2500 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2501 tmp_carry
= CPU (h_cbit
);
2502 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2506 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))));
2507 CPU (h_cbit
) = opval
;
2508 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2511 BI opval
= LTSI (tmp_newval
, 0);
2512 CPU (h_nbit
) = opval
;
2513 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2516 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2517 CPU (h_zbit
) = opval
;
2518 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2521 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)));
2522 CPU (h_vbit
) = opval
;
2523 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2528 CPU (h_xbit
) = opval
;
2529 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2533 SET_H_INSN_PREFIXED_P (opval
);
2534 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2544 CASE (sem
, INSN_CMPUCWR
) : /* [${Rs}${inc}],$Rd */
2546 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2547 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2548 #define FLD(f) abuf->fields.sfmt_bound_cw.f
2549 int UNUSED written
= 0;
2550 IADDR UNUSED pc
= abuf
->addr
;
2551 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2558 tmp_tmpops
= ZEXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
2559 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
2560 tmp_carry
= CPU (h_cbit
);
2561 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
2565 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))));
2566 CPU (h_cbit
) = opval
;
2567 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2570 BI opval
= LTSI (tmp_newval
, 0);
2571 CPU (h_nbit
) = opval
;
2572 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2575 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
2576 CPU (h_zbit
) = opval
;
2577 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2580 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)));
2581 CPU (h_vbit
) = opval
;
2582 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
2587 CPU (h_xbit
) = opval
;
2588 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2592 SET_H_INSN_PREFIXED_P (opval
);
2593 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2603 CASE (sem
, INSN_MOVE_M_B_M
) : /* move-m.b [${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
))) : (CPU (h_prefixreg_pre_v32
)));
2619 ; tmp_tmp_mem
= GETMEMQI (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
, 1);
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_PC (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
2638 SI opval
= ORSI (ANDSI (tmp_tmp
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
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
= LTQI (tmp_tmp
, 0);
2646 CPU (h_nbit
) = opval
;
2647 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2650 BI opval
= ANDIF (EQQI (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_W_M
) : /* move-m.w [${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
))) : (CPU (h_prefixreg_pre_v32
)));
2692 ; tmp_tmp_mem
= GETMEMHI (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
, 2);
2699 SI opval
= tmp_addr
;
2700 SET_H_GR (FLD (f_operand1
), opval
);
2701 written
|= (1 << 10);
2702 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2709 tmp_oldregval
= GET_H_RAW_GR_PC (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
2711 SI opval
= ORSI (ANDSI (tmp_tmp
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
2712 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
2713 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2718 BI opval
= LTHI (tmp_tmp
, 0);
2719 CPU (h_nbit
) = opval
;
2720 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2723 BI opval
= ANDIF (EQHI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
2724 CPU (h_zbit
) = opval
;
2725 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2727 SET_H_CBIT_MOVE (0);
2728 SET_H_VBIT_MOVE (0);
2732 CPU (h_xbit
) = opval
;
2733 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2737 SET_H_INSN_PREFIXED_P (opval
);
2738 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2744 abuf
->written
= written
;
2749 CASE (sem
, INSN_MOVE_M_D_M
) : /* move-m.d [${Rs}${inc}],${Rd} */
2751 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2752 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2753 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2754 int UNUSED written
= 0;
2755 IADDR UNUSED pc
= abuf
->addr
;
2756 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2760 tmp_tmp
= ({ SI tmp_addr
;
2763 tmp_postinc
= FLD (f_memmode
);
2764 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
2765 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
2766 ; if (NEBI (tmp_postinc
, 0)) {
2768 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2769 tmp_addr
= ADDSI (tmp_addr
, 4);
2772 SI opval
= tmp_addr
;
2773 SET_H_GR (FLD (f_operand1
), opval
);
2774 written
|= (1 << 9);
2775 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2782 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
2783 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2787 BI opval
= LTSI (tmp_tmp
, 0);
2788 CPU (h_nbit
) = opval
;
2789 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2792 BI opval
= ANDIF (EQSI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
2793 CPU (h_zbit
) = opval
;
2794 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2796 SET_H_CBIT_MOVE (0);
2797 SET_H_VBIT_MOVE (0);
2801 CPU (h_xbit
) = opval
;
2802 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2806 SET_H_INSN_PREFIXED_P (opval
);
2807 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2813 abuf
->written
= written
;
2818 CASE (sem
, INSN_MOVS_M_B_M
) : /* movs-m.b [${Rs}${inc}],${Rd} */
2820 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2821 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2822 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2823 int UNUSED written
= 0;
2824 IADDR UNUSED pc
= abuf
->addr
;
2825 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2829 tmp_tmp
= EXTQISI (({ SI tmp_addr
;
2832 tmp_postinc
= FLD (f_memmode
);
2833 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
2834 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
2835 ; if (NEBI (tmp_postinc
, 0)) {
2837 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2838 tmp_addr
= ADDSI (tmp_addr
, 1);
2841 SI opval
= tmp_addr
;
2842 SET_H_GR (FLD (f_operand1
), opval
);
2843 written
|= (1 << 8);
2844 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2849 if (ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) {
2852 SET_H_GR (FLD (f_operand1
), opval
);
2853 written
|= (1 << 8);
2854 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2859 SET_H_GR (FLD (f_operand2
), opval
);
2860 written
|= (1 << 7);
2861 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2866 BI opval
= LTSI (tmp_tmp
, 0);
2867 CPU (h_nbit
) = opval
;
2868 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2871 BI opval
= ANDIF (EQSI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
2872 CPU (h_zbit
) = opval
;
2873 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2875 SET_H_CBIT_MOVE (0);
2876 SET_H_VBIT_MOVE (0);
2880 CPU (h_xbit
) = opval
;
2881 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2885 SET_H_INSN_PREFIXED_P (opval
);
2886 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2892 abuf
->written
= written
;
2897 CASE (sem
, INSN_MOVS_M_W_M
) : /* movs-m.w [${Rs}${inc}],${Rd} */
2899 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2900 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2901 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2902 int UNUSED written
= 0;
2903 IADDR UNUSED pc
= abuf
->addr
;
2904 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2908 tmp_tmp
= EXTHISI (({ SI tmp_addr
;
2911 tmp_postinc
= FLD (f_memmode
);
2912 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
2913 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
2914 ; if (NEBI (tmp_postinc
, 0)) {
2916 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2917 tmp_addr
= ADDSI (tmp_addr
, 2);
2920 SI opval
= tmp_addr
;
2921 SET_H_GR (FLD (f_operand1
), opval
);
2922 written
|= (1 << 8);
2923 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2928 if (ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) {
2931 SET_H_GR (FLD (f_operand1
), opval
);
2932 written
|= (1 << 8);
2933 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2938 SET_H_GR (FLD (f_operand2
), opval
);
2939 written
|= (1 << 7);
2940 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2945 BI opval
= LTSI (tmp_tmp
, 0);
2946 CPU (h_nbit
) = opval
;
2947 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2950 BI opval
= ANDIF (EQSI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
2951 CPU (h_zbit
) = opval
;
2952 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2954 SET_H_CBIT_MOVE (0);
2955 SET_H_VBIT_MOVE (0);
2959 CPU (h_xbit
) = opval
;
2960 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
2964 SET_H_INSN_PREFIXED_P (opval
);
2965 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
2971 abuf
->written
= written
;
2976 CASE (sem
, INSN_MOVU_M_B_M
) : /* movu-m.b [${Rs}${inc}],${Rd} */
2978 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2979 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2980 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2981 int UNUSED written
= 0;
2982 IADDR UNUSED pc
= abuf
->addr
;
2983 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2987 tmp_tmp
= ZEXTQISI (({ SI tmp_addr
;
2990 tmp_postinc
= FLD (f_memmode
);
2991 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
2992 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
2993 ; if (NEBI (tmp_postinc
, 0)) {
2995 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
2996 tmp_addr
= ADDSI (tmp_addr
, 1);
2999 SI opval
= tmp_addr
;
3000 SET_H_GR (FLD (f_operand1
), opval
);
3001 written
|= (1 << 8);
3002 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3007 if (ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) {
3010 SET_H_GR (FLD (f_operand1
), opval
);
3011 written
|= (1 << 8);
3012 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3017 SET_H_GR (FLD (f_operand2
), opval
);
3018 written
|= (1 << 7);
3019 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3024 BI opval
= LTSI (tmp_tmp
, 0);
3025 CPU (h_nbit
) = opval
;
3026 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
3029 BI opval
= ANDIF (EQSI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
3030 CPU (h_zbit
) = opval
;
3031 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
3033 SET_H_CBIT_MOVE (0);
3034 SET_H_VBIT_MOVE (0);
3038 CPU (h_xbit
) = opval
;
3039 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3043 SET_H_INSN_PREFIXED_P (opval
);
3044 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3050 abuf
->written
= written
;
3055 CASE (sem
, INSN_MOVU_M_W_M
) : /* movu-m.w [${Rs}${inc}],${Rd} */
3057 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3058 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3059 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
3060 int UNUSED written
= 0;
3061 IADDR UNUSED pc
= abuf
->addr
;
3062 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3066 tmp_tmp
= ZEXTHISI (({ SI tmp_addr
;
3069 tmp_postinc
= FLD (f_memmode
);
3070 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
3071 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
3072 ; if (NEBI (tmp_postinc
, 0)) {
3074 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3075 tmp_addr
= ADDSI (tmp_addr
, 2);
3078 SI opval
= tmp_addr
;
3079 SET_H_GR (FLD (f_operand1
), opval
);
3080 written
|= (1 << 8);
3081 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3086 if (ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) {
3089 SET_H_GR (FLD (f_operand1
), opval
);
3090 written
|= (1 << 8);
3091 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3096 SET_H_GR (FLD (f_operand2
), opval
);
3097 written
|= (1 << 7);
3098 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3103 BI opval
= LTSI (tmp_tmp
, 0);
3104 CPU (h_nbit
) = opval
;
3105 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
3108 BI opval
= ANDIF (EQSI (tmp_tmp
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
3109 CPU (h_zbit
) = opval
;
3110 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
3112 SET_H_CBIT_MOVE (0);
3113 SET_H_VBIT_MOVE (0);
3117 CPU (h_xbit
) = opval
;
3118 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3122 SET_H_INSN_PREFIXED_P (opval
);
3123 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3129 abuf
->written
= written
;
3134 CASE (sem
, INSN_MOVE_R_SPRV10
) : /* move ${Rs},${Pd} */
3136 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3137 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3138 #define FLD(f) abuf->fields.sfmt_move_m_sprv10.f
3139 int UNUSED written
= 0;
3140 IADDR UNUSED pc
= abuf
->addr
;
3141 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3146 tmp_tmp
= GET_H_GR (FLD (f_operand1
));
3147 tmp_rno
= FLD (f_operand2
);
3148 if (ORIF (ORIF (EQSI (tmp_rno
, 0), EQSI (tmp_rno
, 1)), ORIF (EQSI (tmp_rno
, 4), EQSI (tmp_rno
, 8)))) {
3149 cgen_rtx_error (current_cpu
, "move-r-spr: trying to set a read-only special register");
3154 SET_H_SR (FLD (f_operand2
), opval
);
3155 written
|= (1 << 2);
3156 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3162 CPU (h_xbit
) = opval
;
3163 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3167 SET_H_INSN_PREFIXED_P (opval
);
3168 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3173 abuf
->written
= written
;
3178 CASE (sem
, INSN_MOVE_SPR_RV10
) : /* move ${Ps},${Rd-sfield} */
3180 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3181 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3182 #define FLD(f) abuf->fields.sfmt_move_spr_rv10.f
3183 int UNUSED written
= 0;
3184 IADDR UNUSED pc
= abuf
->addr
;
3185 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3191 tmp_prno
= FLD (f_operand2
);
3192 tmp_newval
= GET_H_SR (FLD (f_operand2
));
3193 if (EQSI (tmp_prno
, 5)) {
3196 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand1
));
3198 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
3199 SET_H_GR (FLD (f_operand1
), opval
);
3200 written
|= (1 << 4);
3201 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3205 else if (EQSI (tmp_prno
, 9)) {
3207 SI opval
= tmp_newval
;
3208 SET_H_GR (FLD (f_operand1
), opval
);
3209 written
|= (1 << 4);
3210 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3213 else if (EQSI (tmp_prno
, 10)) {
3215 SI opval
= tmp_newval
;
3216 SET_H_GR (FLD (f_operand1
), opval
);
3217 written
|= (1 << 4);
3218 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3221 else if (EQSI (tmp_prno
, 11)) {
3223 SI opval
= tmp_newval
;
3224 SET_H_GR (FLD (f_operand1
), opval
);
3225 written
|= (1 << 4);
3226 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3229 else if (EQSI (tmp_prno
, 12)) {
3231 SI opval
= tmp_newval
;
3232 SET_H_GR (FLD (f_operand1
), opval
);
3233 written
|= (1 << 4);
3234 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3237 else if (EQSI (tmp_prno
, 13)) {
3239 SI opval
= tmp_newval
;
3240 SET_H_GR (FLD (f_operand1
), opval
);
3241 written
|= (1 << 4);
3242 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3245 else if (EQSI (tmp_prno
, 0)) {
3248 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand1
));
3250 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
3251 SET_H_GR (FLD (f_operand1
), opval
);
3252 written
|= (1 << 4);
3253 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3257 else if (EQSI (tmp_prno
, 1)) {
3260 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand1
));
3262 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
3263 SET_H_GR (FLD (f_operand1
), opval
);
3264 written
|= (1 << 4);
3265 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3269 else if (EQSI (tmp_prno
, 4)) {
3272 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand1
));
3274 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
3275 SET_H_GR (FLD (f_operand1
), opval
);
3276 written
|= (1 << 4);
3277 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3281 else if (EQSI (tmp_prno
, 8)) {
3283 SI opval
= tmp_newval
;
3284 SET_H_GR (FLD (f_operand1
), opval
);
3285 written
|= (1 << 4);
3286 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3289 else if (EQSI (tmp_prno
, 7)) {
3291 SI opval
= tmp_newval
;
3292 SET_H_GR (FLD (f_operand1
), opval
);
3293 written
|= (1 << 4);
3294 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3297 else if (EQSI (tmp_prno
, 14)) {
3299 SI opval
= tmp_newval
;
3300 SET_H_GR (FLD (f_operand1
), opval
);
3301 written
|= (1 << 4);
3302 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3305 else if (EQSI (tmp_prno
, 15)) {
3307 SI opval
= tmp_newval
;
3308 SET_H_GR (FLD (f_operand1
), opval
);
3309 written
|= (1 << 4);
3310 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3314 cgen_rtx_error (current_cpu
, "move-spr-r from unimplemented register");
3319 CPU (h_xbit
) = opval
;
3320 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3324 SET_H_INSN_PREFIXED_P (opval
);
3325 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3330 abuf
->written
= written
;
3335 CASE (sem
, INSN_RET_TYPE
) : /* ret/reti/retb */
3337 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3338 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3339 #define FLD(f) abuf->fields.sfmt_move_spr_rv10.f
3340 int UNUSED written
= 0;
3341 IADDR UNUSED pc
= abuf
->addr
;
3343 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3347 tmp_retaddr
= GET_H_SR (FLD (f_operand2
));
3351 CPU (h_xbit
) = opval
;
3352 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3356 SET_H_INSN_PREFIXED_P (opval
);
3357 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3362 USI opval
= tmp_retaddr
;
3363 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3364 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3369 SEM_BRANCH_FINI (vpc
);
3374 CASE (sem
, INSN_MOVE_M_SPRV10
) : /* move [${Rs}${inc}],${Pd} */
3376 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3377 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3378 #define FLD(f) abuf->fields.sfmt_move_m_sprv10.f
3379 int UNUSED written
= 0;
3380 IADDR UNUSED pc
= abuf
->addr
;
3381 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3386 tmp_rno
= FLD (f_operand2
);
3387 if (EQSI (tmp_rno
, 5)) {
3388 tmp_newval
= EXTHISI (({ 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
))) : (CPU (h_prefixreg_pre_v32
)));
3393 ; tmp_tmp_mem
= GETMEMHI (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
, 2);
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
))) : (CPU (h_prefixreg_pre_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
))) : (CPU (h_prefixreg_pre_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
))) : (CPU (h_prefixreg_pre_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
))) : (CPU (h_prefixreg_pre_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
))) : (CPU (h_prefixreg_pre_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
, 7)) {
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
))) : (CPU (h_prefixreg_pre_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
, 14)) {
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
))) : (CPU (h_prefixreg_pre_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
);
3563 else if (EQSI (tmp_rno
, 15)) {
3564 tmp_newval
= ({ SI tmp_addr
;
3567 tmp_postinc
= FLD (f_memmode
);
3568 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
3569 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3570 ; if (NEBI (tmp_postinc
, 0)) {
3572 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3573 tmp_addr
= ADDSI (tmp_addr
, 4);
3576 SI opval
= tmp_addr
;
3577 SET_H_GR (FLD (f_operand1
), opval
);
3578 written
|= (1 << 8);
3579 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3586 cgen_rtx_error (current_cpu
, "Trying to set unimplemented special register");
3589 SI opval
= tmp_newval
;
3590 SET_H_SR (FLD (f_operand2
), opval
);
3591 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3596 CPU (h_xbit
) = opval
;
3597 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3601 SET_H_INSN_PREFIXED_P (opval
);
3602 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3607 abuf
->written
= written
;
3612 CASE (sem
, INSN_MOVE_C_SPRV10_P5
) : /* move ${sconst16},${Pd} */
3614 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3615 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3616 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p5.f
3617 int UNUSED written
= 0;
3618 IADDR UNUSED pc
= abuf
->addr
;
3619 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3623 SI opval
= FLD (f_indir_pc__word
);
3624 SET_H_SR (FLD (f_operand2
), opval
);
3625 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3630 CPU (h_xbit
) = opval
;
3631 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3635 SET_H_INSN_PREFIXED_P (opval
);
3636 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3645 CASE (sem
, INSN_MOVE_C_SPRV10_P9
) : /* move ${const32},${Pd} */
3647 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3648 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3649 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
3650 int UNUSED written
= 0;
3651 IADDR UNUSED pc
= abuf
->addr
;
3652 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3656 SI opval
= FLD (f_indir_pc__dword
);
3657 SET_H_SR (FLD (f_operand2
), opval
);
3658 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3663 CPU (h_xbit
) = opval
;
3664 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3668 SET_H_INSN_PREFIXED_P (opval
);
3669 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3678 CASE (sem
, INSN_MOVE_C_SPRV10_P10
) : /* move ${const32},${Pd} */
3680 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3681 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3682 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
3683 int UNUSED written
= 0;
3684 IADDR UNUSED pc
= abuf
->addr
;
3685 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3689 SI opval
= FLD (f_indir_pc__dword
);
3690 SET_H_SR (FLD (f_operand2
), opval
);
3691 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3696 CPU (h_xbit
) = opval
;
3697 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3701 SET_H_INSN_PREFIXED_P (opval
);
3702 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3711 CASE (sem
, INSN_MOVE_C_SPRV10_P11
) : /* move ${const32},${Pd} */
3713 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3714 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3715 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
3716 int UNUSED written
= 0;
3717 IADDR UNUSED pc
= abuf
->addr
;
3718 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3722 SI opval
= FLD (f_indir_pc__dword
);
3723 SET_H_SR (FLD (f_operand2
), opval
);
3724 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3729 CPU (h_xbit
) = opval
;
3730 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3734 SET_H_INSN_PREFIXED_P (opval
);
3735 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3744 CASE (sem
, INSN_MOVE_C_SPRV10_P12
) : /* move ${const32},${Pd} */
3746 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3747 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3748 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
3749 int UNUSED written
= 0;
3750 IADDR UNUSED pc
= abuf
->addr
;
3751 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3755 SI opval
= FLD (f_indir_pc__dword
);
3756 SET_H_SR (FLD (f_operand2
), opval
);
3757 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3762 CPU (h_xbit
) = opval
;
3763 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3767 SET_H_INSN_PREFIXED_P (opval
);
3768 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3777 CASE (sem
, INSN_MOVE_C_SPRV10_P13
) : /* move ${const32},${Pd} */
3779 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3780 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3781 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
3782 int UNUSED written
= 0;
3783 IADDR UNUSED pc
= abuf
->addr
;
3784 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3788 SI opval
= FLD (f_indir_pc__dword
);
3789 SET_H_SR (FLD (f_operand2
), opval
);
3790 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3795 CPU (h_xbit
) = opval
;
3796 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3800 SET_H_INSN_PREFIXED_P (opval
);
3801 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3810 CASE (sem
, INSN_MOVE_C_SPRV10_P7
) : /* move ${const32},${Pd} */
3812 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3813 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3814 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
3815 int UNUSED written
= 0;
3816 IADDR UNUSED pc
= abuf
->addr
;
3817 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3821 SI opval
= FLD (f_indir_pc__dword
);
3822 SET_H_SR (FLD (f_operand2
), opval
);
3823 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3828 CPU (h_xbit
) = opval
;
3829 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3833 SET_H_INSN_PREFIXED_P (opval
);
3834 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3843 CASE (sem
, INSN_MOVE_C_SPRV10_P14
) : /* move ${const32},${Pd} */
3845 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3846 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3847 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
3848 int UNUSED written
= 0;
3849 IADDR UNUSED pc
= abuf
->addr
;
3850 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3854 SI opval
= FLD (f_indir_pc__dword
);
3855 SET_H_SR (FLD (f_operand2
), opval
);
3856 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3861 CPU (h_xbit
) = opval
;
3862 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3866 SET_H_INSN_PREFIXED_P (opval
);
3867 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3876 CASE (sem
, INSN_MOVE_C_SPRV10_P15
) : /* move ${const32},${Pd} */
3878 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3879 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3880 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
3881 int UNUSED written
= 0;
3882 IADDR UNUSED pc
= abuf
->addr
;
3883 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
3887 SI opval
= FLD (f_indir_pc__dword
);
3888 SET_H_SR (FLD (f_operand2
), opval
);
3889 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
3894 CPU (h_xbit
) = opval
;
3895 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
3899 SET_H_INSN_PREFIXED_P (opval
);
3900 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
3909 CASE (sem
, INSN_MOVE_SPR_MV10
) : /* move ${Ps},[${Rd-sfield}${inc}] */
3911 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3912 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3913 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
3914 int UNUSED written
= 0;
3915 IADDR UNUSED pc
= abuf
->addr
;
3916 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3920 tmp_rno
= FLD (f_operand2
);
3921 if (EQSI (tmp_rno
, 5)) {
3925 tmp_postinc
= FLD (f_memmode
);
3926 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
3927 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
3928 if (EQBI (CPU (h_pbit
), 0)) {
3931 HI opval
= GET_H_SR (FLD (f_operand2
));
3932 SETMEMHI (current_cpu
, pc
, tmp_addr
, opval
);
3933 written
|= (1 << 11);
3934 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3937 BI opval
= CPU (h_pbit
);
3938 CPU (h_cbit
) = opval
;
3939 written
|= (1 << 10);
3940 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
3946 CPU (h_cbit
) = opval
;
3947 written
|= (1 << 10);
3948 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
3953 HI opval
= GET_H_SR (FLD (f_operand2
));
3954 SETMEMHI (current_cpu
, pc
, tmp_addr
, opval
);
3955 written
|= (1 << 11);
3956 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3959 if (NEBI (tmp_postinc
, 0)) {
3961 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
3962 tmp_addr
= ADDSI (tmp_addr
, 2);
3965 SI opval
= tmp_addr
;
3966 SET_H_GR (FLD (f_operand1
), opval
);
3967 written
|= (1 << 9);
3968 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3974 else if (EQSI (tmp_rno
, 9)) {
3978 tmp_postinc
= FLD (f_memmode
);
3979 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
3980 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
3981 if (EQBI (CPU (h_pbit
), 0)) {
3984 SI opval
= GET_H_SR (FLD (f_operand2
));
3985 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
3986 written
|= (1 << 13);
3987 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3990 BI opval
= CPU (h_pbit
);
3991 CPU (h_cbit
) = opval
;
3992 written
|= (1 << 10);
3993 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
3999 CPU (h_cbit
) = opval
;
4000 written
|= (1 << 10);
4001 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4006 SI opval
= GET_H_SR (FLD (f_operand2
));
4007 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4008 written
|= (1 << 13);
4009 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4012 if (NEBI (tmp_postinc
, 0)) {
4014 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4015 tmp_addr
= ADDSI (tmp_addr
, 4);
4018 SI opval
= tmp_addr
;
4019 SET_H_GR (FLD (f_operand1
), opval
);
4020 written
|= (1 << 9);
4021 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4027 else if (EQSI (tmp_rno
, 10)) {
4031 tmp_postinc
= FLD (f_memmode
);
4032 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4033 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
4034 if (EQBI (CPU (h_pbit
), 0)) {
4037 SI opval
= GET_H_SR (FLD (f_operand2
));
4038 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4039 written
|= (1 << 13);
4040 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4043 BI opval
= CPU (h_pbit
);
4044 CPU (h_cbit
) = opval
;
4045 written
|= (1 << 10);
4046 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4052 CPU (h_cbit
) = opval
;
4053 written
|= (1 << 10);
4054 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4059 SI opval
= GET_H_SR (FLD (f_operand2
));
4060 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4061 written
|= (1 << 13);
4062 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4065 if (NEBI (tmp_postinc
, 0)) {
4067 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4068 tmp_addr
= ADDSI (tmp_addr
, 4);
4071 SI opval
= tmp_addr
;
4072 SET_H_GR (FLD (f_operand1
), opval
);
4073 written
|= (1 << 9);
4074 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4080 else if (EQSI (tmp_rno
, 11)) {
4084 tmp_postinc
= FLD (f_memmode
);
4085 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4086 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
4087 if (EQBI (CPU (h_pbit
), 0)) {
4090 SI opval
= GET_H_SR (FLD (f_operand2
));
4091 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4092 written
|= (1 << 13);
4093 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4096 BI opval
= CPU (h_pbit
);
4097 CPU (h_cbit
) = opval
;
4098 written
|= (1 << 10);
4099 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4105 CPU (h_cbit
) = opval
;
4106 written
|= (1 << 10);
4107 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4112 SI opval
= GET_H_SR (FLD (f_operand2
));
4113 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4114 written
|= (1 << 13);
4115 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4118 if (NEBI (tmp_postinc
, 0)) {
4120 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4121 tmp_addr
= ADDSI (tmp_addr
, 4);
4124 SI opval
= tmp_addr
;
4125 SET_H_GR (FLD (f_operand1
), opval
);
4126 written
|= (1 << 9);
4127 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4133 else if (EQSI (tmp_rno
, 12)) {
4137 tmp_postinc
= FLD (f_memmode
);
4138 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4139 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
4140 if (EQBI (CPU (h_pbit
), 0)) {
4143 SI opval
= GET_H_SR (FLD (f_operand2
));
4144 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4145 written
|= (1 << 13);
4146 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4149 BI opval
= CPU (h_pbit
);
4150 CPU (h_cbit
) = opval
;
4151 written
|= (1 << 10);
4152 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4158 CPU (h_cbit
) = opval
;
4159 written
|= (1 << 10);
4160 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4165 SI opval
= GET_H_SR (FLD (f_operand2
));
4166 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4167 written
|= (1 << 13);
4168 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4171 if (NEBI (tmp_postinc
, 0)) {
4173 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4174 tmp_addr
= ADDSI (tmp_addr
, 4);
4177 SI opval
= tmp_addr
;
4178 SET_H_GR (FLD (f_operand1
), opval
);
4179 written
|= (1 << 9);
4180 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4186 else if (EQSI (tmp_rno
, 13)) {
4190 tmp_postinc
= FLD (f_memmode
);
4191 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4192 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
4193 if (EQBI (CPU (h_pbit
), 0)) {
4196 SI opval
= GET_H_SR (FLD (f_operand2
));
4197 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4198 written
|= (1 << 13);
4199 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4202 BI opval
= CPU (h_pbit
);
4203 CPU (h_cbit
) = opval
;
4204 written
|= (1 << 10);
4205 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4211 CPU (h_cbit
) = opval
;
4212 written
|= (1 << 10);
4213 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4218 SI opval
= GET_H_SR (FLD (f_operand2
));
4219 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4220 written
|= (1 << 13);
4221 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4224 if (NEBI (tmp_postinc
, 0)) {
4226 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4227 tmp_addr
= ADDSI (tmp_addr
, 4);
4230 SI opval
= tmp_addr
;
4231 SET_H_GR (FLD (f_operand1
), opval
);
4232 written
|= (1 << 9);
4233 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4239 else if (EQSI (tmp_rno
, 0)) {
4243 tmp_postinc
= FLD (f_memmode
);
4244 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4245 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
4246 if (EQBI (CPU (h_pbit
), 0)) {
4249 QI opval
= GET_H_SR (FLD (f_operand2
));
4250 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
4251 written
|= (1 << 12);
4252 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4255 BI opval
= CPU (h_pbit
);
4256 CPU (h_cbit
) = opval
;
4257 written
|= (1 << 10);
4258 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4264 CPU (h_cbit
) = opval
;
4265 written
|= (1 << 10);
4266 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4271 QI opval
= GET_H_SR (FLD (f_operand2
));
4272 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
4273 written
|= (1 << 12);
4274 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4277 if (NEBI (tmp_postinc
, 0)) {
4279 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4280 tmp_addr
= ADDSI (tmp_addr
, 1);
4283 SI opval
= tmp_addr
;
4284 SET_H_GR (FLD (f_operand1
), opval
);
4285 written
|= (1 << 9);
4286 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4292 else if (EQSI (tmp_rno
, 1)) {
4296 tmp_postinc
= FLD (f_memmode
);
4297 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4298 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
4299 if (EQBI (CPU (h_pbit
), 0)) {
4302 QI opval
= GET_H_SR (FLD (f_operand2
));
4303 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
4304 written
|= (1 << 12);
4305 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4308 BI opval
= CPU (h_pbit
);
4309 CPU (h_cbit
) = opval
;
4310 written
|= (1 << 10);
4311 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4317 CPU (h_cbit
) = opval
;
4318 written
|= (1 << 10);
4319 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4324 QI opval
= GET_H_SR (FLD (f_operand2
));
4325 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
4326 written
|= (1 << 12);
4327 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4330 if (NEBI (tmp_postinc
, 0)) {
4332 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4333 tmp_addr
= ADDSI (tmp_addr
, 1);
4336 SI opval
= tmp_addr
;
4337 SET_H_GR (FLD (f_operand1
), opval
);
4338 written
|= (1 << 9);
4339 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4345 else if (EQSI (tmp_rno
, 4)) {
4349 tmp_postinc
= FLD (f_memmode
);
4350 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4351 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
4352 if (EQBI (CPU (h_pbit
), 0)) {
4355 HI opval
= GET_H_SR (FLD (f_operand2
));
4356 SETMEMHI (current_cpu
, pc
, tmp_addr
, opval
);
4357 written
|= (1 << 11);
4358 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4361 BI opval
= CPU (h_pbit
);
4362 CPU (h_cbit
) = opval
;
4363 written
|= (1 << 10);
4364 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4370 CPU (h_cbit
) = opval
;
4371 written
|= (1 << 10);
4372 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4377 HI opval
= GET_H_SR (FLD (f_operand2
));
4378 SETMEMHI (current_cpu
, pc
, tmp_addr
, opval
);
4379 written
|= (1 << 11);
4380 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4383 if (NEBI (tmp_postinc
, 0)) {
4385 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4386 tmp_addr
= ADDSI (tmp_addr
, 2);
4389 SI opval
= tmp_addr
;
4390 SET_H_GR (FLD (f_operand1
), opval
);
4391 written
|= (1 << 9);
4392 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4398 else if (EQSI (tmp_rno
, 8)) {
4402 tmp_postinc
= FLD (f_memmode
);
4403 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4404 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
4405 if (EQBI (CPU (h_pbit
), 0)) {
4408 SI opval
= GET_H_SR (FLD (f_operand2
));
4409 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4410 written
|= (1 << 13);
4411 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4414 BI opval
= CPU (h_pbit
);
4415 CPU (h_cbit
) = opval
;
4416 written
|= (1 << 10);
4417 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4423 CPU (h_cbit
) = opval
;
4424 written
|= (1 << 10);
4425 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4430 SI opval
= GET_H_SR (FLD (f_operand2
));
4431 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4432 written
|= (1 << 13);
4433 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4436 if (NEBI (tmp_postinc
, 0)) {
4438 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4439 tmp_addr
= ADDSI (tmp_addr
, 4);
4442 SI opval
= tmp_addr
;
4443 SET_H_GR (FLD (f_operand1
), opval
);
4444 written
|= (1 << 9);
4445 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4451 else if (EQSI (tmp_rno
, 7)) {
4455 tmp_postinc
= FLD (f_memmode
);
4456 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4457 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
4458 if (EQBI (CPU (h_pbit
), 0)) {
4461 SI opval
= GET_H_SR (FLD (f_operand2
));
4462 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4463 written
|= (1 << 13);
4464 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4467 BI opval
= CPU (h_pbit
);
4468 CPU (h_cbit
) = opval
;
4469 written
|= (1 << 10);
4470 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4476 CPU (h_cbit
) = opval
;
4477 written
|= (1 << 10);
4478 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4483 SI opval
= GET_H_SR (FLD (f_operand2
));
4484 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4485 written
|= (1 << 13);
4486 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4489 if (NEBI (tmp_postinc
, 0)) {
4491 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4492 tmp_addr
= ADDSI (tmp_addr
, 4);
4495 SI opval
= tmp_addr
;
4496 SET_H_GR (FLD (f_operand1
), opval
);
4497 written
|= (1 << 9);
4498 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4504 else if (EQSI (tmp_rno
, 14)) {
4508 tmp_postinc
= FLD (f_memmode
);
4509 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4510 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
4511 if (EQBI (CPU (h_pbit
), 0)) {
4514 SI opval
= GET_H_SR (FLD (f_operand2
));
4515 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4516 written
|= (1 << 13);
4517 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4520 BI opval
= CPU (h_pbit
);
4521 CPU (h_cbit
) = opval
;
4522 written
|= (1 << 10);
4523 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4529 CPU (h_cbit
) = opval
;
4530 written
|= (1 << 10);
4531 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4536 SI opval
= GET_H_SR (FLD (f_operand2
));
4537 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4538 written
|= (1 << 13);
4539 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4542 if (NEBI (tmp_postinc
, 0)) {
4544 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4545 tmp_addr
= ADDSI (tmp_addr
, 4);
4548 SI opval
= tmp_addr
;
4549 SET_H_GR (FLD (f_operand1
), opval
);
4550 written
|= (1 << 9);
4551 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4557 else if (EQSI (tmp_rno
, 15)) {
4561 tmp_postinc
= FLD (f_memmode
);
4562 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4563 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
4564 if (EQBI (CPU (h_pbit
), 0)) {
4567 SI opval
= GET_H_SR (FLD (f_operand2
));
4568 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4569 written
|= (1 << 13);
4570 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4573 BI opval
= CPU (h_pbit
);
4574 CPU (h_cbit
) = opval
;
4575 written
|= (1 << 10);
4576 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4582 CPU (h_cbit
) = opval
;
4583 written
|= (1 << 10);
4584 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
4589 SI opval
= GET_H_SR (FLD (f_operand2
));
4590 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4591 written
|= (1 << 13);
4592 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4595 if (NEBI (tmp_postinc
, 0)) {
4597 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
4598 tmp_addr
= ADDSI (tmp_addr
, 4);
4601 SI opval
= tmp_addr
;
4602 SET_H_GR (FLD (f_operand1
), opval
);
4603 written
|= (1 << 9);
4604 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4611 cgen_rtx_error (current_cpu
, "write from unimplemented special register");
4616 CPU (h_xbit
) = opval
;
4617 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
4621 SET_H_INSN_PREFIXED_P (opval
);
4622 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
4627 abuf
->written
= written
;
4632 CASE (sem
, INSN_SBFS
) : /* sbfs [${Rd-sfield}${inc}] */
4634 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4635 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4636 #define FLD(f) abuf->fields.fmt_empty.f
4637 int UNUSED written
= 0;
4638 IADDR UNUSED pc
= abuf
->addr
;
4639 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4641 cgen_rtx_error (current_cpu
, "SBFS isn't implemented");
4647 CASE (sem
, INSN_MOVEM_R_M
) : /* movem ${Rs-dfield},[${Rd-sfield}${inc}] */
4649 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4650 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4651 #define FLD(f) abuf->fields.sfmt_movem_r_m.f
4652 int UNUSED written
= 0;
4653 IADDR UNUSED pc
= abuf
->addr
;
4654 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4659 tmp_postinc
= FLD (f_memmode
);
4662 tmp_dummy
= GET_H_GR (FLD (f_operand2
));
4664 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4666 if (GESI (FLD (f_operand2
), 15)) {
4669 tmp_tmp
= GET_H_GR (((UINT
) 15));
4672 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4673 written
|= (1 << 23);
4674 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4676 tmp_addr
= ADDSI (tmp_addr
, 4);
4679 if (GESI (FLD (f_operand2
), 14)) {
4682 tmp_tmp
= GET_H_GR (((UINT
) 14));
4685 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4686 written
|= (1 << 23);
4687 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4689 tmp_addr
= ADDSI (tmp_addr
, 4);
4692 if (GESI (FLD (f_operand2
), 13)) {
4695 tmp_tmp
= GET_H_GR (((UINT
) 13));
4698 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4699 written
|= (1 << 23);
4700 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4702 tmp_addr
= ADDSI (tmp_addr
, 4);
4705 if (GESI (FLD (f_operand2
), 12)) {
4708 tmp_tmp
= GET_H_GR (((UINT
) 12));
4711 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4712 written
|= (1 << 23);
4713 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4715 tmp_addr
= ADDSI (tmp_addr
, 4);
4718 if (GESI (FLD (f_operand2
), 11)) {
4721 tmp_tmp
= GET_H_GR (((UINT
) 11));
4724 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4725 written
|= (1 << 23);
4726 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4728 tmp_addr
= ADDSI (tmp_addr
, 4);
4731 if (GESI (FLD (f_operand2
), 10)) {
4734 tmp_tmp
= GET_H_GR (((UINT
) 10));
4737 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4738 written
|= (1 << 23);
4739 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4741 tmp_addr
= ADDSI (tmp_addr
, 4);
4744 if (GESI (FLD (f_operand2
), 9)) {
4747 tmp_tmp
= GET_H_GR (((UINT
) 9));
4750 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4751 written
|= (1 << 23);
4752 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4754 tmp_addr
= ADDSI (tmp_addr
, 4);
4757 if (GESI (FLD (f_operand2
), 8)) {
4760 tmp_tmp
= GET_H_GR (((UINT
) 8));
4763 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4764 written
|= (1 << 23);
4765 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4767 tmp_addr
= ADDSI (tmp_addr
, 4);
4770 if (GESI (FLD (f_operand2
), 7)) {
4773 tmp_tmp
= GET_H_GR (((UINT
) 7));
4776 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4777 written
|= (1 << 23);
4778 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4780 tmp_addr
= ADDSI (tmp_addr
, 4);
4783 if (GESI (FLD (f_operand2
), 6)) {
4786 tmp_tmp
= GET_H_GR (((UINT
) 6));
4789 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4790 written
|= (1 << 23);
4791 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4793 tmp_addr
= ADDSI (tmp_addr
, 4);
4796 if (GESI (FLD (f_operand2
), 5)) {
4799 tmp_tmp
= GET_H_GR (((UINT
) 5));
4802 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4803 written
|= (1 << 23);
4804 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4806 tmp_addr
= ADDSI (tmp_addr
, 4);
4809 if (GESI (FLD (f_operand2
), 4)) {
4812 tmp_tmp
= GET_H_GR (((UINT
) 4));
4815 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4816 written
|= (1 << 23);
4817 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4819 tmp_addr
= ADDSI (tmp_addr
, 4);
4822 if (GESI (FLD (f_operand2
), 3)) {
4825 tmp_tmp
= GET_H_GR (((UINT
) 3));
4828 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4829 written
|= (1 << 23);
4830 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4832 tmp_addr
= ADDSI (tmp_addr
, 4);
4835 if (GESI (FLD (f_operand2
), 2)) {
4838 tmp_tmp
= GET_H_GR (((UINT
) 2));
4841 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4842 written
|= (1 << 23);
4843 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4845 tmp_addr
= ADDSI (tmp_addr
, 4);
4848 if (GESI (FLD (f_operand2
), 1)) {
4851 tmp_tmp
= GET_H_GR (((UINT
) 1));
4854 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4855 written
|= (1 << 23);
4856 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4858 tmp_addr
= ADDSI (tmp_addr
, 4);
4861 if (GESI (FLD (f_operand2
), 0)) {
4864 tmp_tmp
= GET_H_GR (((UINT
) 0));
4867 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
4868 written
|= (1 << 23);
4869 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4871 tmp_addr
= ADDSI (tmp_addr
, 4);
4875 if (NEBI (tmp_postinc
, 0)) {
4877 SI opval
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (tmp_addr
) : (CPU (h_prefixreg_pre_v32
)));
4878 SET_H_GR (FLD (f_operand1
), opval
);
4879 written
|= (1 << 22);
4880 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
);
4897 abuf
->written
= written
;
4902 CASE (sem
, INSN_MOVEM_M_R
) : /* movem [${Rs}${inc}],${Rd} */
4904 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4905 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4906 #define FLD(f) abuf->fields.sfmt_movem_m_r.f
4907 int UNUSED written
= 0;
4908 IADDR UNUSED pc
= abuf
->addr
;
4909 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4914 tmp_postinc
= FLD (f_memmode
);
4915 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
4918 tmp_dummy
= GET_H_GR (FLD (f_operand2
));
4921 if (GESI (FLD (f_operand2
), 14)) {
4924 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
4927 SET_H_GR (((UINT
) 14), opval
);
4928 written
|= (1 << 14);
4929 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4931 tmp_addr
= ADDSI (tmp_addr
, 4);
4934 if (GESI (FLD (f_operand2
), 13)) {
4937 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
4940 SET_H_GR (((UINT
) 13), opval
);
4941 written
|= (1 << 13);
4942 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4944 tmp_addr
= ADDSI (tmp_addr
, 4);
4947 if (GESI (FLD (f_operand2
), 12)) {
4950 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
4953 SET_H_GR (((UINT
) 12), opval
);
4954 written
|= (1 << 12);
4955 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4957 tmp_addr
= ADDSI (tmp_addr
, 4);
4960 if (GESI (FLD (f_operand2
), 11)) {
4963 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
4966 SET_H_GR (((UINT
) 11), opval
);
4967 written
|= (1 << 11);
4968 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4970 tmp_addr
= ADDSI (tmp_addr
, 4);
4973 if (GESI (FLD (f_operand2
), 10)) {
4976 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
4979 SET_H_GR (((UINT
) 10), opval
);
4980 written
|= (1 << 10);
4981 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4983 tmp_addr
= ADDSI (tmp_addr
, 4);
4986 if (GESI (FLD (f_operand2
), 9)) {
4989 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
4992 SET_H_GR (((UINT
) 9), opval
);
4993 written
|= (1 << 22);
4994 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4996 tmp_addr
= ADDSI (tmp_addr
, 4);
4999 if (GESI (FLD (f_operand2
), 8)) {
5002 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5005 SET_H_GR (((UINT
) 8), opval
);
5006 written
|= (1 << 21);
5007 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5009 tmp_addr
= ADDSI (tmp_addr
, 4);
5012 if (GESI (FLD (f_operand2
), 7)) {
5015 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5018 SET_H_GR (((UINT
) 7), opval
);
5019 written
|= (1 << 20);
5020 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5022 tmp_addr
= ADDSI (tmp_addr
, 4);
5025 if (GESI (FLD (f_operand2
), 6)) {
5028 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5031 SET_H_GR (((UINT
) 6), opval
);
5032 written
|= (1 << 19);
5033 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5035 tmp_addr
= ADDSI (tmp_addr
, 4);
5038 if (GESI (FLD (f_operand2
), 5)) {
5041 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5044 SET_H_GR (((UINT
) 5), opval
);
5045 written
|= (1 << 18);
5046 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5048 tmp_addr
= ADDSI (tmp_addr
, 4);
5051 if (GESI (FLD (f_operand2
), 4)) {
5054 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5057 SET_H_GR (((UINT
) 4), opval
);
5058 written
|= (1 << 17);
5059 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5061 tmp_addr
= ADDSI (tmp_addr
, 4);
5064 if (GESI (FLD (f_operand2
), 3)) {
5067 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5070 SET_H_GR (((UINT
) 3), opval
);
5071 written
|= (1 << 16);
5072 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5074 tmp_addr
= ADDSI (tmp_addr
, 4);
5077 if (GESI (FLD (f_operand2
), 2)) {
5080 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5083 SET_H_GR (((UINT
) 2), opval
);
5084 written
|= (1 << 15);
5085 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5087 tmp_addr
= ADDSI (tmp_addr
, 4);
5090 if (GESI (FLD (f_operand2
), 1)) {
5093 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5096 SET_H_GR (((UINT
) 1), opval
);
5097 written
|= (1 << 9);
5098 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5100 tmp_addr
= ADDSI (tmp_addr
, 4);
5103 if (GESI (FLD (f_operand2
), 0)) {
5106 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5109 SET_H_GR (((UINT
) 0), opval
);
5110 written
|= (1 << 8);
5111 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5113 tmp_addr
= ADDSI (tmp_addr
, 4);
5117 if (NEBI (tmp_postinc
, 0)) {
5119 SI opval
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (tmp_addr
) : (CPU (h_prefixreg_pre_v32
)));
5120 SET_H_GR (FLD (f_operand1
), opval
);
5121 written
|= (1 << 7);
5122 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5128 CPU (h_xbit
) = opval
;
5129 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5133 SET_H_INSN_PREFIXED_P (opval
);
5134 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5139 abuf
->written
= written
;
5144 CASE (sem
, INSN_MOVEM_M_PC
) : /* movem [${Rs}${inc}],${Rd} */
5146 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5147 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5148 #define FLD(f) abuf->fields.sfmt_movem_m_r.f
5149 int UNUSED written
= 0;
5150 IADDR UNUSED pc
= abuf
->addr
;
5152 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5157 tmp_postinc
= FLD (f_memmode
);
5158 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
5161 USI opval
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5162 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
5163 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
5165 tmp_addr
= ADDSI (tmp_addr
, 4);
5168 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5171 SET_H_GR (((UINT
) 14), opval
);
5172 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5174 tmp_addr
= ADDSI (tmp_addr
, 4);
5178 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5181 SET_H_GR (((UINT
) 13), opval
);
5182 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5184 tmp_addr
= ADDSI (tmp_addr
, 4);
5188 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5191 SET_H_GR (((UINT
) 12), opval
);
5192 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5194 tmp_addr
= ADDSI (tmp_addr
, 4);
5198 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5201 SET_H_GR (((UINT
) 11), opval
);
5202 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5204 tmp_addr
= ADDSI (tmp_addr
, 4);
5208 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5211 SET_H_GR (((UINT
) 10), opval
);
5212 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5214 tmp_addr
= ADDSI (tmp_addr
, 4);
5218 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5221 SET_H_GR (((UINT
) 9), opval
);
5222 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5224 tmp_addr
= ADDSI (tmp_addr
, 4);
5228 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5231 SET_H_GR (((UINT
) 8), opval
);
5232 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5234 tmp_addr
= ADDSI (tmp_addr
, 4);
5238 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5241 SET_H_GR (((UINT
) 7), opval
);
5242 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5244 tmp_addr
= ADDSI (tmp_addr
, 4);
5248 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5251 SET_H_GR (((UINT
) 6), opval
);
5252 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5254 tmp_addr
= ADDSI (tmp_addr
, 4);
5258 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5261 SET_H_GR (((UINT
) 5), opval
);
5262 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5264 tmp_addr
= ADDSI (tmp_addr
, 4);
5268 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5271 SET_H_GR (((UINT
) 4), opval
);
5272 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5274 tmp_addr
= ADDSI (tmp_addr
, 4);
5278 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5281 SET_H_GR (((UINT
) 3), opval
);
5282 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5284 tmp_addr
= ADDSI (tmp_addr
, 4);
5288 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5291 SET_H_GR (((UINT
) 2), opval
);
5292 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5294 tmp_addr
= ADDSI (tmp_addr
, 4);
5298 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5301 SET_H_GR (((UINT
) 1), opval
);
5302 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5304 tmp_addr
= ADDSI (tmp_addr
, 4);
5308 tmp_tmp
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5311 SET_H_GR (((UINT
) 0), opval
);
5312 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5314 tmp_addr
= ADDSI (tmp_addr
, 4);
5317 if (NEBI (tmp_postinc
, 0)) {
5319 SI opval
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (tmp_addr
) : (CPU (h_prefixreg_pre_v32
)));
5320 SET_H_GR (FLD (f_operand1
), opval
);
5321 written
|= (1 << 5);
5322 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5328 CPU (h_xbit
) = opval
;
5329 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5333 SET_H_INSN_PREFIXED_P (opval
);
5334 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5339 abuf
->written
= written
;
5340 SEM_BRANCH_FINI (vpc
);
5345 CASE (sem
, INSN_ADD_B_R
) : /* add.b $Rs,$Rd */
5347 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5348 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5349 #define FLD(f) abuf->fields.sfmt_add_b_r.f
5350 int UNUSED written
= 0;
5351 IADDR UNUSED pc
= abuf
->addr
;
5352 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5359 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
5360 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5361 tmp_carry
= CPU (h_cbit
);
5362 tmp_newval
= ADDCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5365 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
5367 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
5368 SET_H_GR (FLD (f_operand2
), opval
);
5369 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5374 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))));
5375 CPU (h_cbit
) = opval
;
5376 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5379 BI opval
= LTQI (tmp_newval
, 0);
5380 CPU (h_nbit
) = opval
;
5381 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5384 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5385 CPU (h_zbit
) = opval
;
5386 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5389 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)));
5390 CPU (h_vbit
) = opval
;
5391 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5396 CPU (h_xbit
) = opval
;
5397 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5401 SET_H_INSN_PREFIXED_P (opval
);
5402 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5412 CASE (sem
, INSN_ADD_W_R
) : /* add.w $Rs,$Rd */
5414 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5415 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5416 #define FLD(f) abuf->fields.sfmt_add_b_r.f
5417 int UNUSED written
= 0;
5418 IADDR UNUSED pc
= abuf
->addr
;
5419 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5426 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
5427 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5428 tmp_carry
= CPU (h_cbit
);
5429 tmp_newval
= ADDCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5432 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
5434 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
5435 SET_H_GR (FLD (f_operand2
), opval
);
5436 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5441 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))));
5442 CPU (h_cbit
) = opval
;
5443 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5446 BI opval
= LTHI (tmp_newval
, 0);
5447 CPU (h_nbit
) = opval
;
5448 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5451 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5452 CPU (h_zbit
) = opval
;
5453 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5456 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)));
5457 CPU (h_vbit
) = opval
;
5458 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5463 CPU (h_xbit
) = opval
;
5464 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5468 SET_H_INSN_PREFIXED_P (opval
);
5469 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5479 CASE (sem
, INSN_ADD_D_R
) : /* add.d $Rs,$Rd */
5481 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5482 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5483 #define FLD(f) abuf->fields.sfmt_add_b_r.f
5484 int UNUSED written
= 0;
5485 IADDR UNUSED pc
= abuf
->addr
;
5486 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5493 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
5494 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5495 tmp_carry
= CPU (h_cbit
);
5496 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5498 SI opval
= tmp_newval
;
5499 SET_H_GR (FLD (f_operand2
), opval
);
5500 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5504 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))));
5505 CPU (h_cbit
) = opval
;
5506 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5509 BI opval
= LTSI (tmp_newval
, 0);
5510 CPU (h_nbit
) = opval
;
5511 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5514 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5515 CPU (h_zbit
) = opval
;
5516 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5519 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)));
5520 CPU (h_vbit
) = opval
;
5521 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5526 CPU (h_xbit
) = opval
;
5527 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5531 SET_H_INSN_PREFIXED_P (opval
);
5532 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5542 CASE (sem
, INSN_ADD_M_B_M
) : /* add-m.b [${Rs}${inc}],${Rd} */
5544 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5545 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5546 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
5547 int UNUSED written
= 0;
5548 IADDR UNUSED pc
= abuf
->addr
;
5549 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5556 tmp_tmpops
= ({ SI tmp_addr
;
5559 tmp_postinc
= FLD (f_memmode
);
5560 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
5561 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
5562 ; if (NEBI (tmp_postinc
, 0)) {
5564 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
5565 tmp_addr
= ADDSI (tmp_addr
, 1);
5568 SI opval
= tmp_addr
;
5569 SET_H_GR (FLD (f_operand1
), opval
);
5570 written
|= (1 << 12);
5571 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5576 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5577 tmp_carry
= CPU (h_cbit
);
5578 tmp_newval
= ADDCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5581 tmp_oldregval
= GET_H_RAW_GR_PC (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
5583 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
5584 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
5585 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5590 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))));
5591 CPU (h_cbit
) = opval
;
5592 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5595 BI opval
= LTQI (tmp_newval
, 0);
5596 CPU (h_nbit
) = opval
;
5597 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5600 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5601 CPU (h_zbit
) = opval
;
5602 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5605 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)));
5606 CPU (h_vbit
) = opval
;
5607 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5612 CPU (h_xbit
) = opval
;
5613 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5617 SET_H_INSN_PREFIXED_P (opval
);
5618 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5624 abuf
->written
= written
;
5629 CASE (sem
, INSN_ADD_M_W_M
) : /* add-m.w [${Rs}${inc}],${Rd} */
5631 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5632 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5633 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
5634 int UNUSED written
= 0;
5635 IADDR UNUSED pc
= abuf
->addr
;
5636 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5643 tmp_tmpops
= ({ SI tmp_addr
;
5646 tmp_postinc
= FLD (f_memmode
);
5647 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
5648 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
5649 ; if (NEBI (tmp_postinc
, 0)) {
5651 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
5652 tmp_addr
= ADDSI (tmp_addr
, 2);
5655 SI opval
= tmp_addr
;
5656 SET_H_GR (FLD (f_operand1
), opval
);
5657 written
|= (1 << 12);
5658 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5663 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5664 tmp_carry
= CPU (h_cbit
);
5665 tmp_newval
= ADDCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5668 tmp_oldregval
= GET_H_RAW_GR_PC (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
5670 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
5671 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
5672 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5677 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))));
5678 CPU (h_cbit
) = opval
;
5679 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5682 BI opval
= LTHI (tmp_newval
, 0);
5683 CPU (h_nbit
) = opval
;
5684 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5687 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5688 CPU (h_zbit
) = opval
;
5689 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5692 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)));
5693 CPU (h_vbit
) = opval
;
5694 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5699 CPU (h_xbit
) = opval
;
5700 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5704 SET_H_INSN_PREFIXED_P (opval
);
5705 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5711 abuf
->written
= written
;
5716 CASE (sem
, INSN_ADD_M_D_M
) : /* add-m.d [${Rs}${inc}],${Rd} */
5718 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5719 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5720 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
5721 int UNUSED written
= 0;
5722 IADDR UNUSED pc
= abuf
->addr
;
5723 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5730 tmp_tmpops
= ({ SI tmp_addr
;
5733 tmp_postinc
= FLD (f_memmode
);
5734 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
5735 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
5736 ; if (NEBI (tmp_postinc
, 0)) {
5738 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
5739 tmp_addr
= ADDSI (tmp_addr
, 4);
5742 SI opval
= tmp_addr
;
5743 SET_H_GR (FLD (f_operand1
), opval
);
5744 written
|= (1 << 11);
5745 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5750 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5751 tmp_carry
= CPU (h_cbit
);
5752 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5754 SI opval
= tmp_newval
;
5755 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
5756 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5760 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))));
5761 CPU (h_cbit
) = opval
;
5762 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5765 BI opval
= LTSI (tmp_newval
, 0);
5766 CPU (h_nbit
) = opval
;
5767 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5770 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5771 CPU (h_zbit
) = opval
;
5772 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5775 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)));
5776 CPU (h_vbit
) = opval
;
5777 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5782 CPU (h_xbit
) = opval
;
5783 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5787 SET_H_INSN_PREFIXED_P (opval
);
5788 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5794 abuf
->written
= written
;
5799 CASE (sem
, INSN_ADDCBR
) : /* add.b ${sconst8}],${Rd} */
5801 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5802 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5803 #define FLD(f) abuf->fields.sfmt_addcbr.f
5804 int UNUSED written
= 0;
5805 IADDR UNUSED pc
= abuf
->addr
;
5806 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
5813 tmp_tmpops
= FLD (f_indir_pc__byte
);
5814 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5815 tmp_carry
= CPU (h_cbit
);
5816 tmp_newval
= ADDCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5819 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
5821 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
5822 SET_H_GR (FLD (f_operand2
), opval
);
5823 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5828 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))));
5829 CPU (h_cbit
) = opval
;
5830 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5833 BI opval
= LTQI (tmp_newval
, 0);
5834 CPU (h_nbit
) = opval
;
5835 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5838 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5839 CPU (h_zbit
) = opval
;
5840 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5843 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)));
5844 CPU (h_vbit
) = opval
;
5845 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5850 CPU (h_xbit
) = opval
;
5851 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5855 SET_H_INSN_PREFIXED_P (opval
);
5856 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5866 CASE (sem
, INSN_ADDCWR
) : /* add.w ${sconst16}],${Rd} */
5868 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5869 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5870 #define FLD(f) abuf->fields.sfmt_addcwr.f
5871 int UNUSED written
= 0;
5872 IADDR UNUSED pc
= abuf
->addr
;
5873 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
5880 tmp_tmpops
= FLD (f_indir_pc__word
);
5881 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5882 tmp_carry
= CPU (h_cbit
);
5883 tmp_newval
= ADDCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5886 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
5888 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
5889 SET_H_GR (FLD (f_operand2
), opval
);
5890 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5895 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))));
5896 CPU (h_cbit
) = opval
;
5897 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5900 BI opval
= LTHI (tmp_newval
, 0);
5901 CPU (h_nbit
) = opval
;
5902 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5905 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5906 CPU (h_zbit
) = opval
;
5907 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5910 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)));
5911 CPU (h_vbit
) = opval
;
5912 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5917 CPU (h_xbit
) = opval
;
5918 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5922 SET_H_INSN_PREFIXED_P (opval
);
5923 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5933 CASE (sem
, INSN_ADDCDR
) : /* add.d ${const32}],${Rd} */
5935 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5936 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5937 #define FLD(f) abuf->fields.sfmt_addcdr.f
5938 int UNUSED written
= 0;
5939 IADDR UNUSED pc
= abuf
->addr
;
5940 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
5947 tmp_tmpops
= FLD (f_indir_pc__dword
);
5948 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
5949 tmp_carry
= CPU (h_cbit
);
5950 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
5952 SI opval
= tmp_newval
;
5953 SET_H_GR (FLD (f_operand2
), opval
);
5954 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5958 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))));
5959 CPU (h_cbit
) = opval
;
5960 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
5963 BI opval
= LTSI (tmp_newval
, 0);
5964 CPU (h_nbit
) = opval
;
5965 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
5968 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
5969 CPU (h_zbit
) = opval
;
5970 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
5973 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)));
5974 CPU (h_vbit
) = opval
;
5975 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
5980 CPU (h_xbit
) = opval
;
5981 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
5985 SET_H_INSN_PREFIXED_P (opval
);
5986 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
5996 CASE (sem
, INSN_ADDCPC
) : /* add.d ${sconst32},PC */
5998 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5999 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6000 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
6001 int UNUSED written
= 0;
6002 IADDR UNUSED pc
= abuf
->addr
;
6004 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
6010 tmp_offs
= FLD (f_indir_pc__dword
);
6011 tmp_oldpc
= ADDSI (pc
, 6);
6012 tmp_newpc
= ADDSI (tmp_oldpc
, tmp_offs
);
6014 USI opval
= tmp_newpc
;
6015 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
6016 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
6020 BI opval
= ORIF (ANDIF (LTSI (tmp_offs
, 0), LTSI (tmp_oldpc
, 0)), ORIF (ANDIF (LTSI (tmp_oldpc
, 0), GESI (tmp_newpc
, 0)), ANDIF (LTSI (tmp_offs
, 0), GESI (tmp_newpc
, 0))));
6021 CPU (h_cbit
) = opval
;
6022 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6025 BI opval
= LTSI (tmp_newpc
, 0);
6026 CPU (h_nbit
) = opval
;
6027 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6030 BI opval
= ANDIF (EQSI (tmp_newpc
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6031 CPU (h_zbit
) = opval
;
6032 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6035 BI opval
= ORIF (ANDIF (ANDIF (LTSI (tmp_offs
, 0), LTSI (tmp_oldpc
, 0)), GESI (tmp_newpc
, 0)), ANDIF (ANDIF (GESI (tmp_offs
, 0), GESI (tmp_oldpc
, 0)), LTSI (tmp_newpc
, 0)));
6036 CPU (h_vbit
) = opval
;
6037 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6042 CPU (h_xbit
) = opval
;
6043 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6047 SET_H_INSN_PREFIXED_P (opval
);
6048 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6054 SEM_BRANCH_FINI (vpc
);
6059 CASE (sem
, INSN_ADDS_B_R
) : /* adds.b $Rs,$Rd */
6061 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6062 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6063 #define FLD(f) abuf->fields.sfmt_add_b_r.f
6064 int UNUSED written
= 0;
6065 IADDR UNUSED pc
= abuf
->addr
;
6066 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6073 tmp_tmpops
= EXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
6074 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6075 tmp_carry
= CPU (h_cbit
);
6076 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6078 SI opval
= tmp_newval
;
6079 SET_H_GR (FLD (f_operand2
), opval
);
6080 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6084 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))));
6085 CPU (h_cbit
) = opval
;
6086 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6089 BI opval
= LTSI (tmp_newval
, 0);
6090 CPU (h_nbit
) = opval
;
6091 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6094 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6095 CPU (h_zbit
) = opval
;
6096 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6099 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)));
6100 CPU (h_vbit
) = opval
;
6101 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6106 CPU (h_xbit
) = opval
;
6107 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6111 SET_H_INSN_PREFIXED_P (opval
);
6112 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6122 CASE (sem
, INSN_ADDS_W_R
) : /* adds.w $Rs,$Rd */
6124 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6125 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6126 #define FLD(f) abuf->fields.sfmt_add_b_r.f
6127 int UNUSED written
= 0;
6128 IADDR UNUSED pc
= abuf
->addr
;
6129 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6136 tmp_tmpops
= EXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
6137 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6138 tmp_carry
= CPU (h_cbit
);
6139 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6141 SI opval
= tmp_newval
;
6142 SET_H_GR (FLD (f_operand2
), opval
);
6143 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6147 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))));
6148 CPU (h_cbit
) = opval
;
6149 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6152 BI opval
= LTSI (tmp_newval
, 0);
6153 CPU (h_nbit
) = opval
;
6154 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6157 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6158 CPU (h_zbit
) = opval
;
6159 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6162 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)));
6163 CPU (h_vbit
) = opval
;
6164 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6169 CPU (h_xbit
) = opval
;
6170 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6174 SET_H_INSN_PREFIXED_P (opval
);
6175 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6185 CASE (sem
, INSN_ADDS_M_B_M
) : /* adds-m.b [${Rs}${inc}],$Rd */
6187 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6188 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6189 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
6190 int UNUSED written
= 0;
6191 IADDR UNUSED pc
= abuf
->addr
;
6192 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6199 tmp_tmpops
= EXTQISI (({ SI tmp_addr
;
6202 tmp_postinc
= FLD (f_memmode
);
6203 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
6204 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
6205 ; if (NEBI (tmp_postinc
, 0)) {
6207 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
6208 tmp_addr
= ADDSI (tmp_addr
, 1);
6211 SI opval
= tmp_addr
;
6212 SET_H_GR (FLD (f_operand1
), opval
);
6213 written
|= (1 << 11);
6214 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6219 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6220 tmp_carry
= CPU (h_cbit
);
6221 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6223 SI opval
= tmp_newval
;
6224 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
6225 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6229 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))));
6230 CPU (h_cbit
) = opval
;
6231 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6234 BI opval
= LTSI (tmp_newval
, 0);
6235 CPU (h_nbit
) = opval
;
6236 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6239 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6240 CPU (h_zbit
) = opval
;
6241 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6244 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)));
6245 CPU (h_vbit
) = opval
;
6246 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6251 CPU (h_xbit
) = opval
;
6252 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6256 SET_H_INSN_PREFIXED_P (opval
);
6257 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6263 abuf
->written
= written
;
6268 CASE (sem
, INSN_ADDS_M_W_M
) : /* adds-m.w [${Rs}${inc}],$Rd */
6270 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6271 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6272 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
6273 int UNUSED written
= 0;
6274 IADDR UNUSED pc
= abuf
->addr
;
6275 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6282 tmp_tmpops
= EXTHISI (({ SI tmp_addr
;
6285 tmp_postinc
= FLD (f_memmode
);
6286 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
6287 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
6288 ; if (NEBI (tmp_postinc
, 0)) {
6290 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
6291 tmp_addr
= ADDSI (tmp_addr
, 2);
6294 SI opval
= tmp_addr
;
6295 SET_H_GR (FLD (f_operand1
), opval
);
6296 written
|= (1 << 11);
6297 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6302 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6303 tmp_carry
= CPU (h_cbit
);
6304 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6306 SI opval
= tmp_newval
;
6307 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
6308 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6312 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))));
6313 CPU (h_cbit
) = opval
;
6314 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6317 BI opval
= LTSI (tmp_newval
, 0);
6318 CPU (h_nbit
) = opval
;
6319 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6322 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6323 CPU (h_zbit
) = opval
;
6324 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6327 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)));
6328 CPU (h_vbit
) = opval
;
6329 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6334 CPU (h_xbit
) = opval
;
6335 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6339 SET_H_INSN_PREFIXED_P (opval
);
6340 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6346 abuf
->written
= written
;
6351 CASE (sem
, INSN_ADDSCBR
) : /* [${Rs}${inc}],$Rd */
6353 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6354 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6355 #define FLD(f) abuf->fields.sfmt_addcbr.f
6356 int UNUSED written
= 0;
6357 IADDR UNUSED pc
= abuf
->addr
;
6358 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
6365 tmp_tmpops
= EXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
6366 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6367 tmp_carry
= CPU (h_cbit
);
6368 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6370 SI opval
= tmp_newval
;
6371 SET_H_GR (FLD (f_operand2
), opval
);
6372 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6376 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))));
6377 CPU (h_cbit
) = opval
;
6378 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6381 BI opval
= LTSI (tmp_newval
, 0);
6382 CPU (h_nbit
) = opval
;
6383 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6386 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6387 CPU (h_zbit
) = opval
;
6388 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6391 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)));
6392 CPU (h_vbit
) = opval
;
6393 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6398 CPU (h_xbit
) = opval
;
6399 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6403 SET_H_INSN_PREFIXED_P (opval
);
6404 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6414 CASE (sem
, INSN_ADDSCWR
) : /* [${Rs}${inc}],$Rd */
6416 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6417 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6418 #define FLD(f) abuf->fields.sfmt_addcwr.f
6419 int UNUSED written
= 0;
6420 IADDR UNUSED pc
= abuf
->addr
;
6421 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
6428 tmp_tmpops
= EXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
6429 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6430 tmp_carry
= CPU (h_cbit
);
6431 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6433 SI opval
= tmp_newval
;
6434 SET_H_GR (FLD (f_operand2
), opval
);
6435 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6439 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))));
6440 CPU (h_cbit
) = opval
;
6441 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6444 BI opval
= LTSI (tmp_newval
, 0);
6445 CPU (h_nbit
) = opval
;
6446 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6449 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6450 CPU (h_zbit
) = opval
;
6451 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6454 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)));
6455 CPU (h_vbit
) = opval
;
6456 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6461 CPU (h_xbit
) = opval
;
6462 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6466 SET_H_INSN_PREFIXED_P (opval
);
6467 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6477 CASE (sem
, INSN_ADDSPCPC
) : /* adds.w [PC],PC */
6479 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6480 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6481 #define FLD(f) abuf->fields.fmt_empty.f
6482 int UNUSED written
= 0;
6483 IADDR UNUSED pc
= abuf
->addr
;
6485 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6491 if (NOTBI (GET_H_INSN_PREFIXED_P ())) {
6492 cgen_rtx_error (current_cpu
, "Unexpected adds.w [PC],PC without prefix");
6494 tmp_offs
= GETMEMHI (current_cpu
, pc
, CPU (h_prefixreg_pre_v32
));
6495 tmp_oldpc
= ADDSI (pc
, 2);
6496 tmp_newpc
= ADDSI (tmp_oldpc
, tmp_offs
);
6498 USI opval
= tmp_newpc
;
6499 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
6500 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
6504 BI opval
= ORIF (ANDIF (LTSI (EXTHISI (tmp_offs
), 0), LTSI (tmp_oldpc
, 0)), ORIF (ANDIF (LTSI (tmp_oldpc
, 0), GESI (tmp_newpc
, 0)), ANDIF (LTSI (EXTHISI (tmp_offs
), 0), GESI (tmp_newpc
, 0))));
6505 CPU (h_cbit
) = opval
;
6506 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6509 BI opval
= LTSI (tmp_newpc
, 0);
6510 CPU (h_nbit
) = opval
;
6511 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6514 BI opval
= ANDIF (EQSI (tmp_newpc
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6515 CPU (h_zbit
) = opval
;
6516 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6519 BI opval
= ORIF (ANDIF (ANDIF (LTSI (EXTHISI (tmp_offs
), 0), LTSI (tmp_oldpc
, 0)), GESI (tmp_newpc
, 0)), ANDIF (ANDIF (GESI (EXTHISI (tmp_offs
), 0), GESI (tmp_oldpc
, 0)), LTSI (tmp_newpc
, 0)));
6520 CPU (h_vbit
) = opval
;
6521 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6526 CPU (h_xbit
) = opval
;
6527 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6531 SET_H_INSN_PREFIXED_P (opval
);
6532 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6538 SEM_BRANCH_FINI (vpc
);
6543 CASE (sem
, INSN_ADDU_B_R
) : /* addu.b $Rs,$Rd */
6545 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6546 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6547 #define FLD(f) abuf->fields.sfmt_add_b_r.f
6548 int UNUSED written
= 0;
6549 IADDR UNUSED pc
= abuf
->addr
;
6550 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6557 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
6558 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6559 tmp_carry
= CPU (h_cbit
);
6560 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6562 SI opval
= tmp_newval
;
6563 SET_H_GR (FLD (f_operand2
), opval
);
6564 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6568 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))));
6569 CPU (h_cbit
) = opval
;
6570 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6573 BI opval
= LTSI (tmp_newval
, 0);
6574 CPU (h_nbit
) = opval
;
6575 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6578 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6579 CPU (h_zbit
) = opval
;
6580 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6583 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)));
6584 CPU (h_vbit
) = opval
;
6585 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6590 CPU (h_xbit
) = opval
;
6591 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6595 SET_H_INSN_PREFIXED_P (opval
);
6596 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6606 CASE (sem
, INSN_ADDU_W_R
) : /* addu.w $Rs,$Rd */
6608 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6609 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6610 #define FLD(f) abuf->fields.sfmt_add_b_r.f
6611 int UNUSED written
= 0;
6612 IADDR UNUSED pc
= abuf
->addr
;
6613 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6620 tmp_tmpops
= ZEXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
6621 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6622 tmp_carry
= CPU (h_cbit
);
6623 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6625 SI opval
= tmp_newval
;
6626 SET_H_GR (FLD (f_operand2
), opval
);
6627 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6631 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))));
6632 CPU (h_cbit
) = opval
;
6633 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6636 BI opval
= LTSI (tmp_newval
, 0);
6637 CPU (h_nbit
) = opval
;
6638 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6641 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6642 CPU (h_zbit
) = opval
;
6643 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6646 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)));
6647 CPU (h_vbit
) = opval
;
6648 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6653 CPU (h_xbit
) = opval
;
6654 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6658 SET_H_INSN_PREFIXED_P (opval
);
6659 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6669 CASE (sem
, INSN_ADDU_M_B_M
) : /* addu-m.b [${Rs}${inc}],$Rd */
6671 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6672 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6673 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
6674 int UNUSED written
= 0;
6675 IADDR UNUSED pc
= abuf
->addr
;
6676 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6683 tmp_tmpops
= ZEXTQISI (({ SI tmp_addr
;
6686 tmp_postinc
= FLD (f_memmode
);
6687 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
6688 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
6689 ; if (NEBI (tmp_postinc
, 0)) {
6691 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
6692 tmp_addr
= ADDSI (tmp_addr
, 1);
6695 SI opval
= tmp_addr
;
6696 SET_H_GR (FLD (f_operand1
), opval
);
6697 written
|= (1 << 11);
6698 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6703 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6704 tmp_carry
= CPU (h_cbit
);
6705 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6707 SI opval
= tmp_newval
;
6708 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
6709 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6713 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))));
6714 CPU (h_cbit
) = opval
;
6715 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6718 BI opval
= LTSI (tmp_newval
, 0);
6719 CPU (h_nbit
) = opval
;
6720 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6723 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6724 CPU (h_zbit
) = opval
;
6725 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6728 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)));
6729 CPU (h_vbit
) = opval
;
6730 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6735 CPU (h_xbit
) = opval
;
6736 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6740 SET_H_INSN_PREFIXED_P (opval
);
6741 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6747 abuf
->written
= written
;
6752 CASE (sem
, INSN_ADDU_M_W_M
) : /* addu-m.w [${Rs}${inc}],$Rd */
6754 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6755 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6756 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
6757 int UNUSED written
= 0;
6758 IADDR UNUSED pc
= abuf
->addr
;
6759 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6766 tmp_tmpops
= ZEXTHISI (({ SI tmp_addr
;
6769 tmp_postinc
= FLD (f_memmode
);
6770 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
6771 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
6772 ; if (NEBI (tmp_postinc
, 0)) {
6774 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
6775 tmp_addr
= ADDSI (tmp_addr
, 2);
6778 SI opval
= tmp_addr
;
6779 SET_H_GR (FLD (f_operand1
), opval
);
6780 written
|= (1 << 11);
6781 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6786 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6787 tmp_carry
= CPU (h_cbit
);
6788 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6790 SI opval
= tmp_newval
;
6791 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
6792 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6796 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))));
6797 CPU (h_cbit
) = opval
;
6798 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6801 BI opval
= LTSI (tmp_newval
, 0);
6802 CPU (h_nbit
) = opval
;
6803 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6806 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6807 CPU (h_zbit
) = opval
;
6808 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6811 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)));
6812 CPU (h_vbit
) = opval
;
6813 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6818 CPU (h_xbit
) = opval
;
6819 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6823 SET_H_INSN_PREFIXED_P (opval
);
6824 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6830 abuf
->written
= written
;
6835 CASE (sem
, INSN_ADDUCBR
) : /* [${Rs}${inc}],$Rd */
6837 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6838 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6839 #define FLD(f) abuf->fields.sfmt_addcbr.f
6840 int UNUSED written
= 0;
6841 IADDR UNUSED pc
= abuf
->addr
;
6842 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
6849 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
6850 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6851 tmp_carry
= CPU (h_cbit
);
6852 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6854 SI opval
= tmp_newval
;
6855 SET_H_GR (FLD (f_operand2
), opval
);
6856 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6860 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))));
6861 CPU (h_cbit
) = opval
;
6862 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6865 BI opval
= LTSI (tmp_newval
, 0);
6866 CPU (h_nbit
) = opval
;
6867 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6870 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6871 CPU (h_zbit
) = opval
;
6872 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6875 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)));
6876 CPU (h_vbit
) = opval
;
6877 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6882 CPU (h_xbit
) = opval
;
6883 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6887 SET_H_INSN_PREFIXED_P (opval
);
6888 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6898 CASE (sem
, INSN_ADDUCWR
) : /* [${Rs}${inc}],$Rd */
6900 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6901 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6902 #define FLD(f) abuf->fields.sfmt_addcwr.f
6903 int UNUSED written
= 0;
6904 IADDR UNUSED pc
= abuf
->addr
;
6905 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
6912 tmp_tmpops
= ZEXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
6913 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6914 tmp_carry
= CPU (h_cbit
);
6915 tmp_newval
= ADDCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6917 SI opval
= tmp_newval
;
6918 SET_H_GR (FLD (f_operand2
), opval
);
6919 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6923 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))));
6924 CPU (h_cbit
) = opval
;
6925 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6928 BI opval
= LTSI (tmp_newval
, 0);
6929 CPU (h_nbit
) = opval
;
6930 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
6933 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
6934 CPU (h_zbit
) = opval
;
6935 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
6938 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)));
6939 CPU (h_vbit
) = opval
;
6940 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
6945 CPU (h_xbit
) = opval
;
6946 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
6950 SET_H_INSN_PREFIXED_P (opval
);
6951 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
6961 CASE (sem
, INSN_SUB_B_R
) : /* sub.b $Rs,$Rd */
6963 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6964 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6965 #define FLD(f) abuf->fields.sfmt_add_b_r.f
6966 int UNUSED written
= 0;
6967 IADDR UNUSED pc
= abuf
->addr
;
6968 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6975 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
6976 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
6977 tmp_carry
= CPU (h_cbit
);
6978 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
6981 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
6983 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
6984 SET_H_GR (FLD (f_operand2
), opval
);
6985 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6990 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))));
6991 CPU (h_cbit
) = opval
;
6992 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
6995 BI opval
= LTQI (tmp_newval
, 0);
6996 CPU (h_nbit
) = opval
;
6997 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7000 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7001 CPU (h_zbit
) = opval
;
7002 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7005 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)));
7006 CPU (h_vbit
) = opval
;
7007 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7012 CPU (h_xbit
) = opval
;
7013 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7017 SET_H_INSN_PREFIXED_P (opval
);
7018 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7028 CASE (sem
, INSN_SUB_W_R
) : /* sub.w $Rs,$Rd */
7030 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7031 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7032 #define FLD(f) abuf->fields.sfmt_add_b_r.f
7033 int UNUSED written
= 0;
7034 IADDR UNUSED pc
= abuf
->addr
;
7035 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7042 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
7043 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7044 tmp_carry
= CPU (h_cbit
);
7045 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7048 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
7050 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
7051 SET_H_GR (FLD (f_operand2
), opval
);
7052 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7057 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))));
7058 CPU (h_cbit
) = opval
;
7059 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7062 BI opval
= LTHI (tmp_newval
, 0);
7063 CPU (h_nbit
) = opval
;
7064 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7067 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7068 CPU (h_zbit
) = opval
;
7069 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7072 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)));
7073 CPU (h_vbit
) = opval
;
7074 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7079 CPU (h_xbit
) = opval
;
7080 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7084 SET_H_INSN_PREFIXED_P (opval
);
7085 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7095 CASE (sem
, INSN_SUB_D_R
) : /* sub.d $Rs,$Rd */
7097 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7098 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7099 #define FLD(f) abuf->fields.sfmt_add_b_r.f
7100 int UNUSED written
= 0;
7101 IADDR UNUSED pc
= abuf
->addr
;
7102 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7109 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
7110 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7111 tmp_carry
= CPU (h_cbit
);
7112 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7114 SI opval
= tmp_newval
;
7115 SET_H_GR (FLD (f_operand2
), opval
);
7116 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7120 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))));
7121 CPU (h_cbit
) = opval
;
7122 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7125 BI opval
= LTSI (tmp_newval
, 0);
7126 CPU (h_nbit
) = opval
;
7127 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7130 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7131 CPU (h_zbit
) = opval
;
7132 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7135 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)));
7136 CPU (h_vbit
) = opval
;
7137 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7142 CPU (h_xbit
) = opval
;
7143 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7147 SET_H_INSN_PREFIXED_P (opval
);
7148 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7158 CASE (sem
, INSN_SUB_M_B_M
) : /* sub-m.b [${Rs}${inc}],${Rd} */
7160 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7161 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7162 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
7163 int UNUSED written
= 0;
7164 IADDR UNUSED pc
= abuf
->addr
;
7165 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7172 tmp_tmpops
= ({ SI tmp_addr
;
7175 tmp_postinc
= FLD (f_memmode
);
7176 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
7177 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
7178 ; if (NEBI (tmp_postinc
, 0)) {
7180 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
7181 tmp_addr
= ADDSI (tmp_addr
, 1);
7184 SI opval
= tmp_addr
;
7185 SET_H_GR (FLD (f_operand1
), opval
);
7186 written
|= (1 << 12);
7187 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7192 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7193 tmp_carry
= CPU (h_cbit
);
7194 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7197 tmp_oldregval
= GET_H_RAW_GR_PC (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
7199 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
7200 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
7201 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7206 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))));
7207 CPU (h_cbit
) = opval
;
7208 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7211 BI opval
= LTQI (tmp_newval
, 0);
7212 CPU (h_nbit
) = opval
;
7213 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7216 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7217 CPU (h_zbit
) = opval
;
7218 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7221 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)));
7222 CPU (h_vbit
) = opval
;
7223 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7228 CPU (h_xbit
) = opval
;
7229 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7233 SET_H_INSN_PREFIXED_P (opval
);
7234 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7240 abuf
->written
= written
;
7245 CASE (sem
, INSN_SUB_M_W_M
) : /* sub-m.w [${Rs}${inc}],${Rd} */
7247 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7248 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7249 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
7250 int UNUSED written
= 0;
7251 IADDR UNUSED pc
= abuf
->addr
;
7252 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7259 tmp_tmpops
= ({ SI tmp_addr
;
7262 tmp_postinc
= FLD (f_memmode
);
7263 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
7264 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
7265 ; if (NEBI (tmp_postinc
, 0)) {
7267 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
7268 tmp_addr
= ADDSI (tmp_addr
, 2);
7271 SI opval
= tmp_addr
;
7272 SET_H_GR (FLD (f_operand1
), opval
);
7273 written
|= (1 << 12);
7274 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7279 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7280 tmp_carry
= CPU (h_cbit
);
7281 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7284 tmp_oldregval
= GET_H_RAW_GR_PC (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
7286 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
7287 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
7288 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7293 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))));
7294 CPU (h_cbit
) = opval
;
7295 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7298 BI opval
= LTHI (tmp_newval
, 0);
7299 CPU (h_nbit
) = opval
;
7300 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7303 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7304 CPU (h_zbit
) = opval
;
7305 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7308 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)));
7309 CPU (h_vbit
) = opval
;
7310 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7315 CPU (h_xbit
) = opval
;
7316 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7320 SET_H_INSN_PREFIXED_P (opval
);
7321 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7327 abuf
->written
= written
;
7332 CASE (sem
, INSN_SUB_M_D_M
) : /* sub-m.d [${Rs}${inc}],${Rd} */
7334 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7335 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7336 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
7337 int UNUSED written
= 0;
7338 IADDR UNUSED pc
= abuf
->addr
;
7339 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7346 tmp_tmpops
= ({ SI tmp_addr
;
7349 tmp_postinc
= FLD (f_memmode
);
7350 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
7351 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
7352 ; if (NEBI (tmp_postinc
, 0)) {
7354 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
7355 tmp_addr
= ADDSI (tmp_addr
, 4);
7358 SI opval
= tmp_addr
;
7359 SET_H_GR (FLD (f_operand1
), opval
);
7360 written
|= (1 << 11);
7361 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7366 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7367 tmp_carry
= CPU (h_cbit
);
7368 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7370 SI opval
= tmp_newval
;
7371 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
7372 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7376 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))));
7377 CPU (h_cbit
) = opval
;
7378 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7381 BI opval
= LTSI (tmp_newval
, 0);
7382 CPU (h_nbit
) = opval
;
7383 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7386 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7387 CPU (h_zbit
) = opval
;
7388 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7391 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)));
7392 CPU (h_vbit
) = opval
;
7393 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7398 CPU (h_xbit
) = opval
;
7399 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7403 SET_H_INSN_PREFIXED_P (opval
);
7404 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7410 abuf
->written
= written
;
7415 CASE (sem
, INSN_SUBCBR
) : /* sub.b ${sconst8}],${Rd} */
7417 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7418 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7419 #define FLD(f) abuf->fields.sfmt_addcbr.f
7420 int UNUSED written
= 0;
7421 IADDR UNUSED pc
= abuf
->addr
;
7422 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
7429 tmp_tmpops
= FLD (f_indir_pc__byte
);
7430 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7431 tmp_carry
= CPU (h_cbit
);
7432 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7435 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
7437 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
7438 SET_H_GR (FLD (f_operand2
), opval
);
7439 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7444 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))));
7445 CPU (h_cbit
) = opval
;
7446 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7449 BI opval
= LTQI (tmp_newval
, 0);
7450 CPU (h_nbit
) = opval
;
7451 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7454 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7455 CPU (h_zbit
) = opval
;
7456 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7459 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)));
7460 CPU (h_vbit
) = opval
;
7461 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7466 CPU (h_xbit
) = opval
;
7467 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7471 SET_H_INSN_PREFIXED_P (opval
);
7472 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7482 CASE (sem
, INSN_SUBCWR
) : /* sub.w ${sconst16}],${Rd} */
7484 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7485 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7486 #define FLD(f) abuf->fields.sfmt_addcwr.f
7487 int UNUSED written
= 0;
7488 IADDR UNUSED pc
= abuf
->addr
;
7489 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
7496 tmp_tmpops
= FLD (f_indir_pc__word
);
7497 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7498 tmp_carry
= CPU (h_cbit
);
7499 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7502 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
7504 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
7505 SET_H_GR (FLD (f_operand2
), opval
);
7506 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7511 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))));
7512 CPU (h_cbit
) = opval
;
7513 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7516 BI opval
= LTHI (tmp_newval
, 0);
7517 CPU (h_nbit
) = opval
;
7518 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7521 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7522 CPU (h_zbit
) = opval
;
7523 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7526 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)));
7527 CPU (h_vbit
) = opval
;
7528 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7533 CPU (h_xbit
) = opval
;
7534 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7538 SET_H_INSN_PREFIXED_P (opval
);
7539 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7549 CASE (sem
, INSN_SUBCDR
) : /* sub.d ${const32}],${Rd} */
7551 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7552 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7553 #define FLD(f) abuf->fields.sfmt_addcdr.f
7554 int UNUSED written
= 0;
7555 IADDR UNUSED pc
= abuf
->addr
;
7556 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
7563 tmp_tmpops
= FLD (f_indir_pc__dword
);
7564 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7565 tmp_carry
= CPU (h_cbit
);
7566 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7568 SI opval
= tmp_newval
;
7569 SET_H_GR (FLD (f_operand2
), opval
);
7570 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7574 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))));
7575 CPU (h_cbit
) = opval
;
7576 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7579 BI opval
= LTSI (tmp_newval
, 0);
7580 CPU (h_nbit
) = opval
;
7581 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7584 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7585 CPU (h_zbit
) = opval
;
7586 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7589 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)));
7590 CPU (h_vbit
) = opval
;
7591 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7596 CPU (h_xbit
) = opval
;
7597 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7601 SET_H_INSN_PREFIXED_P (opval
);
7602 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7612 CASE (sem
, INSN_SUBS_B_R
) : /* subs.b $Rs,$Rd */
7614 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7615 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7616 #define FLD(f) abuf->fields.sfmt_add_b_r.f
7617 int UNUSED written
= 0;
7618 IADDR UNUSED pc
= abuf
->addr
;
7619 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7626 tmp_tmpops
= EXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
7627 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7628 tmp_carry
= CPU (h_cbit
);
7629 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7631 SI opval
= tmp_newval
;
7632 SET_H_GR (FLD (f_operand2
), opval
);
7633 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7637 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))));
7638 CPU (h_cbit
) = opval
;
7639 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7642 BI opval
= LTSI (tmp_newval
, 0);
7643 CPU (h_nbit
) = opval
;
7644 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7647 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7648 CPU (h_zbit
) = opval
;
7649 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7652 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)));
7653 CPU (h_vbit
) = opval
;
7654 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7659 CPU (h_xbit
) = opval
;
7660 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7664 SET_H_INSN_PREFIXED_P (opval
);
7665 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7675 CASE (sem
, INSN_SUBS_W_R
) : /* subs.w $Rs,$Rd */
7677 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7678 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7679 #define FLD(f) abuf->fields.sfmt_add_b_r.f
7680 int UNUSED written
= 0;
7681 IADDR UNUSED pc
= abuf
->addr
;
7682 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7689 tmp_tmpops
= EXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
7690 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7691 tmp_carry
= CPU (h_cbit
);
7692 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7694 SI opval
= tmp_newval
;
7695 SET_H_GR (FLD (f_operand2
), opval
);
7696 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7700 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))));
7701 CPU (h_cbit
) = opval
;
7702 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7705 BI opval
= LTSI (tmp_newval
, 0);
7706 CPU (h_nbit
) = opval
;
7707 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7710 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7711 CPU (h_zbit
) = opval
;
7712 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7715 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)));
7716 CPU (h_vbit
) = opval
;
7717 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7722 CPU (h_xbit
) = opval
;
7723 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7727 SET_H_INSN_PREFIXED_P (opval
);
7728 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7738 CASE (sem
, INSN_SUBS_M_B_M
) : /* subs-m.b [${Rs}${inc}],$Rd */
7740 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7741 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7742 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
7743 int UNUSED written
= 0;
7744 IADDR UNUSED pc
= abuf
->addr
;
7745 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7752 tmp_tmpops
= EXTQISI (({ SI tmp_addr
;
7755 tmp_postinc
= FLD (f_memmode
);
7756 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
7757 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
7758 ; if (NEBI (tmp_postinc
, 0)) {
7760 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
7761 tmp_addr
= ADDSI (tmp_addr
, 1);
7764 SI opval
= tmp_addr
;
7765 SET_H_GR (FLD (f_operand1
), opval
);
7766 written
|= (1 << 11);
7767 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7772 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7773 tmp_carry
= CPU (h_cbit
);
7774 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7776 SI opval
= tmp_newval
;
7777 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
7778 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7782 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))));
7783 CPU (h_cbit
) = opval
;
7784 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7787 BI opval
= LTSI (tmp_newval
, 0);
7788 CPU (h_nbit
) = opval
;
7789 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7792 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7793 CPU (h_zbit
) = opval
;
7794 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7797 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)));
7798 CPU (h_vbit
) = opval
;
7799 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7804 CPU (h_xbit
) = opval
;
7805 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7809 SET_H_INSN_PREFIXED_P (opval
);
7810 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7816 abuf
->written
= written
;
7821 CASE (sem
, INSN_SUBS_M_W_M
) : /* subs-m.w [${Rs}${inc}],$Rd */
7823 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7824 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7825 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
7826 int UNUSED written
= 0;
7827 IADDR UNUSED pc
= abuf
->addr
;
7828 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
7835 tmp_tmpops
= EXTHISI (({ SI tmp_addr
;
7838 tmp_postinc
= FLD (f_memmode
);
7839 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
7840 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
7841 ; if (NEBI (tmp_postinc
, 0)) {
7843 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
7844 tmp_addr
= ADDSI (tmp_addr
, 2);
7847 SI opval
= tmp_addr
;
7848 SET_H_GR (FLD (f_operand1
), opval
);
7849 written
|= (1 << 11);
7850 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7855 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7856 tmp_carry
= CPU (h_cbit
);
7857 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7859 SI opval
= tmp_newval
;
7860 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
7861 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7865 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))));
7866 CPU (h_cbit
) = opval
;
7867 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7870 BI opval
= LTSI (tmp_newval
, 0);
7871 CPU (h_nbit
) = opval
;
7872 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7875 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7876 CPU (h_zbit
) = opval
;
7877 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7880 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)));
7881 CPU (h_vbit
) = opval
;
7882 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7887 CPU (h_xbit
) = opval
;
7888 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7892 SET_H_INSN_PREFIXED_P (opval
);
7893 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7899 abuf
->written
= written
;
7904 CASE (sem
, INSN_SUBSCBR
) : /* [${Rs}${inc}],$Rd */
7906 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7907 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7908 #define FLD(f) abuf->fields.sfmt_addcbr.f
7909 int UNUSED written
= 0;
7910 IADDR UNUSED pc
= abuf
->addr
;
7911 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
7918 tmp_tmpops
= EXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
7919 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7920 tmp_carry
= CPU (h_cbit
);
7921 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7923 SI opval
= tmp_newval
;
7924 SET_H_GR (FLD (f_operand2
), opval
);
7925 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7929 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))));
7930 CPU (h_cbit
) = opval
;
7931 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7934 BI opval
= LTSI (tmp_newval
, 0);
7935 CPU (h_nbit
) = opval
;
7936 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
7939 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
7940 CPU (h_zbit
) = opval
;
7941 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
7944 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)));
7945 CPU (h_vbit
) = opval
;
7946 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
7951 CPU (h_xbit
) = opval
;
7952 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
7956 SET_H_INSN_PREFIXED_P (opval
);
7957 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
7967 CASE (sem
, INSN_SUBSCWR
) : /* [${Rs}${inc}],$Rd */
7969 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
7970 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
7971 #define FLD(f) abuf->fields.sfmt_addcwr.f
7972 int UNUSED written
= 0;
7973 IADDR UNUSED pc
= abuf
->addr
;
7974 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
7981 tmp_tmpops
= EXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
7982 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
7983 tmp_carry
= CPU (h_cbit
);
7984 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
7986 SI opval
= tmp_newval
;
7987 SET_H_GR (FLD (f_operand2
), opval
);
7988 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
7992 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))));
7993 CPU (h_cbit
) = opval
;
7994 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
7997 BI opval
= LTSI (tmp_newval
, 0);
7998 CPU (h_nbit
) = opval
;
7999 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8002 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8003 CPU (h_zbit
) = opval
;
8004 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8007 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)));
8008 CPU (h_vbit
) = opval
;
8009 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8014 CPU (h_xbit
) = opval
;
8015 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8019 SET_H_INSN_PREFIXED_P (opval
);
8020 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8030 CASE (sem
, INSN_SUBU_B_R
) : /* subu.b $Rs,$Rd */
8032 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8033 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8034 #define FLD(f) abuf->fields.sfmt_add_b_r.f
8035 int UNUSED written
= 0;
8036 IADDR UNUSED pc
= abuf
->addr
;
8037 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8044 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
8045 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8046 tmp_carry
= CPU (h_cbit
);
8047 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8049 SI opval
= tmp_newval
;
8050 SET_H_GR (FLD (f_operand2
), opval
);
8051 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8055 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))));
8056 CPU (h_cbit
) = opval
;
8057 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8060 BI opval
= LTSI (tmp_newval
, 0);
8061 CPU (h_nbit
) = opval
;
8062 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8065 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8066 CPU (h_zbit
) = opval
;
8067 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8070 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)));
8071 CPU (h_vbit
) = opval
;
8072 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8077 CPU (h_xbit
) = opval
;
8078 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8082 SET_H_INSN_PREFIXED_P (opval
);
8083 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8093 CASE (sem
, INSN_SUBU_W_R
) : /* subu.w $Rs,$Rd */
8095 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8096 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8097 #define FLD(f) abuf->fields.sfmt_add_b_r.f
8098 int UNUSED written
= 0;
8099 IADDR UNUSED pc
= abuf
->addr
;
8100 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8107 tmp_tmpops
= ZEXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
8108 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8109 tmp_carry
= CPU (h_cbit
);
8110 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8112 SI opval
= tmp_newval
;
8113 SET_H_GR (FLD (f_operand2
), opval
);
8114 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8118 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))));
8119 CPU (h_cbit
) = opval
;
8120 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8123 BI opval
= LTSI (tmp_newval
, 0);
8124 CPU (h_nbit
) = opval
;
8125 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8128 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8129 CPU (h_zbit
) = opval
;
8130 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8133 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)));
8134 CPU (h_vbit
) = opval
;
8135 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8140 CPU (h_xbit
) = opval
;
8141 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8145 SET_H_INSN_PREFIXED_P (opval
);
8146 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8156 CASE (sem
, INSN_SUBU_M_B_M
) : /* subu-m.b [${Rs}${inc}],$Rd */
8158 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8159 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8160 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
8161 int UNUSED written
= 0;
8162 IADDR UNUSED pc
= abuf
->addr
;
8163 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8170 tmp_tmpops
= ZEXTQISI (({ SI tmp_addr
;
8173 tmp_postinc
= FLD (f_memmode
);
8174 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
8175 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
8176 ; if (NEBI (tmp_postinc
, 0)) {
8178 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
8179 tmp_addr
= ADDSI (tmp_addr
, 1);
8182 SI opval
= tmp_addr
;
8183 SET_H_GR (FLD (f_operand1
), opval
);
8184 written
|= (1 << 11);
8185 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8190 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8191 tmp_carry
= CPU (h_cbit
);
8192 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8194 SI opval
= tmp_newval
;
8195 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
8196 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8200 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))));
8201 CPU (h_cbit
) = opval
;
8202 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8205 BI opval
= LTSI (tmp_newval
, 0);
8206 CPU (h_nbit
) = opval
;
8207 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8210 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8211 CPU (h_zbit
) = opval
;
8212 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8215 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)));
8216 CPU (h_vbit
) = opval
;
8217 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8222 CPU (h_xbit
) = opval
;
8223 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8227 SET_H_INSN_PREFIXED_P (opval
);
8228 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8234 abuf
->written
= written
;
8239 CASE (sem
, INSN_SUBU_M_W_M
) : /* subu-m.w [${Rs}${inc}],$Rd */
8241 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8242 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8243 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
8244 int UNUSED written
= 0;
8245 IADDR UNUSED pc
= abuf
->addr
;
8246 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8253 tmp_tmpops
= ZEXTHISI (({ SI tmp_addr
;
8256 tmp_postinc
= FLD (f_memmode
);
8257 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
8258 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
8259 ; if (NEBI (tmp_postinc
, 0)) {
8261 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
8262 tmp_addr
= ADDSI (tmp_addr
, 2);
8265 SI opval
= tmp_addr
;
8266 SET_H_GR (FLD (f_operand1
), opval
);
8267 written
|= (1 << 11);
8268 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8273 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8274 tmp_carry
= CPU (h_cbit
);
8275 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8277 SI opval
= tmp_newval
;
8278 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
8279 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8283 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))));
8284 CPU (h_cbit
) = opval
;
8285 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8288 BI opval
= LTSI (tmp_newval
, 0);
8289 CPU (h_nbit
) = opval
;
8290 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8293 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8294 CPU (h_zbit
) = opval
;
8295 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8298 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)));
8299 CPU (h_vbit
) = opval
;
8300 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8305 CPU (h_xbit
) = opval
;
8306 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8310 SET_H_INSN_PREFIXED_P (opval
);
8311 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8317 abuf
->written
= written
;
8322 CASE (sem
, INSN_SUBUCBR
) : /* [${Rs}${inc}],$Rd */
8324 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8325 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8326 #define FLD(f) abuf->fields.sfmt_addcbr.f
8327 int UNUSED written
= 0;
8328 IADDR UNUSED pc
= abuf
->addr
;
8329 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
8336 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
8337 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8338 tmp_carry
= CPU (h_cbit
);
8339 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8341 SI opval
= tmp_newval
;
8342 SET_H_GR (FLD (f_operand2
), opval
);
8343 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8347 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))));
8348 CPU (h_cbit
) = opval
;
8349 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8352 BI opval
= LTSI (tmp_newval
, 0);
8353 CPU (h_nbit
) = opval
;
8354 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8357 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8358 CPU (h_zbit
) = opval
;
8359 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8362 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)));
8363 CPU (h_vbit
) = opval
;
8364 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8369 CPU (h_xbit
) = opval
;
8370 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8374 SET_H_INSN_PREFIXED_P (opval
);
8375 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8385 CASE (sem
, INSN_SUBUCWR
) : /* [${Rs}${inc}],$Rd */
8387 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8388 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8389 #define FLD(f) abuf->fields.sfmt_addcwr.f
8390 int UNUSED written
= 0;
8391 IADDR UNUSED pc
= abuf
->addr
;
8392 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
8399 tmp_tmpops
= ZEXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
)));
8400 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
8401 tmp_carry
= CPU (h_cbit
);
8402 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8404 SI opval
= tmp_newval
;
8405 SET_H_GR (FLD (f_operand2
), opval
);
8406 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8410 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))));
8411 CPU (h_cbit
) = opval
;
8412 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8415 BI opval
= LTSI (tmp_newval
, 0);
8416 CPU (h_nbit
) = opval
;
8417 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8420 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8421 CPU (h_zbit
) = opval
;
8422 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8425 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)));
8426 CPU (h_vbit
) = opval
;
8427 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8432 CPU (h_xbit
) = opval
;
8433 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8437 SET_H_INSN_PREFIXED_P (opval
);
8438 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8448 CASE (sem
, INSN_ADDI_B_R
) : /* addi.b ${Rs-dfield}.m,${Rd-sfield} */
8450 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8451 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8452 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
8453 int UNUSED written
= 0;
8454 IADDR UNUSED pc
= abuf
->addr
;
8455 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8459 SI opval
= ADDSI (GET_H_GR (FLD (f_operand1
)), MULSI (GET_H_GR (FLD (f_operand2
)), 1));
8460 SET_H_GR (FLD (f_operand1
), opval
);
8461 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8466 CPU (h_xbit
) = opval
;
8467 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8471 SET_H_INSN_PREFIXED_P (opval
);
8472 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8481 CASE (sem
, INSN_ADDI_W_R
) : /* addi.w ${Rs-dfield}.m,${Rd-sfield} */
8483 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8484 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8485 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
8486 int UNUSED written
= 0;
8487 IADDR UNUSED pc
= abuf
->addr
;
8488 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8492 SI opval
= ADDSI (GET_H_GR (FLD (f_operand1
)), MULSI (GET_H_GR (FLD (f_operand2
)), 2));
8493 SET_H_GR (FLD (f_operand1
), opval
);
8494 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8499 CPU (h_xbit
) = opval
;
8500 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8504 SET_H_INSN_PREFIXED_P (opval
);
8505 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8514 CASE (sem
, INSN_ADDI_D_R
) : /* addi.d ${Rs-dfield}.m,${Rd-sfield} */
8516 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8517 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8518 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
8519 int UNUSED written
= 0;
8520 IADDR UNUSED pc
= abuf
->addr
;
8521 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8525 SI opval
= ADDSI (GET_H_GR (FLD (f_operand1
)), MULSI (GET_H_GR (FLD (f_operand2
)), 4));
8526 SET_H_GR (FLD (f_operand1
), opval
);
8527 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8532 CPU (h_xbit
) = opval
;
8533 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8537 SET_H_INSN_PREFIXED_P (opval
);
8538 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8547 CASE (sem
, INSN_NEG_B_R
) : /* neg.b $Rs,$Rd */
8549 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8550 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8551 #define FLD(f) abuf->fields.sfmt_add_b_r.f
8552 int UNUSED written
= 0;
8553 IADDR UNUSED pc
= abuf
->addr
;
8554 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8561 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
8563 tmp_carry
= CPU (h_cbit
);
8564 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8567 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
8569 SI opval
= ORSI (ANDSI (tmp_newval
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
8570 SET_H_GR (FLD (f_operand2
), opval
);
8571 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8576 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))));
8577 CPU (h_cbit
) = opval
;
8578 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8581 BI opval
= LTQI (tmp_newval
, 0);
8582 CPU (h_nbit
) = opval
;
8583 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8586 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8587 CPU (h_zbit
) = opval
;
8588 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8591 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)));
8592 CPU (h_vbit
) = opval
;
8593 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8598 CPU (h_xbit
) = opval
;
8599 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8603 SET_H_INSN_PREFIXED_P (opval
);
8604 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8614 CASE (sem
, INSN_NEG_W_R
) : /* neg.w $Rs,$Rd */
8616 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8617 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8618 #define FLD(f) abuf->fields.sfmt_add_b_r.f
8619 int UNUSED written
= 0;
8620 IADDR UNUSED pc
= abuf
->addr
;
8621 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8628 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
8630 tmp_carry
= CPU (h_cbit
);
8631 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8634 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
8636 SI opval
= ORSI (ANDSI (tmp_newval
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
8637 SET_H_GR (FLD (f_operand2
), opval
);
8638 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8643 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))));
8644 CPU (h_cbit
) = opval
;
8645 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8648 BI opval
= LTHI (tmp_newval
, 0);
8649 CPU (h_nbit
) = opval
;
8650 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8653 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8654 CPU (h_zbit
) = opval
;
8655 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8658 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)));
8659 CPU (h_vbit
) = opval
;
8660 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8665 CPU (h_xbit
) = opval
;
8666 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8670 SET_H_INSN_PREFIXED_P (opval
);
8671 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8681 CASE (sem
, INSN_NEG_D_R
) : /* neg.d $Rs,$Rd */
8683 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8684 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8685 #define FLD(f) abuf->fields.sfmt_add_b_r.f
8686 int UNUSED written
= 0;
8687 IADDR UNUSED pc
= abuf
->addr
;
8688 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8695 tmp_tmpops
= GET_H_GR (FLD (f_operand1
));
8697 tmp_carry
= CPU (h_cbit
);
8698 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8700 SI opval
= tmp_newval
;
8701 SET_H_GR (FLD (f_operand2
), opval
);
8702 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8706 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))));
8707 CPU (h_cbit
) = opval
;
8708 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8711 BI opval
= LTSI (tmp_newval
, 0);
8712 CPU (h_nbit
) = opval
;
8713 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8716 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8717 CPU (h_zbit
) = opval
;
8718 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8721 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)));
8722 CPU (h_vbit
) = opval
;
8723 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8728 CPU (h_xbit
) = opval
;
8729 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8733 SET_H_INSN_PREFIXED_P (opval
);
8734 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8744 CASE (sem
, INSN_TEST_M_B_M
) : /* test-m.b [${Rs}${inc}] */
8746 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8747 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8748 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
8749 int UNUSED written
= 0;
8750 IADDR UNUSED pc
= abuf
->addr
;
8751 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8755 tmp_tmpd
= ({ SI tmp_addr
;
8758 tmp_postinc
= FLD (f_memmode
);
8759 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
8760 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
8761 ; if (NEBI (tmp_postinc
, 0)) {
8763 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
8764 tmp_addr
= ADDSI (tmp_addr
, 1);
8767 SI opval
= tmp_addr
;
8768 SET_H_GR (FLD (f_operand1
), opval
);
8769 written
|= (1 << 8);
8770 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8781 tmp_tmpopd
= tmp_tmpd
;
8782 tmp_carry
= CPU (h_cbit
);
8783 tmp_newval
= SUBCQI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8787 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))));
8788 CPU (h_cbit
) = opval
;
8789 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8792 BI opval
= LTQI (tmp_newval
, 0);
8793 CPU (h_nbit
) = opval
;
8794 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8797 BI opval
= ANDIF (EQQI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8798 CPU (h_zbit
) = opval
;
8799 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8802 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)));
8803 CPU (h_vbit
) = opval
;
8804 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8809 CPU (h_xbit
) = opval
;
8810 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8814 SET_H_INSN_PREFIXED_P (opval
);
8815 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8822 abuf
->written
= written
;
8827 CASE (sem
, INSN_TEST_M_W_M
) : /* test-m.w [${Rs}${inc}] */
8829 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8830 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8831 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
8832 int UNUSED written
= 0;
8833 IADDR UNUSED pc
= abuf
->addr
;
8834 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8838 tmp_tmpd
= ({ SI tmp_addr
;
8841 tmp_postinc
= FLD (f_memmode
);
8842 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
8843 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
8844 ; if (NEBI (tmp_postinc
, 0)) {
8846 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
8847 tmp_addr
= ADDSI (tmp_addr
, 2);
8850 SI opval
= tmp_addr
;
8851 SET_H_GR (FLD (f_operand1
), opval
);
8852 written
|= (1 << 8);
8853 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8864 tmp_tmpopd
= tmp_tmpd
;
8865 tmp_carry
= CPU (h_cbit
);
8866 tmp_newval
= SUBCHI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8870 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))));
8871 CPU (h_cbit
) = opval
;
8872 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8875 BI opval
= LTHI (tmp_newval
, 0);
8876 CPU (h_nbit
) = opval
;
8877 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8880 BI opval
= ANDIF (EQHI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8881 CPU (h_zbit
) = opval
;
8882 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8885 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)));
8886 CPU (h_vbit
) = opval
;
8887 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8892 CPU (h_xbit
) = opval
;
8893 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8897 SET_H_INSN_PREFIXED_P (opval
);
8898 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8905 abuf
->written
= written
;
8910 CASE (sem
, INSN_TEST_M_D_M
) : /* test-m.d [${Rs}${inc}] */
8912 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8913 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8914 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
8915 int UNUSED written
= 0;
8916 IADDR UNUSED pc
= abuf
->addr
;
8917 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
8921 tmp_tmpd
= ({ SI tmp_addr
;
8924 tmp_postinc
= FLD (f_memmode
);
8925 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
8926 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
8927 ; if (NEBI (tmp_postinc
, 0)) {
8929 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
8930 tmp_addr
= ADDSI (tmp_addr
, 4);
8933 SI opval
= tmp_addr
;
8934 SET_H_GR (FLD (f_operand1
), opval
);
8935 written
|= (1 << 8);
8936 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
8947 tmp_tmpopd
= tmp_tmpd
;
8948 tmp_carry
= CPU (h_cbit
);
8949 tmp_newval
= SUBCSI (tmp_tmpopd
, tmp_tmpops
, ((EQBI (CPU (h_xbit
), 0)) ? (0) : (tmp_carry
)));
8953 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))));
8954 CPU (h_cbit
) = opval
;
8955 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
8958 BI opval
= LTSI (tmp_newval
, 0);
8959 CPU (h_nbit
) = opval
;
8960 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
8963 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
8964 CPU (h_zbit
) = opval
;
8965 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
8968 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)));
8969 CPU (h_vbit
) = opval
;
8970 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
8975 CPU (h_xbit
) = opval
;
8976 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
8980 SET_H_INSN_PREFIXED_P (opval
);
8981 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
8988 abuf
->written
= written
;
8993 CASE (sem
, INSN_MOVE_R_M_B_M
) : /* move-r-m.b ${Rs-dfield},[${Rd-sfield}${inc}] */
8995 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
8996 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
8997 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
8998 int UNUSED written
= 0;
8999 IADDR UNUSED pc
= abuf
->addr
;
9000 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9004 tmp_tmpd
= GET_H_GR (FLD (f_operand2
));
9008 tmp_postinc
= FLD (f_memmode
);
9009 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
9010 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
9011 if (EQBI (CPU (h_pbit
), 0)) {
9014 QI opval
= tmp_tmpd
;
9015 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
9016 written
|= (1 << 10);
9017 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
9020 BI opval
= CPU (h_pbit
);
9021 CPU (h_cbit
) = opval
;
9022 written
|= (1 << 9);
9023 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9029 CPU (h_cbit
) = opval
;
9030 written
|= (1 << 9);
9031 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9036 QI opval
= tmp_tmpd
;
9037 SETMEMQI (current_cpu
, pc
, tmp_addr
, opval
);
9038 written
|= (1 << 10);
9039 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
9042 if (NEBI (tmp_postinc
, 0)) {
9044 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
9045 tmp_addr
= ADDSI (tmp_addr
, 1);
9048 SI opval
= tmp_addr
;
9049 SET_H_GR (FLD (f_operand1
), opval
);
9050 written
|= (1 << 8);
9051 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9059 CPU (h_xbit
) = opval
;
9060 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9064 SET_H_INSN_PREFIXED_P (opval
);
9065 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9070 abuf
->written
= written
;
9075 CASE (sem
, INSN_MOVE_R_M_W_M
) : /* move-r-m.w ${Rs-dfield},[${Rd-sfield}${inc}] */
9077 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9078 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9079 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
9080 int UNUSED written
= 0;
9081 IADDR UNUSED pc
= abuf
->addr
;
9082 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9086 tmp_tmpd
= GET_H_GR (FLD (f_operand2
));
9090 tmp_postinc
= FLD (f_memmode
);
9091 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
9092 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
9093 if (EQBI (CPU (h_pbit
), 0)) {
9096 HI opval
= tmp_tmpd
;
9097 SETMEMHI (current_cpu
, pc
, tmp_addr
, opval
);
9098 written
|= (1 << 10);
9099 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
9102 BI opval
= CPU (h_pbit
);
9103 CPU (h_cbit
) = opval
;
9104 written
|= (1 << 9);
9105 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9111 CPU (h_cbit
) = opval
;
9112 written
|= (1 << 9);
9113 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9118 HI opval
= tmp_tmpd
;
9119 SETMEMHI (current_cpu
, pc
, tmp_addr
, opval
);
9120 written
|= (1 << 10);
9121 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
9124 if (NEBI (tmp_postinc
, 0)) {
9126 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
9127 tmp_addr
= ADDSI (tmp_addr
, 2);
9130 SI opval
= tmp_addr
;
9131 SET_H_GR (FLD (f_operand1
), opval
);
9132 written
|= (1 << 8);
9133 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9141 CPU (h_xbit
) = opval
;
9142 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9146 SET_H_INSN_PREFIXED_P (opval
);
9147 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9152 abuf
->written
= written
;
9157 CASE (sem
, INSN_MOVE_R_M_D_M
) : /* move-r-m.d ${Rs-dfield},[${Rd-sfield}${inc}] */
9159 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9160 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9161 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
9162 int UNUSED written
= 0;
9163 IADDR UNUSED pc
= abuf
->addr
;
9164 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9168 tmp_tmpd
= GET_H_GR (FLD (f_operand2
));
9172 tmp_postinc
= FLD (f_memmode
);
9173 tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
9174 if (ANDIF (GET_H_V32_NON_V32 (), NEBI (CPU (h_xbit
), 0))) {
9175 if (EQBI (CPU (h_pbit
), 0)) {
9178 SI opval
= tmp_tmpd
;
9179 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
9180 written
|= (1 << 10);
9181 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
9184 BI opval
= CPU (h_pbit
);
9185 CPU (h_cbit
) = opval
;
9186 written
|= (1 << 9);
9187 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9193 CPU (h_cbit
) = opval
;
9194 written
|= (1 << 9);
9195 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9200 SI opval
= tmp_tmpd
;
9201 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
9202 written
|= (1 << 10);
9203 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
9206 if (NEBI (tmp_postinc
, 0)) {
9208 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
9209 tmp_addr
= ADDSI (tmp_addr
, 4);
9212 SI opval
= tmp_addr
;
9213 SET_H_GR (FLD (f_operand1
), opval
);
9214 written
|= (1 << 8);
9215 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9223 CPU (h_xbit
) = opval
;
9224 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9228 SET_H_INSN_PREFIXED_P (opval
);
9229 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9234 abuf
->written
= written
;
9239 CASE (sem
, INSN_MULS_B
) : /* muls.b $Rs,$Rd */
9241 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9242 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9243 #define FLD(f) abuf->fields.sfmt_muls_b.f
9244 int UNUSED written
= 0;
9245 IADDR UNUSED pc
= abuf
->addr
;
9246 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9252 tmp_src1
= EXTQIDI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
9253 tmp_src2
= EXTQIDI (TRUNCSIQI (GET_H_GR (FLD (f_operand2
))));
9254 tmp_tmpr
= MULDI (tmp_src1
, tmp_src2
);
9256 SI opval
= TRUNCDISI (tmp_tmpr
);
9257 SET_H_GR (FLD (f_operand2
), opval
);
9258 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9261 SI opval
= TRUNCDISI (SRLDI (tmp_tmpr
, 32));
9262 SET_H_SR (((UINT
) 7), opval
);
9263 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
9267 BI opval
= ANDIF (GET_H_V32_NON_V32 (), CPU (h_cbit
));
9268 CPU (h_cbit
) = opval
;
9269 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9272 BI opval
= LTDI (tmp_tmpr
, 0);
9273 CPU (h_nbit
) = opval
;
9274 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9277 BI opval
= ANDIF (EQDI (tmp_tmpr
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9278 CPU (h_zbit
) = opval
;
9279 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9282 BI opval
= NEDI (tmp_tmpr
, EXTSIDI (TRUNCDISI (tmp_tmpr
)));
9283 CPU (h_vbit
) = opval
;
9284 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9289 CPU (h_xbit
) = opval
;
9290 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9294 SET_H_INSN_PREFIXED_P (opval
);
9295 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9305 CASE (sem
, INSN_MULS_W
) : /* muls.w $Rs,$Rd */
9307 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9308 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9309 #define FLD(f) abuf->fields.sfmt_muls_b.f
9310 int UNUSED written
= 0;
9311 IADDR UNUSED pc
= abuf
->addr
;
9312 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9318 tmp_src1
= EXTHIDI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
9319 tmp_src2
= EXTHIDI (TRUNCSIHI (GET_H_GR (FLD (f_operand2
))));
9320 tmp_tmpr
= MULDI (tmp_src1
, tmp_src2
);
9322 SI opval
= TRUNCDISI (tmp_tmpr
);
9323 SET_H_GR (FLD (f_operand2
), opval
);
9324 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9327 SI opval
= TRUNCDISI (SRLDI (tmp_tmpr
, 32));
9328 SET_H_SR (((UINT
) 7), opval
);
9329 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
9333 BI opval
= ANDIF (GET_H_V32_NON_V32 (), CPU (h_cbit
));
9334 CPU (h_cbit
) = opval
;
9335 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9338 BI opval
= LTDI (tmp_tmpr
, 0);
9339 CPU (h_nbit
) = opval
;
9340 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9343 BI opval
= ANDIF (EQDI (tmp_tmpr
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9344 CPU (h_zbit
) = opval
;
9345 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9348 BI opval
= NEDI (tmp_tmpr
, EXTSIDI (TRUNCDISI (tmp_tmpr
)));
9349 CPU (h_vbit
) = opval
;
9350 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9355 CPU (h_xbit
) = opval
;
9356 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9360 SET_H_INSN_PREFIXED_P (opval
);
9361 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9371 CASE (sem
, INSN_MULS_D
) : /* muls.d $Rs,$Rd */
9373 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9374 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9375 #define FLD(f) abuf->fields.sfmt_muls_b.f
9376 int UNUSED written
= 0;
9377 IADDR UNUSED pc
= abuf
->addr
;
9378 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9384 tmp_src1
= EXTSIDI (TRUNCSISI (GET_H_GR (FLD (f_operand1
))));
9385 tmp_src2
= EXTSIDI (TRUNCSISI (GET_H_GR (FLD (f_operand2
))));
9386 tmp_tmpr
= MULDI (tmp_src1
, tmp_src2
);
9388 SI opval
= TRUNCDISI (tmp_tmpr
);
9389 SET_H_GR (FLD (f_operand2
), opval
);
9390 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9393 SI opval
= TRUNCDISI (SRLDI (tmp_tmpr
, 32));
9394 SET_H_SR (((UINT
) 7), opval
);
9395 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
9399 BI opval
= ANDIF (GET_H_V32_NON_V32 (), CPU (h_cbit
));
9400 CPU (h_cbit
) = opval
;
9401 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9404 BI opval
= LTDI (tmp_tmpr
, 0);
9405 CPU (h_nbit
) = opval
;
9406 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9409 BI opval
= ANDIF (EQDI (tmp_tmpr
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9410 CPU (h_zbit
) = opval
;
9411 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9414 BI opval
= NEDI (tmp_tmpr
, EXTSIDI (TRUNCDISI (tmp_tmpr
)));
9415 CPU (h_vbit
) = opval
;
9416 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9421 CPU (h_xbit
) = opval
;
9422 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9426 SET_H_INSN_PREFIXED_P (opval
);
9427 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9437 CASE (sem
, INSN_MULU_B
) : /* mulu.b $Rs,$Rd */
9439 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9440 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9441 #define FLD(f) abuf->fields.sfmt_muls_b.f
9442 int UNUSED written
= 0;
9443 IADDR UNUSED pc
= abuf
->addr
;
9444 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9450 tmp_src1
= ZEXTQIDI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
9451 tmp_src2
= ZEXTQIDI (TRUNCSIQI (GET_H_GR (FLD (f_operand2
))));
9452 tmp_tmpr
= MULDI (tmp_src1
, tmp_src2
);
9454 SI opval
= TRUNCDISI (tmp_tmpr
);
9455 SET_H_GR (FLD (f_operand2
), opval
);
9456 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9459 SI opval
= TRUNCDISI (SRLDI (tmp_tmpr
, 32));
9460 SET_H_SR (((UINT
) 7), opval
);
9461 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
9465 BI opval
= ANDIF (GET_H_V32_NON_V32 (), CPU (h_cbit
));
9466 CPU (h_cbit
) = opval
;
9467 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9470 BI opval
= LTDI (tmp_tmpr
, 0);
9471 CPU (h_nbit
) = opval
;
9472 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9475 BI opval
= ANDIF (EQDI (tmp_tmpr
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9476 CPU (h_zbit
) = opval
;
9477 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9480 BI opval
= NEDI (tmp_tmpr
, ZEXTSIDI (TRUNCDISI (tmp_tmpr
)));
9481 CPU (h_vbit
) = opval
;
9482 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9487 CPU (h_xbit
) = opval
;
9488 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9492 SET_H_INSN_PREFIXED_P (opval
);
9493 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9503 CASE (sem
, INSN_MULU_W
) : /* mulu.w $Rs,$Rd */
9505 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9506 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9507 #define FLD(f) abuf->fields.sfmt_muls_b.f
9508 int UNUSED written
= 0;
9509 IADDR UNUSED pc
= abuf
->addr
;
9510 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9516 tmp_src1
= ZEXTHIDI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
9517 tmp_src2
= ZEXTHIDI (TRUNCSIHI (GET_H_GR (FLD (f_operand2
))));
9518 tmp_tmpr
= MULDI (tmp_src1
, tmp_src2
);
9520 SI opval
= TRUNCDISI (tmp_tmpr
);
9521 SET_H_GR (FLD (f_operand2
), opval
);
9522 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9525 SI opval
= TRUNCDISI (SRLDI (tmp_tmpr
, 32));
9526 SET_H_SR (((UINT
) 7), opval
);
9527 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
9531 BI opval
= ANDIF (GET_H_V32_NON_V32 (), CPU (h_cbit
));
9532 CPU (h_cbit
) = opval
;
9533 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9536 BI opval
= LTDI (tmp_tmpr
, 0);
9537 CPU (h_nbit
) = opval
;
9538 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9541 BI opval
= ANDIF (EQDI (tmp_tmpr
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9542 CPU (h_zbit
) = opval
;
9543 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9546 BI opval
= NEDI (tmp_tmpr
, ZEXTSIDI (TRUNCDISI (tmp_tmpr
)));
9547 CPU (h_vbit
) = opval
;
9548 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9553 CPU (h_xbit
) = opval
;
9554 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9558 SET_H_INSN_PREFIXED_P (opval
);
9559 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9569 CASE (sem
, INSN_MULU_D
) : /* mulu.d $Rs,$Rd */
9571 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9572 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9573 #define FLD(f) abuf->fields.sfmt_muls_b.f
9574 int UNUSED written
= 0;
9575 IADDR UNUSED pc
= abuf
->addr
;
9576 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9582 tmp_src1
= ZEXTSIDI (TRUNCSISI (GET_H_GR (FLD (f_operand1
))));
9583 tmp_src2
= ZEXTSIDI (TRUNCSISI (GET_H_GR (FLD (f_operand2
))));
9584 tmp_tmpr
= MULDI (tmp_src1
, tmp_src2
);
9586 SI opval
= TRUNCDISI (tmp_tmpr
);
9587 SET_H_GR (FLD (f_operand2
), opval
);
9588 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9591 SI opval
= TRUNCDISI (SRLDI (tmp_tmpr
, 32));
9592 SET_H_SR (((UINT
) 7), opval
);
9593 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
9597 BI opval
= ANDIF (GET_H_V32_NON_V32 (), CPU (h_cbit
));
9598 CPU (h_cbit
) = opval
;
9599 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
9602 BI opval
= LTDI (tmp_tmpr
, 0);
9603 CPU (h_nbit
) = opval
;
9604 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9607 BI opval
= ANDIF (EQDI (tmp_tmpr
, 0), ORIF (CPU (h_zbit
), NOTBI (CPU (h_xbit
))));
9608 CPU (h_zbit
) = opval
;
9609 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9612 BI opval
= NEDI (tmp_tmpr
, ZEXTSIDI (TRUNCDISI (tmp_tmpr
)));
9613 CPU (h_vbit
) = opval
;
9614 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
9619 CPU (h_xbit
) = opval
;
9620 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9624 SET_H_INSN_PREFIXED_P (opval
);
9625 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9635 CASE (sem
, INSN_MSTEP
) : /* mstep $Rs,$Rd */
9637 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9638 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9639 #define FLD(f) abuf->fields.sfmt_muls_b.f
9640 int UNUSED written
= 0;
9641 IADDR UNUSED pc
= abuf
->addr
;
9642 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9647 tmp_tmps
= GET_H_GR (FLD (f_operand1
));
9648 tmp_tmpd
= ADDSI (SLLSI (GET_H_GR (FLD (f_operand2
)), 1), ((CPU (h_nbit
)) ? (tmp_tmps
) : (0)));
9650 SI opval
= tmp_tmpd
;
9651 SET_H_GR (FLD (f_operand2
), opval
);
9652 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9656 BI opval
= LTSI (tmp_tmpd
, 0);
9657 CPU (h_nbit
) = opval
;
9658 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9661 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
9662 CPU (h_zbit
) = opval
;
9663 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9665 SET_H_CBIT_MOVE (0);
9666 SET_H_VBIT_MOVE (0);
9670 CPU (h_xbit
) = opval
;
9671 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9675 SET_H_INSN_PREFIXED_P (opval
);
9676 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9686 CASE (sem
, INSN_DSTEP
) : /* dstep $Rs,$Rd */
9688 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9689 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9690 #define FLD(f) abuf->fields.sfmt_muls_b.f
9691 int UNUSED written
= 0;
9692 IADDR UNUSED pc
= abuf
->addr
;
9693 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9699 tmp_tmps
= GET_H_GR (FLD (f_operand1
));
9700 tmp_tmp
= SLLSI (GET_H_GR (FLD (f_operand2
)), 1);
9701 tmp_tmpd
= ((GEUSI (tmp_tmp
, tmp_tmps
)) ? (SUBSI (tmp_tmp
, tmp_tmps
)) : (tmp_tmp
));
9703 SI opval
= tmp_tmpd
;
9704 SET_H_GR (FLD (f_operand2
), opval
);
9705 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9709 BI opval
= LTSI (tmp_tmpd
, 0);
9710 CPU (h_nbit
) = opval
;
9711 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9714 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
9715 CPU (h_zbit
) = opval
;
9716 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9718 SET_H_CBIT_MOVE (0);
9719 SET_H_VBIT_MOVE (0);
9723 CPU (h_xbit
) = opval
;
9724 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9728 SET_H_INSN_PREFIXED_P (opval
);
9729 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9739 CASE (sem
, INSN_ABS
) : /* abs $Rs,$Rd */
9741 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9742 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9743 #define FLD(f) abuf->fields.sfmt_muls_b.f
9744 int UNUSED written
= 0;
9745 IADDR UNUSED pc
= abuf
->addr
;
9746 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9750 tmp_tmpd
= ABSSI (GET_H_GR (FLD (f_operand1
)));
9752 SI opval
= tmp_tmpd
;
9753 SET_H_GR (FLD (f_operand2
), opval
);
9754 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9758 BI opval
= LTSI (tmp_tmpd
, 0);
9759 CPU (h_nbit
) = opval
;
9760 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9763 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
9764 CPU (h_zbit
) = opval
;
9765 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9767 SET_H_CBIT_MOVE (0);
9768 SET_H_VBIT_MOVE (0);
9772 CPU (h_xbit
) = opval
;
9773 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9777 SET_H_INSN_PREFIXED_P (opval
);
9778 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9788 CASE (sem
, INSN_AND_B_R
) : /* and.b $Rs,$Rd */
9790 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9791 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9792 #define FLD(f) abuf->fields.sfmt_add_b_r.f
9793 int UNUSED written
= 0;
9794 IADDR UNUSED pc
= abuf
->addr
;
9795 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9799 tmp_tmpd
= ANDQI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
9802 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
9804 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
9805 SET_H_GR (FLD (f_operand2
), opval
);
9806 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9811 BI opval
= LTQI (tmp_tmpd
, 0);
9812 CPU (h_nbit
) = opval
;
9813 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9816 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
9817 CPU (h_zbit
) = opval
;
9818 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9820 SET_H_CBIT_MOVE (0);
9821 SET_H_VBIT_MOVE (0);
9825 CPU (h_xbit
) = opval
;
9826 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9830 SET_H_INSN_PREFIXED_P (opval
);
9831 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9841 CASE (sem
, INSN_AND_W_R
) : /* and.w $Rs,$Rd */
9843 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9844 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9845 #define FLD(f) abuf->fields.sfmt_add_b_r.f
9846 int UNUSED written
= 0;
9847 IADDR UNUSED pc
= abuf
->addr
;
9848 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9852 tmp_tmpd
= ANDHI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
9855 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
9857 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
9858 SET_H_GR (FLD (f_operand2
), opval
);
9859 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9864 BI opval
= LTHI (tmp_tmpd
, 0);
9865 CPU (h_nbit
) = opval
;
9866 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9869 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
9870 CPU (h_zbit
) = opval
;
9871 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9873 SET_H_CBIT_MOVE (0);
9874 SET_H_VBIT_MOVE (0);
9878 CPU (h_xbit
) = opval
;
9879 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9883 SET_H_INSN_PREFIXED_P (opval
);
9884 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9894 CASE (sem
, INSN_AND_D_R
) : /* and.d $Rs,$Rd */
9896 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9897 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9898 #define FLD(f) abuf->fields.sfmt_add_b_r.f
9899 int UNUSED written
= 0;
9900 IADDR UNUSED pc
= abuf
->addr
;
9901 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9905 tmp_tmpd
= ANDSI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
9907 SI opval
= tmp_tmpd
;
9908 SET_H_GR (FLD (f_operand2
), opval
);
9909 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9913 BI opval
= LTSI (tmp_tmpd
, 0);
9914 CPU (h_nbit
) = opval
;
9915 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9918 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
9919 CPU (h_zbit
) = opval
;
9920 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9922 SET_H_CBIT_MOVE (0);
9923 SET_H_VBIT_MOVE (0);
9927 CPU (h_xbit
) = opval
;
9928 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
9932 SET_H_INSN_PREFIXED_P (opval
);
9933 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
9943 CASE (sem
, INSN_AND_M_B_M
) : /* and-m.b [${Rs}${inc}],${Rd} */
9945 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
9946 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
9947 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
9948 int UNUSED written
= 0;
9949 IADDR UNUSED pc
= abuf
->addr
;
9950 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
9954 tmp_tmpd
= ANDQI (GET_H_GR (FLD (f_operand2
)), ({ SI tmp_addr
;
9957 tmp_postinc
= FLD (f_memmode
);
9958 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
9959 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
9960 ; if (NEBI (tmp_postinc
, 0)) {
9962 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
9963 tmp_addr
= ADDSI (tmp_addr
, 1);
9966 SI opval
= tmp_addr
;
9967 SET_H_GR (FLD (f_operand1
), opval
);
9968 written
|= (1 << 11);
9969 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9976 tmp_oldregval
= GET_H_RAW_GR_PC (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
9978 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
9979 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
9980 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
9985 BI opval
= LTQI (tmp_tmpd
, 0);
9986 CPU (h_nbit
) = opval
;
9987 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
9990 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
9991 CPU (h_zbit
) = opval
;
9992 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
9994 SET_H_CBIT_MOVE (0);
9995 SET_H_VBIT_MOVE (0);
9999 CPU (h_xbit
) = opval
;
10000 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10004 SET_H_INSN_PREFIXED_P (opval
);
10005 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10011 abuf
->written
= written
;
10016 CASE (sem
, INSN_AND_M_W_M
) : /* and-m.w [${Rs}${inc}],${Rd} */
10018 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10019 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10020 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
10021 int UNUSED written
= 0;
10022 IADDR UNUSED pc
= abuf
->addr
;
10023 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10027 tmp_tmpd
= ANDHI (GET_H_GR (FLD (f_operand2
)), ({ SI tmp_addr
;
10030 tmp_postinc
= FLD (f_memmode
);
10031 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
10032 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
10033 ; if (NEBI (tmp_postinc
, 0)) {
10035 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
10036 tmp_addr
= ADDSI (tmp_addr
, 2);
10039 SI opval
= tmp_addr
;
10040 SET_H_GR (FLD (f_operand1
), opval
);
10041 written
|= (1 << 11);
10042 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10046 ; tmp_tmp_mem
; }));
10049 tmp_oldregval
= GET_H_RAW_GR_PC (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
10051 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
10052 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
10053 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10058 BI opval
= LTHI (tmp_tmpd
, 0);
10059 CPU (h_nbit
) = opval
;
10060 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10063 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10064 CPU (h_zbit
) = opval
;
10065 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10067 SET_H_CBIT_MOVE (0);
10068 SET_H_VBIT_MOVE (0);
10072 CPU (h_xbit
) = opval
;
10073 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10077 SET_H_INSN_PREFIXED_P (opval
);
10078 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10084 abuf
->written
= written
;
10089 CASE (sem
, INSN_AND_M_D_M
) : /* and-m.d [${Rs}${inc}],${Rd} */
10091 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10092 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10093 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
10094 int UNUSED written
= 0;
10095 IADDR UNUSED pc
= abuf
->addr
;
10096 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10100 tmp_tmpd
= ANDSI (GET_H_GR (FLD (f_operand2
)), ({ SI tmp_addr
;
10103 tmp_postinc
= FLD (f_memmode
);
10104 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
10105 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
10106 ; if (NEBI (tmp_postinc
, 0)) {
10108 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
10109 tmp_addr
= ADDSI (tmp_addr
, 4);
10112 SI opval
= tmp_addr
;
10113 SET_H_GR (FLD (f_operand1
), opval
);
10114 written
|= (1 << 10);
10115 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10119 ; tmp_tmp_mem
; }));
10121 SI opval
= tmp_tmpd
;
10122 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
10123 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10127 BI opval
= LTSI (tmp_tmpd
, 0);
10128 CPU (h_nbit
) = opval
;
10129 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10132 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10133 CPU (h_zbit
) = opval
;
10134 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10136 SET_H_CBIT_MOVE (0);
10137 SET_H_VBIT_MOVE (0);
10141 CPU (h_xbit
) = opval
;
10142 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10146 SET_H_INSN_PREFIXED_P (opval
);
10147 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10153 abuf
->written
= written
;
10158 CASE (sem
, INSN_ANDCBR
) : /* and.b ${sconst8}],${Rd} */
10160 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10161 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10162 #define FLD(f) abuf->fields.sfmt_addcbr.f
10163 int UNUSED written
= 0;
10164 IADDR UNUSED pc
= abuf
->addr
;
10165 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
10169 tmp_tmpd
= ANDQI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__byte
));
10172 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
10174 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
10175 SET_H_GR (FLD (f_operand2
), opval
);
10176 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10181 BI opval
= LTQI (tmp_tmpd
, 0);
10182 CPU (h_nbit
) = opval
;
10183 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10186 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10187 CPU (h_zbit
) = opval
;
10188 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10190 SET_H_CBIT_MOVE (0);
10191 SET_H_VBIT_MOVE (0);
10195 CPU (h_xbit
) = opval
;
10196 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10200 SET_H_INSN_PREFIXED_P (opval
);
10201 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10211 CASE (sem
, INSN_ANDCWR
) : /* and.w ${sconst16}],${Rd} */
10213 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10214 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10215 #define FLD(f) abuf->fields.sfmt_addcwr.f
10216 int UNUSED written
= 0;
10217 IADDR UNUSED pc
= abuf
->addr
;
10218 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
10222 tmp_tmpd
= ANDHI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__word
));
10225 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
10227 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
10228 SET_H_GR (FLD (f_operand2
), opval
);
10229 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10234 BI opval
= LTHI (tmp_tmpd
, 0);
10235 CPU (h_nbit
) = opval
;
10236 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10239 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10240 CPU (h_zbit
) = opval
;
10241 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10243 SET_H_CBIT_MOVE (0);
10244 SET_H_VBIT_MOVE (0);
10248 CPU (h_xbit
) = opval
;
10249 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10253 SET_H_INSN_PREFIXED_P (opval
);
10254 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10264 CASE (sem
, INSN_ANDCDR
) : /* and.d ${const32}],${Rd} */
10266 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10267 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10268 #define FLD(f) abuf->fields.sfmt_addcdr.f
10269 int UNUSED written
= 0;
10270 IADDR UNUSED pc
= abuf
->addr
;
10271 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
10275 tmp_tmpd
= ANDSI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__dword
));
10277 SI opval
= tmp_tmpd
;
10278 SET_H_GR (FLD (f_operand2
), opval
);
10279 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10283 BI opval
= LTSI (tmp_tmpd
, 0);
10284 CPU (h_nbit
) = opval
;
10285 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10288 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10289 CPU (h_zbit
) = opval
;
10290 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10292 SET_H_CBIT_MOVE (0);
10293 SET_H_VBIT_MOVE (0);
10297 CPU (h_xbit
) = opval
;
10298 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10302 SET_H_INSN_PREFIXED_P (opval
);
10303 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10313 CASE (sem
, INSN_ANDQ
) : /* andq $i,$Rd */
10315 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10316 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10317 #define FLD(f) abuf->fields.sfmt_andq.f
10318 int UNUSED written
= 0;
10319 IADDR UNUSED pc
= abuf
->addr
;
10320 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10324 tmp_tmpd
= ANDSI (GET_H_GR (FLD (f_operand2
)), FLD (f_s6
));
10326 SI opval
= tmp_tmpd
;
10327 SET_H_GR (FLD (f_operand2
), opval
);
10328 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10332 BI opval
= LTSI (tmp_tmpd
, 0);
10333 CPU (h_nbit
) = opval
;
10334 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10337 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10338 CPU (h_zbit
) = opval
;
10339 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10341 SET_H_CBIT_MOVE (0);
10342 SET_H_VBIT_MOVE (0);
10346 CPU (h_xbit
) = opval
;
10347 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10351 SET_H_INSN_PREFIXED_P (opval
);
10352 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10362 CASE (sem
, INSN_ORR_B_R
) : /* orr.b $Rs,$Rd */
10364 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10365 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10366 #define FLD(f) abuf->fields.sfmt_add_b_r.f
10367 int UNUSED written
= 0;
10368 IADDR UNUSED pc
= abuf
->addr
;
10369 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10373 tmp_tmpd
= ORQI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
10376 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
10378 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
10379 SET_H_GR (FLD (f_operand2
), opval
);
10380 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10385 BI opval
= LTQI (tmp_tmpd
, 0);
10386 CPU (h_nbit
) = opval
;
10387 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10390 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10391 CPU (h_zbit
) = opval
;
10392 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10394 SET_H_CBIT_MOVE (0);
10395 SET_H_VBIT_MOVE (0);
10399 CPU (h_xbit
) = opval
;
10400 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10404 SET_H_INSN_PREFIXED_P (opval
);
10405 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10415 CASE (sem
, INSN_ORR_W_R
) : /* orr.w $Rs,$Rd */
10417 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10418 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10419 #define FLD(f) abuf->fields.sfmt_add_b_r.f
10420 int UNUSED written
= 0;
10421 IADDR UNUSED pc
= abuf
->addr
;
10422 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10426 tmp_tmpd
= ORHI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
10429 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
10431 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
10432 SET_H_GR (FLD (f_operand2
), opval
);
10433 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10438 BI opval
= LTHI (tmp_tmpd
, 0);
10439 CPU (h_nbit
) = opval
;
10440 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10443 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10444 CPU (h_zbit
) = opval
;
10445 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10447 SET_H_CBIT_MOVE (0);
10448 SET_H_VBIT_MOVE (0);
10452 CPU (h_xbit
) = opval
;
10453 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10457 SET_H_INSN_PREFIXED_P (opval
);
10458 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10468 CASE (sem
, INSN_ORR_D_R
) : /* orr.d $Rs,$Rd */
10470 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10471 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10472 #define FLD(f) abuf->fields.sfmt_add_b_r.f
10473 int UNUSED written
= 0;
10474 IADDR UNUSED pc
= abuf
->addr
;
10475 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10479 tmp_tmpd
= ORSI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
10481 SI opval
= tmp_tmpd
;
10482 SET_H_GR (FLD (f_operand2
), opval
);
10483 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10487 BI opval
= LTSI (tmp_tmpd
, 0);
10488 CPU (h_nbit
) = opval
;
10489 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10492 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10493 CPU (h_zbit
) = opval
;
10494 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10496 SET_H_CBIT_MOVE (0);
10497 SET_H_VBIT_MOVE (0);
10501 CPU (h_xbit
) = opval
;
10502 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10506 SET_H_INSN_PREFIXED_P (opval
);
10507 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10517 CASE (sem
, INSN_OR_M_B_M
) : /* or-m.b [${Rs}${inc}],${Rd} */
10519 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10520 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10521 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
10522 int UNUSED written
= 0;
10523 IADDR UNUSED pc
= abuf
->addr
;
10524 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10528 tmp_tmpd
= ORQI (GET_H_GR (FLD (f_operand2
)), ({ SI tmp_addr
;
10531 tmp_postinc
= FLD (f_memmode
);
10532 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
10533 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
10534 ; if (NEBI (tmp_postinc
, 0)) {
10536 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
10537 tmp_addr
= ADDSI (tmp_addr
, 1);
10540 SI opval
= tmp_addr
;
10541 SET_H_GR (FLD (f_operand1
), opval
);
10542 written
|= (1 << 11);
10543 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10547 ; tmp_tmp_mem
; }));
10550 tmp_oldregval
= GET_H_RAW_GR_PC (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
10552 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
10553 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
10554 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10559 BI opval
= LTQI (tmp_tmpd
, 0);
10560 CPU (h_nbit
) = opval
;
10561 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10564 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10565 CPU (h_zbit
) = opval
;
10566 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10568 SET_H_CBIT_MOVE (0);
10569 SET_H_VBIT_MOVE (0);
10573 CPU (h_xbit
) = opval
;
10574 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10578 SET_H_INSN_PREFIXED_P (opval
);
10579 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10585 abuf
->written
= written
;
10590 CASE (sem
, INSN_OR_M_W_M
) : /* or-m.w [${Rs}${inc}],${Rd} */
10592 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10593 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10594 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
10595 int UNUSED written
= 0;
10596 IADDR UNUSED pc
= abuf
->addr
;
10597 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10601 tmp_tmpd
= ORHI (GET_H_GR (FLD (f_operand2
)), ({ SI tmp_addr
;
10604 tmp_postinc
= FLD (f_memmode
);
10605 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
10606 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
10607 ; if (NEBI (tmp_postinc
, 0)) {
10609 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
10610 tmp_addr
= ADDSI (tmp_addr
, 2);
10613 SI opval
= tmp_addr
;
10614 SET_H_GR (FLD (f_operand1
), opval
);
10615 written
|= (1 << 11);
10616 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10620 ; tmp_tmp_mem
; }));
10623 tmp_oldregval
= GET_H_RAW_GR_PC (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))));
10625 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
10626 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
10627 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10632 BI opval
= LTHI (tmp_tmpd
, 0);
10633 CPU (h_nbit
) = opval
;
10634 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10637 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10638 CPU (h_zbit
) = opval
;
10639 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10641 SET_H_CBIT_MOVE (0);
10642 SET_H_VBIT_MOVE (0);
10646 CPU (h_xbit
) = opval
;
10647 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10651 SET_H_INSN_PREFIXED_P (opval
);
10652 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10658 abuf
->written
= written
;
10663 CASE (sem
, INSN_OR_M_D_M
) : /* or-m.d [${Rs}${inc}],${Rd} */
10665 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10666 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10667 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
10668 int UNUSED written
= 0;
10669 IADDR UNUSED pc
= abuf
->addr
;
10670 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10674 tmp_tmpd
= ORSI (GET_H_GR (FLD (f_operand2
)), ({ SI tmp_addr
;
10677 tmp_postinc
= FLD (f_memmode
);
10678 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
10679 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
10680 ; if (NEBI (tmp_postinc
, 0)) {
10682 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
10683 tmp_addr
= ADDSI (tmp_addr
, 4);
10686 SI opval
= tmp_addr
;
10687 SET_H_GR (FLD (f_operand1
), opval
);
10688 written
|= (1 << 10);
10689 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10693 ; tmp_tmp_mem
; }));
10695 SI opval
= tmp_tmpd
;
10696 SET_H_GR (((ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) ? (FLD (f_operand1
)) : (FLD (f_operand2
))), opval
);
10697 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10701 BI opval
= LTSI (tmp_tmpd
, 0);
10702 CPU (h_nbit
) = opval
;
10703 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10706 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10707 CPU (h_zbit
) = opval
;
10708 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10710 SET_H_CBIT_MOVE (0);
10711 SET_H_VBIT_MOVE (0);
10715 CPU (h_xbit
) = opval
;
10716 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10720 SET_H_INSN_PREFIXED_P (opval
);
10721 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10727 abuf
->written
= written
;
10732 CASE (sem
, INSN_ORCBR
) : /* or.b ${sconst8}],${Rd} */
10734 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10735 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10736 #define FLD(f) abuf->fields.sfmt_addcbr.f
10737 int UNUSED written
= 0;
10738 IADDR UNUSED pc
= abuf
->addr
;
10739 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
10743 tmp_tmpd
= ORQI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__byte
));
10746 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
10748 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
10749 SET_H_GR (FLD (f_operand2
), opval
);
10750 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10755 BI opval
= LTQI (tmp_tmpd
, 0);
10756 CPU (h_nbit
) = opval
;
10757 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10760 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10761 CPU (h_zbit
) = opval
;
10762 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10764 SET_H_CBIT_MOVE (0);
10765 SET_H_VBIT_MOVE (0);
10769 CPU (h_xbit
) = opval
;
10770 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10774 SET_H_INSN_PREFIXED_P (opval
);
10775 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10785 CASE (sem
, INSN_ORCWR
) : /* or.w ${sconst16}],${Rd} */
10787 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10788 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10789 #define FLD(f) abuf->fields.sfmt_addcwr.f
10790 int UNUSED written
= 0;
10791 IADDR UNUSED pc
= abuf
->addr
;
10792 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
10796 tmp_tmpd
= ORHI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__word
));
10799 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
10801 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
10802 SET_H_GR (FLD (f_operand2
), opval
);
10803 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10808 BI opval
= LTHI (tmp_tmpd
, 0);
10809 CPU (h_nbit
) = opval
;
10810 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10813 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10814 CPU (h_zbit
) = opval
;
10815 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10817 SET_H_CBIT_MOVE (0);
10818 SET_H_VBIT_MOVE (0);
10822 CPU (h_xbit
) = opval
;
10823 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10827 SET_H_INSN_PREFIXED_P (opval
);
10828 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10838 CASE (sem
, INSN_ORCDR
) : /* or.d ${const32}],${Rd} */
10840 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10841 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10842 #define FLD(f) abuf->fields.sfmt_addcdr.f
10843 int UNUSED written
= 0;
10844 IADDR UNUSED pc
= abuf
->addr
;
10845 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
10849 tmp_tmpd
= ORSI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__dword
));
10851 SI opval
= tmp_tmpd
;
10852 SET_H_GR (FLD (f_operand2
), opval
);
10853 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10857 BI opval
= LTSI (tmp_tmpd
, 0);
10858 CPU (h_nbit
) = opval
;
10859 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10862 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10863 CPU (h_zbit
) = opval
;
10864 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10866 SET_H_CBIT_MOVE (0);
10867 SET_H_VBIT_MOVE (0);
10871 CPU (h_xbit
) = opval
;
10872 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10876 SET_H_INSN_PREFIXED_P (opval
);
10877 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10887 CASE (sem
, INSN_ORQ
) : /* orq $i,$Rd */
10889 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10890 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10891 #define FLD(f) abuf->fields.sfmt_andq.f
10892 int UNUSED written
= 0;
10893 IADDR UNUSED pc
= abuf
->addr
;
10894 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10898 tmp_tmpd
= ORSI (GET_H_GR (FLD (f_operand2
)), FLD (f_s6
));
10900 SI opval
= tmp_tmpd
;
10901 SET_H_GR (FLD (f_operand2
), opval
);
10902 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10906 BI opval
= LTSI (tmp_tmpd
, 0);
10907 CPU (h_nbit
) = opval
;
10908 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10911 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10912 CPU (h_zbit
) = opval
;
10913 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10915 SET_H_CBIT_MOVE (0);
10916 SET_H_VBIT_MOVE (0);
10920 CPU (h_xbit
) = opval
;
10921 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10925 SET_H_INSN_PREFIXED_P (opval
);
10926 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10936 CASE (sem
, INSN_XOR
) : /* xor $Rs,$Rd */
10938 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10939 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10940 #define FLD(f) abuf->fields.sfmt_muls_b.f
10941 int UNUSED written
= 0;
10942 IADDR UNUSED pc
= abuf
->addr
;
10943 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10947 tmp_tmpd
= XORSI (GET_H_GR (FLD (f_operand2
)), GET_H_GR (FLD (f_operand1
)));
10949 SI opval
= tmp_tmpd
;
10950 SET_H_GR (FLD (f_operand2
), opval
);
10951 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
10955 BI opval
= LTSI (tmp_tmpd
, 0);
10956 CPU (h_nbit
) = opval
;
10957 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
10960 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
10961 CPU (h_zbit
) = opval
;
10962 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
10964 SET_H_CBIT_MOVE (0);
10965 SET_H_VBIT_MOVE (0);
10969 CPU (h_xbit
) = opval
;
10970 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
10974 SET_H_INSN_PREFIXED_P (opval
);
10975 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
10985 CASE (sem
, INSN_SWAP
) : /* swap${swapoption} ${Rs} */
10987 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
10988 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
10989 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
10990 int UNUSED written
= 0;
10991 IADDR UNUSED pc
= abuf
->addr
;
10992 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
10997 tmp_tmps
= GET_H_GR (FLD (f_operand1
));
10998 tmp_tmpd
= ({ SI tmp_tmpcode
;
11001 tmp_tmpcode
= FLD (f_operand2
);
11002 ; tmp_tmpval
= tmp_tmps
;
11003 ; if (EQSI (tmp_tmpcode
, 0)) {
11004 tmp_tmpres
= (cgen_rtx_error (current_cpu
, "SWAP without swap modifier isn't implemented"), 0);
11006 else if (EQSI (tmp_tmpcode
, 1)) {
11007 tmp_tmpres
= ({ SI tmp_tmpr
;
11008 tmp_tmpr
= tmp_tmpval
;
11009 ; 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)))))))); });
11011 else if (EQSI (tmp_tmpcode
, 2)) {
11012 tmp_tmpres
= ({ SI tmp_tmpb
;
11013 tmp_tmpb
= tmp_tmpval
;
11014 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11016 else if (EQSI (tmp_tmpcode
, 3)) {
11017 tmp_tmpres
= ({ SI tmp_tmpr
;
11018 tmp_tmpr
= ({ SI tmp_tmpb
;
11019 tmp_tmpb
= tmp_tmpval
;
11020 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11021 ; 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)))))))); });
11023 else if (EQSI (tmp_tmpcode
, 4)) {
11024 tmp_tmpres
= ({ SI tmp_tmpb
;
11025 tmp_tmpb
= tmp_tmpval
;
11026 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11028 else if (EQSI (tmp_tmpcode
, 5)) {
11029 tmp_tmpres
= ({ SI tmp_tmpr
;
11030 tmp_tmpr
= ({ SI tmp_tmpb
;
11031 tmp_tmpb
= tmp_tmpval
;
11032 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11033 ; 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)))))))); });
11035 else if (EQSI (tmp_tmpcode
, 6)) {
11036 tmp_tmpres
= ({ SI tmp_tmpb
;
11037 tmp_tmpb
= ({ SI tmp_tmpb
;
11038 tmp_tmpb
= tmp_tmpval
;
11039 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11040 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11042 else if (EQSI (tmp_tmpcode
, 7)) {
11043 tmp_tmpres
= ({ SI tmp_tmpr
;
11044 tmp_tmpr
= ({ SI tmp_tmpb
;
11045 tmp_tmpb
= ({ SI tmp_tmpb
;
11046 tmp_tmpb
= tmp_tmpval
;
11047 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11048 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11049 ; 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)))))))); });
11051 else if (EQSI (tmp_tmpcode
, 8)) {
11052 tmp_tmpres
= INVSI (tmp_tmpval
);
11054 else if (EQSI (tmp_tmpcode
, 9)) {
11055 tmp_tmpres
= ({ SI tmp_tmpr
;
11056 tmp_tmpr
= INVSI (tmp_tmpval
);
11057 ; 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)))))))); });
11059 else if (EQSI (tmp_tmpcode
, 10)) {
11060 tmp_tmpres
= ({ SI tmp_tmpb
;
11061 tmp_tmpb
= INVSI (tmp_tmpval
);
11062 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11064 else if (EQSI (tmp_tmpcode
, 11)) {
11065 tmp_tmpres
= ({ SI tmp_tmpr
;
11066 tmp_tmpr
= ({ SI tmp_tmpb
;
11067 tmp_tmpb
= INVSI (tmp_tmpval
);
11068 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11069 ; 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)))))))); });
11071 else if (EQSI (tmp_tmpcode
, 12)) {
11072 tmp_tmpres
= ({ SI tmp_tmpb
;
11073 tmp_tmpb
= INVSI (tmp_tmpval
);
11074 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11076 else if (EQSI (tmp_tmpcode
, 13)) {
11077 tmp_tmpres
= ({ SI tmp_tmpr
;
11078 tmp_tmpr
= ({ SI tmp_tmpb
;
11079 tmp_tmpb
= INVSI (tmp_tmpval
);
11080 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11081 ; 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)))))))); });
11083 else if (EQSI (tmp_tmpcode
, 14)) {
11084 tmp_tmpres
= ({ SI tmp_tmpb
;
11085 tmp_tmpb
= ({ SI tmp_tmpb
;
11086 tmp_tmpb
= INVSI (tmp_tmpval
);
11087 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11088 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11090 else if (EQSI (tmp_tmpcode
, 15)) {
11091 tmp_tmpres
= ({ SI tmp_tmpr
;
11092 tmp_tmpr
= ({ SI tmp_tmpb
;
11093 tmp_tmpb
= ({ SI tmp_tmpb
;
11094 tmp_tmpb
= INVSI (tmp_tmpval
);
11095 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 16), 0xffff0000), ANDSI (SRLSI (tmp_tmpb
, 16), 65535)); });
11096 ; ORSI (ANDSI (SLLSI (tmp_tmpb
, 8), 0xff00ff00), ANDSI (SRLSI (tmp_tmpb
, 8), 16711935)); });
11097 ; 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)))))))); });
11101 SI opval
= tmp_tmpd
;
11102 SET_H_GR (FLD (f_operand1
), opval
);
11103 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11107 BI opval
= LTSI (tmp_tmpd
, 0);
11108 CPU (h_nbit
) = opval
;
11109 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11112 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11113 CPU (h_zbit
) = opval
;
11114 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11116 SET_H_CBIT_MOVE (0);
11117 SET_H_VBIT_MOVE (0);
11121 CPU (h_xbit
) = opval
;
11122 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11126 SET_H_INSN_PREFIXED_P (opval
);
11127 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11137 CASE (sem
, INSN_ASRR_B_R
) : /* asrr.b $Rs,$Rd */
11139 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11140 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11141 #define FLD(f) abuf->fields.sfmt_add_b_r.f
11142 int UNUSED written
= 0;
11143 IADDR UNUSED pc
= abuf
->addr
;
11144 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11150 tmp_cnt1
= GET_H_GR (FLD (f_operand1
));
11151 tmp_cnt2
= ((NESI (ANDSI (tmp_cnt1
, 32), 0)) ? (31) : (ANDSI (tmp_cnt1
, 31)));
11152 tmp_tmpd
= SRASI (EXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand2
)))), tmp_cnt2
);
11155 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
11157 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
11158 SET_H_GR (FLD (f_operand2
), opval
);
11159 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11164 BI opval
= LTQI (tmp_tmpd
, 0);
11165 CPU (h_nbit
) = opval
;
11166 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11169 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11170 CPU (h_zbit
) = opval
;
11171 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11173 SET_H_CBIT_MOVE (0);
11174 SET_H_VBIT_MOVE (0);
11178 CPU (h_xbit
) = opval
;
11179 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11183 SET_H_INSN_PREFIXED_P (opval
);
11184 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11194 CASE (sem
, INSN_ASRR_W_R
) : /* asrr.w $Rs,$Rd */
11196 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11197 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11198 #define FLD(f) abuf->fields.sfmt_add_b_r.f
11199 int UNUSED written
= 0;
11200 IADDR UNUSED pc
= abuf
->addr
;
11201 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11207 tmp_cnt1
= GET_H_GR (FLD (f_operand1
));
11208 tmp_cnt2
= ((NESI (ANDSI (tmp_cnt1
, 32), 0)) ? (31) : (ANDSI (tmp_cnt1
, 31)));
11209 tmp_tmpd
= SRASI (EXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand2
)))), tmp_cnt2
);
11212 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
11214 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
11215 SET_H_GR (FLD (f_operand2
), opval
);
11216 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11221 BI opval
= LTHI (tmp_tmpd
, 0);
11222 CPU (h_nbit
) = opval
;
11223 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11226 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11227 CPU (h_zbit
) = opval
;
11228 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11230 SET_H_CBIT_MOVE (0);
11231 SET_H_VBIT_MOVE (0);
11235 CPU (h_xbit
) = opval
;
11236 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11240 SET_H_INSN_PREFIXED_P (opval
);
11241 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11251 CASE (sem
, INSN_ASRR_D_R
) : /* asrr.d $Rs,$Rd */
11253 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11254 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11255 #define FLD(f) abuf->fields.sfmt_add_b_r.f
11256 int UNUSED written
= 0;
11257 IADDR UNUSED pc
= abuf
->addr
;
11258 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11264 tmp_cnt1
= GET_H_GR (FLD (f_operand1
));
11265 tmp_cnt2
= ((NESI (ANDSI (tmp_cnt1
, 32), 0)) ? (31) : (ANDSI (tmp_cnt1
, 31)));
11266 tmp_tmpd
= SRASI (EXTSISI (TRUNCSISI (GET_H_GR (FLD (f_operand2
)))), tmp_cnt2
);
11268 SI opval
= tmp_tmpd
;
11269 SET_H_GR (FLD (f_operand2
), opval
);
11270 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11274 BI opval
= LTSI (tmp_tmpd
, 0);
11275 CPU (h_nbit
) = opval
;
11276 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11279 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11280 CPU (h_zbit
) = opval
;
11281 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11283 SET_H_CBIT_MOVE (0);
11284 SET_H_VBIT_MOVE (0);
11288 CPU (h_xbit
) = opval
;
11289 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11293 SET_H_INSN_PREFIXED_P (opval
);
11294 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11304 CASE (sem
, INSN_ASRQ
) : /* asrq $c,${Rd} */
11306 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11307 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11308 #define FLD(f) abuf->fields.sfmt_asrq.f
11309 int UNUSED written
= 0;
11310 IADDR UNUSED pc
= abuf
->addr
;
11311 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11315 tmp_tmpd
= SRASI (GET_H_GR (FLD (f_operand2
)), FLD (f_u5
));
11317 SI opval
= tmp_tmpd
;
11318 SET_H_GR (FLD (f_operand2
), opval
);
11319 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11323 BI opval
= LTSI (tmp_tmpd
, 0);
11324 CPU (h_nbit
) = opval
;
11325 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11328 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11329 CPU (h_zbit
) = opval
;
11330 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11332 SET_H_CBIT_MOVE (0);
11333 SET_H_VBIT_MOVE (0);
11337 CPU (h_xbit
) = opval
;
11338 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11342 SET_H_INSN_PREFIXED_P (opval
);
11343 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11353 CASE (sem
, INSN_LSRR_B_R
) : /* lsrr.b $Rs,$Rd */
11355 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11356 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11357 #define FLD(f) abuf->fields.sfmt_add_b_r.f
11358 int UNUSED written
= 0;
11359 IADDR UNUSED pc
= abuf
->addr
;
11360 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11365 tmp_cnt
= ANDSI (GET_H_GR (FLD (f_operand1
)), 63);
11366 tmp_tmpd
= ((NESI (ANDSI (tmp_cnt
, 32), 0)) ? (0) : (SRLSI (ZEXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand2
)))), ANDSI (tmp_cnt
, 31))));
11369 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
11371 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
11372 SET_H_GR (FLD (f_operand2
), opval
);
11373 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11378 BI opval
= LTQI (tmp_tmpd
, 0);
11379 CPU (h_nbit
) = opval
;
11380 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11383 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11384 CPU (h_zbit
) = opval
;
11385 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11387 SET_H_CBIT_MOVE (0);
11388 SET_H_VBIT_MOVE (0);
11392 CPU (h_xbit
) = opval
;
11393 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11397 SET_H_INSN_PREFIXED_P (opval
);
11398 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11408 CASE (sem
, INSN_LSRR_W_R
) : /* lsrr.w $Rs,$Rd */
11410 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11411 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11412 #define FLD(f) abuf->fields.sfmt_add_b_r.f
11413 int UNUSED written
= 0;
11414 IADDR UNUSED pc
= abuf
->addr
;
11415 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11420 tmp_cnt
= ANDSI (GET_H_GR (FLD (f_operand1
)), 63);
11421 tmp_tmpd
= ((NESI (ANDSI (tmp_cnt
, 32), 0)) ? (0) : (SRLSI (ZEXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand2
)))), ANDSI (tmp_cnt
, 31))));
11424 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
11426 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
11427 SET_H_GR (FLD (f_operand2
), opval
);
11428 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11433 BI opval
= LTHI (tmp_tmpd
, 0);
11434 CPU (h_nbit
) = opval
;
11435 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11438 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11439 CPU (h_zbit
) = opval
;
11440 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11442 SET_H_CBIT_MOVE (0);
11443 SET_H_VBIT_MOVE (0);
11447 CPU (h_xbit
) = opval
;
11448 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11452 SET_H_INSN_PREFIXED_P (opval
);
11453 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11463 CASE (sem
, INSN_LSRR_D_R
) : /* lsrr.d $Rs,$Rd */
11465 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11466 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11467 #define FLD(f) abuf->fields.sfmt_add_b_r.f
11468 int UNUSED written
= 0;
11469 IADDR UNUSED pc
= abuf
->addr
;
11470 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11475 tmp_cnt
= ANDSI (GET_H_GR (FLD (f_operand1
)), 63);
11476 tmp_tmpd
= ((NESI (ANDSI (tmp_cnt
, 32), 0)) ? (0) : (SRLSI (ZEXTSISI (TRUNCSISI (GET_H_GR (FLD (f_operand2
)))), ANDSI (tmp_cnt
, 31))));
11478 SI opval
= tmp_tmpd
;
11479 SET_H_GR (FLD (f_operand2
), opval
);
11480 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11484 BI opval
= LTSI (tmp_tmpd
, 0);
11485 CPU (h_nbit
) = opval
;
11486 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11489 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11490 CPU (h_zbit
) = opval
;
11491 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11493 SET_H_CBIT_MOVE (0);
11494 SET_H_VBIT_MOVE (0);
11498 CPU (h_xbit
) = opval
;
11499 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11503 SET_H_INSN_PREFIXED_P (opval
);
11504 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11514 CASE (sem
, INSN_LSRQ
) : /* lsrq $c,${Rd} */
11516 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11517 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11518 #define FLD(f) abuf->fields.sfmt_asrq.f
11519 int UNUSED written
= 0;
11520 IADDR UNUSED pc
= abuf
->addr
;
11521 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11525 tmp_tmpd
= SRLSI (GET_H_GR (FLD (f_operand2
)), FLD (f_u5
));
11527 SI opval
= tmp_tmpd
;
11528 SET_H_GR (FLD (f_operand2
), opval
);
11529 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11533 BI opval
= LTSI (tmp_tmpd
, 0);
11534 CPU (h_nbit
) = opval
;
11535 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11538 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11539 CPU (h_zbit
) = opval
;
11540 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11542 SET_H_CBIT_MOVE (0);
11543 SET_H_VBIT_MOVE (0);
11547 CPU (h_xbit
) = opval
;
11548 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11552 SET_H_INSN_PREFIXED_P (opval
);
11553 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11563 CASE (sem
, INSN_LSLR_B_R
) : /* lslr.b $Rs,$Rd */
11565 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11566 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11567 #define FLD(f) abuf->fields.sfmt_add_b_r.f
11568 int UNUSED written
= 0;
11569 IADDR UNUSED pc
= abuf
->addr
;
11570 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11575 tmp_cnt
= ANDSI (GET_H_GR (FLD (f_operand1
)), 63);
11576 tmp_tmpd
= ((NESI (ANDSI (tmp_cnt
, 32), 0)) ? (0) : (SLLSI (ZEXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand2
)))), ANDSI (tmp_cnt
, 31))));
11579 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
11581 SI opval
= ORSI (ANDSI (tmp_tmpd
, 255), ANDSI (tmp_oldregval
, 0xffffff00));
11582 SET_H_GR (FLD (f_operand2
), opval
);
11583 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11588 BI opval
= LTQI (tmp_tmpd
, 0);
11589 CPU (h_nbit
) = opval
;
11590 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11593 BI opval
= ANDIF (EQQI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11594 CPU (h_zbit
) = opval
;
11595 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11597 SET_H_CBIT_MOVE (0);
11598 SET_H_VBIT_MOVE (0);
11602 CPU (h_xbit
) = opval
;
11603 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11607 SET_H_INSN_PREFIXED_P (opval
);
11608 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11618 CASE (sem
, INSN_LSLR_W_R
) : /* lslr.w $Rs,$Rd */
11620 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11621 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11622 #define FLD(f) abuf->fields.sfmt_add_b_r.f
11623 int UNUSED written
= 0;
11624 IADDR UNUSED pc
= abuf
->addr
;
11625 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11630 tmp_cnt
= ANDSI (GET_H_GR (FLD (f_operand1
)), 63);
11631 tmp_tmpd
= ((NESI (ANDSI (tmp_cnt
, 32), 0)) ? (0) : (SLLSI (ZEXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand2
)))), ANDSI (tmp_cnt
, 31))));
11634 tmp_oldregval
= GET_H_RAW_GR_PC (FLD (f_operand2
));
11636 SI opval
= ORSI (ANDSI (tmp_tmpd
, 65535), ANDSI (tmp_oldregval
, 0xffff0000));
11637 SET_H_GR (FLD (f_operand2
), opval
);
11638 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11643 BI opval
= LTHI (tmp_tmpd
, 0);
11644 CPU (h_nbit
) = opval
;
11645 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11648 BI opval
= ANDIF (EQHI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11649 CPU (h_zbit
) = opval
;
11650 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11652 SET_H_CBIT_MOVE (0);
11653 SET_H_VBIT_MOVE (0);
11657 CPU (h_xbit
) = opval
;
11658 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11662 SET_H_INSN_PREFIXED_P (opval
);
11663 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11673 CASE (sem
, INSN_LSLR_D_R
) : /* lslr.d $Rs,$Rd */
11675 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11676 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11677 #define FLD(f) abuf->fields.sfmt_add_b_r.f
11678 int UNUSED written
= 0;
11679 IADDR UNUSED pc
= abuf
->addr
;
11680 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11685 tmp_cnt
= ANDSI (GET_H_GR (FLD (f_operand1
)), 63);
11686 tmp_tmpd
= ((NESI (ANDSI (tmp_cnt
, 32), 0)) ? (0) : (SLLSI (ZEXTSISI (TRUNCSISI (GET_H_GR (FLD (f_operand2
)))), ANDSI (tmp_cnt
, 31))));
11688 SI opval
= tmp_tmpd
;
11689 SET_H_GR (FLD (f_operand2
), opval
);
11690 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11694 BI opval
= LTSI (tmp_tmpd
, 0);
11695 CPU (h_nbit
) = opval
;
11696 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11699 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11700 CPU (h_zbit
) = opval
;
11701 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11703 SET_H_CBIT_MOVE (0);
11704 SET_H_VBIT_MOVE (0);
11708 CPU (h_xbit
) = opval
;
11709 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11713 SET_H_INSN_PREFIXED_P (opval
);
11714 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11724 CASE (sem
, INSN_LSLQ
) : /* lslq $c,${Rd} */
11726 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11727 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11728 #define FLD(f) abuf->fields.sfmt_asrq.f
11729 int UNUSED written
= 0;
11730 IADDR UNUSED pc
= abuf
->addr
;
11731 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11735 tmp_tmpd
= SLLSI (GET_H_GR (FLD (f_operand2
)), FLD (f_u5
));
11737 SI opval
= tmp_tmpd
;
11738 SET_H_GR (FLD (f_operand2
), opval
);
11739 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
11743 BI opval
= LTSI (tmp_tmpd
, 0);
11744 CPU (h_nbit
) = opval
;
11745 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11748 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11749 CPU (h_zbit
) = opval
;
11750 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11752 SET_H_CBIT_MOVE (0);
11753 SET_H_VBIT_MOVE (0);
11757 CPU (h_xbit
) = opval
;
11758 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11762 SET_H_INSN_PREFIXED_P (opval
);
11763 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11773 CASE (sem
, INSN_BTST
) : /* $Rs,$Rd */
11775 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11776 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11777 #define FLD(f) abuf->fields.sfmt_add_b_r.f
11778 int UNUSED written
= 0;
11779 IADDR UNUSED pc
= abuf
->addr
;
11780 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11785 tmp_tmpd
= SLLSI (GET_H_GR (FLD (f_operand2
)), SUBSI (31, ANDSI (GET_H_GR (FLD (f_operand1
)), 31)));
11788 BI opval
= LTSI (tmp_tmpd
, 0);
11789 CPU (h_nbit
) = opval
;
11790 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11793 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11794 CPU (h_zbit
) = opval
;
11795 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11797 SET_H_CBIT_MOVE (0);
11798 SET_H_VBIT_MOVE (0);
11802 CPU (h_xbit
) = opval
;
11803 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11807 SET_H_INSN_PREFIXED_P (opval
);
11808 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11818 CASE (sem
, INSN_BTSTQ
) : /* btstq $c,${Rd} */
11820 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11821 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11822 #define FLD(f) abuf->fields.sfmt_asrq.f
11823 int UNUSED written
= 0;
11824 IADDR UNUSED pc
= abuf
->addr
;
11825 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11829 tmp_tmpd
= SLLSI (GET_H_GR (FLD (f_operand2
)), SUBSI (31, FLD (f_u5
)));
11832 BI opval
= LTSI (tmp_tmpd
, 0);
11833 CPU (h_nbit
) = opval
;
11834 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11837 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
11838 CPU (h_zbit
) = opval
;
11839 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11841 SET_H_CBIT_MOVE (0);
11842 SET_H_VBIT_MOVE (0);
11846 CPU (h_xbit
) = opval
;
11847 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11851 SET_H_INSN_PREFIXED_P (opval
);
11852 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11862 CASE (sem
, INSN_SETF
) : /* setf ${list-of-flags} */
11864 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11865 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11866 #define FLD(f) abuf->fields.sfmt_setf.f
11867 int UNUSED written
= 0;
11868 IADDR UNUSED pc
= abuf
->addr
;
11869 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11873 tmp_tmp
= FLD (f_dstsrc
);
11874 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 0)), 0)) {
11877 CPU (h_cbit
) = opval
;
11878 written
|= (1 << 1);
11879 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
11882 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 1)), 0)) {
11885 CPU (h_vbit
) = opval
;
11886 written
|= (1 << 7);
11887 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
11890 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 2)), 0)) {
11893 CPU (h_zbit
) = opval
;
11894 written
|= (1 << 9);
11895 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11898 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 3)), 0)) {
11901 CPU (h_nbit
) = opval
;
11902 written
|= (1 << 3);
11903 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
11906 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 4)), 0)) {
11909 CPU (h_xbit
) = opval
;
11910 written
|= (1 << 8);
11911 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11914 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 5)), 0)) {
11917 SET_H_IBIT (opval
);
11918 written
|= (1 << 2);
11919 TRACE_RESULT (current_cpu
, abuf
, "ibit", 'x', opval
);
11922 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 6)), 0)) {
11925 SET_H_UBIT (opval
);
11926 written
|= (1 << 6);
11927 TRACE_RESULT (current_cpu
, abuf
, "ubit", 'x', opval
);
11930 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 7)), 0)) {
11933 CPU (h_pbit
) = opval
;
11934 written
|= (1 << 4);
11935 TRACE_RESULT (current_cpu
, abuf
, "pbit", 'x', opval
);
11940 SET_H_INSN_PREFIXED_P (opval
);
11941 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
11943 if (EQSI (ANDSI (tmp_tmp
, SLLSI (1, 4)), 0)) {
11946 CPU (h_xbit
) = opval
;
11947 written
|= (1 << 8);
11948 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
11953 abuf
->written
= written
;
11958 CASE (sem
, INSN_CLEARF
) : /* clearf ${list-of-flags} */
11960 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
11961 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
11962 #define FLD(f) abuf->fields.sfmt_setf.f
11963 int UNUSED written
= 0;
11964 IADDR UNUSED pc
= abuf
->addr
;
11965 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
11969 tmp_tmp
= FLD (f_dstsrc
);
11970 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 0)), 0)) {
11973 CPU (h_cbit
) = opval
;
11974 written
|= (1 << 1);
11975 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
11978 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 1)), 0)) {
11981 CPU (h_vbit
) = opval
;
11982 written
|= (1 << 7);
11983 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
11986 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 2)), 0)) {
11989 CPU (h_zbit
) = opval
;
11990 written
|= (1 << 9);
11991 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
11994 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 3)), 0)) {
11997 CPU (h_nbit
) = opval
;
11998 written
|= (1 << 3);
11999 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12002 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 4)), 0)) {
12005 CPU (h_xbit
) = opval
;
12006 written
|= (1 << 8);
12007 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12010 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 5)), 0)) {
12013 SET_H_IBIT (opval
);
12014 written
|= (1 << 2);
12015 TRACE_RESULT (current_cpu
, abuf
, "ibit", 'x', opval
);
12018 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 6)), 0)) {
12021 SET_H_UBIT (opval
);
12022 written
|= (1 << 6);
12023 TRACE_RESULT (current_cpu
, abuf
, "ubit", 'x', opval
);
12026 if (NESI (ANDSI (tmp_tmp
, SLLSI (1, 7)), 0)) {
12029 CPU (h_pbit
) = opval
;
12030 written
|= (1 << 4);
12031 TRACE_RESULT (current_cpu
, abuf
, "pbit", 'x', opval
);
12037 CPU (h_xbit
) = opval
;
12038 written
|= (1 << 8);
12039 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12043 SET_H_INSN_PREFIXED_P (opval
);
12044 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12049 abuf
->written
= written
;
12054 CASE (sem
, INSN_BCC_B
) : /* b${cc} ${o-pcrel} */
12056 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12057 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12058 #define FLD(f) abuf->fields.sfmt_bcc_b.f
12059 int UNUSED written
= 0;
12060 IADDR UNUSED pc
= abuf
->addr
;
12062 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12066 tmp_truthval
= ({ SI tmp_tmpcond
;
12068 tmp_tmpcond
= FLD (f_operand2
);
12069 ; if (EQSI (tmp_tmpcond
, 0)) {
12070 tmp_condres
= NOTBI (CPU (h_cbit
));
12072 else if (EQSI (tmp_tmpcond
, 1)) {
12073 tmp_condres
= CPU (h_cbit
);
12075 else if (EQSI (tmp_tmpcond
, 2)) {
12076 tmp_condres
= NOTBI (CPU (h_zbit
));
12078 else if (EQSI (tmp_tmpcond
, 3)) {
12079 tmp_condres
= CPU (h_zbit
);
12081 else if (EQSI (tmp_tmpcond
, 4)) {
12082 tmp_condres
= NOTBI (CPU (h_vbit
));
12084 else if (EQSI (tmp_tmpcond
, 5)) {
12085 tmp_condres
= CPU (h_vbit
);
12087 else if (EQSI (tmp_tmpcond
, 6)) {
12088 tmp_condres
= NOTBI (CPU (h_nbit
));
12090 else if (EQSI (tmp_tmpcond
, 7)) {
12091 tmp_condres
= CPU (h_nbit
);
12093 else if (EQSI (tmp_tmpcond
, 8)) {
12094 tmp_condres
= ORBI (CPU (h_cbit
), CPU (h_zbit
));
12096 else if (EQSI (tmp_tmpcond
, 9)) {
12097 tmp_condres
= NOTBI (ORBI (CPU (h_cbit
), CPU (h_zbit
)));
12099 else if (EQSI (tmp_tmpcond
, 10)) {
12100 tmp_condres
= NOTBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)));
12102 else if (EQSI (tmp_tmpcond
, 11)) {
12103 tmp_condres
= XORBI (CPU (h_vbit
), CPU (h_nbit
));
12105 else if (EQSI (tmp_tmpcond
, 12)) {
12106 tmp_condres
= NOTBI (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
)));
12108 else if (EQSI (tmp_tmpcond
, 13)) {
12109 tmp_condres
= ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
));
12111 else if (EQSI (tmp_tmpcond
, 14)) {
12114 else if (EQSI (tmp_tmpcond
, 15)) {
12115 tmp_condres
= CPU (h_pbit
);
12118 crisv10f_branch_taken (current_cpu
, pc
, FLD (i_o_pcrel
), tmp_truthval
);
12122 CPU (h_xbit
) = opval
;
12123 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12127 SET_H_INSN_PREFIXED_P (opval
);
12128 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12131 if (tmp_truthval
) {
12134 USI opval
= FLD (i_o_pcrel
);
12135 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
12136 written
|= (1 << 8);
12137 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12143 abuf
->written
= written
;
12144 SEM_BRANCH_FINI (vpc
);
12149 CASE (sem
, INSN_BA_B
) : /* ba ${o-pcrel} */
12151 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12152 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12153 #define FLD(f) abuf->fields.sfmt_bcc_b.f
12154 int UNUSED written
= 0;
12155 IADDR UNUSED pc
= abuf
->addr
;
12157 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12163 CPU (h_xbit
) = opval
;
12164 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12168 SET_H_INSN_PREFIXED_P (opval
);
12169 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12174 USI opval
= FLD (i_o_pcrel
);
12175 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
12176 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12181 SEM_BRANCH_FINI (vpc
);
12186 CASE (sem
, INSN_BCC_W
) : /* b${cc} ${o-word-pcrel} */
12188 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12189 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12190 #define FLD(f) abuf->fields.sfmt_bcc_w.f
12191 int UNUSED written
= 0;
12192 IADDR UNUSED pc
= abuf
->addr
;
12194 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
12198 tmp_truthval
= ({ SI tmp_tmpcond
;
12200 tmp_tmpcond
= FLD (f_operand2
);
12201 ; if (EQSI (tmp_tmpcond
, 0)) {
12202 tmp_condres
= NOTBI (CPU (h_cbit
));
12204 else if (EQSI (tmp_tmpcond
, 1)) {
12205 tmp_condres
= CPU (h_cbit
);
12207 else if (EQSI (tmp_tmpcond
, 2)) {
12208 tmp_condres
= NOTBI (CPU (h_zbit
));
12210 else if (EQSI (tmp_tmpcond
, 3)) {
12211 tmp_condres
= CPU (h_zbit
);
12213 else if (EQSI (tmp_tmpcond
, 4)) {
12214 tmp_condres
= NOTBI (CPU (h_vbit
));
12216 else if (EQSI (tmp_tmpcond
, 5)) {
12217 tmp_condres
= CPU (h_vbit
);
12219 else if (EQSI (tmp_tmpcond
, 6)) {
12220 tmp_condres
= NOTBI (CPU (h_nbit
));
12222 else if (EQSI (tmp_tmpcond
, 7)) {
12223 tmp_condres
= CPU (h_nbit
);
12225 else if (EQSI (tmp_tmpcond
, 8)) {
12226 tmp_condres
= ORBI (CPU (h_cbit
), CPU (h_zbit
));
12228 else if (EQSI (tmp_tmpcond
, 9)) {
12229 tmp_condres
= NOTBI (ORBI (CPU (h_cbit
), CPU (h_zbit
)));
12231 else if (EQSI (tmp_tmpcond
, 10)) {
12232 tmp_condres
= NOTBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)));
12234 else if (EQSI (tmp_tmpcond
, 11)) {
12235 tmp_condres
= XORBI (CPU (h_vbit
), CPU (h_nbit
));
12237 else if (EQSI (tmp_tmpcond
, 12)) {
12238 tmp_condres
= NOTBI (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
)));
12240 else if (EQSI (tmp_tmpcond
, 13)) {
12241 tmp_condres
= ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
));
12243 else if (EQSI (tmp_tmpcond
, 14)) {
12246 else if (EQSI (tmp_tmpcond
, 15)) {
12247 tmp_condres
= CPU (h_pbit
);
12250 crisv10f_branch_taken (current_cpu
, pc
, FLD (i_o_word_pcrel
), tmp_truthval
);
12254 CPU (h_xbit
) = opval
;
12255 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12259 SET_H_INSN_PREFIXED_P (opval
);
12260 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12263 if (tmp_truthval
) {
12266 USI opval
= FLD (i_o_word_pcrel
);
12267 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
12268 written
|= (1 << 8);
12269 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12275 abuf
->written
= written
;
12276 SEM_BRANCH_FINI (vpc
);
12281 CASE (sem
, INSN_BA_W
) : /* ba ${o-word-pcrel} */
12283 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12284 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12285 #define FLD(f) abuf->fields.sfmt_bcc_w.f
12286 int UNUSED written
= 0;
12287 IADDR UNUSED pc
= abuf
->addr
;
12289 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
12295 CPU (h_xbit
) = opval
;
12296 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12300 SET_H_INSN_PREFIXED_P (opval
);
12301 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12306 USI opval
= FLD (i_o_word_pcrel
);
12307 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
12308 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12313 SEM_BRANCH_FINI (vpc
);
12318 CASE (sem
, INSN_JUMP_R
) : /* jump/jsr/jir ${Rs} */
12320 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12321 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12322 #define FLD(f) abuf->fields.sfmt_move_m_sprv10.f
12323 int UNUSED written
= 0;
12324 IADDR UNUSED pc
= abuf
->addr
;
12326 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12330 SI opval
= ADDSI (pc
, 2);
12331 SET_H_SR (FLD (f_operand2
), opval
);
12332 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
12335 USI opval
= GET_H_GR (FLD (f_operand1
));
12336 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
12337 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12342 CPU (h_xbit
) = opval
;
12343 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12347 SET_H_INSN_PREFIXED_P (opval
);
12348 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12353 SEM_BRANCH_FINI (vpc
);
12358 CASE (sem
, INSN_JUMP_M
) : /* jump/jsr/jir [${Rs}${inc}] */
12360 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12361 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12362 #define FLD(f) abuf->fields.sfmt_move_m_sprv10.f
12363 int UNUSED written
= 0;
12364 IADDR UNUSED pc
= abuf
->addr
;
12366 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12370 SI opval
= ADDSI (pc
, 2);
12371 SET_H_SR (FLD (f_operand2
), opval
);
12372 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
12375 USI opval
= ({ SI tmp_addr
;
12378 tmp_postinc
= FLD (f_memmode
);
12379 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
12380 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
12381 ; if (NEBI (tmp_postinc
, 0)) {
12383 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
12384 tmp_addr
= ADDSI (tmp_addr
, 4);
12387 SI opval
= tmp_addr
;
12388 SET_H_GR (FLD (f_operand1
), opval
);
12389 written
|= (1 << 7);
12390 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12395 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
12396 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12401 CPU (h_xbit
) = opval
;
12402 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12406 SET_H_INSN_PREFIXED_P (opval
);
12407 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12412 abuf
->written
= written
;
12413 SEM_BRANCH_FINI (vpc
);
12418 CASE (sem
, INSN_JUMP_C
) : /* jump/jsr/jir ${const32} */
12420 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12421 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12422 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
12423 int UNUSED written
= 0;
12424 IADDR UNUSED pc
= abuf
->addr
;
12426 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
12430 SI opval
= ADDSI (pc
, 6);
12431 SET_H_SR (FLD (f_operand2
), opval
);
12432 TRACE_RESULT (current_cpu
, abuf
, "sr", 'x', opval
);
12435 USI opval
= FLD (f_indir_pc__dword
);
12436 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
12437 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12442 CPU (h_xbit
) = opval
;
12443 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12447 SET_H_INSN_PREFIXED_P (opval
);
12448 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12453 SEM_BRANCH_FINI (vpc
);
12458 CASE (sem
, INSN_BREAK
) : /* break $n */
12460 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12461 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12462 #define FLD(f) abuf->fields.sfmt_break.f
12463 int UNUSED written
= 0;
12464 IADDR UNUSED pc
= abuf
->addr
;
12466 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12472 CPU (h_xbit
) = opval
;
12473 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12477 SET_H_INSN_PREFIXED_P (opval
);
12478 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12482 USI opval
= crisv10f_break_handler (current_cpu
, FLD (f_u4
), pc
);
12483 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
12484 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
12488 SEM_BRANCH_FINI (vpc
);
12493 CASE (sem
, INSN_BOUND_R_B_R
) : /* bound-r.b ${Rs},${Rd} */
12495 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12496 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12497 #define FLD(f) abuf->fields.sfmt_muls_b.f
12498 int UNUSED written
= 0;
12499 IADDR UNUSED pc
= abuf
->addr
;
12500 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12506 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (GET_H_GR (FLD (f_operand1
))));
12507 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
12508 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
12510 SI opval
= tmp_newval
;
12511 SET_H_GR (FLD (f_operand2
), opval
);
12512 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12516 BI opval
= LTSI (tmp_newval
, 0);
12517 CPU (h_nbit
) = opval
;
12518 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12521 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
12522 CPU (h_zbit
) = opval
;
12523 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12525 SET_H_CBIT_MOVE (0);
12526 SET_H_VBIT_MOVE (0);
12530 CPU (h_xbit
) = opval
;
12531 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12535 SET_H_INSN_PREFIXED_P (opval
);
12536 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12546 CASE (sem
, INSN_BOUND_R_W_R
) : /* bound-r.w ${Rs},${Rd} */
12548 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12549 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12550 #define FLD(f) abuf->fields.sfmt_muls_b.f
12551 int UNUSED written
= 0;
12552 IADDR UNUSED pc
= abuf
->addr
;
12553 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12559 tmp_tmpops
= ZEXTHISI (TRUNCSIHI (GET_H_GR (FLD (f_operand1
))));
12560 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
12561 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
12563 SI opval
= tmp_newval
;
12564 SET_H_GR (FLD (f_operand2
), opval
);
12565 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12569 BI opval
= LTSI (tmp_newval
, 0);
12570 CPU (h_nbit
) = opval
;
12571 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12574 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
12575 CPU (h_zbit
) = opval
;
12576 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12578 SET_H_CBIT_MOVE (0);
12579 SET_H_VBIT_MOVE (0);
12583 CPU (h_xbit
) = opval
;
12584 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12588 SET_H_INSN_PREFIXED_P (opval
);
12589 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12599 CASE (sem
, INSN_BOUND_R_D_R
) : /* bound-r.d ${Rs},${Rd} */
12601 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12602 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12603 #define FLD(f) abuf->fields.sfmt_muls_b.f
12604 int UNUSED written
= 0;
12605 IADDR UNUSED pc
= abuf
->addr
;
12606 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12612 tmp_tmpops
= TRUNCSISI (GET_H_GR (FLD (f_operand1
)));
12613 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
12614 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
12616 SI opval
= tmp_newval
;
12617 SET_H_GR (FLD (f_operand2
), opval
);
12618 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12622 BI opval
= LTSI (tmp_newval
, 0);
12623 CPU (h_nbit
) = opval
;
12624 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12627 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
12628 CPU (h_zbit
) = opval
;
12629 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12631 SET_H_CBIT_MOVE (0);
12632 SET_H_VBIT_MOVE (0);
12636 CPU (h_xbit
) = opval
;
12637 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12641 SET_H_INSN_PREFIXED_P (opval
);
12642 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12652 CASE (sem
, INSN_BOUND_M_B_M
) : /* bound-m.b [${Rs}${inc}],${Rd} */
12654 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12655 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12656 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
12657 int UNUSED written
= 0;
12658 IADDR UNUSED pc
= abuf
->addr
;
12659 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12665 tmp_tmpops
= ZEXTQISI (({ SI tmp_addr
;
12668 tmp_postinc
= FLD (f_memmode
);
12669 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
12670 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
12671 ; if (NEBI (tmp_postinc
, 0)) {
12673 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
12674 tmp_addr
= ADDSI (tmp_addr
, 1);
12677 SI opval
= tmp_addr
;
12678 SET_H_GR (FLD (f_operand1
), opval
);
12679 written
|= (1 << 9);
12680 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12684 ; tmp_tmp_mem
; }));
12685 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
12686 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
12687 if (ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) {
12689 SI opval
= tmp_newval
;
12690 SET_H_GR (FLD (f_operand1
), opval
);
12691 written
|= (1 << 9);
12692 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12696 SI opval
= tmp_newval
;
12697 SET_H_GR (FLD (f_operand2
), opval
);
12698 written
|= (1 << 8);
12699 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12704 BI opval
= LTSI (tmp_newval
, 0);
12705 CPU (h_nbit
) = opval
;
12706 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12709 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
12710 CPU (h_zbit
) = opval
;
12711 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12713 SET_H_CBIT_MOVE (0);
12714 SET_H_VBIT_MOVE (0);
12718 CPU (h_xbit
) = opval
;
12719 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12723 SET_H_INSN_PREFIXED_P (opval
);
12724 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12730 abuf
->written
= written
;
12735 CASE (sem
, INSN_BOUND_M_W_M
) : /* bound-m.w [${Rs}${inc}],${Rd} */
12737 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12738 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12739 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
12740 int UNUSED written
= 0;
12741 IADDR UNUSED pc
= abuf
->addr
;
12742 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12748 tmp_tmpops
= ZEXTHISI (({ SI tmp_addr
;
12751 tmp_postinc
= FLD (f_memmode
);
12752 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
12753 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
12754 ; if (NEBI (tmp_postinc
, 0)) {
12756 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
12757 tmp_addr
= ADDSI (tmp_addr
, 2);
12760 SI opval
= tmp_addr
;
12761 SET_H_GR (FLD (f_operand1
), opval
);
12762 written
|= (1 << 9);
12763 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12767 ; tmp_tmp_mem
; }));
12768 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
12769 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
12770 if (ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) {
12772 SI opval
= tmp_newval
;
12773 SET_H_GR (FLD (f_operand1
), opval
);
12774 written
|= (1 << 9);
12775 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12779 SI opval
= tmp_newval
;
12780 SET_H_GR (FLD (f_operand2
), opval
);
12781 written
|= (1 << 8);
12782 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12787 BI opval
= LTSI (tmp_newval
, 0);
12788 CPU (h_nbit
) = opval
;
12789 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12792 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
12793 CPU (h_zbit
) = opval
;
12794 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12796 SET_H_CBIT_MOVE (0);
12797 SET_H_VBIT_MOVE (0);
12801 CPU (h_xbit
) = opval
;
12802 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12806 SET_H_INSN_PREFIXED_P (opval
);
12807 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12813 abuf
->written
= written
;
12818 CASE (sem
, INSN_BOUND_M_D_M
) : /* bound-m.d [${Rs}${inc}],${Rd} */
12820 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12821 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12822 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
12823 int UNUSED written
= 0;
12824 IADDR UNUSED pc
= abuf
->addr
;
12825 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
12831 tmp_tmpops
= ({ SI tmp_addr
;
12834 tmp_postinc
= FLD (f_memmode
);
12835 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
12836 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
12837 ; if (NEBI (tmp_postinc
, 0)) {
12839 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
12840 tmp_addr
= ADDSI (tmp_addr
, 4);
12843 SI opval
= tmp_addr
;
12844 SET_H_GR (FLD (f_operand1
), opval
);
12845 written
|= (1 << 9);
12846 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12851 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
12852 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
12853 if (ANDIF (GET_H_INSN_PREFIXED_P (), NOTSI (FLD (f_memmode
)))) {
12855 SI opval
= tmp_newval
;
12856 SET_H_GR (FLD (f_operand1
), opval
);
12857 written
|= (1 << 9);
12858 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12862 SI opval
= tmp_newval
;
12863 SET_H_GR (FLD (f_operand2
), opval
);
12864 written
|= (1 << 8);
12865 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12870 BI opval
= LTSI (tmp_newval
, 0);
12871 CPU (h_nbit
) = opval
;
12872 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12875 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
12876 CPU (h_zbit
) = opval
;
12877 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12879 SET_H_CBIT_MOVE (0);
12880 SET_H_VBIT_MOVE (0);
12884 CPU (h_xbit
) = opval
;
12885 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12889 SET_H_INSN_PREFIXED_P (opval
);
12890 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12896 abuf
->written
= written
;
12901 CASE (sem
, INSN_BOUND_CB
) : /* bound.b [PC+],${Rd} */
12903 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12904 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12905 #define FLD(f) abuf->fields.sfmt_bound_cb.f
12906 int UNUSED written
= 0;
12907 IADDR UNUSED pc
= abuf
->addr
;
12908 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
12914 tmp_tmpops
= ZEXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
)));
12915 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
12916 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
12918 SI opval
= tmp_newval
;
12919 SET_H_GR (FLD (f_operand2
), opval
);
12920 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12924 BI opval
= LTSI (tmp_newval
, 0);
12925 CPU (h_nbit
) = opval
;
12926 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12929 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
12930 CPU (h_zbit
) = opval
;
12931 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12933 SET_H_CBIT_MOVE (0);
12934 SET_H_VBIT_MOVE (0);
12938 CPU (h_xbit
) = opval
;
12939 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12943 SET_H_INSN_PREFIXED_P (opval
);
12944 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
12954 CASE (sem
, INSN_BOUND_CW
) : /* bound.w [PC+],${Rd} */
12956 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
12957 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
12958 #define FLD(f) abuf->fields.sfmt_bound_cw.f
12959 int UNUSED written
= 0;
12960 IADDR UNUSED pc
= abuf
->addr
;
12961 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
12967 tmp_tmpops
= ZEXTSISI (FLD (f_indir_pc__word
));
12968 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
12969 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
12971 SI opval
= tmp_newval
;
12972 SET_H_GR (FLD (f_operand2
), opval
);
12973 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
12977 BI opval
= LTSI (tmp_newval
, 0);
12978 CPU (h_nbit
) = opval
;
12979 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
12982 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
12983 CPU (h_zbit
) = opval
;
12984 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
12986 SET_H_CBIT_MOVE (0);
12987 SET_H_VBIT_MOVE (0);
12991 CPU (h_xbit
) = opval
;
12992 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
12996 SET_H_INSN_PREFIXED_P (opval
);
12997 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13007 CASE (sem
, INSN_BOUND_CD
) : /* bound.d [PC+],${Rd} */
13009 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13010 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13011 #define FLD(f) abuf->fields.sfmt_bound_cd.f
13012 int UNUSED written
= 0;
13013 IADDR UNUSED pc
= abuf
->addr
;
13014 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
13020 tmp_tmpops
= FLD (f_indir_pc__dword
);
13021 tmp_tmpopd
= GET_H_GR (FLD (f_operand2
));
13022 tmp_newval
= ((LTUSI (tmp_tmpops
, tmp_tmpopd
)) ? (tmp_tmpops
) : (tmp_tmpopd
));
13024 SI opval
= tmp_newval
;
13025 SET_H_GR (FLD (f_operand2
), opval
);
13026 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13030 BI opval
= LTSI (tmp_newval
, 0);
13031 CPU (h_nbit
) = opval
;
13032 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
13035 BI opval
= ANDIF (EQSI (tmp_newval
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
13036 CPU (h_zbit
) = opval
;
13037 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
13039 SET_H_CBIT_MOVE (0);
13040 SET_H_VBIT_MOVE (0);
13044 CPU (h_xbit
) = opval
;
13045 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13049 SET_H_INSN_PREFIXED_P (opval
);
13050 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13060 CASE (sem
, INSN_SCC
) : /* s${cc} ${Rd-sfield} */
13062 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13063 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13064 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
13065 int UNUSED written
= 0;
13066 IADDR UNUSED pc
= abuf
->addr
;
13067 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13071 tmp_truthval
= ({ SI tmp_tmpcond
;
13073 tmp_tmpcond
= FLD (f_operand2
);
13074 ; if (EQSI (tmp_tmpcond
, 0)) {
13075 tmp_condres
= NOTBI (CPU (h_cbit
));
13077 else if (EQSI (tmp_tmpcond
, 1)) {
13078 tmp_condres
= CPU (h_cbit
);
13080 else if (EQSI (tmp_tmpcond
, 2)) {
13081 tmp_condres
= NOTBI (CPU (h_zbit
));
13083 else if (EQSI (tmp_tmpcond
, 3)) {
13084 tmp_condres
= CPU (h_zbit
);
13086 else if (EQSI (tmp_tmpcond
, 4)) {
13087 tmp_condres
= NOTBI (CPU (h_vbit
));
13089 else if (EQSI (tmp_tmpcond
, 5)) {
13090 tmp_condres
= CPU (h_vbit
);
13092 else if (EQSI (tmp_tmpcond
, 6)) {
13093 tmp_condres
= NOTBI (CPU (h_nbit
));
13095 else if (EQSI (tmp_tmpcond
, 7)) {
13096 tmp_condres
= CPU (h_nbit
);
13098 else if (EQSI (tmp_tmpcond
, 8)) {
13099 tmp_condres
= ORBI (CPU (h_cbit
), CPU (h_zbit
));
13101 else if (EQSI (tmp_tmpcond
, 9)) {
13102 tmp_condres
= NOTBI (ORBI (CPU (h_cbit
), CPU (h_zbit
)));
13104 else if (EQSI (tmp_tmpcond
, 10)) {
13105 tmp_condres
= NOTBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)));
13107 else if (EQSI (tmp_tmpcond
, 11)) {
13108 tmp_condres
= XORBI (CPU (h_vbit
), CPU (h_nbit
));
13110 else if (EQSI (tmp_tmpcond
, 12)) {
13111 tmp_condres
= NOTBI (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
)));
13113 else if (EQSI (tmp_tmpcond
, 13)) {
13114 tmp_condres
= ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
));
13116 else if (EQSI (tmp_tmpcond
, 14)) {
13119 else if (EQSI (tmp_tmpcond
, 15)) {
13120 tmp_condres
= CPU (h_pbit
);
13124 SI opval
= ZEXTBISI (tmp_truthval
);
13125 SET_H_GR (FLD (f_operand1
), opval
);
13126 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13131 CPU (h_xbit
) = opval
;
13132 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13136 SET_H_INSN_PREFIXED_P (opval
);
13137 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13146 CASE (sem
, INSN_LZ
) : /* lz ${Rs},${Rd} */
13148 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13149 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13150 #define FLD(f) abuf->fields.sfmt_muls_b.f
13151 int UNUSED written
= 0;
13152 IADDR UNUSED pc
= abuf
->addr
;
13153 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13158 tmp_tmp
= GET_H_GR (FLD (f_operand1
));
13161 if (GESI (tmp_tmp
, 0)) {
13163 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13164 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13167 if (GESI (tmp_tmp
, 0)) {
13169 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13170 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13173 if (GESI (tmp_tmp
, 0)) {
13175 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13176 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13179 if (GESI (tmp_tmp
, 0)) {
13181 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13182 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13185 if (GESI (tmp_tmp
, 0)) {
13187 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13188 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13191 if (GESI (tmp_tmp
, 0)) {
13193 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13194 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13197 if (GESI (tmp_tmp
, 0)) {
13199 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13200 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13203 if (GESI (tmp_tmp
, 0)) {
13205 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13206 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13209 if (GESI (tmp_tmp
, 0)) {
13211 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13212 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13215 if (GESI (tmp_tmp
, 0)) {
13217 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13218 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13221 if (GESI (tmp_tmp
, 0)) {
13223 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13224 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13227 if (GESI (tmp_tmp
, 0)) {
13229 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13230 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13233 if (GESI (tmp_tmp
, 0)) {
13235 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13236 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13239 if (GESI (tmp_tmp
, 0)) {
13241 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13242 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13245 if (GESI (tmp_tmp
, 0)) {
13247 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13248 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13251 if (GESI (tmp_tmp
, 0)) {
13253 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13254 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13257 if (GESI (tmp_tmp
, 0)) {
13259 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13260 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13263 if (GESI (tmp_tmp
, 0)) {
13265 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13266 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13269 if (GESI (tmp_tmp
, 0)) {
13271 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13272 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13275 if (GESI (tmp_tmp
, 0)) {
13277 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13278 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13281 if (GESI (tmp_tmp
, 0)) {
13283 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13284 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13287 if (GESI (tmp_tmp
, 0)) {
13289 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13290 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13293 if (GESI (tmp_tmp
, 0)) {
13295 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13296 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13299 if (GESI (tmp_tmp
, 0)) {
13301 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13302 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13305 if (GESI (tmp_tmp
, 0)) {
13307 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13308 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13311 if (GESI (tmp_tmp
, 0)) {
13313 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13314 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13317 if (GESI (tmp_tmp
, 0)) {
13319 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13320 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13323 if (GESI (tmp_tmp
, 0)) {
13325 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13326 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13329 if (GESI (tmp_tmp
, 0)) {
13331 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13332 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13335 if (GESI (tmp_tmp
, 0)) {
13337 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13338 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13341 if (GESI (tmp_tmp
, 0)) {
13343 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13344 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13347 if (GESI (tmp_tmp
, 0)) {
13349 tmp_tmp
= SLLSI (tmp_tmp
, 1);
13350 tmp_tmpd
= ADDSI (tmp_tmpd
, 1);
13355 SI opval
= tmp_tmpd
;
13356 SET_H_GR (FLD (f_operand2
), opval
);
13357 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13361 BI opval
= LTSI (tmp_tmpd
, 0);
13362 CPU (h_nbit
) = opval
;
13363 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
13366 BI opval
= ANDIF (EQSI (tmp_tmpd
, 0), ((CPU (h_xbit
)) ? (CPU (h_zbit
)) : (1)));
13367 CPU (h_zbit
) = opval
;
13368 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
13370 SET_H_CBIT_MOVE (0);
13371 SET_H_VBIT_MOVE (0);
13375 CPU (h_xbit
) = opval
;
13376 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13380 SET_H_INSN_PREFIXED_P (opval
);
13381 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13391 CASE (sem
, INSN_ADDOQ
) : /* addoq $o,$Rs,ACR */
13393 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13394 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13395 #define FLD(f) abuf->fields.sfmt_addoq.f
13396 int UNUSED written
= 0;
13397 IADDR UNUSED pc
= abuf
->addr
;
13398 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13402 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), FLD (f_s8
));
13403 CPU (h_prefixreg_pre_v32
) = opval
;
13404 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13408 SET_H_INSN_PREFIXED_P (opval
);
13409 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13417 CASE (sem
, INSN_BDAPQPC
) : /* bdapq $o,PC */
13419 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13420 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13421 #define FLD(f) abuf->fields.sfmt_addoq.f
13422 int UNUSED written
= 0;
13423 IADDR UNUSED pc
= abuf
->addr
;
13425 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13429 SI opval
= ADDSI (ADDSI (pc
, 2), FLD (f_s8
));
13430 CPU (h_prefixreg_pre_v32
) = opval
;
13431 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13435 SET_H_INSN_PREFIXED_P (opval
);
13436 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13438 cris_flush_simulator_decode_cache (current_cpu
, pc
);
13441 SEM_BRANCH_FINI (vpc
);
13446 CASE (sem
, INSN_BDAP_32_PC
) : /* bdap ${sconst32},PC */
13448 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13449 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13450 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
13451 int UNUSED written
= 0;
13452 IADDR UNUSED pc
= abuf
->addr
;
13453 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
13459 tmp_offs
= FLD (f_indir_pc__dword
);
13460 tmp_oldpc
= ADDSI (pc
, 6);
13461 tmp_newpc
= ADDSI (tmp_oldpc
, tmp_offs
);
13463 SI opval
= tmp_newpc
;
13464 CPU (h_prefixreg_pre_v32
) = opval
;
13465 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13469 SET_H_INSN_PREFIXED_P (opval
);
13470 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13478 CASE (sem
, INSN_MOVE_M_PCPLUS_P0
) : /* move [PC+],P0 */
13480 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13481 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13482 #define FLD(f) abuf->fields.sfmt_move_m_spplus_p8.f
13483 int UNUSED written
= 0;
13484 IADDR UNUSED pc
= abuf
->addr
;
13486 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13488 if (GET_H_INSN_PREFIXED_P ()) {
13491 tmp_dummy
= ({ SI tmp_addr
;
13494 tmp_postinc
= FLD (f_memmode
);
13495 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (pc
) : (CPU (h_prefixreg_pre_v32
)));
13496 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
13497 ; if (NEBI (tmp_postinc
, 0)) {
13499 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
13500 tmp_addr
= ADDSI (tmp_addr
, 1);
13503 USI opval
= tmp_addr
;
13504 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
13505 written
|= (1 << 5);
13506 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
13514 CPU (h_xbit
) = opval
;
13515 written
|= (1 << 7);
13516 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13520 SET_H_INSN_PREFIXED_P (opval
);
13521 written
|= (1 << 6);
13522 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13527 cgen_rtx_error (current_cpu
, "move [PC+],P0 without prefix is not implemented");
13530 abuf
->written
= written
;
13531 SEM_BRANCH_FINI (vpc
);
13536 CASE (sem
, INSN_MOVE_M_SPPLUS_P8
) : /* move [SP+],P8 */
13538 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13539 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13540 #define FLD(f) abuf->fields.sfmt_move_m_spplus_p8.f
13541 int UNUSED written
= 0;
13542 IADDR UNUSED pc
= abuf
->addr
;
13543 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13545 if (GET_H_INSN_PREFIXED_P ()) {
13548 tmp_dummy
= ({ SI tmp_addr
;
13551 tmp_postinc
= FLD (f_memmode
);
13552 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (((UINT
) 14))) : (CPU (h_prefixreg_pre_v32
)));
13553 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
13554 ; if (NEBI (tmp_postinc
, 0)) {
13556 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
13557 tmp_addr
= ADDSI (tmp_addr
, 4);
13560 SI opval
= tmp_addr
;
13561 SET_H_GR (((UINT
) 14), opval
);
13562 written
|= (1 << 5);
13563 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13571 CPU (h_xbit
) = opval
;
13572 written
|= (1 << 7);
13573 TRACE_RESULT (current_cpu
, abuf
, "xbit", 'x', opval
);
13577 SET_H_INSN_PREFIXED_P (opval
);
13578 written
|= (1 << 6);
13579 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13584 cgen_rtx_error (current_cpu
, "move [SP+],P8 without prefix is not implemented");
13587 abuf
->written
= written
;
13592 CASE (sem
, INSN_ADDO_M_B_M
) : /* addo-m.b [${Rs}${inc}],$Rd,ACR */
13594 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13595 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13596 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
13597 int UNUSED written
= 0;
13598 IADDR UNUSED pc
= abuf
->addr
;
13599 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13603 tmp_tmps
= ({ SI tmp_addr
;
13606 tmp_postinc
= FLD (f_memmode
);
13607 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
13608 ; tmp_tmp_mem
= GETMEMQI (current_cpu
, pc
, tmp_addr
);
13609 ; if (NEBI (tmp_postinc
, 0)) {
13611 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
13612 tmp_addr
= ADDSI (tmp_addr
, 1);
13615 SI opval
= tmp_addr
;
13616 SET_H_GR (FLD (f_operand1
), opval
);
13617 written
|= (1 << 6);
13618 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13624 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), EXTQISI (tmp_tmps
));
13625 CPU (h_prefixreg_pre_v32
) = opval
;
13626 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13630 SET_H_INSN_PREFIXED_P (opval
);
13631 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13635 abuf
->written
= written
;
13640 CASE (sem
, INSN_ADDO_M_W_M
) : /* addo-m.w [${Rs}${inc}],$Rd,ACR */
13642 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13643 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13644 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
13645 int UNUSED written
= 0;
13646 IADDR UNUSED pc
= abuf
->addr
;
13647 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13651 tmp_tmps
= ({ SI tmp_addr
;
13654 tmp_postinc
= FLD (f_memmode
);
13655 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
13656 ; tmp_tmp_mem
= GETMEMHI (current_cpu
, pc
, tmp_addr
);
13657 ; if (NEBI (tmp_postinc
, 0)) {
13659 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
13660 tmp_addr
= ADDSI (tmp_addr
, 2);
13663 SI opval
= tmp_addr
;
13664 SET_H_GR (FLD (f_operand1
), opval
);
13665 written
|= (1 << 6);
13666 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13672 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), EXTHISI (tmp_tmps
));
13673 CPU (h_prefixreg_pre_v32
) = opval
;
13674 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13678 SET_H_INSN_PREFIXED_P (opval
);
13679 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13683 abuf
->written
= written
;
13688 CASE (sem
, INSN_ADDO_M_D_M
) : /* addo-m.d [${Rs}${inc}],$Rd,ACR */
13690 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13691 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13692 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
13693 int UNUSED written
= 0;
13694 IADDR UNUSED pc
= abuf
->addr
;
13695 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13699 tmp_tmps
= ({ SI tmp_addr
;
13702 tmp_postinc
= FLD (f_memmode
);
13703 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
13704 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
13705 ; if (NEBI (tmp_postinc
, 0)) {
13707 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
13708 tmp_addr
= ADDSI (tmp_addr
, 4);
13711 SI opval
= tmp_addr
;
13712 SET_H_GR (FLD (f_operand1
), opval
);
13713 written
|= (1 << 6);
13714 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13720 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), tmp_tmps
);
13721 CPU (h_prefixreg_pre_v32
) = opval
;
13722 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13726 SET_H_INSN_PREFIXED_P (opval
);
13727 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13731 abuf
->written
= written
;
13736 CASE (sem
, INSN_ADDO_CB
) : /* addo.b [PC+],$Rd,ACR */
13738 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13739 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13740 #define FLD(f) abuf->fields.sfmt_bound_cb.f
13741 int UNUSED written
= 0;
13742 IADDR UNUSED pc
= abuf
->addr
;
13743 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
13747 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), EXTQISI (TRUNCSIQI (FLD (f_indir_pc__byte
))));
13748 CPU (h_prefixreg_pre_v32
) = opval
;
13749 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13753 SET_H_INSN_PREFIXED_P (opval
);
13754 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13762 CASE (sem
, INSN_ADDO_CW
) : /* addo.w [PC+],$Rd,ACR */
13764 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13765 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13766 #define FLD(f) abuf->fields.sfmt_bound_cw.f
13767 int UNUSED written
= 0;
13768 IADDR UNUSED pc
= abuf
->addr
;
13769 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
13773 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), EXTHISI (TRUNCSIHI (FLD (f_indir_pc__word
))));
13774 CPU (h_prefixreg_pre_v32
) = opval
;
13775 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13779 SET_H_INSN_PREFIXED_P (opval
);
13780 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13788 CASE (sem
, INSN_ADDO_CD
) : /* addo.d [PC+],$Rd,ACR */
13790 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13791 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13792 #define FLD(f) abuf->fields.sfmt_bound_cd.f
13793 int UNUSED written
= 0;
13794 IADDR UNUSED pc
= abuf
->addr
;
13795 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
13799 SI opval
= ADDSI (GET_H_GR (FLD (f_operand2
)), FLD (f_indir_pc__dword
));
13800 CPU (h_prefixreg_pre_v32
) = opval
;
13801 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13805 SET_H_INSN_PREFIXED_P (opval
);
13806 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13814 CASE (sem
, INSN_DIP_M
) : /* dip [${Rs}${inc}] */
13816 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13817 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13818 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
13819 int UNUSED written
= 0;
13820 IADDR UNUSED pc
= abuf
->addr
;
13821 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13825 tmp_tmps
= ({ SI tmp_addr
;
13828 tmp_postinc
= FLD (f_memmode
);
13829 ; tmp_addr
= ((EQBI (GET_H_INSN_PREFIXED_P (), 0)) ? (GET_H_GR (FLD (f_operand1
))) : (CPU (h_prefixreg_pre_v32
)));
13830 ; tmp_tmp_mem
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
13831 ; if (NEBI (tmp_postinc
, 0)) {
13833 if (EQBI (GET_H_INSN_PREFIXED_P (), 0)) {
13834 tmp_addr
= ADDSI (tmp_addr
, 4);
13837 SI opval
= tmp_addr
;
13838 SET_H_GR (FLD (f_operand1
), opval
);
13839 written
|= (1 << 5);
13840 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
13846 SI opval
= tmp_tmps
;
13847 CPU (h_prefixreg_pre_v32
) = opval
;
13848 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13852 SET_H_INSN_PREFIXED_P (opval
);
13853 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13857 abuf
->written
= written
;
13862 CASE (sem
, INSN_DIP_C
) : /* dip [PC+] */
13864 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13865 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13866 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
13867 int UNUSED written
= 0;
13868 IADDR UNUSED pc
= abuf
->addr
;
13869 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
13873 SI opval
= FLD (f_indir_pc__dword
);
13874 CPU (h_prefixreg_pre_v32
) = opval
;
13875 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13879 SET_H_INSN_PREFIXED_P (opval
);
13880 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13888 CASE (sem
, INSN_ADDI_ACR_B_R
) : /* addi-acr.b ${Rs-dfield}.m,${Rd-sfield},ACR */
13890 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13891 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13892 #define FLD(f) abuf->fields.sfmt_add_b_r.f
13893 int UNUSED written
= 0;
13894 IADDR UNUSED pc
= abuf
->addr
;
13895 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13899 SI opval
= ADDSI (GET_H_GR (FLD (f_operand1
)), MULSI (GET_H_GR (FLD (f_operand2
)), 1));
13900 CPU (h_prefixreg_pre_v32
) = opval
;
13901 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13905 SET_H_INSN_PREFIXED_P (opval
);
13906 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13914 CASE (sem
, INSN_ADDI_ACR_W_R
) : /* addi-acr.w ${Rs-dfield}.m,${Rd-sfield},ACR */
13916 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13917 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13918 #define FLD(f) abuf->fields.sfmt_add_b_r.f
13919 int UNUSED written
= 0;
13920 IADDR UNUSED pc
= abuf
->addr
;
13921 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13925 SI opval
= ADDSI (GET_H_GR (FLD (f_operand1
)), MULSI (GET_H_GR (FLD (f_operand2
)), 2));
13926 CPU (h_prefixreg_pre_v32
) = opval
;
13927 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13931 SET_H_INSN_PREFIXED_P (opval
);
13932 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13940 CASE (sem
, INSN_ADDI_ACR_D_R
) : /* addi-acr.d ${Rs-dfield}.m,${Rd-sfield},ACR */
13942 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13943 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13944 #define FLD(f) abuf->fields.sfmt_add_b_r.f
13945 int UNUSED written
= 0;
13946 IADDR UNUSED pc
= abuf
->addr
;
13947 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13951 SI opval
= ADDSI (GET_H_GR (FLD (f_operand1
)), MULSI (GET_H_GR (FLD (f_operand2
)), 4));
13952 CPU (h_prefixreg_pre_v32
) = opval
;
13953 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13957 SET_H_INSN_PREFIXED_P (opval
);
13958 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13966 CASE (sem
, INSN_BIAP_PC_B_R
) : /* biap-pc.b ${Rs-dfield}.m,PC */
13968 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13969 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13970 #define FLD(f) abuf->fields.sfmt_addoq.f
13971 int UNUSED written
= 0;
13972 IADDR UNUSED pc
= abuf
->addr
;
13973 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
13977 SI opval
= ADDSI (ADDSI (pc
, 4), MULSI (GET_H_GR (FLD (f_operand2
)), 1));
13978 CPU (h_prefixreg_pre_v32
) = opval
;
13979 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
13983 SET_H_INSN_PREFIXED_P (opval
);
13984 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
13992 CASE (sem
, INSN_BIAP_PC_W_R
) : /* biap-pc.w ${Rs-dfield}.m,PC */
13994 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
13995 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
13996 #define FLD(f) abuf->fields.sfmt_addoq.f
13997 int UNUSED written
= 0;
13998 IADDR UNUSED pc
= abuf
->addr
;
13999 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
14003 SI opval
= ADDSI (ADDSI (pc
, 4), MULSI (GET_H_GR (FLD (f_operand2
)), 2));
14004 CPU (h_prefixreg_pre_v32
) = opval
;
14005 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
14009 SET_H_INSN_PREFIXED_P (opval
);
14010 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
14018 CASE (sem
, INSN_BIAP_PC_D_R
) : /* biap-pc.d ${Rs-dfield}.m,PC */
14020 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
14021 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
14022 #define FLD(f) abuf->fields.sfmt_addoq.f
14023 int UNUSED written
= 0;
14024 IADDR UNUSED pc
= abuf
->addr
;
14025 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
14029 SI opval
= ADDSI (ADDSI (pc
, 4), MULSI (GET_H_GR (FLD (f_operand2
)), 4));
14030 CPU (h_prefixreg_pre_v32
) = opval
;
14031 TRACE_RESULT (current_cpu
, abuf
, "prefixreg", 'x', opval
);
14035 SET_H_INSN_PREFIXED_P (opval
);
14036 TRACE_RESULT (current_cpu
, abuf
, "insn-prefixed-p", 'x', opval
);
14046 ENDSWITCH (sem
) /* End of semantic switch. */
14048 /* At this point `vpc' contains the next insn to execute. */
14051 #undef DEFINE_SWITCH
14052 #endif /* DEFINE_SWITCH */