1 /* Simulator instruction semantics for m32r2f.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996-2024 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
9 This file is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
14 It is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
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 { M32R2F_INSN_X_INVALID
, && case_sem_INSN_X_INVALID
},
36 { M32R2F_INSN_X_AFTER
, && case_sem_INSN_X_AFTER
},
37 { M32R2F_INSN_X_BEFORE
, && case_sem_INSN_X_BEFORE
},
38 { M32R2F_INSN_X_CTI_CHAIN
, && case_sem_INSN_X_CTI_CHAIN
},
39 { M32R2F_INSN_X_CHAIN
, && case_sem_INSN_X_CHAIN
},
40 { M32R2F_INSN_X_BEGIN
, && case_sem_INSN_X_BEGIN
},
41 { M32R2F_INSN_ADD
, && case_sem_INSN_ADD
},
42 { M32R2F_INSN_ADD3
, && case_sem_INSN_ADD3
},
43 { M32R2F_INSN_AND
, && case_sem_INSN_AND
},
44 { M32R2F_INSN_AND3
, && case_sem_INSN_AND3
},
45 { M32R2F_INSN_OR
, && case_sem_INSN_OR
},
46 { M32R2F_INSN_OR3
, && case_sem_INSN_OR3
},
47 { M32R2F_INSN_XOR
, && case_sem_INSN_XOR
},
48 { M32R2F_INSN_XOR3
, && case_sem_INSN_XOR3
},
49 { M32R2F_INSN_ADDI
, && case_sem_INSN_ADDI
},
50 { M32R2F_INSN_ADDV
, && case_sem_INSN_ADDV
},
51 { M32R2F_INSN_ADDV3
, && case_sem_INSN_ADDV3
},
52 { M32R2F_INSN_ADDX
, && case_sem_INSN_ADDX
},
53 { M32R2F_INSN_BC8
, && case_sem_INSN_BC8
},
54 { M32R2F_INSN_BC24
, && case_sem_INSN_BC24
},
55 { M32R2F_INSN_BEQ
, && case_sem_INSN_BEQ
},
56 { M32R2F_INSN_BEQZ
, && case_sem_INSN_BEQZ
},
57 { M32R2F_INSN_BGEZ
, && case_sem_INSN_BGEZ
},
58 { M32R2F_INSN_BGTZ
, && case_sem_INSN_BGTZ
},
59 { M32R2F_INSN_BLEZ
, && case_sem_INSN_BLEZ
},
60 { M32R2F_INSN_BLTZ
, && case_sem_INSN_BLTZ
},
61 { M32R2F_INSN_BNEZ
, && case_sem_INSN_BNEZ
},
62 { M32R2F_INSN_BL8
, && case_sem_INSN_BL8
},
63 { M32R2F_INSN_BL24
, && case_sem_INSN_BL24
},
64 { M32R2F_INSN_BCL8
, && case_sem_INSN_BCL8
},
65 { M32R2F_INSN_BCL24
, && case_sem_INSN_BCL24
},
66 { M32R2F_INSN_BNC8
, && case_sem_INSN_BNC8
},
67 { M32R2F_INSN_BNC24
, && case_sem_INSN_BNC24
},
68 { M32R2F_INSN_BNE
, && case_sem_INSN_BNE
},
69 { M32R2F_INSN_BRA8
, && case_sem_INSN_BRA8
},
70 { M32R2F_INSN_BRA24
, && case_sem_INSN_BRA24
},
71 { M32R2F_INSN_BNCL8
, && case_sem_INSN_BNCL8
},
72 { M32R2F_INSN_BNCL24
, && case_sem_INSN_BNCL24
},
73 { M32R2F_INSN_CMP
, && case_sem_INSN_CMP
},
74 { M32R2F_INSN_CMPI
, && case_sem_INSN_CMPI
},
75 { M32R2F_INSN_CMPU
, && case_sem_INSN_CMPU
},
76 { M32R2F_INSN_CMPUI
, && case_sem_INSN_CMPUI
},
77 { M32R2F_INSN_CMPEQ
, && case_sem_INSN_CMPEQ
},
78 { M32R2F_INSN_CMPZ
, && case_sem_INSN_CMPZ
},
79 { M32R2F_INSN_DIV
, && case_sem_INSN_DIV
},
80 { M32R2F_INSN_DIVU
, && case_sem_INSN_DIVU
},
81 { M32R2F_INSN_REM
, && case_sem_INSN_REM
},
82 { M32R2F_INSN_REMU
, && case_sem_INSN_REMU
},
83 { M32R2F_INSN_REMH
, && case_sem_INSN_REMH
},
84 { M32R2F_INSN_REMUH
, && case_sem_INSN_REMUH
},
85 { M32R2F_INSN_REMB
, && case_sem_INSN_REMB
},
86 { M32R2F_INSN_REMUB
, && case_sem_INSN_REMUB
},
87 { M32R2F_INSN_DIVUH
, && case_sem_INSN_DIVUH
},
88 { M32R2F_INSN_DIVB
, && case_sem_INSN_DIVB
},
89 { M32R2F_INSN_DIVUB
, && case_sem_INSN_DIVUB
},
90 { M32R2F_INSN_DIVH
, && case_sem_INSN_DIVH
},
91 { M32R2F_INSN_JC
, && case_sem_INSN_JC
},
92 { M32R2F_INSN_JNC
, && case_sem_INSN_JNC
},
93 { M32R2F_INSN_JL
, && case_sem_INSN_JL
},
94 { M32R2F_INSN_JMP
, && case_sem_INSN_JMP
},
95 { M32R2F_INSN_LD
, && case_sem_INSN_LD
},
96 { M32R2F_INSN_LD_D
, && case_sem_INSN_LD_D
},
97 { M32R2F_INSN_LDB
, && case_sem_INSN_LDB
},
98 { M32R2F_INSN_LDB_D
, && case_sem_INSN_LDB_D
},
99 { M32R2F_INSN_LDH
, && case_sem_INSN_LDH
},
100 { M32R2F_INSN_LDH_D
, && case_sem_INSN_LDH_D
},
101 { M32R2F_INSN_LDUB
, && case_sem_INSN_LDUB
},
102 { M32R2F_INSN_LDUB_D
, && case_sem_INSN_LDUB_D
},
103 { M32R2F_INSN_LDUH
, && case_sem_INSN_LDUH
},
104 { M32R2F_INSN_LDUH_D
, && case_sem_INSN_LDUH_D
},
105 { M32R2F_INSN_LD_PLUS
, && case_sem_INSN_LD_PLUS
},
106 { M32R2F_INSN_LD24
, && case_sem_INSN_LD24
},
107 { M32R2F_INSN_LDI8
, && case_sem_INSN_LDI8
},
108 { M32R2F_INSN_LDI16
, && case_sem_INSN_LDI16
},
109 { M32R2F_INSN_LOCK
, && case_sem_INSN_LOCK
},
110 { M32R2F_INSN_MACHI_A
, && case_sem_INSN_MACHI_A
},
111 { M32R2F_INSN_MACLO_A
, && case_sem_INSN_MACLO_A
},
112 { M32R2F_INSN_MACWHI_A
, && case_sem_INSN_MACWHI_A
},
113 { M32R2F_INSN_MACWLO_A
, && case_sem_INSN_MACWLO_A
},
114 { M32R2F_INSN_MUL
, && case_sem_INSN_MUL
},
115 { M32R2F_INSN_MULHI_A
, && case_sem_INSN_MULHI_A
},
116 { M32R2F_INSN_MULLO_A
, && case_sem_INSN_MULLO_A
},
117 { M32R2F_INSN_MULWHI_A
, && case_sem_INSN_MULWHI_A
},
118 { M32R2F_INSN_MULWLO_A
, && case_sem_INSN_MULWLO_A
},
119 { M32R2F_INSN_MV
, && case_sem_INSN_MV
},
120 { M32R2F_INSN_MVFACHI_A
, && case_sem_INSN_MVFACHI_A
},
121 { M32R2F_INSN_MVFACLO_A
, && case_sem_INSN_MVFACLO_A
},
122 { M32R2F_INSN_MVFACMI_A
, && case_sem_INSN_MVFACMI_A
},
123 { M32R2F_INSN_MVFC
, && case_sem_INSN_MVFC
},
124 { M32R2F_INSN_MVTACHI_A
, && case_sem_INSN_MVTACHI_A
},
125 { M32R2F_INSN_MVTACLO_A
, && case_sem_INSN_MVTACLO_A
},
126 { M32R2F_INSN_MVTC
, && case_sem_INSN_MVTC
},
127 { M32R2F_INSN_NEG
, && case_sem_INSN_NEG
},
128 { M32R2F_INSN_NOP
, && case_sem_INSN_NOP
},
129 { M32R2F_INSN_NOT
, && case_sem_INSN_NOT
},
130 { M32R2F_INSN_RAC_DSI
, && case_sem_INSN_RAC_DSI
},
131 { M32R2F_INSN_RACH_DSI
, && case_sem_INSN_RACH_DSI
},
132 { M32R2F_INSN_RTE
, && case_sem_INSN_RTE
},
133 { M32R2F_INSN_SETH
, && case_sem_INSN_SETH
},
134 { M32R2F_INSN_SLL
, && case_sem_INSN_SLL
},
135 { M32R2F_INSN_SLL3
, && case_sem_INSN_SLL3
},
136 { M32R2F_INSN_SLLI
, && case_sem_INSN_SLLI
},
137 { M32R2F_INSN_SRA
, && case_sem_INSN_SRA
},
138 { M32R2F_INSN_SRA3
, && case_sem_INSN_SRA3
},
139 { M32R2F_INSN_SRAI
, && case_sem_INSN_SRAI
},
140 { M32R2F_INSN_SRL
, && case_sem_INSN_SRL
},
141 { M32R2F_INSN_SRL3
, && case_sem_INSN_SRL3
},
142 { M32R2F_INSN_SRLI
, && case_sem_INSN_SRLI
},
143 { M32R2F_INSN_ST
, && case_sem_INSN_ST
},
144 { M32R2F_INSN_ST_D
, && case_sem_INSN_ST_D
},
145 { M32R2F_INSN_STB
, && case_sem_INSN_STB
},
146 { M32R2F_INSN_STB_D
, && case_sem_INSN_STB_D
},
147 { M32R2F_INSN_STH
, && case_sem_INSN_STH
},
148 { M32R2F_INSN_STH_D
, && case_sem_INSN_STH_D
},
149 { M32R2F_INSN_ST_PLUS
, && case_sem_INSN_ST_PLUS
},
150 { M32R2F_INSN_STH_PLUS
, && case_sem_INSN_STH_PLUS
},
151 { M32R2F_INSN_STB_PLUS
, && case_sem_INSN_STB_PLUS
},
152 { M32R2F_INSN_ST_MINUS
, && case_sem_INSN_ST_MINUS
},
153 { M32R2F_INSN_SUB
, && case_sem_INSN_SUB
},
154 { M32R2F_INSN_SUBV
, && case_sem_INSN_SUBV
},
155 { M32R2F_INSN_SUBX
, && case_sem_INSN_SUBX
},
156 { M32R2F_INSN_TRAP
, && case_sem_INSN_TRAP
},
157 { M32R2F_INSN_UNLOCK
, && case_sem_INSN_UNLOCK
},
158 { M32R2F_INSN_SATB
, && case_sem_INSN_SATB
},
159 { M32R2F_INSN_SATH
, && case_sem_INSN_SATH
},
160 { M32R2F_INSN_SAT
, && case_sem_INSN_SAT
},
161 { M32R2F_INSN_PCMPBZ
, && case_sem_INSN_PCMPBZ
},
162 { M32R2F_INSN_SADD
, && case_sem_INSN_SADD
},
163 { M32R2F_INSN_MACWU1
, && case_sem_INSN_MACWU1
},
164 { M32R2F_INSN_MSBLO
, && case_sem_INSN_MSBLO
},
165 { M32R2F_INSN_MULWU1
, && case_sem_INSN_MULWU1
},
166 { M32R2F_INSN_MACLH1
, && case_sem_INSN_MACLH1
},
167 { M32R2F_INSN_SC
, && case_sem_INSN_SC
},
168 { M32R2F_INSN_SNC
, && case_sem_INSN_SNC
},
169 { M32R2F_INSN_CLRPSW
, && case_sem_INSN_CLRPSW
},
170 { M32R2F_INSN_SETPSW
, && case_sem_INSN_SETPSW
},
171 { M32R2F_INSN_BSET
, && case_sem_INSN_BSET
},
172 { M32R2F_INSN_BCLR
, && case_sem_INSN_BCLR
},
173 { M32R2F_INSN_BTST
, && case_sem_INSN_BTST
},
174 { M32R2F_INSN_PAR_ADD
, && case_sem_INSN_PAR_ADD
},
175 { M32R2F_INSN_WRITE_ADD
, && case_sem_INSN_WRITE_ADD
},
176 { M32R2F_INSN_PAR_AND
, && case_sem_INSN_PAR_AND
},
177 { M32R2F_INSN_WRITE_AND
, && case_sem_INSN_WRITE_AND
},
178 { M32R2F_INSN_PAR_OR
, && case_sem_INSN_PAR_OR
},
179 { M32R2F_INSN_WRITE_OR
, && case_sem_INSN_WRITE_OR
},
180 { M32R2F_INSN_PAR_XOR
, && case_sem_INSN_PAR_XOR
},
181 { M32R2F_INSN_WRITE_XOR
, && case_sem_INSN_WRITE_XOR
},
182 { M32R2F_INSN_PAR_ADDI
, && case_sem_INSN_PAR_ADDI
},
183 { M32R2F_INSN_WRITE_ADDI
, && case_sem_INSN_WRITE_ADDI
},
184 { M32R2F_INSN_PAR_ADDV
, && case_sem_INSN_PAR_ADDV
},
185 { M32R2F_INSN_WRITE_ADDV
, && case_sem_INSN_WRITE_ADDV
},
186 { M32R2F_INSN_PAR_ADDX
, && case_sem_INSN_PAR_ADDX
},
187 { M32R2F_INSN_WRITE_ADDX
, && case_sem_INSN_WRITE_ADDX
},
188 { M32R2F_INSN_PAR_BC8
, && case_sem_INSN_PAR_BC8
},
189 { M32R2F_INSN_WRITE_BC8
, && case_sem_INSN_WRITE_BC8
},
190 { M32R2F_INSN_PAR_BL8
, && case_sem_INSN_PAR_BL8
},
191 { M32R2F_INSN_WRITE_BL8
, && case_sem_INSN_WRITE_BL8
},
192 { M32R2F_INSN_PAR_BCL8
, && case_sem_INSN_PAR_BCL8
},
193 { M32R2F_INSN_WRITE_BCL8
, && case_sem_INSN_WRITE_BCL8
},
194 { M32R2F_INSN_PAR_BNC8
, && case_sem_INSN_PAR_BNC8
},
195 { M32R2F_INSN_WRITE_BNC8
, && case_sem_INSN_WRITE_BNC8
},
196 { M32R2F_INSN_PAR_BRA8
, && case_sem_INSN_PAR_BRA8
},
197 { M32R2F_INSN_WRITE_BRA8
, && case_sem_INSN_WRITE_BRA8
},
198 { M32R2F_INSN_PAR_BNCL8
, && case_sem_INSN_PAR_BNCL8
},
199 { M32R2F_INSN_WRITE_BNCL8
, && case_sem_INSN_WRITE_BNCL8
},
200 { M32R2F_INSN_PAR_CMP
, && case_sem_INSN_PAR_CMP
},
201 { M32R2F_INSN_WRITE_CMP
, && case_sem_INSN_WRITE_CMP
},
202 { M32R2F_INSN_PAR_CMPU
, && case_sem_INSN_PAR_CMPU
},
203 { M32R2F_INSN_WRITE_CMPU
, && case_sem_INSN_WRITE_CMPU
},
204 { M32R2F_INSN_PAR_CMPEQ
, && case_sem_INSN_PAR_CMPEQ
},
205 { M32R2F_INSN_WRITE_CMPEQ
, && case_sem_INSN_WRITE_CMPEQ
},
206 { M32R2F_INSN_PAR_CMPZ
, && case_sem_INSN_PAR_CMPZ
},
207 { M32R2F_INSN_WRITE_CMPZ
, && case_sem_INSN_WRITE_CMPZ
},
208 { M32R2F_INSN_PAR_JC
, && case_sem_INSN_PAR_JC
},
209 { M32R2F_INSN_WRITE_JC
, && case_sem_INSN_WRITE_JC
},
210 { M32R2F_INSN_PAR_JNC
, && case_sem_INSN_PAR_JNC
},
211 { M32R2F_INSN_WRITE_JNC
, && case_sem_INSN_WRITE_JNC
},
212 { M32R2F_INSN_PAR_JL
, && case_sem_INSN_PAR_JL
},
213 { M32R2F_INSN_WRITE_JL
, && case_sem_INSN_WRITE_JL
},
214 { M32R2F_INSN_PAR_JMP
, && case_sem_INSN_PAR_JMP
},
215 { M32R2F_INSN_WRITE_JMP
, && case_sem_INSN_WRITE_JMP
},
216 { M32R2F_INSN_PAR_LD
, && case_sem_INSN_PAR_LD
},
217 { M32R2F_INSN_WRITE_LD
, && case_sem_INSN_WRITE_LD
},
218 { M32R2F_INSN_PAR_LDB
, && case_sem_INSN_PAR_LDB
},
219 { M32R2F_INSN_WRITE_LDB
, && case_sem_INSN_WRITE_LDB
},
220 { M32R2F_INSN_PAR_LDH
, && case_sem_INSN_PAR_LDH
},
221 { M32R2F_INSN_WRITE_LDH
, && case_sem_INSN_WRITE_LDH
},
222 { M32R2F_INSN_PAR_LDUB
, && case_sem_INSN_PAR_LDUB
},
223 { M32R2F_INSN_WRITE_LDUB
, && case_sem_INSN_WRITE_LDUB
},
224 { M32R2F_INSN_PAR_LDUH
, && case_sem_INSN_PAR_LDUH
},
225 { M32R2F_INSN_WRITE_LDUH
, && case_sem_INSN_WRITE_LDUH
},
226 { M32R2F_INSN_PAR_LD_PLUS
, && case_sem_INSN_PAR_LD_PLUS
},
227 { M32R2F_INSN_WRITE_LD_PLUS
, && case_sem_INSN_WRITE_LD_PLUS
},
228 { M32R2F_INSN_PAR_LDI8
, && case_sem_INSN_PAR_LDI8
},
229 { M32R2F_INSN_WRITE_LDI8
, && case_sem_INSN_WRITE_LDI8
},
230 { M32R2F_INSN_PAR_LOCK
, && case_sem_INSN_PAR_LOCK
},
231 { M32R2F_INSN_WRITE_LOCK
, && case_sem_INSN_WRITE_LOCK
},
232 { M32R2F_INSN_PAR_MACHI_A
, && case_sem_INSN_PAR_MACHI_A
},
233 { M32R2F_INSN_WRITE_MACHI_A
, && case_sem_INSN_WRITE_MACHI_A
},
234 { M32R2F_INSN_PAR_MACLO_A
, && case_sem_INSN_PAR_MACLO_A
},
235 { M32R2F_INSN_WRITE_MACLO_A
, && case_sem_INSN_WRITE_MACLO_A
},
236 { M32R2F_INSN_PAR_MACWHI_A
, && case_sem_INSN_PAR_MACWHI_A
},
237 { M32R2F_INSN_WRITE_MACWHI_A
, && case_sem_INSN_WRITE_MACWHI_A
},
238 { M32R2F_INSN_PAR_MACWLO_A
, && case_sem_INSN_PAR_MACWLO_A
},
239 { M32R2F_INSN_WRITE_MACWLO_A
, && case_sem_INSN_WRITE_MACWLO_A
},
240 { M32R2F_INSN_PAR_MUL
, && case_sem_INSN_PAR_MUL
},
241 { M32R2F_INSN_WRITE_MUL
, && case_sem_INSN_WRITE_MUL
},
242 { M32R2F_INSN_PAR_MULHI_A
, && case_sem_INSN_PAR_MULHI_A
},
243 { M32R2F_INSN_WRITE_MULHI_A
, && case_sem_INSN_WRITE_MULHI_A
},
244 { M32R2F_INSN_PAR_MULLO_A
, && case_sem_INSN_PAR_MULLO_A
},
245 { M32R2F_INSN_WRITE_MULLO_A
, && case_sem_INSN_WRITE_MULLO_A
},
246 { M32R2F_INSN_PAR_MULWHI_A
, && case_sem_INSN_PAR_MULWHI_A
},
247 { M32R2F_INSN_WRITE_MULWHI_A
, && case_sem_INSN_WRITE_MULWHI_A
},
248 { M32R2F_INSN_PAR_MULWLO_A
, && case_sem_INSN_PAR_MULWLO_A
},
249 { M32R2F_INSN_WRITE_MULWLO_A
, && case_sem_INSN_WRITE_MULWLO_A
},
250 { M32R2F_INSN_PAR_MV
, && case_sem_INSN_PAR_MV
},
251 { M32R2F_INSN_WRITE_MV
, && case_sem_INSN_WRITE_MV
},
252 { M32R2F_INSN_PAR_MVFACHI_A
, && case_sem_INSN_PAR_MVFACHI_A
},
253 { M32R2F_INSN_WRITE_MVFACHI_A
, && case_sem_INSN_WRITE_MVFACHI_A
},
254 { M32R2F_INSN_PAR_MVFACLO_A
, && case_sem_INSN_PAR_MVFACLO_A
},
255 { M32R2F_INSN_WRITE_MVFACLO_A
, && case_sem_INSN_WRITE_MVFACLO_A
},
256 { M32R2F_INSN_PAR_MVFACMI_A
, && case_sem_INSN_PAR_MVFACMI_A
},
257 { M32R2F_INSN_WRITE_MVFACMI_A
, && case_sem_INSN_WRITE_MVFACMI_A
},
258 { M32R2F_INSN_PAR_MVFC
, && case_sem_INSN_PAR_MVFC
},
259 { M32R2F_INSN_WRITE_MVFC
, && case_sem_INSN_WRITE_MVFC
},
260 { M32R2F_INSN_PAR_MVTACHI_A
, && case_sem_INSN_PAR_MVTACHI_A
},
261 { M32R2F_INSN_WRITE_MVTACHI_A
, && case_sem_INSN_WRITE_MVTACHI_A
},
262 { M32R2F_INSN_PAR_MVTACLO_A
, && case_sem_INSN_PAR_MVTACLO_A
},
263 { M32R2F_INSN_WRITE_MVTACLO_A
, && case_sem_INSN_WRITE_MVTACLO_A
},
264 { M32R2F_INSN_PAR_MVTC
, && case_sem_INSN_PAR_MVTC
},
265 { M32R2F_INSN_WRITE_MVTC
, && case_sem_INSN_WRITE_MVTC
},
266 { M32R2F_INSN_PAR_NEG
, && case_sem_INSN_PAR_NEG
},
267 { M32R2F_INSN_WRITE_NEG
, && case_sem_INSN_WRITE_NEG
},
268 { M32R2F_INSN_PAR_NOP
, && case_sem_INSN_PAR_NOP
},
269 { M32R2F_INSN_WRITE_NOP
, && case_sem_INSN_WRITE_NOP
},
270 { M32R2F_INSN_PAR_NOT
, && case_sem_INSN_PAR_NOT
},
271 { M32R2F_INSN_WRITE_NOT
, && case_sem_INSN_WRITE_NOT
},
272 { M32R2F_INSN_PAR_RAC_DSI
, && case_sem_INSN_PAR_RAC_DSI
},
273 { M32R2F_INSN_WRITE_RAC_DSI
, && case_sem_INSN_WRITE_RAC_DSI
},
274 { M32R2F_INSN_PAR_RACH_DSI
, && case_sem_INSN_PAR_RACH_DSI
},
275 { M32R2F_INSN_WRITE_RACH_DSI
, && case_sem_INSN_WRITE_RACH_DSI
},
276 { M32R2F_INSN_PAR_RTE
, && case_sem_INSN_PAR_RTE
},
277 { M32R2F_INSN_WRITE_RTE
, && case_sem_INSN_WRITE_RTE
},
278 { M32R2F_INSN_PAR_SLL
, && case_sem_INSN_PAR_SLL
},
279 { M32R2F_INSN_WRITE_SLL
, && case_sem_INSN_WRITE_SLL
},
280 { M32R2F_INSN_PAR_SLLI
, && case_sem_INSN_PAR_SLLI
},
281 { M32R2F_INSN_WRITE_SLLI
, && case_sem_INSN_WRITE_SLLI
},
282 { M32R2F_INSN_PAR_SRA
, && case_sem_INSN_PAR_SRA
},
283 { M32R2F_INSN_WRITE_SRA
, && case_sem_INSN_WRITE_SRA
},
284 { M32R2F_INSN_PAR_SRAI
, && case_sem_INSN_PAR_SRAI
},
285 { M32R2F_INSN_WRITE_SRAI
, && case_sem_INSN_WRITE_SRAI
},
286 { M32R2F_INSN_PAR_SRL
, && case_sem_INSN_PAR_SRL
},
287 { M32R2F_INSN_WRITE_SRL
, && case_sem_INSN_WRITE_SRL
},
288 { M32R2F_INSN_PAR_SRLI
, && case_sem_INSN_PAR_SRLI
},
289 { M32R2F_INSN_WRITE_SRLI
, && case_sem_INSN_WRITE_SRLI
},
290 { M32R2F_INSN_PAR_ST
, && case_sem_INSN_PAR_ST
},
291 { M32R2F_INSN_WRITE_ST
, && case_sem_INSN_WRITE_ST
},
292 { M32R2F_INSN_PAR_STB
, && case_sem_INSN_PAR_STB
},
293 { M32R2F_INSN_WRITE_STB
, && case_sem_INSN_WRITE_STB
},
294 { M32R2F_INSN_PAR_STH
, && case_sem_INSN_PAR_STH
},
295 { M32R2F_INSN_WRITE_STH
, && case_sem_INSN_WRITE_STH
},
296 { M32R2F_INSN_PAR_ST_PLUS
, && case_sem_INSN_PAR_ST_PLUS
},
297 { M32R2F_INSN_WRITE_ST_PLUS
, && case_sem_INSN_WRITE_ST_PLUS
},
298 { M32R2F_INSN_PAR_STH_PLUS
, && case_sem_INSN_PAR_STH_PLUS
},
299 { M32R2F_INSN_WRITE_STH_PLUS
, && case_sem_INSN_WRITE_STH_PLUS
},
300 { M32R2F_INSN_PAR_STB_PLUS
, && case_sem_INSN_PAR_STB_PLUS
},
301 { M32R2F_INSN_WRITE_STB_PLUS
, && case_sem_INSN_WRITE_STB_PLUS
},
302 { M32R2F_INSN_PAR_ST_MINUS
, && case_sem_INSN_PAR_ST_MINUS
},
303 { M32R2F_INSN_WRITE_ST_MINUS
, && case_sem_INSN_WRITE_ST_MINUS
},
304 { M32R2F_INSN_PAR_SUB
, && case_sem_INSN_PAR_SUB
},
305 { M32R2F_INSN_WRITE_SUB
, && case_sem_INSN_WRITE_SUB
},
306 { M32R2F_INSN_PAR_SUBV
, && case_sem_INSN_PAR_SUBV
},
307 { M32R2F_INSN_WRITE_SUBV
, && case_sem_INSN_WRITE_SUBV
},
308 { M32R2F_INSN_PAR_SUBX
, && case_sem_INSN_PAR_SUBX
},
309 { M32R2F_INSN_WRITE_SUBX
, && case_sem_INSN_WRITE_SUBX
},
310 { M32R2F_INSN_PAR_TRAP
, && case_sem_INSN_PAR_TRAP
},
311 { M32R2F_INSN_WRITE_TRAP
, && case_sem_INSN_WRITE_TRAP
},
312 { M32R2F_INSN_PAR_UNLOCK
, && case_sem_INSN_PAR_UNLOCK
},
313 { M32R2F_INSN_WRITE_UNLOCK
, && case_sem_INSN_WRITE_UNLOCK
},
314 { M32R2F_INSN_PAR_PCMPBZ
, && case_sem_INSN_PAR_PCMPBZ
},
315 { M32R2F_INSN_WRITE_PCMPBZ
, && case_sem_INSN_WRITE_PCMPBZ
},
316 { M32R2F_INSN_PAR_SADD
, && case_sem_INSN_PAR_SADD
},
317 { M32R2F_INSN_WRITE_SADD
, && case_sem_INSN_WRITE_SADD
},
318 { M32R2F_INSN_PAR_MACWU1
, && case_sem_INSN_PAR_MACWU1
},
319 { M32R2F_INSN_WRITE_MACWU1
, && case_sem_INSN_WRITE_MACWU1
},
320 { M32R2F_INSN_PAR_MSBLO
, && case_sem_INSN_PAR_MSBLO
},
321 { M32R2F_INSN_WRITE_MSBLO
, && case_sem_INSN_WRITE_MSBLO
},
322 { M32R2F_INSN_PAR_MULWU1
, && case_sem_INSN_PAR_MULWU1
},
323 { M32R2F_INSN_WRITE_MULWU1
, && case_sem_INSN_WRITE_MULWU1
},
324 { M32R2F_INSN_PAR_MACLH1
, && case_sem_INSN_PAR_MACLH1
},
325 { M32R2F_INSN_WRITE_MACLH1
, && case_sem_INSN_WRITE_MACLH1
},
326 { M32R2F_INSN_PAR_SC
, && case_sem_INSN_PAR_SC
},
327 { M32R2F_INSN_WRITE_SC
, && case_sem_INSN_WRITE_SC
},
328 { M32R2F_INSN_PAR_SNC
, && case_sem_INSN_PAR_SNC
},
329 { M32R2F_INSN_WRITE_SNC
, && case_sem_INSN_WRITE_SNC
},
330 { M32R2F_INSN_PAR_CLRPSW
, && case_sem_INSN_PAR_CLRPSW
},
331 { M32R2F_INSN_WRITE_CLRPSW
, && case_sem_INSN_WRITE_CLRPSW
},
332 { M32R2F_INSN_PAR_SETPSW
, && case_sem_INSN_PAR_SETPSW
},
333 { M32R2F_INSN_WRITE_SETPSW
, && case_sem_INSN_WRITE_SETPSW
},
334 { M32R2F_INSN_PAR_BTST
, && case_sem_INSN_PAR_BTST
},
335 { M32R2F_INSN_WRITE_BTST
, && case_sem_INSN_WRITE_BTST
},
340 for (i
= 0; labels
[i
].label
!= 0; ++i
)
343 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_fast_lab
= labels
[i
].label
;
345 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_full_lab
= labels
[i
].label
;
350 #endif /* DEFINE_LABELS */
354 /* If hyper-fast [well not unnecessarily slow] execution is selected, turn
355 off frills like tracing and profiling. */
356 /* FIXME: A better way would be to have CGEN_TRACE_RESULT check for something
357 that can cause it to be optimized out. Another way would be to emit
358 special handlers into the instruction "stream". */
361 #undef CGEN_TRACE_RESULT
362 #define CGEN_TRACE_RESULT(cpu, abuf, name, type, val)
366 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
372 /* Branch to next handler without going around main loop. */
373 #define NEXT(vpc) goto * SEM_ARGBUF (vpc) -> semantic.sem_case
374 SWITCH (sem
, SEM_ARGBUF (vpc
) -> semantic
.sem_case
)
376 #else /* ! WITH_SCACHE_PBB */
378 #define NEXT(vpc) BREAK (sem)
381 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_fast_lab
)
383 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_full_lab
)
386 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->num
)
389 #endif /* ! WITH_SCACHE_PBB */
393 CASE (sem
, INSN_X_INVALID
) : /* --invalid-- */
395 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
396 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
397 #define FLD(f) abuf->fields.sfmt_empty.f
398 int UNUSED written
= 0;
399 IADDR UNUSED pc
= abuf
->addr
;
400 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
403 /* Update the recorded pc in the cpu state struct.
404 Only necessary for WITH_SCACHE case, but to avoid the
405 conditional compilation .... */
407 /* Virtual insns have zero size. Overwrite vpc with address of next insn
408 using the default-insn-bitsize spec. When executing insns in parallel
409 we may want to queue the fault and continue execution. */
410 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
411 vpc
= sim_engine_invalid_insn (current_cpu
, pc
, vpc
);
418 CASE (sem
, INSN_X_AFTER
) : /* --after-- */
420 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
421 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
422 #define FLD(f) abuf->fields.sfmt_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_M32R2F
429 m32r2f_pbb_after (current_cpu
, sem_arg
);
437 CASE (sem
, INSN_X_BEFORE
) : /* --before-- */
439 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
440 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
441 #define FLD(f) abuf->fields.sfmt_empty.f
442 int UNUSED written
= 0;
443 IADDR UNUSED pc
= abuf
->addr
;
444 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
447 #if WITH_SCACHE_PBB_M32R2F
448 m32r2f_pbb_before (current_cpu
, sem_arg
);
456 CASE (sem
, INSN_X_CTI_CHAIN
) : /* --cti-chain-- */
458 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
459 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
460 #define FLD(f) abuf->fields.sfmt_empty.f
461 int UNUSED written
= 0;
462 IADDR UNUSED pc
= abuf
->addr
;
463 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
466 #if WITH_SCACHE_PBB_M32R2F
468 vpc
= m32r2f_pbb_cti_chain (current_cpu
, sem_arg
,
469 pbb_br_type
, pbb_br_npc
);
472 /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
473 vpc
= m32r2f_pbb_cti_chain (current_cpu
, sem_arg
,
474 CPU_PBB_BR_TYPE (current_cpu
),
475 CPU_PBB_BR_NPC (current_cpu
));
484 CASE (sem
, INSN_X_CHAIN
) : /* --chain-- */
486 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
487 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
488 #define FLD(f) abuf->fields.sfmt_empty.f
489 int UNUSED written
= 0;
490 IADDR UNUSED pc
= abuf
->addr
;
491 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
494 #if WITH_SCACHE_PBB_M32R2F
495 vpc
= m32r2f_pbb_chain (current_cpu
, sem_arg
);
506 CASE (sem
, INSN_X_BEGIN
) : /* --begin-- */
508 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
509 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
510 #define FLD(f) abuf->fields.sfmt_empty.f
511 int UNUSED written
= 0;
512 IADDR UNUSED pc
= abuf
->addr
;
513 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
516 #if WITH_SCACHE_PBB_M32R2F
517 #if defined DEFINE_SWITCH || defined FAST_P
518 /* In the switch case FAST_P is a constant, allowing several optimizations
519 in any called inline functions. */
520 vpc
= m32r2f_pbb_begin (current_cpu
, FAST_P
);
522 #if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
523 vpc
= m32r2f_pbb_begin (current_cpu
, STATE_RUN_FAST_P (CPU_STATE (current_cpu
)));
525 vpc
= m32r2f_pbb_begin (current_cpu
, 0);
535 CASE (sem
, INSN_ADD
) : /* add $dr,$sr */
537 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
538 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
539 #define FLD(f) abuf->fields.sfmt_add.f
540 int UNUSED written
= 0;
541 IADDR UNUSED pc
= abuf
->addr
;
542 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
545 SI opval
= ADDSI (* FLD (i_dr
), * FLD (i_sr
));
546 * FLD (i_dr
) = opval
;
547 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
554 CASE (sem
, INSN_ADD3
) : /* add3 $dr,$sr,$hash$slo16 */
556 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
557 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
558 #define FLD(f) abuf->fields.sfmt_add3.f
559 int UNUSED written
= 0;
560 IADDR UNUSED pc
= abuf
->addr
;
561 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
564 SI opval
= ADDSI (* FLD (i_sr
), FLD (f_simm16
));
565 * FLD (i_dr
) = opval
;
566 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
573 CASE (sem
, INSN_AND
) : /* and $dr,$sr */
575 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
576 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
577 #define FLD(f) abuf->fields.sfmt_add.f
578 int UNUSED written
= 0;
579 IADDR UNUSED pc
= abuf
->addr
;
580 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
583 SI opval
= ANDSI (* FLD (i_dr
), * FLD (i_sr
));
584 * FLD (i_dr
) = opval
;
585 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
592 CASE (sem
, INSN_AND3
) : /* and3 $dr,$sr,$uimm16 */
594 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
595 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
596 #define FLD(f) abuf->fields.sfmt_and3.f
597 int UNUSED written
= 0;
598 IADDR UNUSED pc
= abuf
->addr
;
599 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
602 SI opval
= ANDSI (* FLD (i_sr
), FLD (f_uimm16
));
603 * FLD (i_dr
) = opval
;
604 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
611 CASE (sem
, INSN_OR
) : /* or $dr,$sr */
613 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
614 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
615 #define FLD(f) abuf->fields.sfmt_add.f
616 int UNUSED written
= 0;
617 IADDR UNUSED pc
= abuf
->addr
;
618 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
621 SI opval
= ORSI (* FLD (i_dr
), * FLD (i_sr
));
622 * FLD (i_dr
) = opval
;
623 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
630 CASE (sem
, INSN_OR3
) : /* or3 $dr,$sr,$hash$ulo16 */
632 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
633 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
634 #define FLD(f) abuf->fields.sfmt_and3.f
635 int UNUSED written
= 0;
636 IADDR UNUSED pc
= abuf
->addr
;
637 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
640 SI opval
= ORSI (* FLD (i_sr
), FLD (f_uimm16
));
641 * FLD (i_dr
) = opval
;
642 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
649 CASE (sem
, INSN_XOR
) : /* xor $dr,$sr */
651 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
652 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
653 #define FLD(f) abuf->fields.sfmt_add.f
654 int UNUSED written
= 0;
655 IADDR UNUSED pc
= abuf
->addr
;
656 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
659 SI opval
= XORSI (* FLD (i_dr
), * FLD (i_sr
));
660 * FLD (i_dr
) = opval
;
661 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
668 CASE (sem
, INSN_XOR3
) : /* xor3 $dr,$sr,$uimm16 */
670 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
671 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
672 #define FLD(f) abuf->fields.sfmt_and3.f
673 int UNUSED written
= 0;
674 IADDR UNUSED pc
= abuf
->addr
;
675 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
678 SI opval
= XORSI (* FLD (i_sr
), FLD (f_uimm16
));
679 * FLD (i_dr
) = opval
;
680 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
687 CASE (sem
, INSN_ADDI
) : /* addi $dr,$simm8 */
689 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
690 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
691 #define FLD(f) abuf->fields.sfmt_addi.f
692 int UNUSED written
= 0;
693 IADDR UNUSED pc
= abuf
->addr
;
694 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
697 SI opval
= ADDSI (* FLD (i_dr
), FLD (f_simm8
));
698 * FLD (i_dr
) = opval
;
699 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
706 CASE (sem
, INSN_ADDV
) : /* addv $dr,$sr */
708 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
709 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
710 #define FLD(f) abuf->fields.sfmt_add.f
711 int UNUSED written
= 0;
712 IADDR UNUSED pc
= abuf
->addr
;
713 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
717 temp0
= ADDSI (* FLD (i_dr
), * FLD (i_sr
));
718 temp1
= ADDOFSI (* FLD (i_dr
), * FLD (i_sr
), 0);
721 * FLD (i_dr
) = opval
;
722 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
726 CPU (h_cond
) = opval
;
727 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
735 CASE (sem
, INSN_ADDV3
) : /* addv3 $dr,$sr,$simm16 */
737 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
738 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
739 #define FLD(f) abuf->fields.sfmt_add3.f
740 int UNUSED written
= 0;
741 IADDR UNUSED pc
= abuf
->addr
;
742 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
746 temp0
= ADDSI (* FLD (i_sr
), FLD (f_simm16
));
747 temp1
= ADDOFSI (* FLD (i_sr
), FLD (f_simm16
), 0);
750 * FLD (i_dr
) = opval
;
751 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
755 CPU (h_cond
) = opval
;
756 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
764 CASE (sem
, INSN_ADDX
) : /* addx $dr,$sr */
766 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
767 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
768 #define FLD(f) abuf->fields.sfmt_add.f
769 int UNUSED written
= 0;
770 IADDR UNUSED pc
= abuf
->addr
;
771 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
775 temp0
= ADDCSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
776 temp1
= ADDCFSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
779 * FLD (i_dr
) = opval
;
780 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
784 CPU (h_cond
) = opval
;
785 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
793 CASE (sem
, INSN_BC8
) : /* bc.s $disp8 */
795 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
796 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
797 #define FLD(f) abuf->fields.sfmt_bl8.f
798 int UNUSED written
= 0;
799 IADDR UNUSED pc
= abuf
->addr
;
801 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
805 USI opval
= FLD (i_disp8
);
806 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
808 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
812 abuf
->written
= written
;
813 SEM_BRANCH_FINI (vpc
);
818 CASE (sem
, INSN_BC24
) : /* bc.l $disp24 */
820 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
821 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
822 #define FLD(f) abuf->fields.sfmt_bl24.f
823 int UNUSED written
= 0;
824 IADDR UNUSED pc
= abuf
->addr
;
826 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
830 USI opval
= FLD (i_disp24
);
831 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
833 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
837 abuf
->written
= written
;
838 SEM_BRANCH_FINI (vpc
);
843 CASE (sem
, INSN_BEQ
) : /* beq $src1,$src2,$disp16 */
845 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
846 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
847 #define FLD(f) abuf->fields.sfmt_beq.f
848 int UNUSED written
= 0;
849 IADDR UNUSED pc
= abuf
->addr
;
851 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
853 if (EQSI (* FLD (i_src1
), * FLD (i_src2
))) {
855 USI opval
= FLD (i_disp16
);
856 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
858 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
862 abuf
->written
= written
;
863 SEM_BRANCH_FINI (vpc
);
868 CASE (sem
, INSN_BEQZ
) : /* beqz $src2,$disp16 */
870 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
871 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
872 #define FLD(f) abuf->fields.sfmt_beq.f
873 int UNUSED written
= 0;
874 IADDR UNUSED pc
= abuf
->addr
;
876 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
878 if (EQSI (* FLD (i_src2
), 0)) {
880 USI opval
= FLD (i_disp16
);
881 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
883 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
887 abuf
->written
= written
;
888 SEM_BRANCH_FINI (vpc
);
893 CASE (sem
, INSN_BGEZ
) : /* bgez $src2,$disp16 */
895 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
896 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
897 #define FLD(f) abuf->fields.sfmt_beq.f
898 int UNUSED written
= 0;
899 IADDR UNUSED pc
= abuf
->addr
;
901 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
903 if (GESI (* FLD (i_src2
), 0)) {
905 USI opval
= FLD (i_disp16
);
906 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
908 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
912 abuf
->written
= written
;
913 SEM_BRANCH_FINI (vpc
);
918 CASE (sem
, INSN_BGTZ
) : /* bgtz $src2,$disp16 */
920 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
921 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
922 #define FLD(f) abuf->fields.sfmt_beq.f
923 int UNUSED written
= 0;
924 IADDR UNUSED pc
= abuf
->addr
;
926 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
928 if (GTSI (* FLD (i_src2
), 0)) {
930 USI opval
= FLD (i_disp16
);
931 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
933 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
937 abuf
->written
= written
;
938 SEM_BRANCH_FINI (vpc
);
943 CASE (sem
, INSN_BLEZ
) : /* blez $src2,$disp16 */
945 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
946 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
947 #define FLD(f) abuf->fields.sfmt_beq.f
948 int UNUSED written
= 0;
949 IADDR UNUSED pc
= abuf
->addr
;
951 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
953 if (LESI (* FLD (i_src2
), 0)) {
955 USI opval
= FLD (i_disp16
);
956 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
958 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
962 abuf
->written
= written
;
963 SEM_BRANCH_FINI (vpc
);
968 CASE (sem
, INSN_BLTZ
) : /* bltz $src2,$disp16 */
970 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
971 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
972 #define FLD(f) abuf->fields.sfmt_beq.f
973 int UNUSED written
= 0;
974 IADDR UNUSED pc
= abuf
->addr
;
976 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
978 if (LTSI (* FLD (i_src2
), 0)) {
980 USI opval
= FLD (i_disp16
);
981 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
983 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
987 abuf
->written
= written
;
988 SEM_BRANCH_FINI (vpc
);
993 CASE (sem
, INSN_BNEZ
) : /* bnez $src2,$disp16 */
995 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
996 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
997 #define FLD(f) abuf->fields.sfmt_beq.f
998 int UNUSED written
= 0;
999 IADDR UNUSED pc
= abuf
->addr
;
1001 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1003 if (NESI (* FLD (i_src2
), 0)) {
1005 USI opval
= FLD (i_disp16
);
1006 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1007 written
|= (1 << 2);
1008 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1012 abuf
->written
= written
;
1013 SEM_BRANCH_FINI (vpc
);
1018 CASE (sem
, INSN_BL8
) : /* bl.s $disp8 */
1020 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1021 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1022 #define FLD(f) abuf->fields.sfmt_bl8.f
1023 int UNUSED written
= 0;
1024 IADDR UNUSED pc
= abuf
->addr
;
1026 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1030 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
1031 CPU (h_gr
[((UINT
) 14)]) = opval
;
1032 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1035 USI opval
= FLD (i_disp8
);
1036 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1037 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1041 SEM_BRANCH_FINI (vpc
);
1046 CASE (sem
, INSN_BL24
) : /* bl.l $disp24 */
1048 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1049 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1050 #define FLD(f) abuf->fields.sfmt_bl24.f
1051 int UNUSED written
= 0;
1052 IADDR UNUSED pc
= abuf
->addr
;
1054 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1058 SI opval
= ADDSI (pc
, 4);
1059 CPU (h_gr
[((UINT
) 14)]) = opval
;
1060 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1063 USI opval
= FLD (i_disp24
);
1064 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1065 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1069 SEM_BRANCH_FINI (vpc
);
1074 CASE (sem
, INSN_BCL8
) : /* bcl.s $disp8 */
1076 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1077 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1078 #define FLD(f) abuf->fields.sfmt_bl8.f
1079 int UNUSED written
= 0;
1080 IADDR UNUSED pc
= abuf
->addr
;
1082 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1087 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
1088 CPU (h_gr
[((UINT
) 14)]) = opval
;
1089 written
|= (1 << 3);
1090 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1093 USI opval
= FLD (i_disp8
);
1094 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1095 written
|= (1 << 4);
1096 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1101 abuf
->written
= written
;
1102 SEM_BRANCH_FINI (vpc
);
1107 CASE (sem
, INSN_BCL24
) : /* bcl.l $disp24 */
1109 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1110 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1111 #define FLD(f) abuf->fields.sfmt_bl24.f
1112 int UNUSED written
= 0;
1113 IADDR UNUSED pc
= abuf
->addr
;
1115 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1120 SI opval
= ADDSI (pc
, 4);
1121 CPU (h_gr
[((UINT
) 14)]) = opval
;
1122 written
|= (1 << 3);
1123 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1126 USI opval
= FLD (i_disp24
);
1127 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1128 written
|= (1 << 4);
1129 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1134 abuf
->written
= written
;
1135 SEM_BRANCH_FINI (vpc
);
1140 CASE (sem
, INSN_BNC8
) : /* bnc.s $disp8 */
1142 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1143 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1144 #define FLD(f) abuf->fields.sfmt_bl8.f
1145 int UNUSED written
= 0;
1146 IADDR UNUSED pc
= abuf
->addr
;
1148 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1150 if (NOTBI (CPU (h_cond
))) {
1152 USI opval
= FLD (i_disp8
);
1153 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1154 written
|= (1 << 2);
1155 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1159 abuf
->written
= written
;
1160 SEM_BRANCH_FINI (vpc
);
1165 CASE (sem
, INSN_BNC24
) : /* bnc.l $disp24 */
1167 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1168 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1169 #define FLD(f) abuf->fields.sfmt_bl24.f
1170 int UNUSED written
= 0;
1171 IADDR UNUSED pc
= abuf
->addr
;
1173 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1175 if (NOTBI (CPU (h_cond
))) {
1177 USI opval
= FLD (i_disp24
);
1178 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1179 written
|= (1 << 2);
1180 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1184 abuf
->written
= written
;
1185 SEM_BRANCH_FINI (vpc
);
1190 CASE (sem
, INSN_BNE
) : /* bne $src1,$src2,$disp16 */
1192 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1193 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1194 #define FLD(f) abuf->fields.sfmt_beq.f
1195 int UNUSED written
= 0;
1196 IADDR UNUSED pc
= abuf
->addr
;
1198 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1200 if (NESI (* FLD (i_src1
), * FLD (i_src2
))) {
1202 USI opval
= FLD (i_disp16
);
1203 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1204 written
|= (1 << 3);
1205 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1209 abuf
->written
= written
;
1210 SEM_BRANCH_FINI (vpc
);
1215 CASE (sem
, INSN_BRA8
) : /* bra.s $disp8 */
1217 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1218 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1219 #define FLD(f) abuf->fields.sfmt_bl8.f
1220 int UNUSED written
= 0;
1221 IADDR UNUSED pc
= abuf
->addr
;
1223 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1226 USI opval
= FLD (i_disp8
);
1227 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1228 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1231 SEM_BRANCH_FINI (vpc
);
1236 CASE (sem
, INSN_BRA24
) : /* bra.l $disp24 */
1238 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1239 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1240 #define FLD(f) abuf->fields.sfmt_bl24.f
1241 int UNUSED written
= 0;
1242 IADDR UNUSED pc
= abuf
->addr
;
1244 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1247 USI opval
= FLD (i_disp24
);
1248 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1249 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1252 SEM_BRANCH_FINI (vpc
);
1257 CASE (sem
, INSN_BNCL8
) : /* bncl.s $disp8 */
1259 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1260 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1261 #define FLD(f) abuf->fields.sfmt_bl8.f
1262 int UNUSED written
= 0;
1263 IADDR UNUSED pc
= abuf
->addr
;
1265 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1267 if (NOTBI (CPU (h_cond
))) {
1270 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
1271 CPU (h_gr
[((UINT
) 14)]) = opval
;
1272 written
|= (1 << 3);
1273 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1276 USI opval
= FLD (i_disp8
);
1277 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1278 written
|= (1 << 4);
1279 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1284 abuf
->written
= written
;
1285 SEM_BRANCH_FINI (vpc
);
1290 CASE (sem
, INSN_BNCL24
) : /* bncl.l $disp24 */
1292 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1293 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1294 #define FLD(f) abuf->fields.sfmt_bl24.f
1295 int UNUSED written
= 0;
1296 IADDR UNUSED pc
= abuf
->addr
;
1298 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1300 if (NOTBI (CPU (h_cond
))) {
1303 SI opval
= ADDSI (pc
, 4);
1304 CPU (h_gr
[((UINT
) 14)]) = opval
;
1305 written
|= (1 << 3);
1306 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1309 USI opval
= FLD (i_disp24
);
1310 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1311 written
|= (1 << 4);
1312 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1317 abuf
->written
= written
;
1318 SEM_BRANCH_FINI (vpc
);
1323 CASE (sem
, INSN_CMP
) : /* cmp $src1,$src2 */
1325 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1326 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1327 #define FLD(f) abuf->fields.sfmt_st_plus.f
1328 int UNUSED written
= 0;
1329 IADDR UNUSED pc
= abuf
->addr
;
1330 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1333 BI opval
= LTSI (* FLD (i_src1
), * FLD (i_src2
));
1334 CPU (h_cond
) = opval
;
1335 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1342 CASE (sem
, INSN_CMPI
) : /* cmpi $src2,$simm16 */
1344 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1345 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1346 #define FLD(f) abuf->fields.sfmt_st_d.f
1347 int UNUSED written
= 0;
1348 IADDR UNUSED pc
= abuf
->addr
;
1349 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1352 BI opval
= LTSI (* FLD (i_src2
), FLD (f_simm16
));
1353 CPU (h_cond
) = opval
;
1354 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1361 CASE (sem
, INSN_CMPU
) : /* cmpu $src1,$src2 */
1363 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1364 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1365 #define FLD(f) abuf->fields.sfmt_st_plus.f
1366 int UNUSED written
= 0;
1367 IADDR UNUSED pc
= abuf
->addr
;
1368 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1371 BI opval
= LTUSI (* FLD (i_src1
), * FLD (i_src2
));
1372 CPU (h_cond
) = opval
;
1373 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1380 CASE (sem
, INSN_CMPUI
) : /* cmpui $src2,$simm16 */
1382 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1383 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1384 #define FLD(f) abuf->fields.sfmt_st_d.f
1385 int UNUSED written
= 0;
1386 IADDR UNUSED pc
= abuf
->addr
;
1387 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1390 BI opval
= LTUSI (* FLD (i_src2
), FLD (f_simm16
));
1391 CPU (h_cond
) = opval
;
1392 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1399 CASE (sem
, INSN_CMPEQ
) : /* cmpeq $src1,$src2 */
1401 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1402 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1403 #define FLD(f) abuf->fields.sfmt_st_plus.f
1404 int UNUSED written
= 0;
1405 IADDR UNUSED pc
= abuf
->addr
;
1406 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1409 BI opval
= EQSI (* FLD (i_src1
), * FLD (i_src2
));
1410 CPU (h_cond
) = opval
;
1411 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1418 CASE (sem
, INSN_CMPZ
) : /* cmpz $src2 */
1420 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1421 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1422 #define FLD(f) abuf->fields.sfmt_st_plus.f
1423 int UNUSED written
= 0;
1424 IADDR UNUSED pc
= abuf
->addr
;
1425 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1428 BI opval
= EQSI (* FLD (i_src2
), 0);
1429 CPU (h_cond
) = opval
;
1430 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1437 CASE (sem
, INSN_DIV
) : /* div $dr,$sr */
1439 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1440 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1441 #define FLD(f) abuf->fields.sfmt_add.f
1442 int UNUSED written
= 0;
1443 IADDR UNUSED pc
= abuf
->addr
;
1444 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1446 if (NESI (* FLD (i_sr
), 0)) {
1448 SI opval
= DIVSI (* FLD (i_dr
), * FLD (i_sr
));
1449 * FLD (i_dr
) = opval
;
1450 written
|= (1 << 2);
1451 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1455 abuf
->written
= written
;
1460 CASE (sem
, INSN_DIVU
) : /* divu $dr,$sr */
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.f
1465 int UNUSED written
= 0;
1466 IADDR UNUSED pc
= abuf
->addr
;
1467 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1469 if (NESI (* FLD (i_sr
), 0)) {
1471 SI opval
= UDIVSI (* FLD (i_dr
), * FLD (i_sr
));
1472 * FLD (i_dr
) = opval
;
1473 written
|= (1 << 2);
1474 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1478 abuf
->written
= written
;
1483 CASE (sem
, INSN_REM
) : /* rem $dr,$sr */
1485 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1486 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1487 #define FLD(f) abuf->fields.sfmt_add.f
1488 int UNUSED written
= 0;
1489 IADDR UNUSED pc
= abuf
->addr
;
1490 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1492 if (NESI (* FLD (i_sr
), 0)) {
1494 SI opval
= MODSI (* FLD (i_dr
), * FLD (i_sr
));
1495 * FLD (i_dr
) = opval
;
1496 written
|= (1 << 2);
1497 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1501 abuf
->written
= written
;
1506 CASE (sem
, INSN_REMU
) : /* remu $dr,$sr */
1508 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1509 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1510 #define FLD(f) abuf->fields.sfmt_add.f
1511 int UNUSED written
= 0;
1512 IADDR UNUSED pc
= abuf
->addr
;
1513 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1515 if (NESI (* FLD (i_sr
), 0)) {
1517 SI opval
= UMODSI (* FLD (i_dr
), * FLD (i_sr
));
1518 * FLD (i_dr
) = opval
;
1519 written
|= (1 << 2);
1520 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1524 abuf
->written
= written
;
1529 CASE (sem
, INSN_REMH
) : /* remh $dr,$sr */
1531 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1532 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1533 #define FLD(f) abuf->fields.sfmt_add.f
1534 int UNUSED written
= 0;
1535 IADDR UNUSED pc
= abuf
->addr
;
1536 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1538 if (NESI (* FLD (i_sr
), 0)) {
1540 SI opval
= MODSI (EXTHISI (TRUNCSIHI (* FLD (i_dr
))), * FLD (i_sr
));
1541 * FLD (i_dr
) = opval
;
1542 written
|= (1 << 2);
1543 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1547 abuf
->written
= written
;
1552 CASE (sem
, INSN_REMUH
) : /* remuh $dr,$sr */
1554 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1555 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1556 #define FLD(f) abuf->fields.sfmt_add.f
1557 int UNUSED written
= 0;
1558 IADDR UNUSED pc
= abuf
->addr
;
1559 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1561 if (NESI (* FLD (i_sr
), 0)) {
1563 SI opval
= UMODSI (* FLD (i_dr
), * FLD (i_sr
));
1564 * FLD (i_dr
) = opval
;
1565 written
|= (1 << 2);
1566 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1570 abuf
->written
= written
;
1575 CASE (sem
, INSN_REMB
) : /* remb $dr,$sr */
1577 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1578 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1579 #define FLD(f) abuf->fields.sfmt_add.f
1580 int UNUSED written
= 0;
1581 IADDR UNUSED pc
= abuf
->addr
;
1582 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1584 if (NESI (* FLD (i_sr
), 0)) {
1586 SI opval
= MODSI (EXTBISI (TRUNCSIBI (* FLD (i_dr
))), * FLD (i_sr
));
1587 * FLD (i_dr
) = opval
;
1588 written
|= (1 << 2);
1589 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1593 abuf
->written
= written
;
1598 CASE (sem
, INSN_REMUB
) : /* remub $dr,$sr */
1600 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1601 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1602 #define FLD(f) abuf->fields.sfmt_add.f
1603 int UNUSED written
= 0;
1604 IADDR UNUSED pc
= abuf
->addr
;
1605 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1607 if (NESI (* FLD (i_sr
), 0)) {
1609 SI opval
= UMODSI (* FLD (i_dr
), * FLD (i_sr
));
1610 * FLD (i_dr
) = opval
;
1611 written
|= (1 << 2);
1612 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1616 abuf
->written
= written
;
1621 CASE (sem
, INSN_DIVUH
) : /* divuh $dr,$sr */
1623 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1624 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1625 #define FLD(f) abuf->fields.sfmt_add.f
1626 int UNUSED written
= 0;
1627 IADDR UNUSED pc
= abuf
->addr
;
1628 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1630 if (NESI (* FLD (i_sr
), 0)) {
1632 SI opval
= UDIVSI (* FLD (i_dr
), * FLD (i_sr
));
1633 * FLD (i_dr
) = opval
;
1634 written
|= (1 << 2);
1635 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1639 abuf
->written
= written
;
1644 CASE (sem
, INSN_DIVB
) : /* divb $dr,$sr */
1646 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1647 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1648 #define FLD(f) abuf->fields.sfmt_add.f
1649 int UNUSED written
= 0;
1650 IADDR UNUSED pc
= abuf
->addr
;
1651 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1653 if (NESI (* FLD (i_sr
), 0)) {
1655 SI opval
= DIVSI (EXTBISI (TRUNCSIBI (* FLD (i_dr
))), * FLD (i_sr
));
1656 * FLD (i_dr
) = opval
;
1657 written
|= (1 << 2);
1658 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1662 abuf
->written
= written
;
1667 CASE (sem
, INSN_DIVUB
) : /* divub $dr,$sr */
1669 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1670 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1671 #define FLD(f) abuf->fields.sfmt_add.f
1672 int UNUSED written
= 0;
1673 IADDR UNUSED pc
= abuf
->addr
;
1674 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1676 if (NESI (* FLD (i_sr
), 0)) {
1678 SI opval
= UDIVSI (* FLD (i_dr
), * FLD (i_sr
));
1679 * FLD (i_dr
) = opval
;
1680 written
|= (1 << 2);
1681 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1685 abuf
->written
= written
;
1690 CASE (sem
, INSN_DIVH
) : /* divh $dr,$sr */
1692 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1693 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1694 #define FLD(f) abuf->fields.sfmt_add.f
1695 int UNUSED written
= 0;
1696 IADDR UNUSED pc
= abuf
->addr
;
1697 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1699 if (NESI (* FLD (i_sr
), 0)) {
1701 SI opval
= DIVSI (EXTHISI (TRUNCSIHI (* FLD (i_dr
))), * FLD (i_sr
));
1702 * FLD (i_dr
) = opval
;
1703 written
|= (1 << 2);
1704 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1708 abuf
->written
= written
;
1713 CASE (sem
, INSN_JC
) : /* jc $sr */
1715 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1716 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1717 #define FLD(f) abuf->fields.sfmt_jl.f
1718 int UNUSED written
= 0;
1719 IADDR UNUSED pc
= abuf
->addr
;
1721 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1725 USI opval
= ANDSI (* FLD (i_sr
), -4);
1726 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1727 written
|= (1 << 2);
1728 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1732 abuf
->written
= written
;
1733 SEM_BRANCH_FINI (vpc
);
1738 CASE (sem
, INSN_JNC
) : /* jnc $sr */
1740 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1741 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1742 #define FLD(f) abuf->fields.sfmt_jl.f
1743 int UNUSED written
= 0;
1744 IADDR UNUSED pc
= abuf
->addr
;
1746 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1748 if (NOTBI (CPU (h_cond
))) {
1750 USI opval
= ANDSI (* FLD (i_sr
), -4);
1751 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1752 written
|= (1 << 2);
1753 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1757 abuf
->written
= written
;
1758 SEM_BRANCH_FINI (vpc
);
1763 CASE (sem
, INSN_JL
) : /* jl $sr */
1765 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1766 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1767 #define FLD(f) abuf->fields.sfmt_jl.f
1768 int UNUSED written
= 0;
1769 IADDR UNUSED pc
= abuf
->addr
;
1771 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1775 temp0
= ADDSI (ANDSI (pc
, -4), 4);
1776 temp1
= ANDSI (* FLD (i_sr
), -4);
1779 CPU (h_gr
[((UINT
) 14)]) = opval
;
1780 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1784 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1785 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1789 SEM_BRANCH_FINI (vpc
);
1794 CASE (sem
, INSN_JMP
) : /* jmp $sr */
1796 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1797 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1798 #define FLD(f) abuf->fields.sfmt_jl.f
1799 int UNUSED written
= 0;
1800 IADDR UNUSED pc
= abuf
->addr
;
1802 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1805 USI opval
= ANDSI (* FLD (i_sr
), -4);
1806 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1807 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1810 SEM_BRANCH_FINI (vpc
);
1815 CASE (sem
, INSN_LD
) : /* ld $dr,@$sr */
1817 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1818 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1819 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1820 int UNUSED written
= 0;
1821 IADDR UNUSED pc
= abuf
->addr
;
1822 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1825 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
1826 * FLD (i_dr
) = opval
;
1827 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1834 CASE (sem
, INSN_LD_D
) : /* ld $dr,@($slo16,$sr) */
1836 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1837 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1838 #define FLD(f) abuf->fields.sfmt_add3.f
1839 int UNUSED written
= 0;
1840 IADDR UNUSED pc
= abuf
->addr
;
1841 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1844 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
)));
1845 * FLD (i_dr
) = opval
;
1846 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1853 CASE (sem
, INSN_LDB
) : /* ldb $dr,@$sr */
1855 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1856 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1857 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1858 int UNUSED written
= 0;
1859 IADDR UNUSED pc
= abuf
->addr
;
1860 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1863 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, * FLD (i_sr
)));
1864 * FLD (i_dr
) = opval
;
1865 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1872 CASE (sem
, INSN_LDB_D
) : /* ldb $dr,@($slo16,$sr) */
1874 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1875 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1876 #define FLD(f) abuf->fields.sfmt_add3.f
1877 int UNUSED written
= 0;
1878 IADDR UNUSED pc
= abuf
->addr
;
1879 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1882 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))));
1883 * FLD (i_dr
) = opval
;
1884 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1891 CASE (sem
, INSN_LDH
) : /* ldh $dr,@$sr */
1893 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1894 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1895 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1896 int UNUSED written
= 0;
1897 IADDR UNUSED pc
= abuf
->addr
;
1898 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1901 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, * FLD (i_sr
)));
1902 * FLD (i_dr
) = opval
;
1903 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1910 CASE (sem
, INSN_LDH_D
) : /* ldh $dr,@($slo16,$sr) */
1912 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1913 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1914 #define FLD(f) abuf->fields.sfmt_add3.f
1915 int UNUSED written
= 0;
1916 IADDR UNUSED pc
= abuf
->addr
;
1917 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1920 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))));
1921 * FLD (i_dr
) = opval
;
1922 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1929 CASE (sem
, INSN_LDUB
) : /* ldub $dr,@$sr */
1931 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1932 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1933 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1934 int UNUSED written
= 0;
1935 IADDR UNUSED pc
= abuf
->addr
;
1936 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1939 SI opval
= ZEXTQISI (GETMEMQI (current_cpu
, pc
, * FLD (i_sr
)));
1940 * FLD (i_dr
) = opval
;
1941 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1948 CASE (sem
, INSN_LDUB_D
) : /* ldub $dr,@($slo16,$sr) */
1950 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1951 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1952 #define FLD(f) abuf->fields.sfmt_add3.f
1953 int UNUSED written
= 0;
1954 IADDR UNUSED pc
= abuf
->addr
;
1955 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1958 SI opval
= ZEXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))));
1959 * FLD (i_dr
) = opval
;
1960 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1967 CASE (sem
, INSN_LDUH
) : /* lduh $dr,@$sr */
1969 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1970 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1971 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1972 int UNUSED written
= 0;
1973 IADDR UNUSED pc
= abuf
->addr
;
1974 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1977 SI opval
= ZEXTHISI (GETMEMHI (current_cpu
, pc
, * FLD (i_sr
)));
1978 * FLD (i_dr
) = opval
;
1979 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1986 CASE (sem
, INSN_LDUH_D
) : /* lduh $dr,@($slo16,$sr) */
1988 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1989 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1990 #define FLD(f) abuf->fields.sfmt_add3.f
1991 int UNUSED written
= 0;
1992 IADDR UNUSED pc
= abuf
->addr
;
1993 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1996 SI opval
= ZEXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))));
1997 * FLD (i_dr
) = opval
;
1998 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2005 CASE (sem
, INSN_LD_PLUS
) : /* ld $dr,@$sr+ */
2007 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2008 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2009 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2010 int UNUSED written
= 0;
2011 IADDR UNUSED pc
= abuf
->addr
;
2012 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2016 temp0
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
2017 temp1
= ADDSI (* FLD (i_sr
), 4);
2020 * FLD (i_dr
) = opval
;
2021 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2025 * FLD (i_sr
) = opval
;
2026 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2034 CASE (sem
, INSN_LD24
) : /* ld24 $dr,$uimm24 */
2036 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2037 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2038 #define FLD(f) abuf->fields.sfmt_ld24.f
2039 int UNUSED written
= 0;
2040 IADDR UNUSED pc
= abuf
->addr
;
2041 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2044 SI opval
= FLD (i_uimm24
);
2045 * FLD (i_dr
) = opval
;
2046 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2053 CASE (sem
, INSN_LDI8
) : /* ldi8 $dr,$simm8 */
2055 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2056 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2057 #define FLD(f) abuf->fields.sfmt_addi.f
2058 int UNUSED written
= 0;
2059 IADDR UNUSED pc
= abuf
->addr
;
2060 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2063 SI opval
= FLD (f_simm8
);
2064 * FLD (i_dr
) = opval
;
2065 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2072 CASE (sem
, INSN_LDI16
) : /* ldi16 $dr,$hash$slo16 */
2074 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2075 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2076 #define FLD(f) abuf->fields.sfmt_add3.f
2077 int UNUSED written
= 0;
2078 IADDR UNUSED pc
= abuf
->addr
;
2079 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2082 SI opval
= FLD (f_simm16
);
2083 * FLD (i_dr
) = opval
;
2084 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2091 CASE (sem
, INSN_LOCK
) : /* lock $dr,@$sr */
2093 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2094 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2095 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2096 int UNUSED written
= 0;
2097 IADDR UNUSED pc
= abuf
->addr
;
2098 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2103 CPU (h_lock
) = opval
;
2104 CGEN_TRACE_RESULT (current_cpu
, abuf
, "lock", 'x', opval
);
2107 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
2108 * FLD (i_dr
) = opval
;
2109 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2117 CASE (sem
, INSN_MACHI_A
) : /* machi $src1,$src2,$acc */
2119 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2120 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2121 #define FLD(f) abuf->fields.sfmt_machi_a.f
2122 int UNUSED written
= 0;
2123 IADDR UNUSED pc
= abuf
->addr
;
2124 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2127 DI opval
= SRADI (SLLDI (ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (ANDSI (* FLD (i_src1
), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16))))), 8), 8);
2128 SET_H_ACCUMS (FLD (f_acc
), opval
);
2129 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2136 CASE (sem
, INSN_MACLO_A
) : /* maclo $src1,$src2,$acc */
2138 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2139 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2140 #define FLD(f) abuf->fields.sfmt_machi_a.f
2141 int UNUSED written
= 0;
2142 IADDR UNUSED pc
= abuf
->addr
;
2143 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2146 DI opval
= SRADI (SLLDI (ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (SLLSI (* FLD (i_src1
), 16)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
))))), 8), 8);
2147 SET_H_ACCUMS (FLD (f_acc
), opval
);
2148 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2155 CASE (sem
, INSN_MACWHI_A
) : /* macwhi $src1,$src2,$acc */
2157 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2158 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2159 #define FLD(f) abuf->fields.sfmt_machi_a.f
2160 int UNUSED written
= 0;
2161 IADDR UNUSED pc
= abuf
->addr
;
2162 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2165 DI opval
= ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16)))));
2166 SET_H_ACCUMS (FLD (f_acc
), opval
);
2167 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2174 CASE (sem
, INSN_MACWLO_A
) : /* macwlo $src1,$src2,$acc */
2176 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2177 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2178 #define FLD(f) abuf->fields.sfmt_machi_a.f
2179 int UNUSED written
= 0;
2180 IADDR UNUSED pc
= abuf
->addr
;
2181 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2184 DI opval
= ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))));
2185 SET_H_ACCUMS (FLD (f_acc
), opval
);
2186 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2193 CASE (sem
, INSN_MUL
) : /* mul $dr,$sr */
2195 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2196 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2197 #define FLD(f) abuf->fields.sfmt_add.f
2198 int UNUSED written
= 0;
2199 IADDR UNUSED pc
= abuf
->addr
;
2200 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2203 SI opval
= MULSI (* FLD (i_dr
), * FLD (i_sr
));
2204 * FLD (i_dr
) = opval
;
2205 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2212 CASE (sem
, INSN_MULHI_A
) : /* mulhi $src1,$src2,$acc */
2214 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2215 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2216 #define FLD(f) abuf->fields.sfmt_machi_a.f
2217 int UNUSED written
= 0;
2218 IADDR UNUSED pc
= abuf
->addr
;
2219 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2222 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (* FLD (i_src1
), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16)))), 16), 16);
2223 SET_H_ACCUMS (FLD (f_acc
), opval
);
2224 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2231 CASE (sem
, INSN_MULLO_A
) : /* mullo $src1,$src2,$acc */
2233 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2234 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2235 #define FLD(f) abuf->fields.sfmt_machi_a.f
2236 int UNUSED written
= 0;
2237 IADDR UNUSED pc
= abuf
->addr
;
2238 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2241 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (* FLD (i_src1
), 16)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))), 16), 16);
2242 SET_H_ACCUMS (FLD (f_acc
), opval
);
2243 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2250 CASE (sem
, INSN_MULWHI_A
) : /* mulwhi $src1,$src2,$acc */
2252 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2253 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2254 #define FLD(f) abuf->fields.sfmt_machi_a.f
2255 int UNUSED written
= 0;
2256 IADDR UNUSED pc
= abuf
->addr
;
2257 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2260 DI opval
= MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16))));
2261 SET_H_ACCUMS (FLD (f_acc
), opval
);
2262 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2269 CASE (sem
, INSN_MULWLO_A
) : /* mulwlo $src1,$src2,$acc */
2271 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2272 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2273 #define FLD(f) abuf->fields.sfmt_machi_a.f
2274 int UNUSED written
= 0;
2275 IADDR UNUSED pc
= abuf
->addr
;
2276 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2279 DI opval
= MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
))));
2280 SET_H_ACCUMS (FLD (f_acc
), opval
);
2281 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2288 CASE (sem
, INSN_MV
) : /* mv $dr,$sr */
2290 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2291 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2292 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2293 int UNUSED written
= 0;
2294 IADDR UNUSED pc
= abuf
->addr
;
2295 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2298 SI opval
= * FLD (i_sr
);
2299 * FLD (i_dr
) = opval
;
2300 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2307 CASE (sem
, INSN_MVFACHI_A
) : /* mvfachi $dr,$accs */
2309 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2310 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2311 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
2312 int UNUSED written
= 0;
2313 IADDR UNUSED pc
= abuf
->addr
;
2314 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2317 SI opval
= TRUNCDISI (SRADI (GET_H_ACCUMS (FLD (f_accs
)), 32));
2318 * FLD (i_dr
) = opval
;
2319 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2326 CASE (sem
, INSN_MVFACLO_A
) : /* mvfaclo $dr,$accs */
2328 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2329 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2330 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
2331 int UNUSED written
= 0;
2332 IADDR UNUSED pc
= abuf
->addr
;
2333 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2336 SI opval
= TRUNCDISI (GET_H_ACCUMS (FLD (f_accs
)));
2337 * FLD (i_dr
) = opval
;
2338 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2345 CASE (sem
, INSN_MVFACMI_A
) : /* mvfacmi $dr,$accs */
2347 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2348 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2349 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
2350 int UNUSED written
= 0;
2351 IADDR UNUSED pc
= abuf
->addr
;
2352 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2355 SI opval
= TRUNCDISI (SRADI (GET_H_ACCUMS (FLD (f_accs
)), 16));
2356 * FLD (i_dr
) = opval
;
2357 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2364 CASE (sem
, INSN_MVFC
) : /* mvfc $dr,$scr */
2366 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2367 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2368 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2369 int UNUSED written
= 0;
2370 IADDR UNUSED pc
= abuf
->addr
;
2371 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2374 SI opval
= GET_H_CR (FLD (f_r2
));
2375 * FLD (i_dr
) = opval
;
2376 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2383 CASE (sem
, INSN_MVTACHI_A
) : /* mvtachi $src1,$accs */
2385 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2386 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2387 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
2388 int UNUSED written
= 0;
2389 IADDR UNUSED pc
= abuf
->addr
;
2390 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2393 DI opval
= ORDI (ANDDI (GET_H_ACCUMS (FLD (f_accs
)), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (* FLD (i_src1
)), 32));
2394 SET_H_ACCUMS (FLD (f_accs
), opval
);
2395 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2402 CASE (sem
, INSN_MVTACLO_A
) : /* mvtaclo $src1,$accs */
2404 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2405 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2406 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
2407 int UNUSED written
= 0;
2408 IADDR UNUSED pc
= abuf
->addr
;
2409 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2412 DI opval
= ORDI (ANDDI (GET_H_ACCUMS (FLD (f_accs
)), MAKEDI (0xffffffff, 0)), ZEXTSIDI (* FLD (i_src1
)));
2413 SET_H_ACCUMS (FLD (f_accs
), opval
);
2414 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2421 CASE (sem
, INSN_MVTC
) : /* mvtc $sr,$dcr */
2423 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2424 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2425 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2426 int UNUSED written
= 0;
2427 IADDR UNUSED pc
= abuf
->addr
;
2428 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2431 USI opval
= * FLD (i_sr
);
2432 SET_H_CR (FLD (f_r1
), opval
);
2433 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
2440 CASE (sem
, INSN_NEG
) : /* neg $dr,$sr */
2442 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2443 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2444 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2445 int UNUSED written
= 0;
2446 IADDR UNUSED pc
= abuf
->addr
;
2447 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2450 SI opval
= NEGSI (* FLD (i_sr
));
2451 * FLD (i_dr
) = opval
;
2452 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2459 CASE (sem
, INSN_NOP
) : /* nop */
2461 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2462 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2463 #define FLD(f) abuf->fields.sfmt_empty.f
2464 int UNUSED written
= 0;
2465 IADDR UNUSED pc
= abuf
->addr
;
2466 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2468 PROFILE_COUNT_FILLNOPS (current_cpu
, abuf
->addr
);
2474 CASE (sem
, INSN_NOT
) : /* not $dr,$sr */
2476 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2477 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2478 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2479 int UNUSED written
= 0;
2480 IADDR UNUSED pc
= abuf
->addr
;
2481 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2484 SI opval
= INVSI (* FLD (i_sr
));
2485 * FLD (i_dr
) = opval
;
2486 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2493 CASE (sem
, INSN_RAC_DSI
) : /* rac $accd,$accs,$imm1 */
2495 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2496 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2497 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
2498 int UNUSED written
= 0;
2499 IADDR UNUSED pc
= abuf
->addr
;
2500 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2504 tmp_tmp1
= SLLDI (GET_H_ACCUMS (FLD (f_accs
)), FLD (f_imm1
));
2505 tmp_tmp1
= ADDDI (tmp_tmp1
, MAKEDI (0, 32768));
2507 DI opval
= (GTDI (tmp_tmp1
, MAKEDI (32767, 0xffff0000))) ? (MAKEDI (32767, 0xffff0000)) : (LTDI (tmp_tmp1
, MAKEDI (0xffff8000, 0))) ? (MAKEDI (0xffff8000, 0)) : (ANDDI (tmp_tmp1
, MAKEDI (0xffffffff, 0xffff0000)));
2508 SET_H_ACCUMS (FLD (f_accd
), opval
);
2509 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2517 CASE (sem
, INSN_RACH_DSI
) : /* rach $accd,$accs,$imm1 */
2519 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2520 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2521 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
2522 int UNUSED written
= 0;
2523 IADDR UNUSED pc
= abuf
->addr
;
2524 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2528 tmp_tmp1
= SLLDI (GET_H_ACCUMS (FLD (f_accs
)), FLD (f_imm1
));
2529 tmp_tmp1
= ADDDI (tmp_tmp1
, MAKEDI (0, 0x80000000));
2531 DI opval
= (GTDI (tmp_tmp1
, MAKEDI (32767, 0))) ? (MAKEDI (32767, 0)) : (LTDI (tmp_tmp1
, MAKEDI (0xffff8000, 0))) ? (MAKEDI (0xffff8000, 0)) : (ANDDI (tmp_tmp1
, MAKEDI (0xffffffff, 0)));
2532 SET_H_ACCUMS (FLD (f_accd
), opval
);
2533 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2541 CASE (sem
, INSN_RTE
) : /* rte */
2543 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2544 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2545 #define FLD(f) abuf->fields.sfmt_empty.f
2546 int UNUSED written
= 0;
2547 IADDR UNUSED pc
= abuf
->addr
;
2549 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2553 USI opval
= ANDSI (GET_H_CR (((UINT
) 6)), -4);
2554 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
2555 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
2558 USI opval
= GET_H_CR (((UINT
) 14));
2559 SET_H_CR (((UINT
) 6), opval
);
2560 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
2563 UQI opval
= CPU (h_bpsw
);
2565 CGEN_TRACE_RESULT (current_cpu
, abuf
, "psw", 'x', opval
);
2568 UQI opval
= CPU (h_bbpsw
);
2569 CPU (h_bpsw
) = opval
;
2570 CGEN_TRACE_RESULT (current_cpu
, abuf
, "bpsw", 'x', opval
);
2574 SEM_BRANCH_FINI (vpc
);
2579 CASE (sem
, INSN_SETH
) : /* seth $dr,$hash$hi16 */
2581 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2582 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2583 #define FLD(f) abuf->fields.sfmt_seth.f
2584 int UNUSED written
= 0;
2585 IADDR UNUSED pc
= abuf
->addr
;
2586 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2589 SI opval
= SLLSI (FLD (f_hi16
), 16);
2590 * FLD (i_dr
) = opval
;
2591 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2598 CASE (sem
, INSN_SLL
) : /* sll $dr,$sr */
2600 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2601 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2602 #define FLD(f) abuf->fields.sfmt_add.f
2603 int UNUSED written
= 0;
2604 IADDR UNUSED pc
= abuf
->addr
;
2605 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2608 SI opval
= SLLSI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
2609 * FLD (i_dr
) = opval
;
2610 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2617 CASE (sem
, INSN_SLL3
) : /* sll3 $dr,$sr,$simm16 */
2619 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2620 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2621 #define FLD(f) abuf->fields.sfmt_add3.f
2622 int UNUSED written
= 0;
2623 IADDR UNUSED pc
= abuf
->addr
;
2624 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2627 SI opval
= SLLSI (* FLD (i_sr
), ANDSI (FLD (f_simm16
), 31));
2628 * FLD (i_dr
) = opval
;
2629 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2636 CASE (sem
, INSN_SLLI
) : /* slli $dr,$uimm5 */
2638 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2639 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2640 #define FLD(f) abuf->fields.sfmt_slli.f
2641 int UNUSED written
= 0;
2642 IADDR UNUSED pc
= abuf
->addr
;
2643 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2646 SI opval
= SLLSI (* FLD (i_dr
), FLD (f_uimm5
));
2647 * FLD (i_dr
) = opval
;
2648 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2655 CASE (sem
, INSN_SRA
) : /* sra $dr,$sr */
2657 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2658 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2659 #define FLD(f) abuf->fields.sfmt_add.f
2660 int UNUSED written
= 0;
2661 IADDR UNUSED pc
= abuf
->addr
;
2662 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2665 SI opval
= SRASI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
2666 * FLD (i_dr
) = opval
;
2667 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2674 CASE (sem
, INSN_SRA3
) : /* sra3 $dr,$sr,$simm16 */
2676 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2677 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2678 #define FLD(f) abuf->fields.sfmt_add3.f
2679 int UNUSED written
= 0;
2680 IADDR UNUSED pc
= abuf
->addr
;
2681 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2684 SI opval
= SRASI (* FLD (i_sr
), ANDSI (FLD (f_simm16
), 31));
2685 * FLD (i_dr
) = opval
;
2686 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2693 CASE (sem
, INSN_SRAI
) : /* srai $dr,$uimm5 */
2695 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2696 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2697 #define FLD(f) abuf->fields.sfmt_slli.f
2698 int UNUSED written
= 0;
2699 IADDR UNUSED pc
= abuf
->addr
;
2700 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2703 SI opval
= SRASI (* FLD (i_dr
), FLD (f_uimm5
));
2704 * FLD (i_dr
) = opval
;
2705 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2712 CASE (sem
, INSN_SRL
) : /* srl $dr,$sr */
2714 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2715 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2716 #define FLD(f) abuf->fields.sfmt_add.f
2717 int UNUSED written
= 0;
2718 IADDR UNUSED pc
= abuf
->addr
;
2719 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2722 SI opval
= SRLSI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
2723 * FLD (i_dr
) = opval
;
2724 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2731 CASE (sem
, INSN_SRL3
) : /* srl3 $dr,$sr,$simm16 */
2733 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2734 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2735 #define FLD(f) abuf->fields.sfmt_add3.f
2736 int UNUSED written
= 0;
2737 IADDR UNUSED pc
= abuf
->addr
;
2738 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2741 SI opval
= SRLSI (* FLD (i_sr
), ANDSI (FLD (f_simm16
), 31));
2742 * FLD (i_dr
) = opval
;
2743 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2750 CASE (sem
, INSN_SRLI
) : /* srli $dr,$uimm5 */
2752 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2753 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2754 #define FLD(f) abuf->fields.sfmt_slli.f
2755 int UNUSED written
= 0;
2756 IADDR UNUSED pc
= abuf
->addr
;
2757 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2760 SI opval
= SRLSI (* FLD (i_dr
), FLD (f_uimm5
));
2761 * FLD (i_dr
) = opval
;
2762 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2769 CASE (sem
, INSN_ST
) : /* st $src1,@$src2 */
2771 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2772 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2773 #define FLD(f) abuf->fields.sfmt_st_plus.f
2774 int UNUSED written
= 0;
2775 IADDR UNUSED pc
= abuf
->addr
;
2776 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2779 SI opval
= * FLD (i_src1
);
2780 SETMEMSI (current_cpu
, pc
, * FLD (i_src2
), opval
);
2781 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2788 CASE (sem
, INSN_ST_D
) : /* st $src1,@($slo16,$src2) */
2790 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2791 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2792 #define FLD(f) abuf->fields.sfmt_st_d.f
2793 int UNUSED written
= 0;
2794 IADDR UNUSED pc
= abuf
->addr
;
2795 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2798 SI opval
= * FLD (i_src1
);
2799 SETMEMSI (current_cpu
, pc
, ADDSI (* FLD (i_src2
), FLD (f_simm16
)), opval
);
2800 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2807 CASE (sem
, INSN_STB
) : /* stb $src1,@$src2 */
2809 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2810 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2811 #define FLD(f) abuf->fields.sfmt_st_plus.f
2812 int UNUSED written
= 0;
2813 IADDR UNUSED pc
= abuf
->addr
;
2814 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2817 QI opval
= * FLD (i_src1
);
2818 SETMEMQI (current_cpu
, pc
, * FLD (i_src2
), opval
);
2819 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2826 CASE (sem
, INSN_STB_D
) : /* stb $src1,@($slo16,$src2) */
2828 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2829 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2830 #define FLD(f) abuf->fields.sfmt_st_d.f
2831 int UNUSED written
= 0;
2832 IADDR UNUSED pc
= abuf
->addr
;
2833 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2836 QI opval
= * FLD (i_src1
);
2837 SETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_src2
), FLD (f_simm16
)), opval
);
2838 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2845 CASE (sem
, INSN_STH
) : /* sth $src1,@$src2 */
2847 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2848 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2849 #define FLD(f) abuf->fields.sfmt_st_plus.f
2850 int UNUSED written
= 0;
2851 IADDR UNUSED pc
= abuf
->addr
;
2852 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2855 HI opval
= * FLD (i_src1
);
2856 SETMEMHI (current_cpu
, pc
, * FLD (i_src2
), opval
);
2857 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2864 CASE (sem
, INSN_STH_D
) : /* sth $src1,@($slo16,$src2) */
2866 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2867 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2868 #define FLD(f) abuf->fields.sfmt_st_d.f
2869 int UNUSED written
= 0;
2870 IADDR UNUSED pc
= abuf
->addr
;
2871 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2874 HI opval
= * FLD (i_src1
);
2875 SETMEMHI (current_cpu
, pc
, ADDSI (* FLD (i_src2
), FLD (f_simm16
)), opval
);
2876 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2883 CASE (sem
, INSN_ST_PLUS
) : /* st $src1,@+$src2 */
2885 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2886 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2887 #define FLD(f) abuf->fields.sfmt_st_plus.f
2888 int UNUSED written
= 0;
2889 IADDR UNUSED pc
= abuf
->addr
;
2890 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2894 tmp_new_src2
= ADDSI (* FLD (i_src2
), 4);
2896 SI opval
= * FLD (i_src1
);
2897 SETMEMSI (current_cpu
, pc
, tmp_new_src2
, opval
);
2898 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2901 SI opval
= tmp_new_src2
;
2902 * FLD (i_src2
) = opval
;
2903 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2911 CASE (sem
, INSN_STH_PLUS
) : /* sth $src1,@$src2+ */
2913 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2914 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2915 #define FLD(f) abuf->fields.sfmt_st_plus.f
2916 int UNUSED written
= 0;
2917 IADDR UNUSED pc
= abuf
->addr
;
2918 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2922 tmp_new_src2
= * FLD (i_src2
);
2924 HI opval
= * FLD (i_src1
);
2925 SETMEMHI (current_cpu
, pc
, tmp_new_src2
, opval
);
2926 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2929 SI opval
= ADDSI (tmp_new_src2
, 2);
2930 * FLD (i_src2
) = opval
;
2931 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2939 CASE (sem
, INSN_STB_PLUS
) : /* stb $src1,@$src2+ */
2941 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2942 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2943 #define FLD(f) abuf->fields.sfmt_st_plus.f
2944 int UNUSED written
= 0;
2945 IADDR UNUSED pc
= abuf
->addr
;
2946 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2950 tmp_new_src2
= * FLD (i_src2
);
2952 QI opval
= * FLD (i_src1
);
2953 SETMEMQI (current_cpu
, pc
, tmp_new_src2
, opval
);
2954 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2957 SI opval
= ADDSI (tmp_new_src2
, 1);
2958 * FLD (i_src2
) = opval
;
2959 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2967 CASE (sem
, INSN_ST_MINUS
) : /* st $src1,@-$src2 */
2969 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2970 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2971 #define FLD(f) abuf->fields.sfmt_st_plus.f
2972 int UNUSED written
= 0;
2973 IADDR UNUSED pc
= abuf
->addr
;
2974 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2978 tmp_new_src2
= SUBSI (* FLD (i_src2
), 4);
2980 SI opval
= * FLD (i_src1
);
2981 SETMEMSI (current_cpu
, pc
, tmp_new_src2
, opval
);
2982 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2985 SI opval
= tmp_new_src2
;
2986 * FLD (i_src2
) = opval
;
2987 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2995 CASE (sem
, INSN_SUB
) : /* sub $dr,$sr */
2997 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2998 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2999 #define FLD(f) abuf->fields.sfmt_add.f
3000 int UNUSED written
= 0;
3001 IADDR UNUSED pc
= abuf
->addr
;
3002 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3005 SI opval
= SUBSI (* FLD (i_dr
), * FLD (i_sr
));
3006 * FLD (i_dr
) = opval
;
3007 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3014 CASE (sem
, INSN_SUBV
) : /* subv $dr,$sr */
3016 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3017 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3018 #define FLD(f) abuf->fields.sfmt_add.f
3019 int UNUSED written
= 0;
3020 IADDR UNUSED pc
= abuf
->addr
;
3021 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3025 temp0
= SUBSI (* FLD (i_dr
), * FLD (i_sr
));
3026 temp1
= SUBOFSI (* FLD (i_dr
), * FLD (i_sr
), 0);
3029 * FLD (i_dr
) = opval
;
3030 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3034 CPU (h_cond
) = opval
;
3035 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3043 CASE (sem
, INSN_SUBX
) : /* subx $dr,$sr */
3045 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3046 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3047 #define FLD(f) abuf->fields.sfmt_add.f
3048 int UNUSED written
= 0;
3049 IADDR UNUSED pc
= abuf
->addr
;
3050 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3054 temp0
= SUBCSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
3055 temp1
= SUBCFSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
3058 * FLD (i_dr
) = opval
;
3059 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3063 CPU (h_cond
) = opval
;
3064 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3072 CASE (sem
, INSN_TRAP
) : /* trap $uimm4 */
3074 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3075 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3076 #define FLD(f) abuf->fields.sfmt_trap.f
3077 int UNUSED written
= 0;
3078 IADDR UNUSED pc
= abuf
->addr
;
3080 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3084 USI opval
= GET_H_CR (((UINT
) 6));
3085 SET_H_CR (((UINT
) 14), opval
);
3086 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
3089 USI opval
= ADDSI (pc
, 4);
3090 SET_H_CR (((UINT
) 6), opval
);
3091 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
3094 UQI opval
= CPU (h_bpsw
);
3095 CPU (h_bbpsw
) = opval
;
3096 CGEN_TRACE_RESULT (current_cpu
, abuf
, "bbpsw", 'x', opval
);
3099 UQI opval
= GET_H_PSW ();
3100 CPU (h_bpsw
) = opval
;
3101 CGEN_TRACE_RESULT (current_cpu
, abuf
, "bpsw", 'x', opval
);
3104 UQI opval
= ANDQI (GET_H_PSW (), 128);
3106 CGEN_TRACE_RESULT (current_cpu
, abuf
, "psw", 'x', opval
);
3109 SI opval
= m32r_trap (current_cpu
, pc
, FLD (f_uimm4
));
3110 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3111 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3115 SEM_BRANCH_FINI (vpc
);
3120 CASE (sem
, INSN_UNLOCK
) : /* unlock $src1,@$src2 */
3122 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3123 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3124 #define FLD(f) abuf->fields.sfmt_st_plus.f
3125 int UNUSED written
= 0;
3126 IADDR UNUSED pc
= abuf
->addr
;
3127 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3132 SI opval
= * FLD (i_src1
);
3133 SETMEMSI (current_cpu
, pc
, * FLD (i_src2
), opval
);
3134 written
|= (1 << 4);
3135 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3140 CPU (h_lock
) = opval
;
3141 CGEN_TRACE_RESULT (current_cpu
, abuf
, "lock", 'x', opval
);
3145 abuf
->written
= written
;
3150 CASE (sem
, INSN_SATB
) : /* satb $dr,$sr */
3152 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3153 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3154 #define FLD(f) abuf->fields.sfmt_ld_plus.f
3155 int UNUSED written
= 0;
3156 IADDR UNUSED pc
= abuf
->addr
;
3157 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3160 SI opval
= (GESI (* FLD (i_sr
), 127)) ? (127) : (LESI (* FLD (i_sr
), -128)) ? (-128) : (* FLD (i_sr
));
3161 * FLD (i_dr
) = opval
;
3162 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3169 CASE (sem
, INSN_SATH
) : /* sath $dr,$sr */
3171 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3172 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3173 #define FLD(f) abuf->fields.sfmt_ld_plus.f
3174 int UNUSED written
= 0;
3175 IADDR UNUSED pc
= abuf
->addr
;
3176 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3179 SI opval
= (GESI (* FLD (i_sr
), 32767)) ? (32767) : (LESI (* FLD (i_sr
), -32768)) ? (-32768) : (* FLD (i_sr
));
3180 * FLD (i_dr
) = opval
;
3181 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3188 CASE (sem
, INSN_SAT
) : /* sat $dr,$sr */
3190 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3191 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3192 #define FLD(f) abuf->fields.sfmt_ld_plus.f
3193 int UNUSED written
= 0;
3194 IADDR UNUSED pc
= abuf
->addr
;
3195 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3198 SI opval
= ((CPU (h_cond
)) ? (((LTSI (* FLD (i_sr
), 0)) ? (2147483647) : (0x80000000))) : (* FLD (i_sr
)));
3199 * FLD (i_dr
) = opval
;
3200 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3207 CASE (sem
, INSN_PCMPBZ
) : /* pcmpbz $src2 */
3209 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3210 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3211 #define FLD(f) abuf->fields.sfmt_st_plus.f
3212 int UNUSED written
= 0;
3213 IADDR UNUSED pc
= abuf
->addr
;
3214 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3217 BI opval
= (EQSI (ANDSI (* FLD (i_src2
), 255), 0)) ? (1) : (EQSI (ANDSI (* FLD (i_src2
), 65280), 0)) ? (1) : (EQSI (ANDSI (* FLD (i_src2
), 16711680), 0)) ? (1) : (EQSI (ANDSI (* FLD (i_src2
), 0xff000000), 0)) ? (1) : (0);
3218 CPU (h_cond
) = opval
;
3219 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3226 CASE (sem
, INSN_SADD
) : /* sadd */
3228 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3229 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3230 #define FLD(f) abuf->fields.sfmt_empty.f
3231 int UNUSED written
= 0;
3232 IADDR UNUSED pc
= abuf
->addr
;
3233 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3236 DI opval
= ADDDI (SRADI (GET_H_ACCUMS (((UINT
) 1)), 16), GET_H_ACCUMS (((UINT
) 0)));
3237 SET_H_ACCUMS (((UINT
) 0), opval
);
3238 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
3245 CASE (sem
, INSN_MACWU1
) : /* macwu1 $src1,$src2 */
3247 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3248 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3249 #define FLD(f) abuf->fields.sfmt_st_plus.f
3250 int UNUSED written
= 0;
3251 IADDR UNUSED pc
= abuf
->addr
;
3252 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3255 DI opval
= SRADI (SLLDI (ADDDI (GET_H_ACCUMS (((UINT
) 1)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTSIDI (ANDSI (* FLD (i_src2
), 65535)))), 8), 8);
3256 SET_H_ACCUMS (((UINT
) 1), opval
);
3257 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
3264 CASE (sem
, INSN_MSBLO
) : /* msblo $src1,$src2 */
3266 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3267 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3268 #define FLD(f) abuf->fields.sfmt_st_plus.f
3269 int UNUSED written
= 0;
3270 IADDR UNUSED pc
= abuf
->addr
;
3271 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3274 DI opval
= SRADI (SLLDI (SUBDI (GET_H_ACCUM (), SRADI (SLLDI (MULDI (EXTHIDI (TRUNCSIHI (* FLD (i_src1
))), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))), 32), 16)), 8), 8);
3275 SET_H_ACCUM (opval
);
3276 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accum", 'D', opval
);
3283 CASE (sem
, INSN_MULWU1
) : /* mulwu1 $src1,$src2 */
3285 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3286 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3287 #define FLD(f) abuf->fields.sfmt_st_plus.f
3288 int UNUSED written
= 0;
3289 IADDR UNUSED pc
= abuf
->addr
;
3290 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3293 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (* FLD (i_src1
)), EXTSIDI (ANDSI (* FLD (i_src2
), 65535))), 16), 16);
3294 SET_H_ACCUMS (((UINT
) 1), opval
);
3295 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
3302 CASE (sem
, INSN_MACLH1
) : /* maclh1 $src1,$src2 */
3304 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3305 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3306 #define FLD(f) abuf->fields.sfmt_st_plus.f
3307 int UNUSED written
= 0;
3308 IADDR UNUSED pc
= abuf
->addr
;
3309 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3312 DI opval
= SRADI (SLLDI (ADDDI (GET_H_ACCUMS (((UINT
) 1)), SLLDI (EXTSIDI (MULSI (EXTHISI (TRUNCSIHI (* FLD (i_src1
))), SRASI (* FLD (i_src2
), 16))), 16)), 8), 8);
3313 SET_H_ACCUMS (((UINT
) 1), opval
);
3314 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
3321 CASE (sem
, INSN_SC
) : /* sc */
3323 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3324 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3325 #define FLD(f) abuf->fields.sfmt_empty.f
3326 int UNUSED written
= 0;
3327 IADDR UNUSED pc
= abuf
->addr
;
3328 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3330 if (ZEXTBISI (CPU (h_cond
)))
3331 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
3337 CASE (sem
, INSN_SNC
) : /* snc */
3339 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3340 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3341 #define FLD(f) abuf->fields.sfmt_empty.f
3342 int UNUSED written
= 0;
3343 IADDR UNUSED pc
= abuf
->addr
;
3344 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3346 if (ZEXTBISI (NOTBI (CPU (h_cond
))))
3347 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
3353 CASE (sem
, INSN_CLRPSW
) : /* clrpsw $uimm8 */
3355 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3356 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3357 #define FLD(f) abuf->fields.sfmt_clrpsw.f
3358 int UNUSED written
= 0;
3359 IADDR UNUSED pc
= abuf
->addr
;
3360 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3363 USI opval
= ANDSI (GET_H_CR (((UINT
) 0)), ORSI (ZEXTQISI (INVQI (FLD (f_uimm8
))), 65280));
3364 SET_H_CR (((UINT
) 0), opval
);
3365 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
3372 CASE (sem
, INSN_SETPSW
) : /* setpsw $uimm8 */
3374 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3375 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3376 #define FLD(f) abuf->fields.sfmt_clrpsw.f
3377 int UNUSED written
= 0;
3378 IADDR UNUSED pc
= abuf
->addr
;
3379 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3382 USI opval
= FLD (f_uimm8
);
3383 SET_H_CR (((UINT
) 0), opval
);
3384 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
3391 CASE (sem
, INSN_BSET
) : /* bset $uimm3,@($slo16,$sr) */
3393 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3394 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3395 #define FLD(f) abuf->fields.sfmt_bset.f
3396 int UNUSED written
= 0;
3397 IADDR UNUSED pc
= abuf
->addr
;
3398 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3401 QI opval
= ORQI (GETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))), SLLQI (1, SUBSI (7, FLD (f_uimm3
))));
3402 SETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
)), opval
);
3403 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3410 CASE (sem
, INSN_BCLR
) : /* bclr $uimm3,@($slo16,$sr) */
3412 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3413 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3414 #define FLD(f) abuf->fields.sfmt_bset.f
3415 int UNUSED written
= 0;
3416 IADDR UNUSED pc
= abuf
->addr
;
3417 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3420 QI opval
= ANDQI (GETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))), INVQI (SLLQI (1, SUBSI (7, FLD (f_uimm3
)))));
3421 SETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
)), opval
);
3422 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3429 CASE (sem
, INSN_BTST
) : /* btst $uimm3,$sr */
3431 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3432 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3433 #define FLD(f) abuf->fields.sfmt_bset.f
3434 int UNUSED written
= 0;
3435 IADDR UNUSED pc
= abuf
->addr
;
3436 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3439 BI opval
= ANDQI (SRLQI (* FLD (i_sr
), SUBSI (7, FLD (f_uimm3
))), 1);
3440 CPU (h_cond
) = opval
;
3441 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3448 CASE (sem
, INSN_PAR_ADD
) : /* add $dr,$sr */
3450 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3451 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3452 #define FLD(f) abuf->fields.sfmt_add.f
3453 #define OPRND(f) par_exec->operands.sfmt_add.f
3454 int UNUSED written
= 0;
3455 IADDR UNUSED pc
= abuf
->addr
;
3456 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3459 SI opval
= ADDSI (* FLD (i_dr
), * FLD (i_sr
));
3461 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3469 CASE (sem
, INSN_WRITE_ADD
) : /* add $dr,$sr */
3471 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3472 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3473 #define FLD(f) abuf->fields.sfmt_add.f
3474 #define OPRND(f) par_exec->operands.sfmt_add.f
3475 int UNUSED written
= abuf
->written
;
3476 IADDR UNUSED pc
= abuf
->addr
;
3477 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3479 * FLD (i_dr
) = OPRND (dr
);
3486 CASE (sem
, INSN_PAR_AND
) : /* and $dr,$sr */
3488 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3489 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3490 #define FLD(f) abuf->fields.sfmt_add.f
3491 #define OPRND(f) par_exec->operands.sfmt_add.f
3492 int UNUSED written
= 0;
3493 IADDR UNUSED pc
= abuf
->addr
;
3494 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3497 SI opval
= ANDSI (* FLD (i_dr
), * FLD (i_sr
));
3499 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3507 CASE (sem
, INSN_WRITE_AND
) : /* and $dr,$sr */
3509 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3510 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3511 #define FLD(f) abuf->fields.sfmt_add.f
3512 #define OPRND(f) par_exec->operands.sfmt_add.f
3513 int UNUSED written
= abuf
->written
;
3514 IADDR UNUSED pc
= abuf
->addr
;
3515 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3517 * FLD (i_dr
) = OPRND (dr
);
3524 CASE (sem
, INSN_PAR_OR
) : /* or $dr,$sr */
3526 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3527 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3528 #define FLD(f) abuf->fields.sfmt_add.f
3529 #define OPRND(f) par_exec->operands.sfmt_add.f
3530 int UNUSED written
= 0;
3531 IADDR UNUSED pc
= abuf
->addr
;
3532 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3535 SI opval
= ORSI (* FLD (i_dr
), * FLD (i_sr
));
3537 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3545 CASE (sem
, INSN_WRITE_OR
) : /* or $dr,$sr */
3547 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3548 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3549 #define FLD(f) abuf->fields.sfmt_add.f
3550 #define OPRND(f) par_exec->operands.sfmt_add.f
3551 int UNUSED written
= abuf
->written
;
3552 IADDR UNUSED pc
= abuf
->addr
;
3553 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3555 * FLD (i_dr
) = OPRND (dr
);
3562 CASE (sem
, INSN_PAR_XOR
) : /* xor $dr,$sr */
3564 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3565 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3566 #define FLD(f) abuf->fields.sfmt_add.f
3567 #define OPRND(f) par_exec->operands.sfmt_add.f
3568 int UNUSED written
= 0;
3569 IADDR UNUSED pc
= abuf
->addr
;
3570 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3573 SI opval
= XORSI (* FLD (i_dr
), * FLD (i_sr
));
3575 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3583 CASE (sem
, INSN_WRITE_XOR
) : /* xor $dr,$sr */
3585 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3586 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3587 #define FLD(f) abuf->fields.sfmt_add.f
3588 #define OPRND(f) par_exec->operands.sfmt_add.f
3589 int UNUSED written
= abuf
->written
;
3590 IADDR UNUSED pc
= abuf
->addr
;
3591 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3593 * FLD (i_dr
) = OPRND (dr
);
3600 CASE (sem
, INSN_PAR_ADDI
) : /* addi $dr,$simm8 */
3602 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3603 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3604 #define FLD(f) abuf->fields.sfmt_addi.f
3605 #define OPRND(f) par_exec->operands.sfmt_addi.f
3606 int UNUSED written
= 0;
3607 IADDR UNUSED pc
= abuf
->addr
;
3608 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3611 SI opval
= ADDSI (* FLD (i_dr
), FLD (f_simm8
));
3613 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3621 CASE (sem
, INSN_WRITE_ADDI
) : /* addi $dr,$simm8 */
3623 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3624 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3625 #define FLD(f) abuf->fields.sfmt_addi.f
3626 #define OPRND(f) par_exec->operands.sfmt_addi.f
3627 int UNUSED written
= abuf
->written
;
3628 IADDR UNUSED pc
= abuf
->addr
;
3629 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3631 * FLD (i_dr
) = OPRND (dr
);
3638 CASE (sem
, INSN_PAR_ADDV
) : /* addv $dr,$sr */
3640 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3641 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3642 #define FLD(f) abuf->fields.sfmt_add.f
3643 #define OPRND(f) par_exec->operands.sfmt_addv.f
3644 int UNUSED written
= 0;
3645 IADDR UNUSED pc
= abuf
->addr
;
3646 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3650 temp0
= ADDSI (* FLD (i_dr
), * FLD (i_sr
));
3651 temp1
= ADDOFSI (* FLD (i_dr
), * FLD (i_sr
), 0);
3655 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3659 OPRND (condbit
) = opval
;
3660 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3669 CASE (sem
, INSN_WRITE_ADDV
) : /* addv $dr,$sr */
3671 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3672 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3673 #define FLD(f) abuf->fields.sfmt_add.f
3674 #define OPRND(f) par_exec->operands.sfmt_addv.f
3675 int UNUSED written
= abuf
->written
;
3676 IADDR UNUSED pc
= abuf
->addr
;
3677 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3679 CPU (h_cond
) = OPRND (condbit
);
3680 * FLD (i_dr
) = OPRND (dr
);
3687 CASE (sem
, INSN_PAR_ADDX
) : /* addx $dr,$sr */
3689 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3690 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3691 #define FLD(f) abuf->fields.sfmt_add.f
3692 #define OPRND(f) par_exec->operands.sfmt_addx.f
3693 int UNUSED written
= 0;
3694 IADDR UNUSED pc
= abuf
->addr
;
3695 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3699 temp0
= ADDCSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
3700 temp1
= ADDCFSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
3704 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3708 OPRND (condbit
) = opval
;
3709 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3718 CASE (sem
, INSN_WRITE_ADDX
) : /* addx $dr,$sr */
3720 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3721 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3722 #define FLD(f) abuf->fields.sfmt_add.f
3723 #define OPRND(f) par_exec->operands.sfmt_addx.f
3724 int UNUSED written
= abuf
->written
;
3725 IADDR UNUSED pc
= abuf
->addr
;
3726 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3728 CPU (h_cond
) = OPRND (condbit
);
3729 * FLD (i_dr
) = OPRND (dr
);
3736 CASE (sem
, INSN_PAR_BC8
) : /* bc.s $disp8 */
3738 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3739 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3740 #define FLD(f) abuf->fields.sfmt_bl8.f
3741 #define OPRND(f) par_exec->operands.sfmt_bc8.f
3742 int UNUSED written
= 0;
3743 IADDR UNUSED pc
= abuf
->addr
;
3744 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3748 USI opval
= FLD (i_disp8
);
3750 written
|= (1 << 2);
3751 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3755 abuf
->written
= written
;
3761 CASE (sem
, INSN_WRITE_BC8
) : /* bc.s $disp8 */
3763 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3764 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3765 #define FLD(f) abuf->fields.sfmt_bl8.f
3766 #define OPRND(f) par_exec->operands.sfmt_bc8.f
3767 int UNUSED written
= abuf
->written
;
3768 IADDR UNUSED pc
= abuf
->addr
;
3770 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3772 if (written
& (1 << 2))
3774 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3777 SEM_BRANCH_FINI (vpc
);
3783 CASE (sem
, INSN_PAR_BL8
) : /* bl.s $disp8 */
3785 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3786 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3787 #define FLD(f) abuf->fields.sfmt_bl8.f
3788 #define OPRND(f) par_exec->operands.sfmt_bl8.f
3789 int UNUSED written
= 0;
3790 IADDR UNUSED pc
= abuf
->addr
;
3791 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3795 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
3796 OPRND (h_gr_SI_14
) = opval
;
3797 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3800 USI opval
= FLD (i_disp8
);
3802 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3811 CASE (sem
, INSN_WRITE_BL8
) : /* bl.s $disp8 */
3813 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3814 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3815 #define FLD(f) abuf->fields.sfmt_bl8.f
3816 #define OPRND(f) par_exec->operands.sfmt_bl8.f
3817 int UNUSED written
= abuf
->written
;
3818 IADDR UNUSED pc
= abuf
->addr
;
3820 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3822 CPU (h_gr
[((UINT
) 14)]) = OPRND (h_gr_SI_14
);
3823 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3825 SEM_BRANCH_FINI (vpc
);
3831 CASE (sem
, INSN_PAR_BCL8
) : /* bcl.s $disp8 */
3833 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3834 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3835 #define FLD(f) abuf->fields.sfmt_bl8.f
3836 #define OPRND(f) par_exec->operands.sfmt_bcl8.f
3837 int UNUSED written
= 0;
3838 IADDR UNUSED pc
= abuf
->addr
;
3839 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3844 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
3845 OPRND (h_gr_SI_14
) = opval
;
3846 written
|= (1 << 3);
3847 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3850 USI opval
= FLD (i_disp8
);
3852 written
|= (1 << 4);
3853 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3858 abuf
->written
= written
;
3864 CASE (sem
, INSN_WRITE_BCL8
) : /* bcl.s $disp8 */
3866 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3867 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3868 #define FLD(f) abuf->fields.sfmt_bl8.f
3869 #define OPRND(f) par_exec->operands.sfmt_bcl8.f
3870 int UNUSED written
= abuf
->written
;
3871 IADDR UNUSED pc
= abuf
->addr
;
3873 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3875 if (written
& (1 << 3))
3877 CPU (h_gr
[((UINT
) 14)]) = OPRND (h_gr_SI_14
);
3879 if (written
& (1 << 4))
3881 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3884 SEM_BRANCH_FINI (vpc
);
3890 CASE (sem
, INSN_PAR_BNC8
) : /* bnc.s $disp8 */
3892 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3893 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3894 #define FLD(f) abuf->fields.sfmt_bl8.f
3895 #define OPRND(f) par_exec->operands.sfmt_bc8.f
3896 int UNUSED written
= 0;
3897 IADDR UNUSED pc
= abuf
->addr
;
3898 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3900 if (NOTBI (CPU (h_cond
))) {
3902 USI opval
= FLD (i_disp8
);
3904 written
|= (1 << 2);
3905 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3909 abuf
->written
= written
;
3915 CASE (sem
, INSN_WRITE_BNC8
) : /* bnc.s $disp8 */
3917 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3918 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3919 #define FLD(f) abuf->fields.sfmt_bl8.f
3920 #define OPRND(f) par_exec->operands.sfmt_bc8.f
3921 int UNUSED written
= abuf
->written
;
3922 IADDR UNUSED pc
= abuf
->addr
;
3924 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3926 if (written
& (1 << 2))
3928 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3931 SEM_BRANCH_FINI (vpc
);
3937 CASE (sem
, INSN_PAR_BRA8
) : /* bra.s $disp8 */
3939 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3940 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3941 #define FLD(f) abuf->fields.sfmt_bl8.f
3942 #define OPRND(f) par_exec->operands.sfmt_bra8.f
3943 int UNUSED written
= 0;
3944 IADDR UNUSED pc
= abuf
->addr
;
3945 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3948 USI opval
= FLD (i_disp8
);
3950 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3958 CASE (sem
, INSN_WRITE_BRA8
) : /* bra.s $disp8 */
3960 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3961 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3962 #define FLD(f) abuf->fields.sfmt_bl8.f
3963 #define OPRND(f) par_exec->operands.sfmt_bra8.f
3964 int UNUSED written
= abuf
->written
;
3965 IADDR UNUSED pc
= abuf
->addr
;
3967 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3969 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3971 SEM_BRANCH_FINI (vpc
);
3977 CASE (sem
, INSN_PAR_BNCL8
) : /* bncl.s $disp8 */
3979 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3980 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3981 #define FLD(f) abuf->fields.sfmt_bl8.f
3982 #define OPRND(f) par_exec->operands.sfmt_bcl8.f
3983 int UNUSED written
= 0;
3984 IADDR UNUSED pc
= abuf
->addr
;
3985 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3987 if (NOTBI (CPU (h_cond
))) {
3990 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
3991 OPRND (h_gr_SI_14
) = opval
;
3992 written
|= (1 << 3);
3993 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3996 USI opval
= FLD (i_disp8
);
3998 written
|= (1 << 4);
3999 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4004 abuf
->written
= written
;
4010 CASE (sem
, INSN_WRITE_BNCL8
) : /* bncl.s $disp8 */
4012 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4013 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4014 #define FLD(f) abuf->fields.sfmt_bl8.f
4015 #define OPRND(f) par_exec->operands.sfmt_bcl8.f
4016 int UNUSED written
= abuf
->written
;
4017 IADDR UNUSED pc
= abuf
->addr
;
4019 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4021 if (written
& (1 << 3))
4023 CPU (h_gr
[((UINT
) 14)]) = OPRND (h_gr_SI_14
);
4025 if (written
& (1 << 4))
4027 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
4030 SEM_BRANCH_FINI (vpc
);
4036 CASE (sem
, INSN_PAR_CMP
) : /* cmp $src1,$src2 */
4038 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4039 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4040 #define FLD(f) abuf->fields.sfmt_st_plus.f
4041 #define OPRND(f) par_exec->operands.sfmt_cmp.f
4042 int UNUSED written
= 0;
4043 IADDR UNUSED pc
= abuf
->addr
;
4044 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4047 BI opval
= LTSI (* FLD (i_src1
), * FLD (i_src2
));
4048 OPRND (condbit
) = opval
;
4049 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
4057 CASE (sem
, INSN_WRITE_CMP
) : /* cmp $src1,$src2 */
4059 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4060 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4061 #define FLD(f) abuf->fields.sfmt_st_plus.f
4062 #define OPRND(f) par_exec->operands.sfmt_cmp.f
4063 int UNUSED written
= abuf
->written
;
4064 IADDR UNUSED pc
= abuf
->addr
;
4065 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4067 CPU (h_cond
) = OPRND (condbit
);
4074 CASE (sem
, INSN_PAR_CMPU
) : /* cmpu $src1,$src2 */
4076 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4077 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4078 #define FLD(f) abuf->fields.sfmt_st_plus.f
4079 #define OPRND(f) par_exec->operands.sfmt_cmp.f
4080 int UNUSED written
= 0;
4081 IADDR UNUSED pc
= abuf
->addr
;
4082 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4085 BI opval
= LTUSI (* FLD (i_src1
), * FLD (i_src2
));
4086 OPRND (condbit
) = opval
;
4087 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
4095 CASE (sem
, INSN_WRITE_CMPU
) : /* cmpu $src1,$src2 */
4097 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4098 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4099 #define FLD(f) abuf->fields.sfmt_st_plus.f
4100 #define OPRND(f) par_exec->operands.sfmt_cmp.f
4101 int UNUSED written
= abuf
->written
;
4102 IADDR UNUSED pc
= abuf
->addr
;
4103 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4105 CPU (h_cond
) = OPRND (condbit
);
4112 CASE (sem
, INSN_PAR_CMPEQ
) : /* cmpeq $src1,$src2 */
4114 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4115 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4116 #define FLD(f) abuf->fields.sfmt_st_plus.f
4117 #define OPRND(f) par_exec->operands.sfmt_cmp.f
4118 int UNUSED written
= 0;
4119 IADDR UNUSED pc
= abuf
->addr
;
4120 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4123 BI opval
= EQSI (* FLD (i_src1
), * FLD (i_src2
));
4124 OPRND (condbit
) = opval
;
4125 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
4133 CASE (sem
, INSN_WRITE_CMPEQ
) : /* cmpeq $src1,$src2 */
4135 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4136 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4137 #define FLD(f) abuf->fields.sfmt_st_plus.f
4138 #define OPRND(f) par_exec->operands.sfmt_cmp.f
4139 int UNUSED written
= abuf
->written
;
4140 IADDR UNUSED pc
= abuf
->addr
;
4141 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4143 CPU (h_cond
) = OPRND (condbit
);
4150 CASE (sem
, INSN_PAR_CMPZ
) : /* cmpz $src2 */
4152 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4153 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4154 #define FLD(f) abuf->fields.sfmt_st_plus.f
4155 #define OPRND(f) par_exec->operands.sfmt_cmpz.f
4156 int UNUSED written
= 0;
4157 IADDR UNUSED pc
= abuf
->addr
;
4158 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4161 BI opval
= EQSI (* FLD (i_src2
), 0);
4162 OPRND (condbit
) = opval
;
4163 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
4171 CASE (sem
, INSN_WRITE_CMPZ
) : /* cmpz $src2 */
4173 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4174 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4175 #define FLD(f) abuf->fields.sfmt_st_plus.f
4176 #define OPRND(f) par_exec->operands.sfmt_cmpz.f
4177 int UNUSED written
= abuf
->written
;
4178 IADDR UNUSED pc
= abuf
->addr
;
4179 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4181 CPU (h_cond
) = OPRND (condbit
);
4188 CASE (sem
, INSN_PAR_JC
) : /* jc $sr */
4190 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4191 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4192 #define FLD(f) abuf->fields.sfmt_jl.f
4193 #define OPRND(f) par_exec->operands.sfmt_jc.f
4194 int UNUSED written
= 0;
4195 IADDR UNUSED pc
= abuf
->addr
;
4196 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4200 USI opval
= ANDSI (* FLD (i_sr
), -4);
4202 written
|= (1 << 2);
4203 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4207 abuf
->written
= written
;
4213 CASE (sem
, INSN_WRITE_JC
) : /* jc $sr */
4215 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4216 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4217 #define FLD(f) abuf->fields.sfmt_jl.f
4218 #define OPRND(f) par_exec->operands.sfmt_jc.f
4219 int UNUSED written
= abuf
->written
;
4220 IADDR UNUSED pc
= abuf
->addr
;
4222 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4224 if (written
& (1 << 2))
4226 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
4229 SEM_BRANCH_FINI (vpc
);
4235 CASE (sem
, INSN_PAR_JNC
) : /* jnc $sr */
4237 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4238 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4239 #define FLD(f) abuf->fields.sfmt_jl.f
4240 #define OPRND(f) par_exec->operands.sfmt_jc.f
4241 int UNUSED written
= 0;
4242 IADDR UNUSED pc
= abuf
->addr
;
4243 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4245 if (NOTBI (CPU (h_cond
))) {
4247 USI opval
= ANDSI (* FLD (i_sr
), -4);
4249 written
|= (1 << 2);
4250 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4254 abuf
->written
= written
;
4260 CASE (sem
, INSN_WRITE_JNC
) : /* jnc $sr */
4262 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4263 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4264 #define FLD(f) abuf->fields.sfmt_jl.f
4265 #define OPRND(f) par_exec->operands.sfmt_jc.f
4266 int UNUSED written
= abuf
->written
;
4267 IADDR UNUSED pc
= abuf
->addr
;
4269 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4271 if (written
& (1 << 2))
4273 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
4276 SEM_BRANCH_FINI (vpc
);
4282 CASE (sem
, INSN_PAR_JL
) : /* jl $sr */
4284 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4285 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4286 #define FLD(f) abuf->fields.sfmt_jl.f
4287 #define OPRND(f) par_exec->operands.sfmt_jl.f
4288 int UNUSED written
= 0;
4289 IADDR UNUSED pc
= abuf
->addr
;
4290 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4294 temp0
= ADDSI (ANDSI (pc
, -4), 4);
4295 temp1
= ANDSI (* FLD (i_sr
), -4);
4298 OPRND (h_gr_SI_14
) = opval
;
4299 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4304 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4313 CASE (sem
, INSN_WRITE_JL
) : /* jl $sr */
4315 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4316 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4317 #define FLD(f) abuf->fields.sfmt_jl.f
4318 #define OPRND(f) par_exec->operands.sfmt_jl.f
4319 int UNUSED written
= abuf
->written
;
4320 IADDR UNUSED pc
= abuf
->addr
;
4322 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4324 CPU (h_gr
[((UINT
) 14)]) = OPRND (h_gr_SI_14
);
4325 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
4327 SEM_BRANCH_FINI (vpc
);
4333 CASE (sem
, INSN_PAR_JMP
) : /* jmp $sr */
4335 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4336 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4337 #define FLD(f) abuf->fields.sfmt_jl.f
4338 #define OPRND(f) par_exec->operands.sfmt_jmp.f
4339 int UNUSED written
= 0;
4340 IADDR UNUSED pc
= abuf
->addr
;
4341 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4344 USI opval
= ANDSI (* FLD (i_sr
), -4);
4346 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4354 CASE (sem
, INSN_WRITE_JMP
) : /* jmp $sr */
4356 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4357 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4358 #define FLD(f) abuf->fields.sfmt_jl.f
4359 #define OPRND(f) par_exec->operands.sfmt_jmp.f
4360 int UNUSED written
= abuf
->written
;
4361 IADDR UNUSED pc
= abuf
->addr
;
4363 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4365 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
4367 SEM_BRANCH_FINI (vpc
);
4373 CASE (sem
, INSN_PAR_LD
) : /* ld $dr,@$sr */
4375 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4376 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4377 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4378 #define OPRND(f) par_exec->operands.sfmt_ld.f
4379 int UNUSED written
= 0;
4380 IADDR UNUSED pc
= abuf
->addr
;
4381 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4384 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
4386 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4394 CASE (sem
, INSN_WRITE_LD
) : /* ld $dr,@$sr */
4396 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4397 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4398 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4399 #define OPRND(f) par_exec->operands.sfmt_ld.f
4400 int UNUSED written
= abuf
->written
;
4401 IADDR UNUSED pc
= abuf
->addr
;
4402 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4404 * FLD (i_dr
) = OPRND (dr
);
4411 CASE (sem
, INSN_PAR_LDB
) : /* ldb $dr,@$sr */
4413 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4414 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4415 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4416 #define OPRND(f) par_exec->operands.sfmt_ldb.f
4417 int UNUSED written
= 0;
4418 IADDR UNUSED pc
= abuf
->addr
;
4419 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4422 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, * FLD (i_sr
)));
4424 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4432 CASE (sem
, INSN_WRITE_LDB
) : /* ldb $dr,@$sr */
4434 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4435 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4436 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4437 #define OPRND(f) par_exec->operands.sfmt_ldb.f
4438 int UNUSED written
= abuf
->written
;
4439 IADDR UNUSED pc
= abuf
->addr
;
4440 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4442 * FLD (i_dr
) = OPRND (dr
);
4449 CASE (sem
, INSN_PAR_LDH
) : /* ldh $dr,@$sr */
4451 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4452 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4453 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4454 #define OPRND(f) par_exec->operands.sfmt_ldh.f
4455 int UNUSED written
= 0;
4456 IADDR UNUSED pc
= abuf
->addr
;
4457 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4460 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, * FLD (i_sr
)));
4462 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4470 CASE (sem
, INSN_WRITE_LDH
) : /* ldh $dr,@$sr */
4472 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4473 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4474 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4475 #define OPRND(f) par_exec->operands.sfmt_ldh.f
4476 int UNUSED written
= abuf
->written
;
4477 IADDR UNUSED pc
= abuf
->addr
;
4478 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4480 * FLD (i_dr
) = OPRND (dr
);
4487 CASE (sem
, INSN_PAR_LDUB
) : /* ldub $dr,@$sr */
4489 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4490 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4491 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4492 #define OPRND(f) par_exec->operands.sfmt_ldb.f
4493 int UNUSED written
= 0;
4494 IADDR UNUSED pc
= abuf
->addr
;
4495 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4498 SI opval
= ZEXTQISI (GETMEMQI (current_cpu
, pc
, * FLD (i_sr
)));
4500 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4508 CASE (sem
, INSN_WRITE_LDUB
) : /* ldub $dr,@$sr */
4510 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4511 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4512 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4513 #define OPRND(f) par_exec->operands.sfmt_ldb.f
4514 int UNUSED written
= abuf
->written
;
4515 IADDR UNUSED pc
= abuf
->addr
;
4516 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4518 * FLD (i_dr
) = OPRND (dr
);
4525 CASE (sem
, INSN_PAR_LDUH
) : /* lduh $dr,@$sr */
4527 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4528 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4529 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4530 #define OPRND(f) par_exec->operands.sfmt_ldh.f
4531 int UNUSED written
= 0;
4532 IADDR UNUSED pc
= abuf
->addr
;
4533 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4536 SI opval
= ZEXTHISI (GETMEMHI (current_cpu
, pc
, * FLD (i_sr
)));
4538 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4546 CASE (sem
, INSN_WRITE_LDUH
) : /* lduh $dr,@$sr */
4548 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4549 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4550 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4551 #define OPRND(f) par_exec->operands.sfmt_ldh.f
4552 int UNUSED written
= abuf
->written
;
4553 IADDR UNUSED pc
= abuf
->addr
;
4554 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4556 * FLD (i_dr
) = OPRND (dr
);
4563 CASE (sem
, INSN_PAR_LD_PLUS
) : /* ld $dr,@$sr+ */
4565 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4566 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4567 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4568 #define OPRND(f) par_exec->operands.sfmt_ld_plus.f
4569 int UNUSED written
= 0;
4570 IADDR UNUSED pc
= abuf
->addr
;
4571 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4575 temp0
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
4576 temp1
= ADDSI (* FLD (i_sr
), 4);
4580 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4585 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4594 CASE (sem
, INSN_WRITE_LD_PLUS
) : /* ld $dr,@$sr+ */
4596 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4597 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4598 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4599 #define OPRND(f) par_exec->operands.sfmt_ld_plus.f
4600 int UNUSED written
= abuf
->written
;
4601 IADDR UNUSED pc
= abuf
->addr
;
4602 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4604 * FLD (i_dr
) = OPRND (dr
);
4605 * FLD (i_sr
) = OPRND (sr
);
4612 CASE (sem
, INSN_PAR_LDI8
) : /* ldi8 $dr,$simm8 */
4614 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4615 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4616 #define FLD(f) abuf->fields.sfmt_addi.f
4617 #define OPRND(f) par_exec->operands.sfmt_ldi8.f
4618 int UNUSED written
= 0;
4619 IADDR UNUSED pc
= abuf
->addr
;
4620 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4623 SI opval
= FLD (f_simm8
);
4625 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4633 CASE (sem
, INSN_WRITE_LDI8
) : /* ldi8 $dr,$simm8 */
4635 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4636 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4637 #define FLD(f) abuf->fields.sfmt_addi.f
4638 #define OPRND(f) par_exec->operands.sfmt_ldi8.f
4639 int UNUSED written
= abuf
->written
;
4640 IADDR UNUSED pc
= abuf
->addr
;
4641 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4643 * FLD (i_dr
) = OPRND (dr
);
4650 CASE (sem
, INSN_PAR_LOCK
) : /* lock $dr,@$sr */
4652 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4653 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4654 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4655 #define OPRND(f) par_exec->operands.sfmt_lock.f
4656 int UNUSED written
= 0;
4657 IADDR UNUSED pc
= abuf
->addr
;
4658 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4663 OPRND (h_lock_BI
) = opval
;
4664 CGEN_TRACE_RESULT (current_cpu
, abuf
, "lock", 'x', opval
);
4667 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
4669 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4678 CASE (sem
, INSN_WRITE_LOCK
) : /* lock $dr,@$sr */
4680 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4681 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4682 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4683 #define OPRND(f) par_exec->operands.sfmt_lock.f
4684 int UNUSED written
= abuf
->written
;
4685 IADDR UNUSED pc
= abuf
->addr
;
4686 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4688 * FLD (i_dr
) = OPRND (dr
);
4689 CPU (h_lock
) = OPRND (h_lock_BI
);
4696 CASE (sem
, INSN_PAR_MACHI_A
) : /* machi $src1,$src2,$acc */
4698 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4699 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4700 #define FLD(f) abuf->fields.sfmt_machi_a.f
4701 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4702 int UNUSED written
= 0;
4703 IADDR UNUSED pc
= abuf
->addr
;
4704 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4707 DI opval
= SRADI (SLLDI (ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (ANDSI (* FLD (i_src1
), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16))))), 8), 8);
4708 OPRND (acc
) = opval
;
4709 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4717 CASE (sem
, INSN_WRITE_MACHI_A
) : /* machi $src1,$src2,$acc */
4719 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4720 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4721 #define FLD(f) abuf->fields.sfmt_machi_a.f
4722 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4723 int UNUSED written
= abuf
->written
;
4724 IADDR UNUSED pc
= abuf
->addr
;
4725 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4727 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4734 CASE (sem
, INSN_PAR_MACLO_A
) : /* maclo $src1,$src2,$acc */
4736 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4737 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4738 #define FLD(f) abuf->fields.sfmt_machi_a.f
4739 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4740 int UNUSED written
= 0;
4741 IADDR UNUSED pc
= abuf
->addr
;
4742 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4745 DI opval
= SRADI (SLLDI (ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (SLLSI (* FLD (i_src1
), 16)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
))))), 8), 8);
4746 OPRND (acc
) = opval
;
4747 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4755 CASE (sem
, INSN_WRITE_MACLO_A
) : /* maclo $src1,$src2,$acc */
4757 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4758 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4759 #define FLD(f) abuf->fields.sfmt_machi_a.f
4760 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4761 int UNUSED written
= abuf
->written
;
4762 IADDR UNUSED pc
= abuf
->addr
;
4763 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4765 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4772 CASE (sem
, INSN_PAR_MACWHI_A
) : /* macwhi $src1,$src2,$acc */
4774 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4775 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4776 #define FLD(f) abuf->fields.sfmt_machi_a.f
4777 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4778 int UNUSED written
= 0;
4779 IADDR UNUSED pc
= abuf
->addr
;
4780 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4783 DI opval
= ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16)))));
4784 OPRND (acc
) = opval
;
4785 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4793 CASE (sem
, INSN_WRITE_MACWHI_A
) : /* macwhi $src1,$src2,$acc */
4795 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4796 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4797 #define FLD(f) abuf->fields.sfmt_machi_a.f
4798 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4799 int UNUSED written
= abuf
->written
;
4800 IADDR UNUSED pc
= abuf
->addr
;
4801 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4803 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4810 CASE (sem
, INSN_PAR_MACWLO_A
) : /* macwlo $src1,$src2,$acc */
4812 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4813 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4814 #define FLD(f) abuf->fields.sfmt_machi_a.f
4815 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4816 int UNUSED written
= 0;
4817 IADDR UNUSED pc
= abuf
->addr
;
4818 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4821 DI opval
= ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))));
4822 OPRND (acc
) = opval
;
4823 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4831 CASE (sem
, INSN_WRITE_MACWLO_A
) : /* macwlo $src1,$src2,$acc */
4833 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4834 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4835 #define FLD(f) abuf->fields.sfmt_machi_a.f
4836 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4837 int UNUSED written
= abuf
->written
;
4838 IADDR UNUSED pc
= abuf
->addr
;
4839 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4841 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4848 CASE (sem
, INSN_PAR_MUL
) : /* mul $dr,$sr */
4850 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4851 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4852 #define FLD(f) abuf->fields.sfmt_add.f
4853 #define OPRND(f) par_exec->operands.sfmt_add.f
4854 int UNUSED written
= 0;
4855 IADDR UNUSED pc
= abuf
->addr
;
4856 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4859 SI opval
= MULSI (* FLD (i_dr
), * FLD (i_sr
));
4861 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4869 CASE (sem
, INSN_WRITE_MUL
) : /* mul $dr,$sr */
4871 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4872 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4873 #define FLD(f) abuf->fields.sfmt_add.f
4874 #define OPRND(f) par_exec->operands.sfmt_add.f
4875 int UNUSED written
= abuf
->written
;
4876 IADDR UNUSED pc
= abuf
->addr
;
4877 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4879 * FLD (i_dr
) = OPRND (dr
);
4886 CASE (sem
, INSN_PAR_MULHI_A
) : /* mulhi $src1,$src2,$acc */
4888 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4889 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4890 #define FLD(f) abuf->fields.sfmt_machi_a.f
4891 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4892 int UNUSED written
= 0;
4893 IADDR UNUSED pc
= abuf
->addr
;
4894 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4897 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (* FLD (i_src1
), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16)))), 16), 16);
4898 OPRND (acc
) = opval
;
4899 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4907 CASE (sem
, INSN_WRITE_MULHI_A
) : /* mulhi $src1,$src2,$acc */
4909 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4910 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4911 #define FLD(f) abuf->fields.sfmt_machi_a.f
4912 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4913 int UNUSED written
= abuf
->written
;
4914 IADDR UNUSED pc
= abuf
->addr
;
4915 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4917 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4924 CASE (sem
, INSN_PAR_MULLO_A
) : /* mullo $src1,$src2,$acc */
4926 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4927 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4928 #define FLD(f) abuf->fields.sfmt_machi_a.f
4929 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4930 int UNUSED written
= 0;
4931 IADDR UNUSED pc
= abuf
->addr
;
4932 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4935 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (* FLD (i_src1
), 16)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))), 16), 16);
4936 OPRND (acc
) = opval
;
4937 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4945 CASE (sem
, INSN_WRITE_MULLO_A
) : /* mullo $src1,$src2,$acc */
4947 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4948 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4949 #define FLD(f) abuf->fields.sfmt_machi_a.f
4950 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4951 int UNUSED written
= abuf
->written
;
4952 IADDR UNUSED pc
= abuf
->addr
;
4953 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4955 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4962 CASE (sem
, INSN_PAR_MULWHI_A
) : /* mulwhi $src1,$src2,$acc */
4964 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4965 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4966 #define FLD(f) abuf->fields.sfmt_machi_a.f
4967 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4968 int UNUSED written
= 0;
4969 IADDR UNUSED pc
= abuf
->addr
;
4970 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4973 DI opval
= MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16))));
4974 OPRND (acc
) = opval
;
4975 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4983 CASE (sem
, INSN_WRITE_MULWHI_A
) : /* mulwhi $src1,$src2,$acc */
4985 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4986 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4987 #define FLD(f) abuf->fields.sfmt_machi_a.f
4988 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4989 int UNUSED written
= abuf
->written
;
4990 IADDR UNUSED pc
= abuf
->addr
;
4991 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4993 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
5000 CASE (sem
, INSN_PAR_MULWLO_A
) : /* mulwlo $src1,$src2,$acc */
5002 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5003 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5004 #define FLD(f) abuf->fields.sfmt_machi_a.f
5005 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
5006 int UNUSED written
= 0;
5007 IADDR UNUSED pc
= abuf
->addr
;
5008 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5011 DI opval
= MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
))));
5012 OPRND (acc
) = opval
;
5013 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
5021 CASE (sem
, INSN_WRITE_MULWLO_A
) : /* mulwlo $src1,$src2,$acc */
5023 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5024 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5025 #define FLD(f) abuf->fields.sfmt_machi_a.f
5026 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
5027 int UNUSED written
= abuf
->written
;
5028 IADDR UNUSED pc
= abuf
->addr
;
5029 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5031 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
5038 CASE (sem
, INSN_PAR_MV
) : /* mv $dr,$sr */
5040 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5041 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5042 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5043 #define OPRND(f) par_exec->operands.sfmt_mv.f
5044 int UNUSED written
= 0;
5045 IADDR UNUSED pc
= abuf
->addr
;
5046 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5049 SI opval
= * FLD (i_sr
);
5051 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5059 CASE (sem
, INSN_WRITE_MV
) : /* mv $dr,$sr */
5061 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5062 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5063 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5064 #define OPRND(f) par_exec->operands.sfmt_mv.f
5065 int UNUSED written
= abuf
->written
;
5066 IADDR UNUSED pc
= abuf
->addr
;
5067 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5069 * FLD (i_dr
) = OPRND (dr
);
5076 CASE (sem
, INSN_PAR_MVFACHI_A
) : /* mvfachi $dr,$accs */
5078 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5079 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5080 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
5081 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
5082 int UNUSED written
= 0;
5083 IADDR UNUSED pc
= abuf
->addr
;
5084 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5087 SI opval
= TRUNCDISI (SRADI (GET_H_ACCUMS (FLD (f_accs
)), 32));
5089 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5097 CASE (sem
, INSN_WRITE_MVFACHI_A
) : /* mvfachi $dr,$accs */
5099 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5100 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5101 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
5102 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
5103 int UNUSED written
= abuf
->written
;
5104 IADDR UNUSED pc
= abuf
->addr
;
5105 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5107 * FLD (i_dr
) = OPRND (dr
);
5114 CASE (sem
, INSN_PAR_MVFACLO_A
) : /* mvfaclo $dr,$accs */
5116 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5117 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5118 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
5119 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
5120 int UNUSED written
= 0;
5121 IADDR UNUSED pc
= abuf
->addr
;
5122 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5125 SI opval
= TRUNCDISI (GET_H_ACCUMS (FLD (f_accs
)));
5127 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5135 CASE (sem
, INSN_WRITE_MVFACLO_A
) : /* mvfaclo $dr,$accs */
5137 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5138 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5139 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
5140 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
5141 int UNUSED written
= abuf
->written
;
5142 IADDR UNUSED pc
= abuf
->addr
;
5143 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5145 * FLD (i_dr
) = OPRND (dr
);
5152 CASE (sem
, INSN_PAR_MVFACMI_A
) : /* mvfacmi $dr,$accs */
5154 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5155 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5156 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
5157 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
5158 int UNUSED written
= 0;
5159 IADDR UNUSED pc
= abuf
->addr
;
5160 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5163 SI opval
= TRUNCDISI (SRADI (GET_H_ACCUMS (FLD (f_accs
)), 16));
5165 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5173 CASE (sem
, INSN_WRITE_MVFACMI_A
) : /* mvfacmi $dr,$accs */
5175 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5176 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5177 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
5178 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
5179 int UNUSED written
= abuf
->written
;
5180 IADDR UNUSED pc
= abuf
->addr
;
5181 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5183 * FLD (i_dr
) = OPRND (dr
);
5190 CASE (sem
, INSN_PAR_MVFC
) : /* mvfc $dr,$scr */
5192 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5193 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5194 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5195 #define OPRND(f) par_exec->operands.sfmt_mvfc.f
5196 int UNUSED written
= 0;
5197 IADDR UNUSED pc
= abuf
->addr
;
5198 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5201 SI opval
= GET_H_CR (FLD (f_r2
));
5203 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5211 CASE (sem
, INSN_WRITE_MVFC
) : /* mvfc $dr,$scr */
5213 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5214 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5215 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5216 #define OPRND(f) par_exec->operands.sfmt_mvfc.f
5217 int UNUSED written
= abuf
->written
;
5218 IADDR UNUSED pc
= abuf
->addr
;
5219 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5221 * FLD (i_dr
) = OPRND (dr
);
5228 CASE (sem
, INSN_PAR_MVTACHI_A
) : /* mvtachi $src1,$accs */
5230 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5231 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5232 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
5233 #define OPRND(f) par_exec->operands.sfmt_mvtachi_a.f
5234 int UNUSED written
= 0;
5235 IADDR UNUSED pc
= abuf
->addr
;
5236 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5239 DI opval
= ORDI (ANDDI (GET_H_ACCUMS (FLD (f_accs
)), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (* FLD (i_src1
)), 32));
5240 OPRND (accs
) = opval
;
5241 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
5249 CASE (sem
, INSN_WRITE_MVTACHI_A
) : /* mvtachi $src1,$accs */
5251 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5252 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5253 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
5254 #define OPRND(f) par_exec->operands.sfmt_mvtachi_a.f
5255 int UNUSED written
= abuf
->written
;
5256 IADDR UNUSED pc
= abuf
->addr
;
5257 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5259 SET_H_ACCUMS (FLD (f_accs
), OPRND (accs
));
5266 CASE (sem
, INSN_PAR_MVTACLO_A
) : /* mvtaclo $src1,$accs */
5268 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5269 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5270 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
5271 #define OPRND(f) par_exec->operands.sfmt_mvtachi_a.f
5272 int UNUSED written
= 0;
5273 IADDR UNUSED pc
= abuf
->addr
;
5274 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5277 DI opval
= ORDI (ANDDI (GET_H_ACCUMS (FLD (f_accs
)), MAKEDI (0xffffffff, 0)), ZEXTSIDI (* FLD (i_src1
)));
5278 OPRND (accs
) = opval
;
5279 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
5287 CASE (sem
, INSN_WRITE_MVTACLO_A
) : /* mvtaclo $src1,$accs */
5289 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5290 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5291 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
5292 #define OPRND(f) par_exec->operands.sfmt_mvtachi_a.f
5293 int UNUSED written
= abuf
->written
;
5294 IADDR UNUSED pc
= abuf
->addr
;
5295 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5297 SET_H_ACCUMS (FLD (f_accs
), OPRND (accs
));
5304 CASE (sem
, INSN_PAR_MVTC
) : /* mvtc $sr,$dcr */
5306 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5307 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5308 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5309 #define OPRND(f) par_exec->operands.sfmt_mvtc.f
5310 int UNUSED written
= 0;
5311 IADDR UNUSED pc
= abuf
->addr
;
5312 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5315 USI opval
= * FLD (i_sr
);
5316 OPRND (dcr
) = opval
;
5317 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
5325 CASE (sem
, INSN_WRITE_MVTC
) : /* mvtc $sr,$dcr */
5327 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5328 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5329 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5330 #define OPRND(f) par_exec->operands.sfmt_mvtc.f
5331 int UNUSED written
= abuf
->written
;
5332 IADDR UNUSED pc
= abuf
->addr
;
5333 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5335 SET_H_CR (FLD (f_r1
), OPRND (dcr
));
5342 CASE (sem
, INSN_PAR_NEG
) : /* neg $dr,$sr */
5344 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5345 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5346 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5347 #define OPRND(f) par_exec->operands.sfmt_mv.f
5348 int UNUSED written
= 0;
5349 IADDR UNUSED pc
= abuf
->addr
;
5350 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5353 SI opval
= NEGSI (* FLD (i_sr
));
5355 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5363 CASE (sem
, INSN_WRITE_NEG
) : /* neg $dr,$sr */
5365 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5366 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5367 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5368 #define OPRND(f) par_exec->operands.sfmt_mv.f
5369 int UNUSED written
= abuf
->written
;
5370 IADDR UNUSED pc
= abuf
->addr
;
5371 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5373 * FLD (i_dr
) = OPRND (dr
);
5380 CASE (sem
, INSN_PAR_NOP
) : /* nop */
5382 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5383 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5384 #define FLD(f) abuf->fields.sfmt_empty.f
5385 #define OPRND(f) par_exec->operands.sfmt_nop.f
5386 int UNUSED written
= 0;
5387 IADDR UNUSED pc
= abuf
->addr
;
5388 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5390 PROFILE_COUNT_FILLNOPS (current_cpu
, abuf
->addr
);
5397 CASE (sem
, INSN_WRITE_NOP
) : /* nop */
5399 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5400 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5401 #define FLD(f) abuf->fields.sfmt_empty.f
5402 #define OPRND(f) par_exec->operands.sfmt_nop.f
5403 int UNUSED written
= abuf
->written
;
5404 IADDR UNUSED pc
= abuf
->addr
;
5405 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5413 CASE (sem
, INSN_PAR_NOT
) : /* not $dr,$sr */
5415 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5416 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5417 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5418 #define OPRND(f) par_exec->operands.sfmt_mv.f
5419 int UNUSED written
= 0;
5420 IADDR UNUSED pc
= abuf
->addr
;
5421 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5424 SI opval
= INVSI (* FLD (i_sr
));
5426 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5434 CASE (sem
, INSN_WRITE_NOT
) : /* not $dr,$sr */
5436 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5437 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5438 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5439 #define OPRND(f) par_exec->operands.sfmt_mv.f
5440 int UNUSED written
= abuf
->written
;
5441 IADDR UNUSED pc
= abuf
->addr
;
5442 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5444 * FLD (i_dr
) = OPRND (dr
);
5451 CASE (sem
, INSN_PAR_RAC_DSI
) : /* rac $accd,$accs,$imm1 */
5453 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5454 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5455 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
5456 #define OPRND(f) par_exec->operands.sfmt_rac_dsi.f
5457 int UNUSED written
= 0;
5458 IADDR UNUSED pc
= abuf
->addr
;
5459 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5463 tmp_tmp1
= SLLDI (GET_H_ACCUMS (FLD (f_accs
)), FLD (f_imm1
));
5464 tmp_tmp1
= ADDDI (tmp_tmp1
, MAKEDI (0, 32768));
5466 DI opval
= (GTDI (tmp_tmp1
, MAKEDI (32767, 0xffff0000))) ? (MAKEDI (32767, 0xffff0000)) : (LTDI (tmp_tmp1
, MAKEDI (0xffff8000, 0))) ? (MAKEDI (0xffff8000, 0)) : (ANDDI (tmp_tmp1
, MAKEDI (0xffffffff, 0xffff0000)));
5467 OPRND (accd
) = opval
;
5468 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
5477 CASE (sem
, INSN_WRITE_RAC_DSI
) : /* rac $accd,$accs,$imm1 */
5479 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5480 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5481 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
5482 #define OPRND(f) par_exec->operands.sfmt_rac_dsi.f
5483 int UNUSED written
= abuf
->written
;
5484 IADDR UNUSED pc
= abuf
->addr
;
5485 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5487 SET_H_ACCUMS (FLD (f_accd
), OPRND (accd
));
5494 CASE (sem
, INSN_PAR_RACH_DSI
) : /* rach $accd,$accs,$imm1 */
5496 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5497 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5498 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
5499 #define OPRND(f) par_exec->operands.sfmt_rac_dsi.f
5500 int UNUSED written
= 0;
5501 IADDR UNUSED pc
= abuf
->addr
;
5502 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5506 tmp_tmp1
= SLLDI (GET_H_ACCUMS (FLD (f_accs
)), FLD (f_imm1
));
5507 tmp_tmp1
= ADDDI (tmp_tmp1
, MAKEDI (0, 0x80000000));
5509 DI opval
= (GTDI (tmp_tmp1
, MAKEDI (32767, 0))) ? (MAKEDI (32767, 0)) : (LTDI (tmp_tmp1
, MAKEDI (0xffff8000, 0))) ? (MAKEDI (0xffff8000, 0)) : (ANDDI (tmp_tmp1
, MAKEDI (0xffffffff, 0)));
5510 OPRND (accd
) = opval
;
5511 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
5520 CASE (sem
, INSN_WRITE_RACH_DSI
) : /* rach $accd,$accs,$imm1 */
5522 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5523 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5524 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
5525 #define OPRND(f) par_exec->operands.sfmt_rac_dsi.f
5526 int UNUSED written
= abuf
->written
;
5527 IADDR UNUSED pc
= abuf
->addr
;
5528 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5530 SET_H_ACCUMS (FLD (f_accd
), OPRND (accd
));
5537 CASE (sem
, INSN_PAR_RTE
) : /* rte */
5539 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5540 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5541 #define FLD(f) abuf->fields.sfmt_empty.f
5542 #define OPRND(f) par_exec->operands.sfmt_rte.f
5543 int UNUSED written
= 0;
5544 IADDR UNUSED pc
= abuf
->addr
;
5545 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5549 USI opval
= ANDSI (GET_H_CR (((UINT
) 6)), -4);
5551 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
5554 USI opval
= GET_H_CR (((UINT
) 14));
5555 OPRND (h_cr_USI_6
) = opval
;
5556 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
5559 UQI opval
= CPU (h_bpsw
);
5560 OPRND (h_psw_UQI
) = opval
;
5561 CGEN_TRACE_RESULT (current_cpu
, abuf
, "psw", 'x', opval
);
5564 UQI opval
= CPU (h_bbpsw
);
5565 OPRND (h_bpsw_UQI
) = opval
;
5566 CGEN_TRACE_RESULT (current_cpu
, abuf
, "bpsw", 'x', opval
);
5575 CASE (sem
, INSN_WRITE_RTE
) : /* rte */
5577 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5578 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5579 #define FLD(f) abuf->fields.sfmt_empty.f
5580 #define OPRND(f) par_exec->operands.sfmt_rte.f
5581 int UNUSED written
= abuf
->written
;
5582 IADDR UNUSED pc
= abuf
->addr
;
5584 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5586 CPU (h_bpsw
) = OPRND (h_bpsw_UQI
);
5587 SET_H_CR (((UINT
) 6), OPRND (h_cr_USI_6
));
5588 SET_H_PSW (OPRND (h_psw_UQI
));
5589 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
5591 SEM_BRANCH_FINI (vpc
);
5597 CASE (sem
, INSN_PAR_SLL
) : /* sll $dr,$sr */
5599 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5600 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5601 #define FLD(f) abuf->fields.sfmt_add.f
5602 #define OPRND(f) par_exec->operands.sfmt_add.f
5603 int UNUSED written
= 0;
5604 IADDR UNUSED pc
= abuf
->addr
;
5605 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5608 SI opval
= SLLSI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
5610 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5618 CASE (sem
, INSN_WRITE_SLL
) : /* sll $dr,$sr */
5620 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5621 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5622 #define FLD(f) abuf->fields.sfmt_add.f
5623 #define OPRND(f) par_exec->operands.sfmt_add.f
5624 int UNUSED written
= abuf
->written
;
5625 IADDR UNUSED pc
= abuf
->addr
;
5626 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5628 * FLD (i_dr
) = OPRND (dr
);
5635 CASE (sem
, INSN_PAR_SLLI
) : /* slli $dr,$uimm5 */
5637 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5638 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5639 #define FLD(f) abuf->fields.sfmt_slli.f
5640 #define OPRND(f) par_exec->operands.sfmt_slli.f
5641 int UNUSED written
= 0;
5642 IADDR UNUSED pc
= abuf
->addr
;
5643 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5646 SI opval
= SLLSI (* FLD (i_dr
), FLD (f_uimm5
));
5648 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5656 CASE (sem
, INSN_WRITE_SLLI
) : /* slli $dr,$uimm5 */
5658 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5659 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5660 #define FLD(f) abuf->fields.sfmt_slli.f
5661 #define OPRND(f) par_exec->operands.sfmt_slli.f
5662 int UNUSED written
= abuf
->written
;
5663 IADDR UNUSED pc
= abuf
->addr
;
5664 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5666 * FLD (i_dr
) = OPRND (dr
);
5673 CASE (sem
, INSN_PAR_SRA
) : /* sra $dr,$sr */
5675 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5676 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5677 #define FLD(f) abuf->fields.sfmt_add.f
5678 #define OPRND(f) par_exec->operands.sfmt_add.f
5679 int UNUSED written
= 0;
5680 IADDR UNUSED pc
= abuf
->addr
;
5681 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5684 SI opval
= SRASI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
5686 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5694 CASE (sem
, INSN_WRITE_SRA
) : /* sra $dr,$sr */
5696 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5697 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5698 #define FLD(f) abuf->fields.sfmt_add.f
5699 #define OPRND(f) par_exec->operands.sfmt_add.f
5700 int UNUSED written
= abuf
->written
;
5701 IADDR UNUSED pc
= abuf
->addr
;
5702 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5704 * FLD (i_dr
) = OPRND (dr
);
5711 CASE (sem
, INSN_PAR_SRAI
) : /* srai $dr,$uimm5 */
5713 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5714 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5715 #define FLD(f) abuf->fields.sfmt_slli.f
5716 #define OPRND(f) par_exec->operands.sfmt_slli.f
5717 int UNUSED written
= 0;
5718 IADDR UNUSED pc
= abuf
->addr
;
5719 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5722 SI opval
= SRASI (* FLD (i_dr
), FLD (f_uimm5
));
5724 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5732 CASE (sem
, INSN_WRITE_SRAI
) : /* srai $dr,$uimm5 */
5734 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5735 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5736 #define FLD(f) abuf->fields.sfmt_slli.f
5737 #define OPRND(f) par_exec->operands.sfmt_slli.f
5738 int UNUSED written
= abuf
->written
;
5739 IADDR UNUSED pc
= abuf
->addr
;
5740 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5742 * FLD (i_dr
) = OPRND (dr
);
5749 CASE (sem
, INSN_PAR_SRL
) : /* srl $dr,$sr */
5751 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5752 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5753 #define FLD(f) abuf->fields.sfmt_add.f
5754 #define OPRND(f) par_exec->operands.sfmt_add.f
5755 int UNUSED written
= 0;
5756 IADDR UNUSED pc
= abuf
->addr
;
5757 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5760 SI opval
= SRLSI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
5762 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5770 CASE (sem
, INSN_WRITE_SRL
) : /* srl $dr,$sr */
5772 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5773 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5774 #define FLD(f) abuf->fields.sfmt_add.f
5775 #define OPRND(f) par_exec->operands.sfmt_add.f
5776 int UNUSED written
= abuf
->written
;
5777 IADDR UNUSED pc
= abuf
->addr
;
5778 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5780 * FLD (i_dr
) = OPRND (dr
);
5787 CASE (sem
, INSN_PAR_SRLI
) : /* srli $dr,$uimm5 */
5789 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5790 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5791 #define FLD(f) abuf->fields.sfmt_slli.f
5792 #define OPRND(f) par_exec->operands.sfmt_slli.f
5793 int UNUSED written
= 0;
5794 IADDR UNUSED pc
= abuf
->addr
;
5795 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5798 SI opval
= SRLSI (* FLD (i_dr
), FLD (f_uimm5
));
5800 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5808 CASE (sem
, INSN_WRITE_SRLI
) : /* srli $dr,$uimm5 */
5810 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5811 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5812 #define FLD(f) abuf->fields.sfmt_slli.f
5813 #define OPRND(f) par_exec->operands.sfmt_slli.f
5814 int UNUSED written
= abuf
->written
;
5815 IADDR UNUSED pc
= abuf
->addr
;
5816 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5818 * FLD (i_dr
) = OPRND (dr
);
5825 CASE (sem
, INSN_PAR_ST
) : /* st $src1,@$src2 */
5827 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5828 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5829 #define FLD(f) abuf->fields.sfmt_st_plus.f
5830 #define OPRND(f) par_exec->operands.sfmt_st.f
5831 int UNUSED written
= 0;
5832 IADDR UNUSED pc
= abuf
->addr
;
5833 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5836 SI opval
= * FLD (i_src1
);
5837 OPRND (h_memory_SI_src2_idx
) = * FLD (i_src2
);
5838 OPRND (h_memory_SI_src2
) = opval
;
5839 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5847 CASE (sem
, INSN_WRITE_ST
) : /* st $src1,@$src2 */
5849 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5850 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5851 #define FLD(f) abuf->fields.sfmt_st_plus.f
5852 #define OPRND(f) par_exec->operands.sfmt_st.f
5853 int UNUSED written
= abuf
->written
;
5854 IADDR UNUSED pc
= abuf
->addr
;
5855 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5857 SETMEMSI (current_cpu
, pc
, OPRND (h_memory_SI_src2_idx
), OPRND (h_memory_SI_src2
));
5864 CASE (sem
, INSN_PAR_STB
) : /* stb $src1,@$src2 */
5866 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5867 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5868 #define FLD(f) abuf->fields.sfmt_st_plus.f
5869 #define OPRND(f) par_exec->operands.sfmt_stb.f
5870 int UNUSED written
= 0;
5871 IADDR UNUSED pc
= abuf
->addr
;
5872 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5875 QI opval
= * FLD (i_src1
);
5876 OPRND (h_memory_QI_src2_idx
) = * FLD (i_src2
);
5877 OPRND (h_memory_QI_src2
) = opval
;
5878 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5886 CASE (sem
, INSN_WRITE_STB
) : /* stb $src1,@$src2 */
5888 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5889 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5890 #define FLD(f) abuf->fields.sfmt_st_plus.f
5891 #define OPRND(f) par_exec->operands.sfmt_stb.f
5892 int UNUSED written
= abuf
->written
;
5893 IADDR UNUSED pc
= abuf
->addr
;
5894 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5896 SETMEMQI (current_cpu
, pc
, OPRND (h_memory_QI_src2_idx
), OPRND (h_memory_QI_src2
));
5903 CASE (sem
, INSN_PAR_STH
) : /* sth $src1,@$src2 */
5905 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5906 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5907 #define FLD(f) abuf->fields.sfmt_st_plus.f
5908 #define OPRND(f) par_exec->operands.sfmt_sth.f
5909 int UNUSED written
= 0;
5910 IADDR UNUSED pc
= abuf
->addr
;
5911 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5914 HI opval
= * FLD (i_src1
);
5915 OPRND (h_memory_HI_src2_idx
) = * FLD (i_src2
);
5916 OPRND (h_memory_HI_src2
) = opval
;
5917 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5925 CASE (sem
, INSN_WRITE_STH
) : /* sth $src1,@$src2 */
5927 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5928 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5929 #define FLD(f) abuf->fields.sfmt_st_plus.f
5930 #define OPRND(f) par_exec->operands.sfmt_sth.f
5931 int UNUSED written
= abuf
->written
;
5932 IADDR UNUSED pc
= abuf
->addr
;
5933 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5935 SETMEMHI (current_cpu
, pc
, OPRND (h_memory_HI_src2_idx
), OPRND (h_memory_HI_src2
));
5942 CASE (sem
, INSN_PAR_ST_PLUS
) : /* st $src1,@+$src2 */
5944 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5945 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5946 #define FLD(f) abuf->fields.sfmt_st_plus.f
5947 #define OPRND(f) par_exec->operands.sfmt_st_plus.f
5948 int UNUSED written
= 0;
5949 IADDR UNUSED pc
= abuf
->addr
;
5950 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5954 tmp_new_src2
= ADDSI (* FLD (i_src2
), 4);
5956 SI opval
= * FLD (i_src1
);
5957 OPRND (h_memory_SI_new_src2_idx
) = tmp_new_src2
;
5958 OPRND (h_memory_SI_new_src2
) = opval
;
5959 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5962 SI opval
= tmp_new_src2
;
5963 OPRND (src2
) = opval
;
5964 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5973 CASE (sem
, INSN_WRITE_ST_PLUS
) : /* st $src1,@+$src2 */
5975 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5976 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5977 #define FLD(f) abuf->fields.sfmt_st_plus.f
5978 #define OPRND(f) par_exec->operands.sfmt_st_plus.f
5979 int UNUSED written
= abuf
->written
;
5980 IADDR UNUSED pc
= abuf
->addr
;
5981 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5983 SETMEMSI (current_cpu
, pc
, OPRND (h_memory_SI_new_src2_idx
), OPRND (h_memory_SI_new_src2
));
5984 * FLD (i_src2
) = OPRND (src2
);
5991 CASE (sem
, INSN_PAR_STH_PLUS
) : /* sth $src1,@$src2+ */
5993 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5994 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5995 #define FLD(f) abuf->fields.sfmt_st_plus.f
5996 #define OPRND(f) par_exec->operands.sfmt_sth_plus.f
5997 int UNUSED written
= 0;
5998 IADDR UNUSED pc
= abuf
->addr
;
5999 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6003 tmp_new_src2
= * FLD (i_src2
);
6005 HI opval
= * FLD (i_src1
);
6006 OPRND (h_memory_HI_new_src2_idx
) = tmp_new_src2
;
6007 OPRND (h_memory_HI_new_src2
) = opval
;
6008 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
6011 SI opval
= ADDSI (tmp_new_src2
, 2);
6012 OPRND (src2
) = opval
;
6013 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6022 CASE (sem
, INSN_WRITE_STH_PLUS
) : /* sth $src1,@$src2+ */
6024 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6025 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6026 #define FLD(f) abuf->fields.sfmt_st_plus.f
6027 #define OPRND(f) par_exec->operands.sfmt_sth_plus.f
6028 int UNUSED written
= abuf
->written
;
6029 IADDR UNUSED pc
= abuf
->addr
;
6030 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6032 SETMEMHI (current_cpu
, pc
, OPRND (h_memory_HI_new_src2_idx
), OPRND (h_memory_HI_new_src2
));
6033 * FLD (i_src2
) = OPRND (src2
);
6040 CASE (sem
, INSN_PAR_STB_PLUS
) : /* stb $src1,@$src2+ */
6042 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6043 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6044 #define FLD(f) abuf->fields.sfmt_st_plus.f
6045 #define OPRND(f) par_exec->operands.sfmt_stb_plus.f
6046 int UNUSED written
= 0;
6047 IADDR UNUSED pc
= abuf
->addr
;
6048 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6052 tmp_new_src2
= * FLD (i_src2
);
6054 QI opval
= * FLD (i_src1
);
6055 OPRND (h_memory_QI_new_src2_idx
) = tmp_new_src2
;
6056 OPRND (h_memory_QI_new_src2
) = opval
;
6057 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
6060 SI opval
= ADDSI (tmp_new_src2
, 1);
6061 OPRND (src2
) = opval
;
6062 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6071 CASE (sem
, INSN_WRITE_STB_PLUS
) : /* stb $src1,@$src2+ */
6073 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6074 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6075 #define FLD(f) abuf->fields.sfmt_st_plus.f
6076 #define OPRND(f) par_exec->operands.sfmt_stb_plus.f
6077 int UNUSED written
= abuf
->written
;
6078 IADDR UNUSED pc
= abuf
->addr
;
6079 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6081 SETMEMQI (current_cpu
, pc
, OPRND (h_memory_QI_new_src2_idx
), OPRND (h_memory_QI_new_src2
));
6082 * FLD (i_src2
) = OPRND (src2
);
6089 CASE (sem
, INSN_PAR_ST_MINUS
) : /* st $src1,@-$src2 */
6091 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6092 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6093 #define FLD(f) abuf->fields.sfmt_st_plus.f
6094 #define OPRND(f) par_exec->operands.sfmt_st_plus.f
6095 int UNUSED written
= 0;
6096 IADDR UNUSED pc
= abuf
->addr
;
6097 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6101 tmp_new_src2
= SUBSI (* FLD (i_src2
), 4);
6103 SI opval
= * FLD (i_src1
);
6104 OPRND (h_memory_SI_new_src2_idx
) = tmp_new_src2
;
6105 OPRND (h_memory_SI_new_src2
) = opval
;
6106 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
6109 SI opval
= tmp_new_src2
;
6110 OPRND (src2
) = opval
;
6111 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6120 CASE (sem
, INSN_WRITE_ST_MINUS
) : /* st $src1,@-$src2 */
6122 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6123 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6124 #define FLD(f) abuf->fields.sfmt_st_plus.f
6125 #define OPRND(f) par_exec->operands.sfmt_st_plus.f
6126 int UNUSED written
= abuf
->written
;
6127 IADDR UNUSED pc
= abuf
->addr
;
6128 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6130 SETMEMSI (current_cpu
, pc
, OPRND (h_memory_SI_new_src2_idx
), OPRND (h_memory_SI_new_src2
));
6131 * FLD (i_src2
) = OPRND (src2
);
6138 CASE (sem
, INSN_PAR_SUB
) : /* sub $dr,$sr */
6140 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6141 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6142 #define FLD(f) abuf->fields.sfmt_add.f
6143 #define OPRND(f) par_exec->operands.sfmt_add.f
6144 int UNUSED written
= 0;
6145 IADDR UNUSED pc
= abuf
->addr
;
6146 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6149 SI opval
= SUBSI (* FLD (i_dr
), * FLD (i_sr
));
6151 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6159 CASE (sem
, INSN_WRITE_SUB
) : /* sub $dr,$sr */
6161 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6162 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6163 #define FLD(f) abuf->fields.sfmt_add.f
6164 #define OPRND(f) par_exec->operands.sfmt_add.f
6165 int UNUSED written
= abuf
->written
;
6166 IADDR UNUSED pc
= abuf
->addr
;
6167 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6169 * FLD (i_dr
) = OPRND (dr
);
6176 CASE (sem
, INSN_PAR_SUBV
) : /* subv $dr,$sr */
6178 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6179 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6180 #define FLD(f) abuf->fields.sfmt_add.f
6181 #define OPRND(f) par_exec->operands.sfmt_addv.f
6182 int UNUSED written
= 0;
6183 IADDR UNUSED pc
= abuf
->addr
;
6184 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6188 temp0
= SUBSI (* FLD (i_dr
), * FLD (i_sr
));
6189 temp1
= SUBOFSI (* FLD (i_dr
), * FLD (i_sr
), 0);
6193 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6197 OPRND (condbit
) = opval
;
6198 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
6207 CASE (sem
, INSN_WRITE_SUBV
) : /* subv $dr,$sr */
6209 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6210 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6211 #define FLD(f) abuf->fields.sfmt_add.f
6212 #define OPRND(f) par_exec->operands.sfmt_addv.f
6213 int UNUSED written
= abuf
->written
;
6214 IADDR UNUSED pc
= abuf
->addr
;
6215 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6217 CPU (h_cond
) = OPRND (condbit
);
6218 * FLD (i_dr
) = OPRND (dr
);
6225 CASE (sem
, INSN_PAR_SUBX
) : /* subx $dr,$sr */
6227 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6228 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6229 #define FLD(f) abuf->fields.sfmt_add.f
6230 #define OPRND(f) par_exec->operands.sfmt_addx.f
6231 int UNUSED written
= 0;
6232 IADDR UNUSED pc
= abuf
->addr
;
6233 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6237 temp0
= SUBCSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
6238 temp1
= SUBCFSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
6242 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6246 OPRND (condbit
) = opval
;
6247 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
6256 CASE (sem
, INSN_WRITE_SUBX
) : /* subx $dr,$sr */
6258 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6259 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6260 #define FLD(f) abuf->fields.sfmt_add.f
6261 #define OPRND(f) par_exec->operands.sfmt_addx.f
6262 int UNUSED written
= abuf
->written
;
6263 IADDR UNUSED pc
= abuf
->addr
;
6264 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6266 CPU (h_cond
) = OPRND (condbit
);
6267 * FLD (i_dr
) = OPRND (dr
);
6274 CASE (sem
, INSN_PAR_TRAP
) : /* trap $uimm4 */
6276 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6277 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6278 #define FLD(f) abuf->fields.sfmt_trap.f
6279 #define OPRND(f) par_exec->operands.sfmt_trap.f
6280 int UNUSED written
= 0;
6281 IADDR UNUSED pc
= abuf
->addr
;
6282 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6286 USI opval
= GET_H_CR (((UINT
) 6));
6287 OPRND (h_cr_USI_14
) = opval
;
6288 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
6291 USI opval
= ADDSI (pc
, 4);
6292 OPRND (h_cr_USI_6
) = opval
;
6293 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
6296 UQI opval
= CPU (h_bpsw
);
6297 OPRND (h_bbpsw_UQI
) = opval
;
6298 CGEN_TRACE_RESULT (current_cpu
, abuf
, "bbpsw", 'x', opval
);
6301 UQI opval
= GET_H_PSW ();
6302 OPRND (h_bpsw_UQI
) = opval
;
6303 CGEN_TRACE_RESULT (current_cpu
, abuf
, "bpsw", 'x', opval
);
6306 UQI opval
= ANDQI (GET_H_PSW (), 128);
6307 OPRND (h_psw_UQI
) = opval
;
6308 CGEN_TRACE_RESULT (current_cpu
, abuf
, "psw", 'x', opval
);
6311 SI opval
= m32r_trap (current_cpu
, pc
, FLD (f_uimm4
));
6313 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
6322 CASE (sem
, INSN_WRITE_TRAP
) : /* trap $uimm4 */
6324 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6325 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6326 #define FLD(f) abuf->fields.sfmt_trap.f
6327 #define OPRND(f) par_exec->operands.sfmt_trap.f
6328 int UNUSED written
= abuf
->written
;
6329 IADDR UNUSED pc
= abuf
->addr
;
6331 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6333 CPU (h_bbpsw
) = OPRND (h_bbpsw_UQI
);
6334 CPU (h_bpsw
) = OPRND (h_bpsw_UQI
);
6335 SET_H_CR (((UINT
) 14), OPRND (h_cr_USI_14
));
6336 SET_H_CR (((UINT
) 6), OPRND (h_cr_USI_6
));
6337 SET_H_PSW (OPRND (h_psw_UQI
));
6338 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
6340 SEM_BRANCH_FINI (vpc
);
6346 CASE (sem
, INSN_PAR_UNLOCK
) : /* unlock $src1,@$src2 */
6348 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6349 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6350 #define FLD(f) abuf->fields.sfmt_st_plus.f
6351 #define OPRND(f) par_exec->operands.sfmt_unlock.f
6352 int UNUSED written
= 0;
6353 IADDR UNUSED pc
= abuf
->addr
;
6354 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6359 SI opval
= * FLD (i_src1
);
6360 OPRND (h_memory_SI_src2_idx
) = * FLD (i_src2
);
6361 OPRND (h_memory_SI_src2
) = opval
;
6362 written
|= (1 << 4);
6363 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
6368 OPRND (h_lock_BI
) = opval
;
6369 CGEN_TRACE_RESULT (current_cpu
, abuf
, "lock", 'x', opval
);
6373 abuf
->written
= written
;
6379 CASE (sem
, INSN_WRITE_UNLOCK
) : /* unlock $src1,@$src2 */
6381 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6382 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6383 #define FLD(f) abuf->fields.sfmt_st_plus.f
6384 #define OPRND(f) par_exec->operands.sfmt_unlock.f
6385 int UNUSED written
= abuf
->written
;
6386 IADDR UNUSED pc
= abuf
->addr
;
6387 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6389 CPU (h_lock
) = OPRND (h_lock_BI
);
6390 if (written
& (1 << 4))
6392 SETMEMSI (current_cpu
, pc
, OPRND (h_memory_SI_src2_idx
), OPRND (h_memory_SI_src2
));
6400 CASE (sem
, INSN_PAR_PCMPBZ
) : /* pcmpbz $src2 */
6402 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6403 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6404 #define FLD(f) abuf->fields.sfmt_st_plus.f
6405 #define OPRND(f) par_exec->operands.sfmt_cmpz.f
6406 int UNUSED written
= 0;
6407 IADDR UNUSED pc
= abuf
->addr
;
6408 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6411 BI opval
= (EQSI (ANDSI (* FLD (i_src2
), 255), 0)) ? (1) : (EQSI (ANDSI (* FLD (i_src2
), 65280), 0)) ? (1) : (EQSI (ANDSI (* FLD (i_src2
), 16711680), 0)) ? (1) : (EQSI (ANDSI (* FLD (i_src2
), 0xff000000), 0)) ? (1) : (0);
6412 OPRND (condbit
) = opval
;
6413 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
6421 CASE (sem
, INSN_WRITE_PCMPBZ
) : /* pcmpbz $src2 */
6423 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6424 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6425 #define FLD(f) abuf->fields.sfmt_st_plus.f
6426 #define OPRND(f) par_exec->operands.sfmt_cmpz.f
6427 int UNUSED written
= abuf
->written
;
6428 IADDR UNUSED pc
= abuf
->addr
;
6429 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6431 CPU (h_cond
) = OPRND (condbit
);
6438 CASE (sem
, INSN_PAR_SADD
) : /* sadd */
6440 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6441 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6442 #define FLD(f) abuf->fields.sfmt_empty.f
6443 #define OPRND(f) par_exec->operands.sfmt_sadd.f
6444 int UNUSED written
= 0;
6445 IADDR UNUSED pc
= abuf
->addr
;
6446 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6449 DI opval
= ADDDI (SRADI (GET_H_ACCUMS (((UINT
) 1)), 16), GET_H_ACCUMS (((UINT
) 0)));
6450 OPRND (h_accums_DI_0
) = opval
;
6451 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
6459 CASE (sem
, INSN_WRITE_SADD
) : /* sadd */
6461 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6462 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6463 #define FLD(f) abuf->fields.sfmt_empty.f
6464 #define OPRND(f) par_exec->operands.sfmt_sadd.f
6465 int UNUSED written
= abuf
->written
;
6466 IADDR UNUSED pc
= abuf
->addr
;
6467 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6469 SET_H_ACCUMS (((UINT
) 0), OPRND (h_accums_DI_0
));
6476 CASE (sem
, INSN_PAR_MACWU1
) : /* macwu1 $src1,$src2 */
6478 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6479 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6480 #define FLD(f) abuf->fields.sfmt_st_plus.f
6481 #define OPRND(f) par_exec->operands.sfmt_macwu1.f
6482 int UNUSED written
= 0;
6483 IADDR UNUSED pc
= abuf
->addr
;
6484 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6487 DI opval
= SRADI (SLLDI (ADDDI (GET_H_ACCUMS (((UINT
) 1)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTSIDI (ANDSI (* FLD (i_src2
), 65535)))), 8), 8);
6488 OPRND (h_accums_DI_1
) = opval
;
6489 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
6497 CASE (sem
, INSN_WRITE_MACWU1
) : /* macwu1 $src1,$src2 */
6499 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6500 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6501 #define FLD(f) abuf->fields.sfmt_st_plus.f
6502 #define OPRND(f) par_exec->operands.sfmt_macwu1.f
6503 int UNUSED written
= abuf
->written
;
6504 IADDR UNUSED pc
= abuf
->addr
;
6505 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6507 SET_H_ACCUMS (((UINT
) 1), OPRND (h_accums_DI_1
));
6514 CASE (sem
, INSN_PAR_MSBLO
) : /* msblo $src1,$src2 */
6516 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6517 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6518 #define FLD(f) abuf->fields.sfmt_st_plus.f
6519 #define OPRND(f) par_exec->operands.sfmt_msblo.f
6520 int UNUSED written
= 0;
6521 IADDR UNUSED pc
= abuf
->addr
;
6522 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6525 DI opval
= SRADI (SLLDI (SUBDI (GET_H_ACCUM (), SRADI (SLLDI (MULDI (EXTHIDI (TRUNCSIHI (* FLD (i_src1
))), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))), 32), 16)), 8), 8);
6526 OPRND (accum
) = opval
;
6527 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accum", 'D', opval
);
6535 CASE (sem
, INSN_WRITE_MSBLO
) : /* msblo $src1,$src2 */
6537 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6538 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6539 #define FLD(f) abuf->fields.sfmt_st_plus.f
6540 #define OPRND(f) par_exec->operands.sfmt_msblo.f
6541 int UNUSED written
= abuf
->written
;
6542 IADDR UNUSED pc
= abuf
->addr
;
6543 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6545 SET_H_ACCUM (OPRND (accum
));
6552 CASE (sem
, INSN_PAR_MULWU1
) : /* mulwu1 $src1,$src2 */
6554 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6555 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6556 #define FLD(f) abuf->fields.sfmt_st_plus.f
6557 #define OPRND(f) par_exec->operands.sfmt_mulwu1.f
6558 int UNUSED written
= 0;
6559 IADDR UNUSED pc
= abuf
->addr
;
6560 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6563 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (* FLD (i_src1
)), EXTSIDI (ANDSI (* FLD (i_src2
), 65535))), 16), 16);
6564 OPRND (h_accums_DI_1
) = opval
;
6565 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
6573 CASE (sem
, INSN_WRITE_MULWU1
) : /* mulwu1 $src1,$src2 */
6575 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6576 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6577 #define FLD(f) abuf->fields.sfmt_st_plus.f
6578 #define OPRND(f) par_exec->operands.sfmt_mulwu1.f
6579 int UNUSED written
= abuf
->written
;
6580 IADDR UNUSED pc
= abuf
->addr
;
6581 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6583 SET_H_ACCUMS (((UINT
) 1), OPRND (h_accums_DI_1
));
6590 CASE (sem
, INSN_PAR_MACLH1
) : /* maclh1 $src1,$src2 */
6592 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6593 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6594 #define FLD(f) abuf->fields.sfmt_st_plus.f
6595 #define OPRND(f) par_exec->operands.sfmt_macwu1.f
6596 int UNUSED written
= 0;
6597 IADDR UNUSED pc
= abuf
->addr
;
6598 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6601 DI opval
= SRADI (SLLDI (ADDDI (GET_H_ACCUMS (((UINT
) 1)), SLLDI (EXTSIDI (MULSI (EXTHISI (TRUNCSIHI (* FLD (i_src1
))), SRASI (* FLD (i_src2
), 16))), 16)), 8), 8);
6602 OPRND (h_accums_DI_1
) = opval
;
6603 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
6611 CASE (sem
, INSN_WRITE_MACLH1
) : /* maclh1 $src1,$src2 */
6613 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6614 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6615 #define FLD(f) abuf->fields.sfmt_st_plus.f
6616 #define OPRND(f) par_exec->operands.sfmt_macwu1.f
6617 int UNUSED written
= abuf
->written
;
6618 IADDR UNUSED pc
= abuf
->addr
;
6619 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6621 SET_H_ACCUMS (((UINT
) 1), OPRND (h_accums_DI_1
));
6628 CASE (sem
, INSN_PAR_SC
) : /* sc */
6630 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6631 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6632 #define FLD(f) abuf->fields.sfmt_empty.f
6633 #define OPRND(f) par_exec->operands.sfmt_sc.f
6634 int UNUSED written
= 0;
6635 IADDR UNUSED pc
= abuf
->addr
;
6636 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6638 if (ZEXTBISI (CPU (h_cond
)))
6639 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
6646 CASE (sem
, INSN_WRITE_SC
) : /* sc */
6648 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6649 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6650 #define FLD(f) abuf->fields.sfmt_empty.f
6651 #define OPRND(f) par_exec->operands.sfmt_sc.f
6652 int UNUSED written
= abuf
->written
;
6653 IADDR UNUSED pc
= abuf
->addr
;
6654 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6662 CASE (sem
, INSN_PAR_SNC
) : /* snc */
6664 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6665 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6666 #define FLD(f) abuf->fields.sfmt_empty.f
6667 #define OPRND(f) par_exec->operands.sfmt_sc.f
6668 int UNUSED written
= 0;
6669 IADDR UNUSED pc
= abuf
->addr
;
6670 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6672 if (ZEXTBISI (NOTBI (CPU (h_cond
))))
6673 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
6680 CASE (sem
, INSN_WRITE_SNC
) : /* snc */
6682 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6683 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6684 #define FLD(f) abuf->fields.sfmt_empty.f
6685 #define OPRND(f) par_exec->operands.sfmt_sc.f
6686 int UNUSED written
= abuf
->written
;
6687 IADDR UNUSED pc
= abuf
->addr
;
6688 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6696 CASE (sem
, INSN_PAR_CLRPSW
) : /* clrpsw $uimm8 */
6698 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6699 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6700 #define FLD(f) abuf->fields.sfmt_clrpsw.f
6701 #define OPRND(f) par_exec->operands.sfmt_clrpsw.f
6702 int UNUSED written
= 0;
6703 IADDR UNUSED pc
= abuf
->addr
;
6704 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6707 USI opval
= ANDSI (GET_H_CR (((UINT
) 0)), ORSI (ZEXTQISI (INVQI (FLD (f_uimm8
))), 65280));
6708 OPRND (h_cr_USI_0
) = opval
;
6709 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
6717 CASE (sem
, INSN_WRITE_CLRPSW
) : /* clrpsw $uimm8 */
6719 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6720 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6721 #define FLD(f) abuf->fields.sfmt_clrpsw.f
6722 #define OPRND(f) par_exec->operands.sfmt_clrpsw.f
6723 int UNUSED written
= abuf
->written
;
6724 IADDR UNUSED pc
= abuf
->addr
;
6725 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6727 SET_H_CR (((UINT
) 0), OPRND (h_cr_USI_0
));
6734 CASE (sem
, INSN_PAR_SETPSW
) : /* setpsw $uimm8 */
6736 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6737 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6738 #define FLD(f) abuf->fields.sfmt_clrpsw.f
6739 #define OPRND(f) par_exec->operands.sfmt_setpsw.f
6740 int UNUSED written
= 0;
6741 IADDR UNUSED pc
= abuf
->addr
;
6742 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6745 USI opval
= FLD (f_uimm8
);
6746 OPRND (h_cr_USI_0
) = opval
;
6747 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
6755 CASE (sem
, INSN_WRITE_SETPSW
) : /* setpsw $uimm8 */
6757 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6758 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6759 #define FLD(f) abuf->fields.sfmt_clrpsw.f
6760 #define OPRND(f) par_exec->operands.sfmt_setpsw.f
6761 int UNUSED written
= abuf
->written
;
6762 IADDR UNUSED pc
= abuf
->addr
;
6763 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6765 SET_H_CR (((UINT
) 0), OPRND (h_cr_USI_0
));
6772 CASE (sem
, INSN_PAR_BTST
) : /* btst $uimm3,$sr */
6774 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6775 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6776 #define FLD(f) abuf->fields.sfmt_bset.f
6777 #define OPRND(f) par_exec->operands.sfmt_btst.f
6778 int UNUSED written
= 0;
6779 IADDR UNUSED pc
= abuf
->addr
;
6780 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6783 BI opval
= ANDQI (SRLQI (* FLD (i_sr
), SUBSI (7, FLD (f_uimm3
))), 1);
6784 OPRND (condbit
) = opval
;
6785 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
6793 CASE (sem
, INSN_WRITE_BTST
) : /* btst $uimm3,$sr */
6795 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6796 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6797 #define FLD(f) abuf->fields.sfmt_bset.f
6798 #define OPRND(f) par_exec->operands.sfmt_btst.f
6799 int UNUSED written
= abuf
->written
;
6800 IADDR UNUSED pc
= abuf
->addr
;
6801 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6803 CPU (h_cond
) = OPRND (condbit
);
6812 ENDSWITCH (sem
) /* End of semantic switch. */
6814 /* At this point `vpc' contains the next insn to execute. */
6817 #undef DEFINE_SWITCH
6818 #endif /* DEFINE_SWITCH */