1 /* Simulator instruction semantics for m32r2f.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996-2019 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
9 This file is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
14 It is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, see <http://www.gnu.org/licenses/>.
26 /* The labels have the case they have because the enum of insn types
27 is all uppercase and in the non-stdc case the insn symbol is built
28 into the enum name. */
34 { M32R2F_INSN_X_INVALID
, && case_sem_INSN_X_INVALID
},
35 { M32R2F_INSN_X_AFTER
, && case_sem_INSN_X_AFTER
},
36 { M32R2F_INSN_X_BEFORE
, && case_sem_INSN_X_BEFORE
},
37 { M32R2F_INSN_X_CTI_CHAIN
, && case_sem_INSN_X_CTI_CHAIN
},
38 { M32R2F_INSN_X_CHAIN
, && case_sem_INSN_X_CHAIN
},
39 { M32R2F_INSN_X_BEGIN
, && case_sem_INSN_X_BEGIN
},
40 { M32R2F_INSN_ADD
, && case_sem_INSN_ADD
},
41 { M32R2F_INSN_ADD3
, && case_sem_INSN_ADD3
},
42 { M32R2F_INSN_AND
, && case_sem_INSN_AND
},
43 { M32R2F_INSN_AND3
, && case_sem_INSN_AND3
},
44 { M32R2F_INSN_OR
, && case_sem_INSN_OR
},
45 { M32R2F_INSN_OR3
, && case_sem_INSN_OR3
},
46 { M32R2F_INSN_XOR
, && case_sem_INSN_XOR
},
47 { M32R2F_INSN_XOR3
, && case_sem_INSN_XOR3
},
48 { M32R2F_INSN_ADDI
, && case_sem_INSN_ADDI
},
49 { M32R2F_INSN_ADDV
, && case_sem_INSN_ADDV
},
50 { M32R2F_INSN_ADDV3
, && case_sem_INSN_ADDV3
},
51 { M32R2F_INSN_ADDX
, && case_sem_INSN_ADDX
},
52 { M32R2F_INSN_BC8
, && case_sem_INSN_BC8
},
53 { M32R2F_INSN_BC24
, && case_sem_INSN_BC24
},
54 { M32R2F_INSN_BEQ
, && case_sem_INSN_BEQ
},
55 { M32R2F_INSN_BEQZ
, && case_sem_INSN_BEQZ
},
56 { M32R2F_INSN_BGEZ
, && case_sem_INSN_BGEZ
},
57 { M32R2F_INSN_BGTZ
, && case_sem_INSN_BGTZ
},
58 { M32R2F_INSN_BLEZ
, && case_sem_INSN_BLEZ
},
59 { M32R2F_INSN_BLTZ
, && case_sem_INSN_BLTZ
},
60 { M32R2F_INSN_BNEZ
, && case_sem_INSN_BNEZ
},
61 { M32R2F_INSN_BL8
, && case_sem_INSN_BL8
},
62 { M32R2F_INSN_BL24
, && case_sem_INSN_BL24
},
63 { M32R2F_INSN_BCL8
, && case_sem_INSN_BCL8
},
64 { M32R2F_INSN_BCL24
, && case_sem_INSN_BCL24
},
65 { M32R2F_INSN_BNC8
, && case_sem_INSN_BNC8
},
66 { M32R2F_INSN_BNC24
, && case_sem_INSN_BNC24
},
67 { M32R2F_INSN_BNE
, && case_sem_INSN_BNE
},
68 { M32R2F_INSN_BRA8
, && case_sem_INSN_BRA8
},
69 { M32R2F_INSN_BRA24
, && case_sem_INSN_BRA24
},
70 { M32R2F_INSN_BNCL8
, && case_sem_INSN_BNCL8
},
71 { M32R2F_INSN_BNCL24
, && case_sem_INSN_BNCL24
},
72 { M32R2F_INSN_CMP
, && case_sem_INSN_CMP
},
73 { M32R2F_INSN_CMPI
, && case_sem_INSN_CMPI
},
74 { M32R2F_INSN_CMPU
, && case_sem_INSN_CMPU
},
75 { M32R2F_INSN_CMPUI
, && case_sem_INSN_CMPUI
},
76 { M32R2F_INSN_CMPEQ
, && case_sem_INSN_CMPEQ
},
77 { M32R2F_INSN_CMPZ
, && case_sem_INSN_CMPZ
},
78 { M32R2F_INSN_DIV
, && case_sem_INSN_DIV
},
79 { M32R2F_INSN_DIVU
, && case_sem_INSN_DIVU
},
80 { M32R2F_INSN_REM
, && case_sem_INSN_REM
},
81 { M32R2F_INSN_REMU
, && case_sem_INSN_REMU
},
82 { M32R2F_INSN_REMH
, && case_sem_INSN_REMH
},
83 { M32R2F_INSN_REMUH
, && case_sem_INSN_REMUH
},
84 { M32R2F_INSN_REMB
, && case_sem_INSN_REMB
},
85 { M32R2F_INSN_REMUB
, && case_sem_INSN_REMUB
},
86 { M32R2F_INSN_DIVUH
, && case_sem_INSN_DIVUH
},
87 { M32R2F_INSN_DIVB
, && case_sem_INSN_DIVB
},
88 { M32R2F_INSN_DIVUB
, && case_sem_INSN_DIVUB
},
89 { M32R2F_INSN_DIVH
, && case_sem_INSN_DIVH
},
90 { M32R2F_INSN_JC
, && case_sem_INSN_JC
},
91 { M32R2F_INSN_JNC
, && case_sem_INSN_JNC
},
92 { M32R2F_INSN_JL
, && case_sem_INSN_JL
},
93 { M32R2F_INSN_JMP
, && case_sem_INSN_JMP
},
94 { M32R2F_INSN_LD
, && case_sem_INSN_LD
},
95 { M32R2F_INSN_LD_D
, && case_sem_INSN_LD_D
},
96 { M32R2F_INSN_LDB
, && case_sem_INSN_LDB
},
97 { M32R2F_INSN_LDB_D
, && case_sem_INSN_LDB_D
},
98 { M32R2F_INSN_LDH
, && case_sem_INSN_LDH
},
99 { M32R2F_INSN_LDH_D
, && case_sem_INSN_LDH_D
},
100 { M32R2F_INSN_LDUB
, && case_sem_INSN_LDUB
},
101 { M32R2F_INSN_LDUB_D
, && case_sem_INSN_LDUB_D
},
102 { M32R2F_INSN_LDUH
, && case_sem_INSN_LDUH
},
103 { M32R2F_INSN_LDUH_D
, && case_sem_INSN_LDUH_D
},
104 { M32R2F_INSN_LD_PLUS
, && case_sem_INSN_LD_PLUS
},
105 { M32R2F_INSN_LD24
, && case_sem_INSN_LD24
},
106 { M32R2F_INSN_LDI8
, && case_sem_INSN_LDI8
},
107 { M32R2F_INSN_LDI16
, && case_sem_INSN_LDI16
},
108 { M32R2F_INSN_LOCK
, && case_sem_INSN_LOCK
},
109 { M32R2F_INSN_MACHI_A
, && case_sem_INSN_MACHI_A
},
110 { M32R2F_INSN_MACLO_A
, && case_sem_INSN_MACLO_A
},
111 { M32R2F_INSN_MACWHI_A
, && case_sem_INSN_MACWHI_A
},
112 { M32R2F_INSN_MACWLO_A
, && case_sem_INSN_MACWLO_A
},
113 { M32R2F_INSN_MUL
, && case_sem_INSN_MUL
},
114 { M32R2F_INSN_MULHI_A
, && case_sem_INSN_MULHI_A
},
115 { M32R2F_INSN_MULLO_A
, && case_sem_INSN_MULLO_A
},
116 { M32R2F_INSN_MULWHI_A
, && case_sem_INSN_MULWHI_A
},
117 { M32R2F_INSN_MULWLO_A
, && case_sem_INSN_MULWLO_A
},
118 { M32R2F_INSN_MV
, && case_sem_INSN_MV
},
119 { M32R2F_INSN_MVFACHI_A
, && case_sem_INSN_MVFACHI_A
},
120 { M32R2F_INSN_MVFACLO_A
, && case_sem_INSN_MVFACLO_A
},
121 { M32R2F_INSN_MVFACMI_A
, && case_sem_INSN_MVFACMI_A
},
122 { M32R2F_INSN_MVFC
, && case_sem_INSN_MVFC
},
123 { M32R2F_INSN_MVTACHI_A
, && case_sem_INSN_MVTACHI_A
},
124 { M32R2F_INSN_MVTACLO_A
, && case_sem_INSN_MVTACLO_A
},
125 { M32R2F_INSN_MVTC
, && case_sem_INSN_MVTC
},
126 { M32R2F_INSN_NEG
, && case_sem_INSN_NEG
},
127 { M32R2F_INSN_NOP
, && case_sem_INSN_NOP
},
128 { M32R2F_INSN_NOT
, && case_sem_INSN_NOT
},
129 { M32R2F_INSN_RAC_DSI
, && case_sem_INSN_RAC_DSI
},
130 { M32R2F_INSN_RACH_DSI
, && case_sem_INSN_RACH_DSI
},
131 { M32R2F_INSN_RTE
, && case_sem_INSN_RTE
},
132 { M32R2F_INSN_SETH
, && case_sem_INSN_SETH
},
133 { M32R2F_INSN_SLL
, && case_sem_INSN_SLL
},
134 { M32R2F_INSN_SLL3
, && case_sem_INSN_SLL3
},
135 { M32R2F_INSN_SLLI
, && case_sem_INSN_SLLI
},
136 { M32R2F_INSN_SRA
, && case_sem_INSN_SRA
},
137 { M32R2F_INSN_SRA3
, && case_sem_INSN_SRA3
},
138 { M32R2F_INSN_SRAI
, && case_sem_INSN_SRAI
},
139 { M32R2F_INSN_SRL
, && case_sem_INSN_SRL
},
140 { M32R2F_INSN_SRL3
, && case_sem_INSN_SRL3
},
141 { M32R2F_INSN_SRLI
, && case_sem_INSN_SRLI
},
142 { M32R2F_INSN_ST
, && case_sem_INSN_ST
},
143 { M32R2F_INSN_ST_D
, && case_sem_INSN_ST_D
},
144 { M32R2F_INSN_STB
, && case_sem_INSN_STB
},
145 { M32R2F_INSN_STB_D
, && case_sem_INSN_STB_D
},
146 { M32R2F_INSN_STH
, && case_sem_INSN_STH
},
147 { M32R2F_INSN_STH_D
, && case_sem_INSN_STH_D
},
148 { M32R2F_INSN_ST_PLUS
, && case_sem_INSN_ST_PLUS
},
149 { M32R2F_INSN_STH_PLUS
, && case_sem_INSN_STH_PLUS
},
150 { M32R2F_INSN_STB_PLUS
, && case_sem_INSN_STB_PLUS
},
151 { M32R2F_INSN_ST_MINUS
, && case_sem_INSN_ST_MINUS
},
152 { M32R2F_INSN_SUB
, && case_sem_INSN_SUB
},
153 { M32R2F_INSN_SUBV
, && case_sem_INSN_SUBV
},
154 { M32R2F_INSN_SUBX
, && case_sem_INSN_SUBX
},
155 { M32R2F_INSN_TRAP
, && case_sem_INSN_TRAP
},
156 { M32R2F_INSN_UNLOCK
, && case_sem_INSN_UNLOCK
},
157 { M32R2F_INSN_SATB
, && case_sem_INSN_SATB
},
158 { M32R2F_INSN_SATH
, && case_sem_INSN_SATH
},
159 { M32R2F_INSN_SAT
, && case_sem_INSN_SAT
},
160 { M32R2F_INSN_PCMPBZ
, && case_sem_INSN_PCMPBZ
},
161 { M32R2F_INSN_SADD
, && case_sem_INSN_SADD
},
162 { M32R2F_INSN_MACWU1
, && case_sem_INSN_MACWU1
},
163 { M32R2F_INSN_MSBLO
, && case_sem_INSN_MSBLO
},
164 { M32R2F_INSN_MULWU1
, && case_sem_INSN_MULWU1
},
165 { M32R2F_INSN_MACLH1
, && case_sem_INSN_MACLH1
},
166 { M32R2F_INSN_SC
, && case_sem_INSN_SC
},
167 { M32R2F_INSN_SNC
, && case_sem_INSN_SNC
},
168 { M32R2F_INSN_CLRPSW
, && case_sem_INSN_CLRPSW
},
169 { M32R2F_INSN_SETPSW
, && case_sem_INSN_SETPSW
},
170 { M32R2F_INSN_BSET
, && case_sem_INSN_BSET
},
171 { M32R2F_INSN_BCLR
, && case_sem_INSN_BCLR
},
172 { M32R2F_INSN_BTST
, && case_sem_INSN_BTST
},
173 { M32R2F_INSN_PAR_ADD
, && case_sem_INSN_PAR_ADD
},
174 { M32R2F_INSN_WRITE_ADD
, && case_sem_INSN_WRITE_ADD
},
175 { M32R2F_INSN_PAR_AND
, && case_sem_INSN_PAR_AND
},
176 { M32R2F_INSN_WRITE_AND
, && case_sem_INSN_WRITE_AND
},
177 { M32R2F_INSN_PAR_OR
, && case_sem_INSN_PAR_OR
},
178 { M32R2F_INSN_WRITE_OR
, && case_sem_INSN_WRITE_OR
},
179 { M32R2F_INSN_PAR_XOR
, && case_sem_INSN_PAR_XOR
},
180 { M32R2F_INSN_WRITE_XOR
, && case_sem_INSN_WRITE_XOR
},
181 { M32R2F_INSN_PAR_ADDI
, && case_sem_INSN_PAR_ADDI
},
182 { M32R2F_INSN_WRITE_ADDI
, && case_sem_INSN_WRITE_ADDI
},
183 { M32R2F_INSN_PAR_ADDV
, && case_sem_INSN_PAR_ADDV
},
184 { M32R2F_INSN_WRITE_ADDV
, && case_sem_INSN_WRITE_ADDV
},
185 { M32R2F_INSN_PAR_ADDX
, && case_sem_INSN_PAR_ADDX
},
186 { M32R2F_INSN_WRITE_ADDX
, && case_sem_INSN_WRITE_ADDX
},
187 { M32R2F_INSN_PAR_BC8
, && case_sem_INSN_PAR_BC8
},
188 { M32R2F_INSN_WRITE_BC8
, && case_sem_INSN_WRITE_BC8
},
189 { M32R2F_INSN_PAR_BL8
, && case_sem_INSN_PAR_BL8
},
190 { M32R2F_INSN_WRITE_BL8
, && case_sem_INSN_WRITE_BL8
},
191 { M32R2F_INSN_PAR_BCL8
, && case_sem_INSN_PAR_BCL8
},
192 { M32R2F_INSN_WRITE_BCL8
, && case_sem_INSN_WRITE_BCL8
},
193 { M32R2F_INSN_PAR_BNC8
, && case_sem_INSN_PAR_BNC8
},
194 { M32R2F_INSN_WRITE_BNC8
, && case_sem_INSN_WRITE_BNC8
},
195 { M32R2F_INSN_PAR_BRA8
, && case_sem_INSN_PAR_BRA8
},
196 { M32R2F_INSN_WRITE_BRA8
, && case_sem_INSN_WRITE_BRA8
},
197 { M32R2F_INSN_PAR_BNCL8
, && case_sem_INSN_PAR_BNCL8
},
198 { M32R2F_INSN_WRITE_BNCL8
, && case_sem_INSN_WRITE_BNCL8
},
199 { M32R2F_INSN_PAR_CMP
, && case_sem_INSN_PAR_CMP
},
200 { M32R2F_INSN_WRITE_CMP
, && case_sem_INSN_WRITE_CMP
},
201 { M32R2F_INSN_PAR_CMPU
, && case_sem_INSN_PAR_CMPU
},
202 { M32R2F_INSN_WRITE_CMPU
, && case_sem_INSN_WRITE_CMPU
},
203 { M32R2F_INSN_PAR_CMPEQ
, && case_sem_INSN_PAR_CMPEQ
},
204 { M32R2F_INSN_WRITE_CMPEQ
, && case_sem_INSN_WRITE_CMPEQ
},
205 { M32R2F_INSN_PAR_CMPZ
, && case_sem_INSN_PAR_CMPZ
},
206 { M32R2F_INSN_WRITE_CMPZ
, && case_sem_INSN_WRITE_CMPZ
},
207 { M32R2F_INSN_PAR_JC
, && case_sem_INSN_PAR_JC
},
208 { M32R2F_INSN_WRITE_JC
, && case_sem_INSN_WRITE_JC
},
209 { M32R2F_INSN_PAR_JNC
, && case_sem_INSN_PAR_JNC
},
210 { M32R2F_INSN_WRITE_JNC
, && case_sem_INSN_WRITE_JNC
},
211 { M32R2F_INSN_PAR_JL
, && case_sem_INSN_PAR_JL
},
212 { M32R2F_INSN_WRITE_JL
, && case_sem_INSN_WRITE_JL
},
213 { M32R2F_INSN_PAR_JMP
, && case_sem_INSN_PAR_JMP
},
214 { M32R2F_INSN_WRITE_JMP
, && case_sem_INSN_WRITE_JMP
},
215 { M32R2F_INSN_PAR_LD
, && case_sem_INSN_PAR_LD
},
216 { M32R2F_INSN_WRITE_LD
, && case_sem_INSN_WRITE_LD
},
217 { M32R2F_INSN_PAR_LDB
, && case_sem_INSN_PAR_LDB
},
218 { M32R2F_INSN_WRITE_LDB
, && case_sem_INSN_WRITE_LDB
},
219 { M32R2F_INSN_PAR_LDH
, && case_sem_INSN_PAR_LDH
},
220 { M32R2F_INSN_WRITE_LDH
, && case_sem_INSN_WRITE_LDH
},
221 { M32R2F_INSN_PAR_LDUB
, && case_sem_INSN_PAR_LDUB
},
222 { M32R2F_INSN_WRITE_LDUB
, && case_sem_INSN_WRITE_LDUB
},
223 { M32R2F_INSN_PAR_LDUH
, && case_sem_INSN_PAR_LDUH
},
224 { M32R2F_INSN_WRITE_LDUH
, && case_sem_INSN_WRITE_LDUH
},
225 { M32R2F_INSN_PAR_LD_PLUS
, && case_sem_INSN_PAR_LD_PLUS
},
226 { M32R2F_INSN_WRITE_LD_PLUS
, && case_sem_INSN_WRITE_LD_PLUS
},
227 { M32R2F_INSN_PAR_LDI8
, && case_sem_INSN_PAR_LDI8
},
228 { M32R2F_INSN_WRITE_LDI8
, && case_sem_INSN_WRITE_LDI8
},
229 { M32R2F_INSN_PAR_LOCK
, && case_sem_INSN_PAR_LOCK
},
230 { M32R2F_INSN_WRITE_LOCK
, && case_sem_INSN_WRITE_LOCK
},
231 { M32R2F_INSN_PAR_MACHI_A
, && case_sem_INSN_PAR_MACHI_A
},
232 { M32R2F_INSN_WRITE_MACHI_A
, && case_sem_INSN_WRITE_MACHI_A
},
233 { M32R2F_INSN_PAR_MACLO_A
, && case_sem_INSN_PAR_MACLO_A
},
234 { M32R2F_INSN_WRITE_MACLO_A
, && case_sem_INSN_WRITE_MACLO_A
},
235 { M32R2F_INSN_PAR_MACWHI_A
, && case_sem_INSN_PAR_MACWHI_A
},
236 { M32R2F_INSN_WRITE_MACWHI_A
, && case_sem_INSN_WRITE_MACWHI_A
},
237 { M32R2F_INSN_PAR_MACWLO_A
, && case_sem_INSN_PAR_MACWLO_A
},
238 { M32R2F_INSN_WRITE_MACWLO_A
, && case_sem_INSN_WRITE_MACWLO_A
},
239 { M32R2F_INSN_PAR_MUL
, && case_sem_INSN_PAR_MUL
},
240 { M32R2F_INSN_WRITE_MUL
, && case_sem_INSN_WRITE_MUL
},
241 { M32R2F_INSN_PAR_MULHI_A
, && case_sem_INSN_PAR_MULHI_A
},
242 { M32R2F_INSN_WRITE_MULHI_A
, && case_sem_INSN_WRITE_MULHI_A
},
243 { M32R2F_INSN_PAR_MULLO_A
, && case_sem_INSN_PAR_MULLO_A
},
244 { M32R2F_INSN_WRITE_MULLO_A
, && case_sem_INSN_WRITE_MULLO_A
},
245 { M32R2F_INSN_PAR_MULWHI_A
, && case_sem_INSN_PAR_MULWHI_A
},
246 { M32R2F_INSN_WRITE_MULWHI_A
, && case_sem_INSN_WRITE_MULWHI_A
},
247 { M32R2F_INSN_PAR_MULWLO_A
, && case_sem_INSN_PAR_MULWLO_A
},
248 { M32R2F_INSN_WRITE_MULWLO_A
, && case_sem_INSN_WRITE_MULWLO_A
},
249 { M32R2F_INSN_PAR_MV
, && case_sem_INSN_PAR_MV
},
250 { M32R2F_INSN_WRITE_MV
, && case_sem_INSN_WRITE_MV
},
251 { M32R2F_INSN_PAR_MVFACHI_A
, && case_sem_INSN_PAR_MVFACHI_A
},
252 { M32R2F_INSN_WRITE_MVFACHI_A
, && case_sem_INSN_WRITE_MVFACHI_A
},
253 { M32R2F_INSN_PAR_MVFACLO_A
, && case_sem_INSN_PAR_MVFACLO_A
},
254 { M32R2F_INSN_WRITE_MVFACLO_A
, && case_sem_INSN_WRITE_MVFACLO_A
},
255 { M32R2F_INSN_PAR_MVFACMI_A
, && case_sem_INSN_PAR_MVFACMI_A
},
256 { M32R2F_INSN_WRITE_MVFACMI_A
, && case_sem_INSN_WRITE_MVFACMI_A
},
257 { M32R2F_INSN_PAR_MVFC
, && case_sem_INSN_PAR_MVFC
},
258 { M32R2F_INSN_WRITE_MVFC
, && case_sem_INSN_WRITE_MVFC
},
259 { M32R2F_INSN_PAR_MVTACHI_A
, && case_sem_INSN_PAR_MVTACHI_A
},
260 { M32R2F_INSN_WRITE_MVTACHI_A
, && case_sem_INSN_WRITE_MVTACHI_A
},
261 { M32R2F_INSN_PAR_MVTACLO_A
, && case_sem_INSN_PAR_MVTACLO_A
},
262 { M32R2F_INSN_WRITE_MVTACLO_A
, && case_sem_INSN_WRITE_MVTACLO_A
},
263 { M32R2F_INSN_PAR_MVTC
, && case_sem_INSN_PAR_MVTC
},
264 { M32R2F_INSN_WRITE_MVTC
, && case_sem_INSN_WRITE_MVTC
},
265 { M32R2F_INSN_PAR_NEG
, && case_sem_INSN_PAR_NEG
},
266 { M32R2F_INSN_WRITE_NEG
, && case_sem_INSN_WRITE_NEG
},
267 { M32R2F_INSN_PAR_NOP
, && case_sem_INSN_PAR_NOP
},
268 { M32R2F_INSN_WRITE_NOP
, && case_sem_INSN_WRITE_NOP
},
269 { M32R2F_INSN_PAR_NOT
, && case_sem_INSN_PAR_NOT
},
270 { M32R2F_INSN_WRITE_NOT
, && case_sem_INSN_WRITE_NOT
},
271 { M32R2F_INSN_PAR_RAC_DSI
, && case_sem_INSN_PAR_RAC_DSI
},
272 { M32R2F_INSN_WRITE_RAC_DSI
, && case_sem_INSN_WRITE_RAC_DSI
},
273 { M32R2F_INSN_PAR_RACH_DSI
, && case_sem_INSN_PAR_RACH_DSI
},
274 { M32R2F_INSN_WRITE_RACH_DSI
, && case_sem_INSN_WRITE_RACH_DSI
},
275 { M32R2F_INSN_PAR_RTE
, && case_sem_INSN_PAR_RTE
},
276 { M32R2F_INSN_WRITE_RTE
, && case_sem_INSN_WRITE_RTE
},
277 { M32R2F_INSN_PAR_SLL
, && case_sem_INSN_PAR_SLL
},
278 { M32R2F_INSN_WRITE_SLL
, && case_sem_INSN_WRITE_SLL
},
279 { M32R2F_INSN_PAR_SLLI
, && case_sem_INSN_PAR_SLLI
},
280 { M32R2F_INSN_WRITE_SLLI
, && case_sem_INSN_WRITE_SLLI
},
281 { M32R2F_INSN_PAR_SRA
, && case_sem_INSN_PAR_SRA
},
282 { M32R2F_INSN_WRITE_SRA
, && case_sem_INSN_WRITE_SRA
},
283 { M32R2F_INSN_PAR_SRAI
, && case_sem_INSN_PAR_SRAI
},
284 { M32R2F_INSN_WRITE_SRAI
, && case_sem_INSN_WRITE_SRAI
},
285 { M32R2F_INSN_PAR_SRL
, && case_sem_INSN_PAR_SRL
},
286 { M32R2F_INSN_WRITE_SRL
, && case_sem_INSN_WRITE_SRL
},
287 { M32R2F_INSN_PAR_SRLI
, && case_sem_INSN_PAR_SRLI
},
288 { M32R2F_INSN_WRITE_SRLI
, && case_sem_INSN_WRITE_SRLI
},
289 { M32R2F_INSN_PAR_ST
, && case_sem_INSN_PAR_ST
},
290 { M32R2F_INSN_WRITE_ST
, && case_sem_INSN_WRITE_ST
},
291 { M32R2F_INSN_PAR_STB
, && case_sem_INSN_PAR_STB
},
292 { M32R2F_INSN_WRITE_STB
, && case_sem_INSN_WRITE_STB
},
293 { M32R2F_INSN_PAR_STH
, && case_sem_INSN_PAR_STH
},
294 { M32R2F_INSN_WRITE_STH
, && case_sem_INSN_WRITE_STH
},
295 { M32R2F_INSN_PAR_ST_PLUS
, && case_sem_INSN_PAR_ST_PLUS
},
296 { M32R2F_INSN_WRITE_ST_PLUS
, && case_sem_INSN_WRITE_ST_PLUS
},
297 { M32R2F_INSN_PAR_STH_PLUS
, && case_sem_INSN_PAR_STH_PLUS
},
298 { M32R2F_INSN_WRITE_STH_PLUS
, && case_sem_INSN_WRITE_STH_PLUS
},
299 { M32R2F_INSN_PAR_STB_PLUS
, && case_sem_INSN_PAR_STB_PLUS
},
300 { M32R2F_INSN_WRITE_STB_PLUS
, && case_sem_INSN_WRITE_STB_PLUS
},
301 { M32R2F_INSN_PAR_ST_MINUS
, && case_sem_INSN_PAR_ST_MINUS
},
302 { M32R2F_INSN_WRITE_ST_MINUS
, && case_sem_INSN_WRITE_ST_MINUS
},
303 { M32R2F_INSN_PAR_SUB
, && case_sem_INSN_PAR_SUB
},
304 { M32R2F_INSN_WRITE_SUB
, && case_sem_INSN_WRITE_SUB
},
305 { M32R2F_INSN_PAR_SUBV
, && case_sem_INSN_PAR_SUBV
},
306 { M32R2F_INSN_WRITE_SUBV
, && case_sem_INSN_WRITE_SUBV
},
307 { M32R2F_INSN_PAR_SUBX
, && case_sem_INSN_PAR_SUBX
},
308 { M32R2F_INSN_WRITE_SUBX
, && case_sem_INSN_WRITE_SUBX
},
309 { M32R2F_INSN_PAR_TRAP
, && case_sem_INSN_PAR_TRAP
},
310 { M32R2F_INSN_WRITE_TRAP
, && case_sem_INSN_WRITE_TRAP
},
311 { M32R2F_INSN_PAR_UNLOCK
, && case_sem_INSN_PAR_UNLOCK
},
312 { M32R2F_INSN_WRITE_UNLOCK
, && case_sem_INSN_WRITE_UNLOCK
},
313 { M32R2F_INSN_PAR_PCMPBZ
, && case_sem_INSN_PAR_PCMPBZ
},
314 { M32R2F_INSN_WRITE_PCMPBZ
, && case_sem_INSN_WRITE_PCMPBZ
},
315 { M32R2F_INSN_PAR_SADD
, && case_sem_INSN_PAR_SADD
},
316 { M32R2F_INSN_WRITE_SADD
, && case_sem_INSN_WRITE_SADD
},
317 { M32R2F_INSN_PAR_MACWU1
, && case_sem_INSN_PAR_MACWU1
},
318 { M32R2F_INSN_WRITE_MACWU1
, && case_sem_INSN_WRITE_MACWU1
},
319 { M32R2F_INSN_PAR_MSBLO
, && case_sem_INSN_PAR_MSBLO
},
320 { M32R2F_INSN_WRITE_MSBLO
, && case_sem_INSN_WRITE_MSBLO
},
321 { M32R2F_INSN_PAR_MULWU1
, && case_sem_INSN_PAR_MULWU1
},
322 { M32R2F_INSN_WRITE_MULWU1
, && case_sem_INSN_WRITE_MULWU1
},
323 { M32R2F_INSN_PAR_MACLH1
, && case_sem_INSN_PAR_MACLH1
},
324 { M32R2F_INSN_WRITE_MACLH1
, && case_sem_INSN_WRITE_MACLH1
},
325 { M32R2F_INSN_PAR_SC
, && case_sem_INSN_PAR_SC
},
326 { M32R2F_INSN_WRITE_SC
, && case_sem_INSN_WRITE_SC
},
327 { M32R2F_INSN_PAR_SNC
, && case_sem_INSN_PAR_SNC
},
328 { M32R2F_INSN_WRITE_SNC
, && case_sem_INSN_WRITE_SNC
},
329 { M32R2F_INSN_PAR_CLRPSW
, && case_sem_INSN_PAR_CLRPSW
},
330 { M32R2F_INSN_WRITE_CLRPSW
, && case_sem_INSN_WRITE_CLRPSW
},
331 { M32R2F_INSN_PAR_SETPSW
, && case_sem_INSN_PAR_SETPSW
},
332 { M32R2F_INSN_WRITE_SETPSW
, && case_sem_INSN_WRITE_SETPSW
},
333 { M32R2F_INSN_PAR_BTST
, && case_sem_INSN_PAR_BTST
},
334 { M32R2F_INSN_WRITE_BTST
, && case_sem_INSN_WRITE_BTST
},
339 for (i
= 0; labels
[i
].label
!= 0; ++i
)
342 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_fast_lab
= labels
[i
].label
;
344 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_full_lab
= labels
[i
].label
;
349 #endif /* DEFINE_LABELS */
353 /* If hyper-fast [well not unnecessarily slow] execution is selected, turn
354 off frills like tracing and profiling. */
355 /* FIXME: A better way would be to have CGEN_TRACE_RESULT check for something
356 that can cause it to be optimized out. Another way would be to emit
357 special handlers into the instruction "stream". */
360 #undef CGEN_TRACE_RESULT
361 #define CGEN_TRACE_RESULT(cpu, abuf, name, type, val)
365 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
371 /* Branch to next handler without going around main loop. */
372 #define NEXT(vpc) goto * SEM_ARGBUF (vpc) -> semantic.sem_case
373 SWITCH (sem
, SEM_ARGBUF (vpc
) -> semantic
.sem_case
)
375 #else /* ! WITH_SCACHE_PBB */
377 #define NEXT(vpc) BREAK (sem)
380 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_fast_lab
)
382 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_full_lab
)
385 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->num
)
388 #endif /* ! WITH_SCACHE_PBB */
392 CASE (sem
, INSN_X_INVALID
) : /* --invalid-- */
394 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
395 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
396 #define FLD(f) abuf->fields.sfmt_empty.f
397 int UNUSED written
= 0;
398 IADDR UNUSED pc
= abuf
->addr
;
399 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
402 /* Update the recorded pc in the cpu state struct.
403 Only necessary for WITH_SCACHE case, but to avoid the
404 conditional compilation .... */
406 /* Virtual insns have zero size. Overwrite vpc with address of next insn
407 using the default-insn-bitsize spec. When executing insns in parallel
408 we may want to queue the fault and continue execution. */
409 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
410 vpc
= sim_engine_invalid_insn (current_cpu
, pc
, vpc
);
417 CASE (sem
, INSN_X_AFTER
) : /* --after-- */
419 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
420 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
421 #define FLD(f) abuf->fields.sfmt_empty.f
422 int UNUSED written
= 0;
423 IADDR UNUSED pc
= abuf
->addr
;
424 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
427 #if WITH_SCACHE_PBB_M32R2F
428 m32r2f_pbb_after (current_cpu
, sem_arg
);
436 CASE (sem
, INSN_X_BEFORE
) : /* --before-- */
438 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
439 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
440 #define FLD(f) abuf->fields.sfmt_empty.f
441 int UNUSED written
= 0;
442 IADDR UNUSED pc
= abuf
->addr
;
443 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
446 #if WITH_SCACHE_PBB_M32R2F
447 m32r2f_pbb_before (current_cpu
, sem_arg
);
455 CASE (sem
, INSN_X_CTI_CHAIN
) : /* --cti-chain-- */
457 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
458 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
459 #define FLD(f) abuf->fields.sfmt_empty.f
460 int UNUSED written
= 0;
461 IADDR UNUSED pc
= abuf
->addr
;
462 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
465 #if WITH_SCACHE_PBB_M32R2F
467 vpc
= m32r2f_pbb_cti_chain (current_cpu
, sem_arg
,
468 pbb_br_type
, pbb_br_npc
);
471 /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
472 vpc
= m32r2f_pbb_cti_chain (current_cpu
, sem_arg
,
473 CPU_PBB_BR_TYPE (current_cpu
),
474 CPU_PBB_BR_NPC (current_cpu
));
483 CASE (sem
, INSN_X_CHAIN
) : /* --chain-- */
485 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
486 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
487 #define FLD(f) abuf->fields.sfmt_empty.f
488 int UNUSED written
= 0;
489 IADDR UNUSED pc
= abuf
->addr
;
490 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
493 #if WITH_SCACHE_PBB_M32R2F
494 vpc
= m32r2f_pbb_chain (current_cpu
, sem_arg
);
505 CASE (sem
, INSN_X_BEGIN
) : /* --begin-- */
507 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
508 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
509 #define FLD(f) abuf->fields.sfmt_empty.f
510 int UNUSED written
= 0;
511 IADDR UNUSED pc
= abuf
->addr
;
512 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
515 #if WITH_SCACHE_PBB_M32R2F
516 #if defined DEFINE_SWITCH || defined FAST_P
517 /* In the switch case FAST_P is a constant, allowing several optimizations
518 in any called inline functions. */
519 vpc
= m32r2f_pbb_begin (current_cpu
, FAST_P
);
521 #if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
522 vpc
= m32r2f_pbb_begin (current_cpu
, STATE_RUN_FAST_P (CPU_STATE (current_cpu
)));
524 vpc
= m32r2f_pbb_begin (current_cpu
, 0);
534 CASE (sem
, INSN_ADD
) : /* add $dr,$sr */
536 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
537 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
538 #define FLD(f) abuf->fields.sfmt_add.f
539 int UNUSED written
= 0;
540 IADDR UNUSED pc
= abuf
->addr
;
541 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
544 SI opval
= ADDSI (* FLD (i_dr
), * FLD (i_sr
));
545 * FLD (i_dr
) = opval
;
546 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
553 CASE (sem
, INSN_ADD3
) : /* add3 $dr,$sr,$hash$slo16 */
555 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
556 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
557 #define FLD(f) abuf->fields.sfmt_add3.f
558 int UNUSED written
= 0;
559 IADDR UNUSED pc
= abuf
->addr
;
560 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
563 SI opval
= ADDSI (* FLD (i_sr
), FLD (f_simm16
));
564 * FLD (i_dr
) = opval
;
565 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
572 CASE (sem
, INSN_AND
) : /* and $dr,$sr */
574 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
575 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
576 #define FLD(f) abuf->fields.sfmt_add.f
577 int UNUSED written
= 0;
578 IADDR UNUSED pc
= abuf
->addr
;
579 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
582 SI opval
= ANDSI (* FLD (i_dr
), * FLD (i_sr
));
583 * FLD (i_dr
) = opval
;
584 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
591 CASE (sem
, INSN_AND3
) : /* and3 $dr,$sr,$uimm16 */
593 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
594 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
595 #define FLD(f) abuf->fields.sfmt_and3.f
596 int UNUSED written
= 0;
597 IADDR UNUSED pc
= abuf
->addr
;
598 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
601 SI opval
= ANDSI (* FLD (i_sr
), FLD (f_uimm16
));
602 * FLD (i_dr
) = opval
;
603 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
610 CASE (sem
, INSN_OR
) : /* or $dr,$sr */
612 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
613 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
614 #define FLD(f) abuf->fields.sfmt_add.f
615 int UNUSED written
= 0;
616 IADDR UNUSED pc
= abuf
->addr
;
617 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
620 SI opval
= ORSI (* FLD (i_dr
), * FLD (i_sr
));
621 * FLD (i_dr
) = opval
;
622 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
629 CASE (sem
, INSN_OR3
) : /* or3 $dr,$sr,$hash$ulo16 */
631 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
632 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
633 #define FLD(f) abuf->fields.sfmt_and3.f
634 int UNUSED written
= 0;
635 IADDR UNUSED pc
= abuf
->addr
;
636 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
639 SI opval
= ORSI (* FLD (i_sr
), FLD (f_uimm16
));
640 * FLD (i_dr
) = opval
;
641 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
648 CASE (sem
, INSN_XOR
) : /* xor $dr,$sr */
650 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
651 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
652 #define FLD(f) abuf->fields.sfmt_add.f
653 int UNUSED written
= 0;
654 IADDR UNUSED pc
= abuf
->addr
;
655 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
658 SI opval
= XORSI (* FLD (i_dr
), * FLD (i_sr
));
659 * FLD (i_dr
) = opval
;
660 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
667 CASE (sem
, INSN_XOR3
) : /* xor3 $dr,$sr,$uimm16 */
669 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
670 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
671 #define FLD(f) abuf->fields.sfmt_and3.f
672 int UNUSED written
= 0;
673 IADDR UNUSED pc
= abuf
->addr
;
674 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
677 SI opval
= XORSI (* FLD (i_sr
), FLD (f_uimm16
));
678 * FLD (i_dr
) = opval
;
679 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
686 CASE (sem
, INSN_ADDI
) : /* addi $dr,$simm8 */
688 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
689 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
690 #define FLD(f) abuf->fields.sfmt_addi.f
691 int UNUSED written
= 0;
692 IADDR UNUSED pc
= abuf
->addr
;
693 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
696 SI opval
= ADDSI (* FLD (i_dr
), FLD (f_simm8
));
697 * FLD (i_dr
) = opval
;
698 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
705 CASE (sem
, INSN_ADDV
) : /* addv $dr,$sr */
707 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
708 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
709 #define FLD(f) abuf->fields.sfmt_add.f
710 int UNUSED written
= 0;
711 IADDR UNUSED pc
= abuf
->addr
;
712 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
716 temp0
= ADDSI (* FLD (i_dr
), * FLD (i_sr
));
717 temp1
= ADDOFSI (* FLD (i_dr
), * FLD (i_sr
), 0);
720 * FLD (i_dr
) = opval
;
721 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
725 CPU (h_cond
) = opval
;
726 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
734 CASE (sem
, INSN_ADDV3
) : /* addv3 $dr,$sr,$simm16 */
736 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
737 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
738 #define FLD(f) abuf->fields.sfmt_add3.f
739 int UNUSED written
= 0;
740 IADDR UNUSED pc
= abuf
->addr
;
741 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
745 temp0
= ADDSI (* FLD (i_sr
), FLD (f_simm16
));
746 temp1
= ADDOFSI (* FLD (i_sr
), FLD (f_simm16
), 0);
749 * FLD (i_dr
) = opval
;
750 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
754 CPU (h_cond
) = opval
;
755 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
763 CASE (sem
, INSN_ADDX
) : /* addx $dr,$sr */
765 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
766 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
767 #define FLD(f) abuf->fields.sfmt_add.f
768 int UNUSED written
= 0;
769 IADDR UNUSED pc
= abuf
->addr
;
770 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
774 temp0
= ADDCSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
775 temp1
= ADDCFSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
778 * FLD (i_dr
) = opval
;
779 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
783 CPU (h_cond
) = opval
;
784 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
792 CASE (sem
, INSN_BC8
) : /* bc.s $disp8 */
794 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
795 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
796 #define FLD(f) abuf->fields.sfmt_bl8.f
797 int UNUSED written
= 0;
798 IADDR UNUSED pc
= abuf
->addr
;
800 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
804 USI opval
= FLD (i_disp8
);
805 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
807 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
811 abuf
->written
= written
;
812 SEM_BRANCH_FINI (vpc
);
817 CASE (sem
, INSN_BC24
) : /* bc.l $disp24 */
819 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
820 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
821 #define FLD(f) abuf->fields.sfmt_bl24.f
822 int UNUSED written
= 0;
823 IADDR UNUSED pc
= abuf
->addr
;
825 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
829 USI opval
= FLD (i_disp24
);
830 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
832 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
836 abuf
->written
= written
;
837 SEM_BRANCH_FINI (vpc
);
842 CASE (sem
, INSN_BEQ
) : /* beq $src1,$src2,$disp16 */
844 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
845 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
846 #define FLD(f) abuf->fields.sfmt_beq.f
847 int UNUSED written
= 0;
848 IADDR UNUSED pc
= abuf
->addr
;
850 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
852 if (EQSI (* FLD (i_src1
), * FLD (i_src2
))) {
854 USI opval
= FLD (i_disp16
);
855 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
857 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
861 abuf
->written
= written
;
862 SEM_BRANCH_FINI (vpc
);
867 CASE (sem
, INSN_BEQZ
) : /* beqz $src2,$disp16 */
869 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
870 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
871 #define FLD(f) abuf->fields.sfmt_beq.f
872 int UNUSED written
= 0;
873 IADDR UNUSED pc
= abuf
->addr
;
875 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
877 if (EQSI (* FLD (i_src2
), 0)) {
879 USI opval
= FLD (i_disp16
);
880 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
882 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
886 abuf
->written
= written
;
887 SEM_BRANCH_FINI (vpc
);
892 CASE (sem
, INSN_BGEZ
) : /* bgez $src2,$disp16 */
894 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
895 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
896 #define FLD(f) abuf->fields.sfmt_beq.f
897 int UNUSED written
= 0;
898 IADDR UNUSED pc
= abuf
->addr
;
900 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
902 if (GESI (* FLD (i_src2
), 0)) {
904 USI opval
= FLD (i_disp16
);
905 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
907 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
911 abuf
->written
= written
;
912 SEM_BRANCH_FINI (vpc
);
917 CASE (sem
, INSN_BGTZ
) : /* bgtz $src2,$disp16 */
919 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
920 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
921 #define FLD(f) abuf->fields.sfmt_beq.f
922 int UNUSED written
= 0;
923 IADDR UNUSED pc
= abuf
->addr
;
925 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
927 if (GTSI (* FLD (i_src2
), 0)) {
929 USI opval
= FLD (i_disp16
);
930 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
932 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
936 abuf
->written
= written
;
937 SEM_BRANCH_FINI (vpc
);
942 CASE (sem
, INSN_BLEZ
) : /* blez $src2,$disp16 */
944 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
945 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
946 #define FLD(f) abuf->fields.sfmt_beq.f
947 int UNUSED written
= 0;
948 IADDR UNUSED pc
= abuf
->addr
;
950 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
952 if (LESI (* FLD (i_src2
), 0)) {
954 USI opval
= FLD (i_disp16
);
955 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
957 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
961 abuf
->written
= written
;
962 SEM_BRANCH_FINI (vpc
);
967 CASE (sem
, INSN_BLTZ
) : /* bltz $src2,$disp16 */
969 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
970 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
971 #define FLD(f) abuf->fields.sfmt_beq.f
972 int UNUSED written
= 0;
973 IADDR UNUSED pc
= abuf
->addr
;
975 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
977 if (LTSI (* FLD (i_src2
), 0)) {
979 USI opval
= FLD (i_disp16
);
980 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
982 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
986 abuf
->written
= written
;
987 SEM_BRANCH_FINI (vpc
);
992 CASE (sem
, INSN_BNEZ
) : /* bnez $src2,$disp16 */
994 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
995 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
996 #define FLD(f) abuf->fields.sfmt_beq.f
997 int UNUSED written
= 0;
998 IADDR UNUSED pc
= abuf
->addr
;
1000 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1002 if (NESI (* FLD (i_src2
), 0)) {
1004 USI opval
= FLD (i_disp16
);
1005 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1006 written
|= (1 << 2);
1007 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1011 abuf
->written
= written
;
1012 SEM_BRANCH_FINI (vpc
);
1017 CASE (sem
, INSN_BL8
) : /* bl.s $disp8 */
1019 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1020 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1021 #define FLD(f) abuf->fields.sfmt_bl8.f
1022 int UNUSED written
= 0;
1023 IADDR UNUSED pc
= abuf
->addr
;
1025 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1029 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
1030 CPU (h_gr
[((UINT
) 14)]) = opval
;
1031 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1034 USI opval
= FLD (i_disp8
);
1035 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1036 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1040 SEM_BRANCH_FINI (vpc
);
1045 CASE (sem
, INSN_BL24
) : /* bl.l $disp24 */
1047 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1048 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1049 #define FLD(f) abuf->fields.sfmt_bl24.f
1050 int UNUSED written
= 0;
1051 IADDR UNUSED pc
= abuf
->addr
;
1053 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1057 SI opval
= ADDSI (pc
, 4);
1058 CPU (h_gr
[((UINT
) 14)]) = opval
;
1059 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1062 USI opval
= FLD (i_disp24
);
1063 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1064 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1068 SEM_BRANCH_FINI (vpc
);
1073 CASE (sem
, INSN_BCL8
) : /* bcl.s $disp8 */
1075 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1076 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1077 #define FLD(f) abuf->fields.sfmt_bl8.f
1078 int UNUSED written
= 0;
1079 IADDR UNUSED pc
= abuf
->addr
;
1081 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1086 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
1087 CPU (h_gr
[((UINT
) 14)]) = opval
;
1088 written
|= (1 << 3);
1089 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1092 USI opval
= FLD (i_disp8
);
1093 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1094 written
|= (1 << 4);
1095 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1100 abuf
->written
= written
;
1101 SEM_BRANCH_FINI (vpc
);
1106 CASE (sem
, INSN_BCL24
) : /* bcl.l $disp24 */
1108 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1109 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1110 #define FLD(f) abuf->fields.sfmt_bl24.f
1111 int UNUSED written
= 0;
1112 IADDR UNUSED pc
= abuf
->addr
;
1114 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1119 SI opval
= ADDSI (pc
, 4);
1120 CPU (h_gr
[((UINT
) 14)]) = opval
;
1121 written
|= (1 << 3);
1122 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1125 USI opval
= FLD (i_disp24
);
1126 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1127 written
|= (1 << 4);
1128 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1133 abuf
->written
= written
;
1134 SEM_BRANCH_FINI (vpc
);
1139 CASE (sem
, INSN_BNC8
) : /* bnc.s $disp8 */
1141 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1142 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1143 #define FLD(f) abuf->fields.sfmt_bl8.f
1144 int UNUSED written
= 0;
1145 IADDR UNUSED pc
= abuf
->addr
;
1147 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1149 if (NOTBI (CPU (h_cond
))) {
1151 USI opval
= FLD (i_disp8
);
1152 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1153 written
|= (1 << 2);
1154 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1158 abuf
->written
= written
;
1159 SEM_BRANCH_FINI (vpc
);
1164 CASE (sem
, INSN_BNC24
) : /* bnc.l $disp24 */
1166 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1167 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1168 #define FLD(f) abuf->fields.sfmt_bl24.f
1169 int UNUSED written
= 0;
1170 IADDR UNUSED pc
= abuf
->addr
;
1172 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1174 if (NOTBI (CPU (h_cond
))) {
1176 USI opval
= FLD (i_disp24
);
1177 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1178 written
|= (1 << 2);
1179 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1183 abuf
->written
= written
;
1184 SEM_BRANCH_FINI (vpc
);
1189 CASE (sem
, INSN_BNE
) : /* bne $src1,$src2,$disp16 */
1191 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1192 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1193 #define FLD(f) abuf->fields.sfmt_beq.f
1194 int UNUSED written
= 0;
1195 IADDR UNUSED pc
= abuf
->addr
;
1197 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1199 if (NESI (* FLD (i_src1
), * FLD (i_src2
))) {
1201 USI opval
= FLD (i_disp16
);
1202 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1203 written
|= (1 << 3);
1204 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1208 abuf
->written
= written
;
1209 SEM_BRANCH_FINI (vpc
);
1214 CASE (sem
, INSN_BRA8
) : /* bra.s $disp8 */
1216 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1217 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1218 #define FLD(f) abuf->fields.sfmt_bl8.f
1219 int UNUSED written
= 0;
1220 IADDR UNUSED pc
= abuf
->addr
;
1222 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1225 USI opval
= FLD (i_disp8
);
1226 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1227 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1230 SEM_BRANCH_FINI (vpc
);
1235 CASE (sem
, INSN_BRA24
) : /* bra.l $disp24 */
1237 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1238 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1239 #define FLD(f) abuf->fields.sfmt_bl24.f
1240 int UNUSED written
= 0;
1241 IADDR UNUSED pc
= abuf
->addr
;
1243 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1246 USI opval
= FLD (i_disp24
);
1247 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1248 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1251 SEM_BRANCH_FINI (vpc
);
1256 CASE (sem
, INSN_BNCL8
) : /* bncl.s $disp8 */
1258 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1259 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1260 #define FLD(f) abuf->fields.sfmt_bl8.f
1261 int UNUSED written
= 0;
1262 IADDR UNUSED pc
= abuf
->addr
;
1264 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1266 if (NOTBI (CPU (h_cond
))) {
1269 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
1270 CPU (h_gr
[((UINT
) 14)]) = opval
;
1271 written
|= (1 << 3);
1272 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1275 USI opval
= FLD (i_disp8
);
1276 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1277 written
|= (1 << 4);
1278 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1283 abuf
->written
= written
;
1284 SEM_BRANCH_FINI (vpc
);
1289 CASE (sem
, INSN_BNCL24
) : /* bncl.l $disp24 */
1291 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1292 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1293 #define FLD(f) abuf->fields.sfmt_bl24.f
1294 int UNUSED written
= 0;
1295 IADDR UNUSED pc
= abuf
->addr
;
1297 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1299 if (NOTBI (CPU (h_cond
))) {
1302 SI opval
= ADDSI (pc
, 4);
1303 CPU (h_gr
[((UINT
) 14)]) = opval
;
1304 written
|= (1 << 3);
1305 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1308 USI opval
= FLD (i_disp24
);
1309 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1310 written
|= (1 << 4);
1311 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1316 abuf
->written
= written
;
1317 SEM_BRANCH_FINI (vpc
);
1322 CASE (sem
, INSN_CMP
) : /* cmp $src1,$src2 */
1324 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1325 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1326 #define FLD(f) abuf->fields.sfmt_st_plus.f
1327 int UNUSED written
= 0;
1328 IADDR UNUSED pc
= abuf
->addr
;
1329 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1332 BI opval
= LTSI (* FLD (i_src1
), * FLD (i_src2
));
1333 CPU (h_cond
) = opval
;
1334 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1341 CASE (sem
, INSN_CMPI
) : /* cmpi $src2,$simm16 */
1343 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1344 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1345 #define FLD(f) abuf->fields.sfmt_st_d.f
1346 int UNUSED written
= 0;
1347 IADDR UNUSED pc
= abuf
->addr
;
1348 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1351 BI opval
= LTSI (* FLD (i_src2
), FLD (f_simm16
));
1352 CPU (h_cond
) = opval
;
1353 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1360 CASE (sem
, INSN_CMPU
) : /* cmpu $src1,$src2 */
1362 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1363 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1364 #define FLD(f) abuf->fields.sfmt_st_plus.f
1365 int UNUSED written
= 0;
1366 IADDR UNUSED pc
= abuf
->addr
;
1367 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1370 BI opval
= LTUSI (* FLD (i_src1
), * FLD (i_src2
));
1371 CPU (h_cond
) = opval
;
1372 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1379 CASE (sem
, INSN_CMPUI
) : /* cmpui $src2,$simm16 */
1381 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1382 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1383 #define FLD(f) abuf->fields.sfmt_st_d.f
1384 int UNUSED written
= 0;
1385 IADDR UNUSED pc
= abuf
->addr
;
1386 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1389 BI opval
= LTUSI (* FLD (i_src2
), FLD (f_simm16
));
1390 CPU (h_cond
) = opval
;
1391 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1398 CASE (sem
, INSN_CMPEQ
) : /* cmpeq $src1,$src2 */
1400 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1401 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1402 #define FLD(f) abuf->fields.sfmt_st_plus.f
1403 int UNUSED written
= 0;
1404 IADDR UNUSED pc
= abuf
->addr
;
1405 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1408 BI opval
= EQSI (* FLD (i_src1
), * FLD (i_src2
));
1409 CPU (h_cond
) = opval
;
1410 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1417 CASE (sem
, INSN_CMPZ
) : /* cmpz $src2 */
1419 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1420 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1421 #define FLD(f) abuf->fields.sfmt_st_plus.f
1422 int UNUSED written
= 0;
1423 IADDR UNUSED pc
= abuf
->addr
;
1424 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1427 BI opval
= EQSI (* FLD (i_src2
), 0);
1428 CPU (h_cond
) = opval
;
1429 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1436 CASE (sem
, INSN_DIV
) : /* div $dr,$sr */
1438 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1439 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1440 #define FLD(f) abuf->fields.sfmt_add.f
1441 int UNUSED written
= 0;
1442 IADDR UNUSED pc
= abuf
->addr
;
1443 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1445 if (NESI (* FLD (i_sr
), 0)) {
1447 SI opval
= DIVSI (* FLD (i_dr
), * FLD (i_sr
));
1448 * FLD (i_dr
) = opval
;
1449 written
|= (1 << 2);
1450 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1454 abuf
->written
= written
;
1459 CASE (sem
, INSN_DIVU
) : /* divu $dr,$sr */
1461 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1462 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1463 #define FLD(f) abuf->fields.sfmt_add.f
1464 int UNUSED written
= 0;
1465 IADDR UNUSED pc
= abuf
->addr
;
1466 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1468 if (NESI (* FLD (i_sr
), 0)) {
1470 SI opval
= UDIVSI (* FLD (i_dr
), * FLD (i_sr
));
1471 * FLD (i_dr
) = opval
;
1472 written
|= (1 << 2);
1473 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1477 abuf
->written
= written
;
1482 CASE (sem
, INSN_REM
) : /* rem $dr,$sr */
1484 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1485 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1486 #define FLD(f) abuf->fields.sfmt_add.f
1487 int UNUSED written
= 0;
1488 IADDR UNUSED pc
= abuf
->addr
;
1489 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1491 if (NESI (* FLD (i_sr
), 0)) {
1493 SI opval
= MODSI (* FLD (i_dr
), * FLD (i_sr
));
1494 * FLD (i_dr
) = opval
;
1495 written
|= (1 << 2);
1496 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1500 abuf
->written
= written
;
1505 CASE (sem
, INSN_REMU
) : /* remu $dr,$sr */
1507 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1508 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1509 #define FLD(f) abuf->fields.sfmt_add.f
1510 int UNUSED written
= 0;
1511 IADDR UNUSED pc
= abuf
->addr
;
1512 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1514 if (NESI (* FLD (i_sr
), 0)) {
1516 SI opval
= UMODSI (* FLD (i_dr
), * FLD (i_sr
));
1517 * FLD (i_dr
) = opval
;
1518 written
|= (1 << 2);
1519 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1523 abuf
->written
= written
;
1528 CASE (sem
, INSN_REMH
) : /* remh $dr,$sr */
1530 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1531 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1532 #define FLD(f) abuf->fields.sfmt_add.f
1533 int UNUSED written
= 0;
1534 IADDR UNUSED pc
= abuf
->addr
;
1535 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1537 if (NESI (* FLD (i_sr
), 0)) {
1539 SI opval
= MODSI (EXTHISI (TRUNCSIHI (* FLD (i_dr
))), * FLD (i_sr
));
1540 * FLD (i_dr
) = opval
;
1541 written
|= (1 << 2);
1542 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1546 abuf
->written
= written
;
1551 CASE (sem
, INSN_REMUH
) : /* remuh $dr,$sr */
1553 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1554 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1555 #define FLD(f) abuf->fields.sfmt_add.f
1556 int UNUSED written
= 0;
1557 IADDR UNUSED pc
= abuf
->addr
;
1558 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1560 if (NESI (* FLD (i_sr
), 0)) {
1562 SI opval
= UMODSI (* FLD (i_dr
), * FLD (i_sr
));
1563 * FLD (i_dr
) = opval
;
1564 written
|= (1 << 2);
1565 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1569 abuf
->written
= written
;
1574 CASE (sem
, INSN_REMB
) : /* remb $dr,$sr */
1576 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1577 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1578 #define FLD(f) abuf->fields.sfmt_add.f
1579 int UNUSED written
= 0;
1580 IADDR UNUSED pc
= abuf
->addr
;
1581 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1583 if (NESI (* FLD (i_sr
), 0)) {
1585 SI opval
= MODSI (EXTBISI (TRUNCSIBI (* FLD (i_dr
))), * FLD (i_sr
));
1586 * FLD (i_dr
) = opval
;
1587 written
|= (1 << 2);
1588 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1592 abuf
->written
= written
;
1597 CASE (sem
, INSN_REMUB
) : /* remub $dr,$sr */
1599 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1600 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1601 #define FLD(f) abuf->fields.sfmt_add.f
1602 int UNUSED written
= 0;
1603 IADDR UNUSED pc
= abuf
->addr
;
1604 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1606 if (NESI (* FLD (i_sr
), 0)) {
1608 SI opval
= UMODSI (* FLD (i_dr
), * FLD (i_sr
));
1609 * FLD (i_dr
) = opval
;
1610 written
|= (1 << 2);
1611 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1615 abuf
->written
= written
;
1620 CASE (sem
, INSN_DIVUH
) : /* divuh $dr,$sr */
1622 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1623 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1624 #define FLD(f) abuf->fields.sfmt_add.f
1625 int UNUSED written
= 0;
1626 IADDR UNUSED pc
= abuf
->addr
;
1627 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1629 if (NESI (* FLD (i_sr
), 0)) {
1631 SI opval
= UDIVSI (* FLD (i_dr
), * FLD (i_sr
));
1632 * FLD (i_dr
) = opval
;
1633 written
|= (1 << 2);
1634 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1638 abuf
->written
= written
;
1643 CASE (sem
, INSN_DIVB
) : /* divb $dr,$sr */
1645 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1646 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1647 #define FLD(f) abuf->fields.sfmt_add.f
1648 int UNUSED written
= 0;
1649 IADDR UNUSED pc
= abuf
->addr
;
1650 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1652 if (NESI (* FLD (i_sr
), 0)) {
1654 SI opval
= DIVSI (EXTBISI (TRUNCSIBI (* FLD (i_dr
))), * FLD (i_sr
));
1655 * FLD (i_dr
) = opval
;
1656 written
|= (1 << 2);
1657 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1661 abuf
->written
= written
;
1666 CASE (sem
, INSN_DIVUB
) : /* divub $dr,$sr */
1668 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1669 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1670 #define FLD(f) abuf->fields.sfmt_add.f
1671 int UNUSED written
= 0;
1672 IADDR UNUSED pc
= abuf
->addr
;
1673 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1675 if (NESI (* FLD (i_sr
), 0)) {
1677 SI opval
= UDIVSI (* FLD (i_dr
), * FLD (i_sr
));
1678 * FLD (i_dr
) = opval
;
1679 written
|= (1 << 2);
1680 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1684 abuf
->written
= written
;
1689 CASE (sem
, INSN_DIVH
) : /* divh $dr,$sr */
1691 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1692 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1693 #define FLD(f) abuf->fields.sfmt_add.f
1694 int UNUSED written
= 0;
1695 IADDR UNUSED pc
= abuf
->addr
;
1696 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1698 if (NESI (* FLD (i_sr
), 0)) {
1700 SI opval
= DIVSI (EXTHISI (TRUNCSIHI (* FLD (i_dr
))), * FLD (i_sr
));
1701 * FLD (i_dr
) = opval
;
1702 written
|= (1 << 2);
1703 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1707 abuf
->written
= written
;
1712 CASE (sem
, INSN_JC
) : /* jc $sr */
1714 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1715 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1716 #define FLD(f) abuf->fields.sfmt_jl.f
1717 int UNUSED written
= 0;
1718 IADDR UNUSED pc
= abuf
->addr
;
1720 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1724 USI opval
= ANDSI (* FLD (i_sr
), -4);
1725 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1726 written
|= (1 << 2);
1727 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1731 abuf
->written
= written
;
1732 SEM_BRANCH_FINI (vpc
);
1737 CASE (sem
, INSN_JNC
) : /* jnc $sr */
1739 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1740 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1741 #define FLD(f) abuf->fields.sfmt_jl.f
1742 int UNUSED written
= 0;
1743 IADDR UNUSED pc
= abuf
->addr
;
1745 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1747 if (NOTBI (CPU (h_cond
))) {
1749 USI opval
= ANDSI (* FLD (i_sr
), -4);
1750 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1751 written
|= (1 << 2);
1752 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1756 abuf
->written
= written
;
1757 SEM_BRANCH_FINI (vpc
);
1762 CASE (sem
, INSN_JL
) : /* jl $sr */
1764 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1765 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1766 #define FLD(f) abuf->fields.sfmt_jl.f
1767 int UNUSED written
= 0;
1768 IADDR UNUSED pc
= abuf
->addr
;
1770 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1774 temp0
= ADDSI (ANDSI (pc
, -4), 4);
1775 temp1
= ANDSI (* FLD (i_sr
), -4);
1778 CPU (h_gr
[((UINT
) 14)]) = opval
;
1779 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1783 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1784 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1788 SEM_BRANCH_FINI (vpc
);
1793 CASE (sem
, INSN_JMP
) : /* jmp $sr */
1795 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1796 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1797 #define FLD(f) abuf->fields.sfmt_jl.f
1798 int UNUSED written
= 0;
1799 IADDR UNUSED pc
= abuf
->addr
;
1801 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1804 USI opval
= ANDSI (* FLD (i_sr
), -4);
1805 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1806 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1809 SEM_BRANCH_FINI (vpc
);
1814 CASE (sem
, INSN_LD
) : /* ld $dr,@$sr */
1816 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1817 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1818 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1819 int UNUSED written
= 0;
1820 IADDR UNUSED pc
= abuf
->addr
;
1821 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1824 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
1825 * FLD (i_dr
) = opval
;
1826 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1833 CASE (sem
, INSN_LD_D
) : /* ld $dr,@($slo16,$sr) */
1835 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1836 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1837 #define FLD(f) abuf->fields.sfmt_add3.f
1838 int UNUSED written
= 0;
1839 IADDR UNUSED pc
= abuf
->addr
;
1840 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1843 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
)));
1844 * FLD (i_dr
) = opval
;
1845 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1852 CASE (sem
, INSN_LDB
) : /* ldb $dr,@$sr */
1854 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1855 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1856 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1857 int UNUSED written
= 0;
1858 IADDR UNUSED pc
= abuf
->addr
;
1859 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1862 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, * FLD (i_sr
)));
1863 * FLD (i_dr
) = opval
;
1864 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1871 CASE (sem
, INSN_LDB_D
) : /* ldb $dr,@($slo16,$sr) */
1873 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1874 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1875 #define FLD(f) abuf->fields.sfmt_add3.f
1876 int UNUSED written
= 0;
1877 IADDR UNUSED pc
= abuf
->addr
;
1878 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1881 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))));
1882 * FLD (i_dr
) = opval
;
1883 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1890 CASE (sem
, INSN_LDH
) : /* ldh $dr,@$sr */
1892 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1893 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1894 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1895 int UNUSED written
= 0;
1896 IADDR UNUSED pc
= abuf
->addr
;
1897 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1900 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, * FLD (i_sr
)));
1901 * FLD (i_dr
) = opval
;
1902 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1909 CASE (sem
, INSN_LDH_D
) : /* ldh $dr,@($slo16,$sr) */
1911 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1912 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1913 #define FLD(f) abuf->fields.sfmt_add3.f
1914 int UNUSED written
= 0;
1915 IADDR UNUSED pc
= abuf
->addr
;
1916 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1919 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))));
1920 * FLD (i_dr
) = opval
;
1921 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1928 CASE (sem
, INSN_LDUB
) : /* ldub $dr,@$sr */
1930 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1931 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1932 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1933 int UNUSED written
= 0;
1934 IADDR UNUSED pc
= abuf
->addr
;
1935 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1938 SI opval
= ZEXTQISI (GETMEMQI (current_cpu
, pc
, * FLD (i_sr
)));
1939 * FLD (i_dr
) = opval
;
1940 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1947 CASE (sem
, INSN_LDUB_D
) : /* ldub $dr,@($slo16,$sr) */
1949 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1950 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1951 #define FLD(f) abuf->fields.sfmt_add3.f
1952 int UNUSED written
= 0;
1953 IADDR UNUSED pc
= abuf
->addr
;
1954 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1957 SI opval
= ZEXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))));
1958 * FLD (i_dr
) = opval
;
1959 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1966 CASE (sem
, INSN_LDUH
) : /* lduh $dr,@$sr */
1968 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1969 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1970 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1971 int UNUSED written
= 0;
1972 IADDR UNUSED pc
= abuf
->addr
;
1973 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1976 SI opval
= ZEXTHISI (GETMEMHI (current_cpu
, pc
, * FLD (i_sr
)));
1977 * FLD (i_dr
) = opval
;
1978 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1985 CASE (sem
, INSN_LDUH_D
) : /* lduh $dr,@($slo16,$sr) */
1987 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1988 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1989 #define FLD(f) abuf->fields.sfmt_add3.f
1990 int UNUSED written
= 0;
1991 IADDR UNUSED pc
= abuf
->addr
;
1992 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1995 SI opval
= ZEXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))));
1996 * FLD (i_dr
) = opval
;
1997 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2004 CASE (sem
, INSN_LD_PLUS
) : /* ld $dr,@$sr+ */
2006 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2007 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2008 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2009 int UNUSED written
= 0;
2010 IADDR UNUSED pc
= abuf
->addr
;
2011 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2015 temp0
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
2016 temp1
= ADDSI (* FLD (i_sr
), 4);
2019 * FLD (i_dr
) = opval
;
2020 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2024 * FLD (i_sr
) = opval
;
2025 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2033 CASE (sem
, INSN_LD24
) : /* ld24 $dr,$uimm24 */
2035 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2036 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2037 #define FLD(f) abuf->fields.sfmt_ld24.f
2038 int UNUSED written
= 0;
2039 IADDR UNUSED pc
= abuf
->addr
;
2040 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2043 SI opval
= FLD (i_uimm24
);
2044 * FLD (i_dr
) = opval
;
2045 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2052 CASE (sem
, INSN_LDI8
) : /* ldi8 $dr,$simm8 */
2054 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2055 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2056 #define FLD(f) abuf->fields.sfmt_addi.f
2057 int UNUSED written
= 0;
2058 IADDR UNUSED pc
= abuf
->addr
;
2059 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2062 SI opval
= FLD (f_simm8
);
2063 * FLD (i_dr
) = opval
;
2064 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2071 CASE (sem
, INSN_LDI16
) : /* ldi16 $dr,$hash$slo16 */
2073 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2074 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2075 #define FLD(f) abuf->fields.sfmt_add3.f
2076 int UNUSED written
= 0;
2077 IADDR UNUSED pc
= abuf
->addr
;
2078 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2081 SI opval
= FLD (f_simm16
);
2082 * FLD (i_dr
) = opval
;
2083 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2090 CASE (sem
, INSN_LOCK
) : /* lock $dr,@$sr */
2092 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2093 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2094 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2095 int UNUSED written
= 0;
2096 IADDR UNUSED pc
= abuf
->addr
;
2097 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2102 CPU (h_lock
) = opval
;
2103 CGEN_TRACE_RESULT (current_cpu
, abuf
, "lock", 'x', opval
);
2106 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
2107 * FLD (i_dr
) = opval
;
2108 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2116 CASE (sem
, INSN_MACHI_A
) : /* machi $src1,$src2,$acc */
2118 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2119 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2120 #define FLD(f) abuf->fields.sfmt_machi_a.f
2121 int UNUSED written
= 0;
2122 IADDR UNUSED pc
= abuf
->addr
;
2123 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2126 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);
2127 SET_H_ACCUMS (FLD (f_acc
), opval
);
2128 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2135 CASE (sem
, INSN_MACLO_A
) : /* maclo $src1,$src2,$acc */
2137 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2138 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2139 #define FLD(f) abuf->fields.sfmt_machi_a.f
2140 int UNUSED written
= 0;
2141 IADDR UNUSED pc
= abuf
->addr
;
2142 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2145 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);
2146 SET_H_ACCUMS (FLD (f_acc
), opval
);
2147 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2154 CASE (sem
, INSN_MACWHI_A
) : /* macwhi $src1,$src2,$acc */
2156 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2157 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2158 #define FLD(f) abuf->fields.sfmt_machi_a.f
2159 int UNUSED written
= 0;
2160 IADDR UNUSED pc
= abuf
->addr
;
2161 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2164 DI opval
= ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16)))));
2165 SET_H_ACCUMS (FLD (f_acc
), opval
);
2166 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2173 CASE (sem
, INSN_MACWLO_A
) : /* macwlo $src1,$src2,$acc */
2175 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2176 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2177 #define FLD(f) abuf->fields.sfmt_machi_a.f
2178 int UNUSED written
= 0;
2179 IADDR UNUSED pc
= abuf
->addr
;
2180 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2183 DI opval
= ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))));
2184 SET_H_ACCUMS (FLD (f_acc
), opval
);
2185 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2192 CASE (sem
, INSN_MUL
) : /* mul $dr,$sr */
2194 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2195 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2196 #define FLD(f) abuf->fields.sfmt_add.f
2197 int UNUSED written
= 0;
2198 IADDR UNUSED pc
= abuf
->addr
;
2199 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2202 SI opval
= MULSI (* FLD (i_dr
), * FLD (i_sr
));
2203 * FLD (i_dr
) = opval
;
2204 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2211 CASE (sem
, INSN_MULHI_A
) : /* mulhi $src1,$src2,$acc */
2213 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2214 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2215 #define FLD(f) abuf->fields.sfmt_machi_a.f
2216 int UNUSED written
= 0;
2217 IADDR UNUSED pc
= abuf
->addr
;
2218 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2221 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (* FLD (i_src1
), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16)))), 16), 16);
2222 SET_H_ACCUMS (FLD (f_acc
), opval
);
2223 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2230 CASE (sem
, INSN_MULLO_A
) : /* mullo $src1,$src2,$acc */
2232 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2233 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2234 #define FLD(f) abuf->fields.sfmt_machi_a.f
2235 int UNUSED written
= 0;
2236 IADDR UNUSED pc
= abuf
->addr
;
2237 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2240 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (* FLD (i_src1
), 16)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))), 16), 16);
2241 SET_H_ACCUMS (FLD (f_acc
), opval
);
2242 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2249 CASE (sem
, INSN_MULWHI_A
) : /* mulwhi $src1,$src2,$acc */
2251 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2252 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2253 #define FLD(f) abuf->fields.sfmt_machi_a.f
2254 int UNUSED written
= 0;
2255 IADDR UNUSED pc
= abuf
->addr
;
2256 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2259 DI opval
= MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16))));
2260 SET_H_ACCUMS (FLD (f_acc
), opval
);
2261 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2268 CASE (sem
, INSN_MULWLO_A
) : /* mulwlo $src1,$src2,$acc */
2270 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2271 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2272 #define FLD(f) abuf->fields.sfmt_machi_a.f
2273 int UNUSED written
= 0;
2274 IADDR UNUSED pc
= abuf
->addr
;
2275 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2278 DI opval
= MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
))));
2279 SET_H_ACCUMS (FLD (f_acc
), opval
);
2280 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2287 CASE (sem
, INSN_MV
) : /* mv $dr,$sr */
2289 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2290 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2291 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2292 int UNUSED written
= 0;
2293 IADDR UNUSED pc
= abuf
->addr
;
2294 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2297 SI opval
= * FLD (i_sr
);
2298 * FLD (i_dr
) = opval
;
2299 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2306 CASE (sem
, INSN_MVFACHI_A
) : /* mvfachi $dr,$accs */
2308 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2309 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2310 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
2311 int UNUSED written
= 0;
2312 IADDR UNUSED pc
= abuf
->addr
;
2313 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2316 SI opval
= TRUNCDISI (SRADI (GET_H_ACCUMS (FLD (f_accs
)), 32));
2317 * FLD (i_dr
) = opval
;
2318 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2325 CASE (sem
, INSN_MVFACLO_A
) : /* mvfaclo $dr,$accs */
2327 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2328 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2329 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
2330 int UNUSED written
= 0;
2331 IADDR UNUSED pc
= abuf
->addr
;
2332 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2335 SI opval
= TRUNCDISI (GET_H_ACCUMS (FLD (f_accs
)));
2336 * FLD (i_dr
) = opval
;
2337 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2344 CASE (sem
, INSN_MVFACMI_A
) : /* mvfacmi $dr,$accs */
2346 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2347 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2348 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
2349 int UNUSED written
= 0;
2350 IADDR UNUSED pc
= abuf
->addr
;
2351 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2354 SI opval
= TRUNCDISI (SRADI (GET_H_ACCUMS (FLD (f_accs
)), 16));
2355 * FLD (i_dr
) = opval
;
2356 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2363 CASE (sem
, INSN_MVFC
) : /* mvfc $dr,$scr */
2365 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2366 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2367 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2368 int UNUSED written
= 0;
2369 IADDR UNUSED pc
= abuf
->addr
;
2370 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2373 SI opval
= GET_H_CR (FLD (f_r2
));
2374 * FLD (i_dr
) = opval
;
2375 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2382 CASE (sem
, INSN_MVTACHI_A
) : /* mvtachi $src1,$accs */
2384 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2385 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2386 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
2387 int UNUSED written
= 0;
2388 IADDR UNUSED pc
= abuf
->addr
;
2389 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2392 DI opval
= ORDI (ANDDI (GET_H_ACCUMS (FLD (f_accs
)), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (* FLD (i_src1
)), 32));
2393 SET_H_ACCUMS (FLD (f_accs
), opval
);
2394 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2401 CASE (sem
, INSN_MVTACLO_A
) : /* mvtaclo $src1,$accs */
2403 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2404 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2405 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
2406 int UNUSED written
= 0;
2407 IADDR UNUSED pc
= abuf
->addr
;
2408 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2411 DI opval
= ORDI (ANDDI (GET_H_ACCUMS (FLD (f_accs
)), MAKEDI (0xffffffff, 0)), ZEXTSIDI (* FLD (i_src1
)));
2412 SET_H_ACCUMS (FLD (f_accs
), opval
);
2413 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2420 CASE (sem
, INSN_MVTC
) : /* mvtc $sr,$dcr */
2422 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2423 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2424 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2425 int UNUSED written
= 0;
2426 IADDR UNUSED pc
= abuf
->addr
;
2427 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2430 USI opval
= * FLD (i_sr
);
2431 SET_H_CR (FLD (f_r1
), opval
);
2432 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
2439 CASE (sem
, INSN_NEG
) : /* neg $dr,$sr */
2441 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2442 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2443 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2444 int UNUSED written
= 0;
2445 IADDR UNUSED pc
= abuf
->addr
;
2446 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2449 SI opval
= NEGSI (* FLD (i_sr
));
2450 * FLD (i_dr
) = opval
;
2451 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2458 CASE (sem
, INSN_NOP
) : /* nop */
2460 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2461 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2462 #define FLD(f) abuf->fields.sfmt_empty.f
2463 int UNUSED written
= 0;
2464 IADDR UNUSED pc
= abuf
->addr
;
2465 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2467 PROFILE_COUNT_FILLNOPS (current_cpu
, abuf
->addr
);
2473 CASE (sem
, INSN_NOT
) : /* not $dr,$sr */
2475 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2476 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2477 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2478 int UNUSED written
= 0;
2479 IADDR UNUSED pc
= abuf
->addr
;
2480 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2483 SI opval
= INVSI (* FLD (i_sr
));
2484 * FLD (i_dr
) = opval
;
2485 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2492 CASE (sem
, INSN_RAC_DSI
) : /* rac $accd,$accs,$imm1 */
2494 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2495 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2496 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
2497 int UNUSED written
= 0;
2498 IADDR UNUSED pc
= abuf
->addr
;
2499 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2503 tmp_tmp1
= SLLDI (GET_H_ACCUMS (FLD (f_accs
)), FLD (f_imm1
));
2504 tmp_tmp1
= ADDDI (tmp_tmp1
, MAKEDI (0, 32768));
2506 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)));
2507 SET_H_ACCUMS (FLD (f_accd
), opval
);
2508 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2516 CASE (sem
, INSN_RACH_DSI
) : /* rach $accd,$accs,$imm1 */
2518 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2519 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2520 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
2521 int UNUSED written
= 0;
2522 IADDR UNUSED pc
= abuf
->addr
;
2523 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2527 tmp_tmp1
= SLLDI (GET_H_ACCUMS (FLD (f_accs
)), FLD (f_imm1
));
2528 tmp_tmp1
= ADDDI (tmp_tmp1
, MAKEDI (0, 0x80000000));
2530 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)));
2531 SET_H_ACCUMS (FLD (f_accd
), opval
);
2532 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2540 CASE (sem
, INSN_RTE
) : /* rte */
2542 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2543 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2544 #define FLD(f) abuf->fields.sfmt_empty.f
2545 int UNUSED written
= 0;
2546 IADDR UNUSED pc
= abuf
->addr
;
2548 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2552 USI opval
= ANDSI (GET_H_CR (((UINT
) 6)), -4);
2553 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
2554 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
2557 USI opval
= GET_H_CR (((UINT
) 14));
2558 SET_H_CR (((UINT
) 6), opval
);
2559 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
2562 UQI opval
= CPU (h_bpsw
);
2564 CGEN_TRACE_RESULT (current_cpu
, abuf
, "psw", 'x', opval
);
2567 UQI opval
= CPU (h_bbpsw
);
2568 CPU (h_bpsw
) = opval
;
2569 CGEN_TRACE_RESULT (current_cpu
, abuf
, "bpsw", 'x', opval
);
2573 SEM_BRANCH_FINI (vpc
);
2578 CASE (sem
, INSN_SETH
) : /* seth $dr,$hash$hi16 */
2580 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2581 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2582 #define FLD(f) abuf->fields.sfmt_seth.f
2583 int UNUSED written
= 0;
2584 IADDR UNUSED pc
= abuf
->addr
;
2585 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2588 SI opval
= SLLSI (FLD (f_hi16
), 16);
2589 * FLD (i_dr
) = opval
;
2590 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2597 CASE (sem
, INSN_SLL
) : /* sll $dr,$sr */
2599 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2600 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2601 #define FLD(f) abuf->fields.sfmt_add.f
2602 int UNUSED written
= 0;
2603 IADDR UNUSED pc
= abuf
->addr
;
2604 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2607 SI opval
= SLLSI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
2608 * FLD (i_dr
) = opval
;
2609 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2616 CASE (sem
, INSN_SLL3
) : /* sll3 $dr,$sr,$simm16 */
2618 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2619 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2620 #define FLD(f) abuf->fields.sfmt_add3.f
2621 int UNUSED written
= 0;
2622 IADDR UNUSED pc
= abuf
->addr
;
2623 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2626 SI opval
= SLLSI (* FLD (i_sr
), ANDSI (FLD (f_simm16
), 31));
2627 * FLD (i_dr
) = opval
;
2628 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2635 CASE (sem
, INSN_SLLI
) : /* slli $dr,$uimm5 */
2637 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2638 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2639 #define FLD(f) abuf->fields.sfmt_slli.f
2640 int UNUSED written
= 0;
2641 IADDR UNUSED pc
= abuf
->addr
;
2642 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2645 SI opval
= SLLSI (* FLD (i_dr
), FLD (f_uimm5
));
2646 * FLD (i_dr
) = opval
;
2647 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2654 CASE (sem
, INSN_SRA
) : /* sra $dr,$sr */
2656 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2657 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2658 #define FLD(f) abuf->fields.sfmt_add.f
2659 int UNUSED written
= 0;
2660 IADDR UNUSED pc
= abuf
->addr
;
2661 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2664 SI opval
= SRASI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
2665 * FLD (i_dr
) = opval
;
2666 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2673 CASE (sem
, INSN_SRA3
) : /* sra3 $dr,$sr,$simm16 */
2675 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2676 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2677 #define FLD(f) abuf->fields.sfmt_add3.f
2678 int UNUSED written
= 0;
2679 IADDR UNUSED pc
= abuf
->addr
;
2680 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2683 SI opval
= SRASI (* FLD (i_sr
), ANDSI (FLD (f_simm16
), 31));
2684 * FLD (i_dr
) = opval
;
2685 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2692 CASE (sem
, INSN_SRAI
) : /* srai $dr,$uimm5 */
2694 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2695 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2696 #define FLD(f) abuf->fields.sfmt_slli.f
2697 int UNUSED written
= 0;
2698 IADDR UNUSED pc
= abuf
->addr
;
2699 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2702 SI opval
= SRASI (* FLD (i_dr
), FLD (f_uimm5
));
2703 * FLD (i_dr
) = opval
;
2704 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2711 CASE (sem
, INSN_SRL
) : /* srl $dr,$sr */
2713 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2714 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2715 #define FLD(f) abuf->fields.sfmt_add.f
2716 int UNUSED written
= 0;
2717 IADDR UNUSED pc
= abuf
->addr
;
2718 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2721 SI opval
= SRLSI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
2722 * FLD (i_dr
) = opval
;
2723 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2730 CASE (sem
, INSN_SRL3
) : /* srl3 $dr,$sr,$simm16 */
2732 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2733 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2734 #define FLD(f) abuf->fields.sfmt_add3.f
2735 int UNUSED written
= 0;
2736 IADDR UNUSED pc
= abuf
->addr
;
2737 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2740 SI opval
= SRLSI (* FLD (i_sr
), ANDSI (FLD (f_simm16
), 31));
2741 * FLD (i_dr
) = opval
;
2742 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2749 CASE (sem
, INSN_SRLI
) : /* srli $dr,$uimm5 */
2751 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2752 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2753 #define FLD(f) abuf->fields.sfmt_slli.f
2754 int UNUSED written
= 0;
2755 IADDR UNUSED pc
= abuf
->addr
;
2756 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2759 SI opval
= SRLSI (* FLD (i_dr
), FLD (f_uimm5
));
2760 * FLD (i_dr
) = opval
;
2761 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2768 CASE (sem
, INSN_ST
) : /* st $src1,@$src2 */
2770 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2771 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2772 #define FLD(f) abuf->fields.sfmt_st_plus.f
2773 int UNUSED written
= 0;
2774 IADDR UNUSED pc
= abuf
->addr
;
2775 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2778 SI opval
= * FLD (i_src1
);
2779 SETMEMSI (current_cpu
, pc
, * FLD (i_src2
), opval
);
2780 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2787 CASE (sem
, INSN_ST_D
) : /* st $src1,@($slo16,$src2) */
2789 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2790 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2791 #define FLD(f) abuf->fields.sfmt_st_d.f
2792 int UNUSED written
= 0;
2793 IADDR UNUSED pc
= abuf
->addr
;
2794 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2797 SI opval
= * FLD (i_src1
);
2798 SETMEMSI (current_cpu
, pc
, ADDSI (* FLD (i_src2
), FLD (f_simm16
)), opval
);
2799 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2806 CASE (sem
, INSN_STB
) : /* stb $src1,@$src2 */
2808 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2809 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2810 #define FLD(f) abuf->fields.sfmt_st_plus.f
2811 int UNUSED written
= 0;
2812 IADDR UNUSED pc
= abuf
->addr
;
2813 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2816 QI opval
= * FLD (i_src1
);
2817 SETMEMQI (current_cpu
, pc
, * FLD (i_src2
), opval
);
2818 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2825 CASE (sem
, INSN_STB_D
) : /* stb $src1,@($slo16,$src2) */
2827 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2828 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2829 #define FLD(f) abuf->fields.sfmt_st_d.f
2830 int UNUSED written
= 0;
2831 IADDR UNUSED pc
= abuf
->addr
;
2832 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2835 QI opval
= * FLD (i_src1
);
2836 SETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_src2
), FLD (f_simm16
)), opval
);
2837 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2844 CASE (sem
, INSN_STH
) : /* sth $src1,@$src2 */
2846 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2847 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2848 #define FLD(f) abuf->fields.sfmt_st_plus.f
2849 int UNUSED written
= 0;
2850 IADDR UNUSED pc
= abuf
->addr
;
2851 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2854 HI opval
= * FLD (i_src1
);
2855 SETMEMHI (current_cpu
, pc
, * FLD (i_src2
), opval
);
2856 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2863 CASE (sem
, INSN_STH_D
) : /* sth $src1,@($slo16,$src2) */
2865 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2866 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2867 #define FLD(f) abuf->fields.sfmt_st_d.f
2868 int UNUSED written
= 0;
2869 IADDR UNUSED pc
= abuf
->addr
;
2870 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2873 HI opval
= * FLD (i_src1
);
2874 SETMEMHI (current_cpu
, pc
, ADDSI (* FLD (i_src2
), FLD (f_simm16
)), opval
);
2875 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2882 CASE (sem
, INSN_ST_PLUS
) : /* st $src1,@+$src2 */
2884 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2885 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2886 #define FLD(f) abuf->fields.sfmt_st_plus.f
2887 int UNUSED written
= 0;
2888 IADDR UNUSED pc
= abuf
->addr
;
2889 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2893 tmp_new_src2
= ADDSI (* FLD (i_src2
), 4);
2895 SI opval
= * FLD (i_src1
);
2896 SETMEMSI (current_cpu
, pc
, tmp_new_src2
, opval
);
2897 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2900 SI opval
= tmp_new_src2
;
2901 * FLD (i_src2
) = opval
;
2902 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2910 CASE (sem
, INSN_STH_PLUS
) : /* sth $src1,@$src2+ */
2912 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2913 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2914 #define FLD(f) abuf->fields.sfmt_st_plus.f
2915 int UNUSED written
= 0;
2916 IADDR UNUSED pc
= abuf
->addr
;
2917 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2921 tmp_new_src2
= * FLD (i_src2
);
2923 HI opval
= * FLD (i_src1
);
2924 SETMEMHI (current_cpu
, pc
, tmp_new_src2
, opval
);
2925 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2928 SI opval
= ADDSI (tmp_new_src2
, 2);
2929 * FLD (i_src2
) = opval
;
2930 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2938 CASE (sem
, INSN_STB_PLUS
) : /* stb $src1,@$src2+ */
2940 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2941 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2942 #define FLD(f) abuf->fields.sfmt_st_plus.f
2943 int UNUSED written
= 0;
2944 IADDR UNUSED pc
= abuf
->addr
;
2945 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2949 tmp_new_src2
= * FLD (i_src2
);
2951 QI opval
= * FLD (i_src1
);
2952 SETMEMQI (current_cpu
, pc
, tmp_new_src2
, opval
);
2953 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2956 SI opval
= ADDSI (tmp_new_src2
, 1);
2957 * FLD (i_src2
) = opval
;
2958 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2966 CASE (sem
, INSN_ST_MINUS
) : /* st $src1,@-$src2 */
2968 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2969 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2970 #define FLD(f) abuf->fields.sfmt_st_plus.f
2971 int UNUSED written
= 0;
2972 IADDR UNUSED pc
= abuf
->addr
;
2973 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2977 tmp_new_src2
= SUBSI (* FLD (i_src2
), 4);
2979 SI opval
= * FLD (i_src1
);
2980 SETMEMSI (current_cpu
, pc
, tmp_new_src2
, opval
);
2981 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2984 SI opval
= tmp_new_src2
;
2985 * FLD (i_src2
) = opval
;
2986 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2994 CASE (sem
, INSN_SUB
) : /* sub $dr,$sr */
2996 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2997 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2998 #define FLD(f) abuf->fields.sfmt_add.f
2999 int UNUSED written
= 0;
3000 IADDR UNUSED pc
= abuf
->addr
;
3001 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3004 SI opval
= SUBSI (* FLD (i_dr
), * FLD (i_sr
));
3005 * FLD (i_dr
) = opval
;
3006 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3013 CASE (sem
, INSN_SUBV
) : /* subv $dr,$sr */
3015 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3016 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3017 #define FLD(f) abuf->fields.sfmt_add.f
3018 int UNUSED written
= 0;
3019 IADDR UNUSED pc
= abuf
->addr
;
3020 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3024 temp0
= SUBSI (* FLD (i_dr
), * FLD (i_sr
));
3025 temp1
= SUBOFSI (* FLD (i_dr
), * FLD (i_sr
), 0);
3028 * FLD (i_dr
) = opval
;
3029 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3033 CPU (h_cond
) = opval
;
3034 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3042 CASE (sem
, INSN_SUBX
) : /* subx $dr,$sr */
3044 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3045 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3046 #define FLD(f) abuf->fields.sfmt_add.f
3047 int UNUSED written
= 0;
3048 IADDR UNUSED pc
= abuf
->addr
;
3049 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3053 temp0
= SUBCSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
3054 temp1
= SUBCFSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
3057 * FLD (i_dr
) = opval
;
3058 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3062 CPU (h_cond
) = opval
;
3063 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3071 CASE (sem
, INSN_TRAP
) : /* trap $uimm4 */
3073 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3074 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3075 #define FLD(f) abuf->fields.sfmt_trap.f
3076 int UNUSED written
= 0;
3077 IADDR UNUSED pc
= abuf
->addr
;
3079 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3083 USI opval
= GET_H_CR (((UINT
) 6));
3084 SET_H_CR (((UINT
) 14), opval
);
3085 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
3088 USI opval
= ADDSI (pc
, 4);
3089 SET_H_CR (((UINT
) 6), opval
);
3090 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
3093 UQI opval
= CPU (h_bpsw
);
3094 CPU (h_bbpsw
) = opval
;
3095 CGEN_TRACE_RESULT (current_cpu
, abuf
, "bbpsw", 'x', opval
);
3098 UQI opval
= GET_H_PSW ();
3099 CPU (h_bpsw
) = opval
;
3100 CGEN_TRACE_RESULT (current_cpu
, abuf
, "bpsw", 'x', opval
);
3103 UQI opval
= ANDQI (GET_H_PSW (), 128);
3105 CGEN_TRACE_RESULT (current_cpu
, abuf
, "psw", 'x', opval
);
3108 SI opval
= m32r_trap (current_cpu
, pc
, FLD (f_uimm4
));
3109 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3110 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3114 SEM_BRANCH_FINI (vpc
);
3119 CASE (sem
, INSN_UNLOCK
) : /* unlock $src1,@$src2 */
3121 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3122 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3123 #define FLD(f) abuf->fields.sfmt_st_plus.f
3124 int UNUSED written
= 0;
3125 IADDR UNUSED pc
= abuf
->addr
;
3126 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3131 SI opval
= * FLD (i_src1
);
3132 SETMEMSI (current_cpu
, pc
, * FLD (i_src2
), opval
);
3133 written
|= (1 << 4);
3134 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3139 CPU (h_lock
) = opval
;
3140 CGEN_TRACE_RESULT (current_cpu
, abuf
, "lock", 'x', opval
);
3144 abuf
->written
= written
;
3149 CASE (sem
, INSN_SATB
) : /* satb $dr,$sr */
3151 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3152 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3153 #define FLD(f) abuf->fields.sfmt_ld_plus.f
3154 int UNUSED written
= 0;
3155 IADDR UNUSED pc
= abuf
->addr
;
3156 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3159 SI opval
= (GESI (* FLD (i_sr
), 127)) ? (127) : (LESI (* FLD (i_sr
), -128)) ? (-128) : (* FLD (i_sr
));
3160 * FLD (i_dr
) = opval
;
3161 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3168 CASE (sem
, INSN_SATH
) : /* sath $dr,$sr */
3170 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3171 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3172 #define FLD(f) abuf->fields.sfmt_ld_plus.f
3173 int UNUSED written
= 0;
3174 IADDR UNUSED pc
= abuf
->addr
;
3175 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3178 SI opval
= (GESI (* FLD (i_sr
), 32767)) ? (32767) : (LESI (* FLD (i_sr
), -32768)) ? (-32768) : (* FLD (i_sr
));
3179 * FLD (i_dr
) = opval
;
3180 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3187 CASE (sem
, INSN_SAT
) : /* sat $dr,$sr */
3189 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3190 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3191 #define FLD(f) abuf->fields.sfmt_ld_plus.f
3192 int UNUSED written
= 0;
3193 IADDR UNUSED pc
= abuf
->addr
;
3194 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3197 SI opval
= ((CPU (h_cond
)) ? (((LTSI (* FLD (i_sr
), 0)) ? (2147483647) : (0x80000000))) : (* FLD (i_sr
)));
3198 * FLD (i_dr
) = opval
;
3199 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3206 CASE (sem
, INSN_PCMPBZ
) : /* pcmpbz $src2 */
3208 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3209 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3210 #define FLD(f) abuf->fields.sfmt_st_plus.f
3211 int UNUSED written
= 0;
3212 IADDR UNUSED pc
= abuf
->addr
;
3213 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3216 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);
3217 CPU (h_cond
) = opval
;
3218 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3225 CASE (sem
, INSN_SADD
) : /* sadd */
3227 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3228 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3229 #define FLD(f) abuf->fields.sfmt_empty.f
3230 int UNUSED written
= 0;
3231 IADDR UNUSED pc
= abuf
->addr
;
3232 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3235 DI opval
= ADDDI (SRADI (GET_H_ACCUMS (((UINT
) 1)), 16), GET_H_ACCUMS (((UINT
) 0)));
3236 SET_H_ACCUMS (((UINT
) 0), opval
);
3237 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
3244 CASE (sem
, INSN_MACWU1
) : /* macwu1 $src1,$src2 */
3246 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3247 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3248 #define FLD(f) abuf->fields.sfmt_st_plus.f
3249 int UNUSED written
= 0;
3250 IADDR UNUSED pc
= abuf
->addr
;
3251 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3254 DI opval
= SRADI (SLLDI (ADDDI (GET_H_ACCUMS (((UINT
) 1)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTSIDI (ANDSI (* FLD (i_src2
), 65535)))), 8), 8);
3255 SET_H_ACCUMS (((UINT
) 1), opval
);
3256 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
3263 CASE (sem
, INSN_MSBLO
) : /* msblo $src1,$src2 */
3265 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3266 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3267 #define FLD(f) abuf->fields.sfmt_st_plus.f
3268 int UNUSED written
= 0;
3269 IADDR UNUSED pc
= abuf
->addr
;
3270 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3273 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);
3274 SET_H_ACCUM (opval
);
3275 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accum", 'D', opval
);
3282 CASE (sem
, INSN_MULWU1
) : /* mulwu1 $src1,$src2 */
3284 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3285 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3286 #define FLD(f) abuf->fields.sfmt_st_plus.f
3287 int UNUSED written
= 0;
3288 IADDR UNUSED pc
= abuf
->addr
;
3289 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3292 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (* FLD (i_src1
)), EXTSIDI (ANDSI (* FLD (i_src2
), 65535))), 16), 16);
3293 SET_H_ACCUMS (((UINT
) 1), opval
);
3294 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
3301 CASE (sem
, INSN_MACLH1
) : /* maclh1 $src1,$src2 */
3303 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3304 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3305 #define FLD(f) abuf->fields.sfmt_st_plus.f
3306 int UNUSED written
= 0;
3307 IADDR UNUSED pc
= abuf
->addr
;
3308 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3311 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);
3312 SET_H_ACCUMS (((UINT
) 1), opval
);
3313 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
3320 CASE (sem
, INSN_SC
) : /* sc */
3322 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3323 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3324 #define FLD(f) abuf->fields.sfmt_empty.f
3325 int UNUSED written
= 0;
3326 IADDR UNUSED pc
= abuf
->addr
;
3327 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3329 if (ZEXTBISI (CPU (h_cond
)))
3330 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
3336 CASE (sem
, INSN_SNC
) : /* snc */
3338 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3339 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3340 #define FLD(f) abuf->fields.sfmt_empty.f
3341 int UNUSED written
= 0;
3342 IADDR UNUSED pc
= abuf
->addr
;
3343 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3345 if (ZEXTBISI (NOTBI (CPU (h_cond
))))
3346 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
3352 CASE (sem
, INSN_CLRPSW
) : /* clrpsw $uimm8 */
3354 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3355 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3356 #define FLD(f) abuf->fields.sfmt_clrpsw.f
3357 int UNUSED written
= 0;
3358 IADDR UNUSED pc
= abuf
->addr
;
3359 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3362 USI opval
= ANDSI (GET_H_CR (((UINT
) 0)), ORSI (ZEXTQISI (INVQI (FLD (f_uimm8
))), 65280));
3363 SET_H_CR (((UINT
) 0), opval
);
3364 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
3371 CASE (sem
, INSN_SETPSW
) : /* setpsw $uimm8 */
3373 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3374 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3375 #define FLD(f) abuf->fields.sfmt_clrpsw.f
3376 int UNUSED written
= 0;
3377 IADDR UNUSED pc
= abuf
->addr
;
3378 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3381 USI opval
= FLD (f_uimm8
);
3382 SET_H_CR (((UINT
) 0), opval
);
3383 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
3390 CASE (sem
, INSN_BSET
) : /* bset $uimm3,@($slo16,$sr) */
3392 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3393 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3394 #define FLD(f) abuf->fields.sfmt_bset.f
3395 int UNUSED written
= 0;
3396 IADDR UNUSED pc
= abuf
->addr
;
3397 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3400 QI opval
= ORQI (GETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))), SLLQI (1, SUBSI (7, FLD (f_uimm3
))));
3401 SETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
)), opval
);
3402 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3409 CASE (sem
, INSN_BCLR
) : /* bclr $uimm3,@($slo16,$sr) */
3411 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3412 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3413 #define FLD(f) abuf->fields.sfmt_bset.f
3414 int UNUSED written
= 0;
3415 IADDR UNUSED pc
= abuf
->addr
;
3416 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3419 QI opval
= ANDQI (GETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))), INVQI (SLLQI (1, SUBSI (7, FLD (f_uimm3
)))));
3420 SETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
)), opval
);
3421 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3428 CASE (sem
, INSN_BTST
) : /* btst $uimm3,$sr */
3430 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3431 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3432 #define FLD(f) abuf->fields.sfmt_bset.f
3433 int UNUSED written
= 0;
3434 IADDR UNUSED pc
= abuf
->addr
;
3435 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3438 BI opval
= ANDQI (SRLQI (* FLD (i_sr
), SUBSI (7, FLD (f_uimm3
))), 1);
3439 CPU (h_cond
) = opval
;
3440 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3447 CASE (sem
, INSN_PAR_ADD
) : /* add $dr,$sr */
3449 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3450 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3451 #define FLD(f) abuf->fields.sfmt_add.f
3452 #define OPRND(f) par_exec->operands.sfmt_add.f
3453 int UNUSED written
= 0;
3454 IADDR UNUSED pc
= abuf
->addr
;
3455 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3458 SI opval
= ADDSI (* FLD (i_dr
), * FLD (i_sr
));
3460 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3468 CASE (sem
, INSN_WRITE_ADD
) : /* add $dr,$sr */
3470 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3471 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3472 #define FLD(f) abuf->fields.sfmt_add.f
3473 #define OPRND(f) par_exec->operands.sfmt_add.f
3474 int UNUSED written
= abuf
->written
;
3475 IADDR UNUSED pc
= abuf
->addr
;
3476 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3478 * FLD (i_dr
) = OPRND (dr
);
3485 CASE (sem
, INSN_PAR_AND
) : /* and $dr,$sr */
3487 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3488 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3489 #define FLD(f) abuf->fields.sfmt_add.f
3490 #define OPRND(f) par_exec->operands.sfmt_add.f
3491 int UNUSED written
= 0;
3492 IADDR UNUSED pc
= abuf
->addr
;
3493 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3496 SI opval
= ANDSI (* FLD (i_dr
), * FLD (i_sr
));
3498 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3506 CASE (sem
, INSN_WRITE_AND
) : /* and $dr,$sr */
3508 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3509 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3510 #define FLD(f) abuf->fields.sfmt_add.f
3511 #define OPRND(f) par_exec->operands.sfmt_add.f
3512 int UNUSED written
= abuf
->written
;
3513 IADDR UNUSED pc
= abuf
->addr
;
3514 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3516 * FLD (i_dr
) = OPRND (dr
);
3523 CASE (sem
, INSN_PAR_OR
) : /* or $dr,$sr */
3525 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3526 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3527 #define FLD(f) abuf->fields.sfmt_add.f
3528 #define OPRND(f) par_exec->operands.sfmt_add.f
3529 int UNUSED written
= 0;
3530 IADDR UNUSED pc
= abuf
->addr
;
3531 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3534 SI opval
= ORSI (* FLD (i_dr
), * FLD (i_sr
));
3536 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3544 CASE (sem
, INSN_WRITE_OR
) : /* or $dr,$sr */
3546 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3547 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3548 #define FLD(f) abuf->fields.sfmt_add.f
3549 #define OPRND(f) par_exec->operands.sfmt_add.f
3550 int UNUSED written
= abuf
->written
;
3551 IADDR UNUSED pc
= abuf
->addr
;
3552 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3554 * FLD (i_dr
) = OPRND (dr
);
3561 CASE (sem
, INSN_PAR_XOR
) : /* xor $dr,$sr */
3563 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3564 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3565 #define FLD(f) abuf->fields.sfmt_add.f
3566 #define OPRND(f) par_exec->operands.sfmt_add.f
3567 int UNUSED written
= 0;
3568 IADDR UNUSED pc
= abuf
->addr
;
3569 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3572 SI opval
= XORSI (* FLD (i_dr
), * FLD (i_sr
));
3574 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3582 CASE (sem
, INSN_WRITE_XOR
) : /* xor $dr,$sr */
3584 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3585 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3586 #define FLD(f) abuf->fields.sfmt_add.f
3587 #define OPRND(f) par_exec->operands.sfmt_add.f
3588 int UNUSED written
= abuf
->written
;
3589 IADDR UNUSED pc
= abuf
->addr
;
3590 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3592 * FLD (i_dr
) = OPRND (dr
);
3599 CASE (sem
, INSN_PAR_ADDI
) : /* addi $dr,$simm8 */
3601 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3602 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3603 #define FLD(f) abuf->fields.sfmt_addi.f
3604 #define OPRND(f) par_exec->operands.sfmt_addi.f
3605 int UNUSED written
= 0;
3606 IADDR UNUSED pc
= abuf
->addr
;
3607 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3610 SI opval
= ADDSI (* FLD (i_dr
), FLD (f_simm8
));
3612 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3620 CASE (sem
, INSN_WRITE_ADDI
) : /* addi $dr,$simm8 */
3622 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3623 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3624 #define FLD(f) abuf->fields.sfmt_addi.f
3625 #define OPRND(f) par_exec->operands.sfmt_addi.f
3626 int UNUSED written
= abuf
->written
;
3627 IADDR UNUSED pc
= abuf
->addr
;
3628 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3630 * FLD (i_dr
) = OPRND (dr
);
3637 CASE (sem
, INSN_PAR_ADDV
) : /* addv $dr,$sr */
3639 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3640 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3641 #define FLD(f) abuf->fields.sfmt_add.f
3642 #define OPRND(f) par_exec->operands.sfmt_addv.f
3643 int UNUSED written
= 0;
3644 IADDR UNUSED pc
= abuf
->addr
;
3645 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3649 temp0
= ADDSI (* FLD (i_dr
), * FLD (i_sr
));
3650 temp1
= ADDOFSI (* FLD (i_dr
), * FLD (i_sr
), 0);
3654 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3658 OPRND (condbit
) = opval
;
3659 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3668 CASE (sem
, INSN_WRITE_ADDV
) : /* addv $dr,$sr */
3670 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3671 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3672 #define FLD(f) abuf->fields.sfmt_add.f
3673 #define OPRND(f) par_exec->operands.sfmt_addv.f
3674 int UNUSED written
= abuf
->written
;
3675 IADDR UNUSED pc
= abuf
->addr
;
3676 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3678 CPU (h_cond
) = OPRND (condbit
);
3679 * FLD (i_dr
) = OPRND (dr
);
3686 CASE (sem
, INSN_PAR_ADDX
) : /* addx $dr,$sr */
3688 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3689 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3690 #define FLD(f) abuf->fields.sfmt_add.f
3691 #define OPRND(f) par_exec->operands.sfmt_addx.f
3692 int UNUSED written
= 0;
3693 IADDR UNUSED pc
= abuf
->addr
;
3694 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3698 temp0
= ADDCSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
3699 temp1
= ADDCFSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
3703 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3707 OPRND (condbit
) = opval
;
3708 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3717 CASE (sem
, INSN_WRITE_ADDX
) : /* addx $dr,$sr */
3719 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3720 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3721 #define FLD(f) abuf->fields.sfmt_add.f
3722 #define OPRND(f) par_exec->operands.sfmt_addx.f
3723 int UNUSED written
= abuf
->written
;
3724 IADDR UNUSED pc
= abuf
->addr
;
3725 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3727 CPU (h_cond
) = OPRND (condbit
);
3728 * FLD (i_dr
) = OPRND (dr
);
3735 CASE (sem
, INSN_PAR_BC8
) : /* bc.s $disp8 */
3737 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3738 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3739 #define FLD(f) abuf->fields.sfmt_bl8.f
3740 #define OPRND(f) par_exec->operands.sfmt_bc8.f
3741 int UNUSED written
= 0;
3742 IADDR UNUSED pc
= abuf
->addr
;
3743 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3747 USI opval
= FLD (i_disp8
);
3749 written
|= (1 << 2);
3750 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3754 abuf
->written
= written
;
3760 CASE (sem
, INSN_WRITE_BC8
) : /* bc.s $disp8 */
3762 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3763 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3764 #define FLD(f) abuf->fields.sfmt_bl8.f
3765 #define OPRND(f) par_exec->operands.sfmt_bc8.f
3766 int UNUSED written
= abuf
->written
;
3767 IADDR UNUSED pc
= abuf
->addr
;
3769 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3771 if (written
& (1 << 2))
3773 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3776 SEM_BRANCH_FINI (vpc
);
3782 CASE (sem
, INSN_PAR_BL8
) : /* bl.s $disp8 */
3784 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3785 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3786 #define FLD(f) abuf->fields.sfmt_bl8.f
3787 #define OPRND(f) par_exec->operands.sfmt_bl8.f
3788 int UNUSED written
= 0;
3789 IADDR UNUSED pc
= abuf
->addr
;
3790 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3794 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
3795 OPRND (h_gr_SI_14
) = opval
;
3796 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3799 USI opval
= FLD (i_disp8
);
3801 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3810 CASE (sem
, INSN_WRITE_BL8
) : /* bl.s $disp8 */
3812 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3813 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3814 #define FLD(f) abuf->fields.sfmt_bl8.f
3815 #define OPRND(f) par_exec->operands.sfmt_bl8.f
3816 int UNUSED written
= abuf
->written
;
3817 IADDR UNUSED pc
= abuf
->addr
;
3819 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3821 CPU (h_gr
[((UINT
) 14)]) = OPRND (h_gr_SI_14
);
3822 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3824 SEM_BRANCH_FINI (vpc
);
3830 CASE (sem
, INSN_PAR_BCL8
) : /* bcl.s $disp8 */
3832 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3833 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3834 #define FLD(f) abuf->fields.sfmt_bl8.f
3835 #define OPRND(f) par_exec->operands.sfmt_bcl8.f
3836 int UNUSED written
= 0;
3837 IADDR UNUSED pc
= abuf
->addr
;
3838 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3843 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
3844 OPRND (h_gr_SI_14
) = opval
;
3845 written
|= (1 << 3);
3846 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3849 USI opval
= FLD (i_disp8
);
3851 written
|= (1 << 4);
3852 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3857 abuf
->written
= written
;
3863 CASE (sem
, INSN_WRITE_BCL8
) : /* bcl.s $disp8 */
3865 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3866 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3867 #define FLD(f) abuf->fields.sfmt_bl8.f
3868 #define OPRND(f) par_exec->operands.sfmt_bcl8.f
3869 int UNUSED written
= abuf
->written
;
3870 IADDR UNUSED pc
= abuf
->addr
;
3872 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3874 if (written
& (1 << 3))
3876 CPU (h_gr
[((UINT
) 14)]) = OPRND (h_gr_SI_14
);
3878 if (written
& (1 << 4))
3880 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3883 SEM_BRANCH_FINI (vpc
);
3889 CASE (sem
, INSN_PAR_BNC8
) : /* bnc.s $disp8 */
3891 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3892 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3893 #define FLD(f) abuf->fields.sfmt_bl8.f
3894 #define OPRND(f) par_exec->operands.sfmt_bc8.f
3895 int UNUSED written
= 0;
3896 IADDR UNUSED pc
= abuf
->addr
;
3897 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3899 if (NOTBI (CPU (h_cond
))) {
3901 USI opval
= FLD (i_disp8
);
3903 written
|= (1 << 2);
3904 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3908 abuf
->written
= written
;
3914 CASE (sem
, INSN_WRITE_BNC8
) : /* bnc.s $disp8 */
3916 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3917 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3918 #define FLD(f) abuf->fields.sfmt_bl8.f
3919 #define OPRND(f) par_exec->operands.sfmt_bc8.f
3920 int UNUSED written
= abuf
->written
;
3921 IADDR UNUSED pc
= abuf
->addr
;
3923 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3925 if (written
& (1 << 2))
3927 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3930 SEM_BRANCH_FINI (vpc
);
3936 CASE (sem
, INSN_PAR_BRA8
) : /* bra.s $disp8 */
3938 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3939 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3940 #define FLD(f) abuf->fields.sfmt_bl8.f
3941 #define OPRND(f) par_exec->operands.sfmt_bra8.f
3942 int UNUSED written
= 0;
3943 IADDR UNUSED pc
= abuf
->addr
;
3944 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3947 USI opval
= FLD (i_disp8
);
3949 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3957 CASE (sem
, INSN_WRITE_BRA8
) : /* bra.s $disp8 */
3959 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3960 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3961 #define FLD(f) abuf->fields.sfmt_bl8.f
3962 #define OPRND(f) par_exec->operands.sfmt_bra8.f
3963 int UNUSED written
= abuf
->written
;
3964 IADDR UNUSED pc
= abuf
->addr
;
3966 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3968 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3970 SEM_BRANCH_FINI (vpc
);
3976 CASE (sem
, INSN_PAR_BNCL8
) : /* bncl.s $disp8 */
3978 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3979 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3980 #define FLD(f) abuf->fields.sfmt_bl8.f
3981 #define OPRND(f) par_exec->operands.sfmt_bcl8.f
3982 int UNUSED written
= 0;
3983 IADDR UNUSED pc
= abuf
->addr
;
3984 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3986 if (NOTBI (CPU (h_cond
))) {
3989 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
3990 OPRND (h_gr_SI_14
) = opval
;
3991 written
|= (1 << 3);
3992 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3995 USI opval
= FLD (i_disp8
);
3997 written
|= (1 << 4);
3998 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4003 abuf
->written
= written
;
4009 CASE (sem
, INSN_WRITE_BNCL8
) : /* bncl.s $disp8 */
4011 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4012 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4013 #define FLD(f) abuf->fields.sfmt_bl8.f
4014 #define OPRND(f) par_exec->operands.sfmt_bcl8.f
4015 int UNUSED written
= abuf
->written
;
4016 IADDR UNUSED pc
= abuf
->addr
;
4018 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4020 if (written
& (1 << 3))
4022 CPU (h_gr
[((UINT
) 14)]) = OPRND (h_gr_SI_14
);
4024 if (written
& (1 << 4))
4026 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
4029 SEM_BRANCH_FINI (vpc
);
4035 CASE (sem
, INSN_PAR_CMP
) : /* cmp $src1,$src2 */
4037 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4038 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4039 #define FLD(f) abuf->fields.sfmt_st_plus.f
4040 #define OPRND(f) par_exec->operands.sfmt_cmp.f
4041 int UNUSED written
= 0;
4042 IADDR UNUSED pc
= abuf
->addr
;
4043 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4046 BI opval
= LTSI (* FLD (i_src1
), * FLD (i_src2
));
4047 OPRND (condbit
) = opval
;
4048 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
4056 CASE (sem
, INSN_WRITE_CMP
) : /* cmp $src1,$src2 */
4058 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4059 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4060 #define FLD(f) abuf->fields.sfmt_st_plus.f
4061 #define OPRND(f) par_exec->operands.sfmt_cmp.f
4062 int UNUSED written
= abuf
->written
;
4063 IADDR UNUSED pc
= abuf
->addr
;
4064 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4066 CPU (h_cond
) = OPRND (condbit
);
4073 CASE (sem
, INSN_PAR_CMPU
) : /* cmpu $src1,$src2 */
4075 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4076 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4077 #define FLD(f) abuf->fields.sfmt_st_plus.f
4078 #define OPRND(f) par_exec->operands.sfmt_cmp.f
4079 int UNUSED written
= 0;
4080 IADDR UNUSED pc
= abuf
->addr
;
4081 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4084 BI opval
= LTUSI (* FLD (i_src1
), * FLD (i_src2
));
4085 OPRND (condbit
) = opval
;
4086 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
4094 CASE (sem
, INSN_WRITE_CMPU
) : /* cmpu $src1,$src2 */
4096 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4097 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4098 #define FLD(f) abuf->fields.sfmt_st_plus.f
4099 #define OPRND(f) par_exec->operands.sfmt_cmp.f
4100 int UNUSED written
= abuf
->written
;
4101 IADDR UNUSED pc
= abuf
->addr
;
4102 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4104 CPU (h_cond
) = OPRND (condbit
);
4111 CASE (sem
, INSN_PAR_CMPEQ
) : /* cmpeq $src1,$src2 */
4113 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4114 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4115 #define FLD(f) abuf->fields.sfmt_st_plus.f
4116 #define OPRND(f) par_exec->operands.sfmt_cmp.f
4117 int UNUSED written
= 0;
4118 IADDR UNUSED pc
= abuf
->addr
;
4119 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4122 BI opval
= EQSI (* FLD (i_src1
), * FLD (i_src2
));
4123 OPRND (condbit
) = opval
;
4124 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
4132 CASE (sem
, INSN_WRITE_CMPEQ
) : /* cmpeq $src1,$src2 */
4134 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4135 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4136 #define FLD(f) abuf->fields.sfmt_st_plus.f
4137 #define OPRND(f) par_exec->operands.sfmt_cmp.f
4138 int UNUSED written
= abuf
->written
;
4139 IADDR UNUSED pc
= abuf
->addr
;
4140 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4142 CPU (h_cond
) = OPRND (condbit
);
4149 CASE (sem
, INSN_PAR_CMPZ
) : /* cmpz $src2 */
4151 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4152 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4153 #define FLD(f) abuf->fields.sfmt_st_plus.f
4154 #define OPRND(f) par_exec->operands.sfmt_cmpz.f
4155 int UNUSED written
= 0;
4156 IADDR UNUSED pc
= abuf
->addr
;
4157 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4160 BI opval
= EQSI (* FLD (i_src2
), 0);
4161 OPRND (condbit
) = opval
;
4162 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
4170 CASE (sem
, INSN_WRITE_CMPZ
) : /* cmpz $src2 */
4172 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4173 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4174 #define FLD(f) abuf->fields.sfmt_st_plus.f
4175 #define OPRND(f) par_exec->operands.sfmt_cmpz.f
4176 int UNUSED written
= abuf
->written
;
4177 IADDR UNUSED pc
= abuf
->addr
;
4178 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4180 CPU (h_cond
) = OPRND (condbit
);
4187 CASE (sem
, INSN_PAR_JC
) : /* jc $sr */
4189 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4190 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4191 #define FLD(f) abuf->fields.sfmt_jl.f
4192 #define OPRND(f) par_exec->operands.sfmt_jc.f
4193 int UNUSED written
= 0;
4194 IADDR UNUSED pc
= abuf
->addr
;
4195 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4199 USI opval
= ANDSI (* FLD (i_sr
), -4);
4201 written
|= (1 << 2);
4202 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4206 abuf
->written
= written
;
4212 CASE (sem
, INSN_WRITE_JC
) : /* jc $sr */
4214 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4215 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4216 #define FLD(f) abuf->fields.sfmt_jl.f
4217 #define OPRND(f) par_exec->operands.sfmt_jc.f
4218 int UNUSED written
= abuf
->written
;
4219 IADDR UNUSED pc
= abuf
->addr
;
4221 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4223 if (written
& (1 << 2))
4225 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
4228 SEM_BRANCH_FINI (vpc
);
4234 CASE (sem
, INSN_PAR_JNC
) : /* jnc $sr */
4236 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4237 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4238 #define FLD(f) abuf->fields.sfmt_jl.f
4239 #define OPRND(f) par_exec->operands.sfmt_jc.f
4240 int UNUSED written
= 0;
4241 IADDR UNUSED pc
= abuf
->addr
;
4242 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4244 if (NOTBI (CPU (h_cond
))) {
4246 USI opval
= ANDSI (* FLD (i_sr
), -4);
4248 written
|= (1 << 2);
4249 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4253 abuf
->written
= written
;
4259 CASE (sem
, INSN_WRITE_JNC
) : /* jnc $sr */
4261 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4262 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4263 #define FLD(f) abuf->fields.sfmt_jl.f
4264 #define OPRND(f) par_exec->operands.sfmt_jc.f
4265 int UNUSED written
= abuf
->written
;
4266 IADDR UNUSED pc
= abuf
->addr
;
4268 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4270 if (written
& (1 << 2))
4272 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
4275 SEM_BRANCH_FINI (vpc
);
4281 CASE (sem
, INSN_PAR_JL
) : /* jl $sr */
4283 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4284 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4285 #define FLD(f) abuf->fields.sfmt_jl.f
4286 #define OPRND(f) par_exec->operands.sfmt_jl.f
4287 int UNUSED written
= 0;
4288 IADDR UNUSED pc
= abuf
->addr
;
4289 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4293 temp0
= ADDSI (ANDSI (pc
, -4), 4);
4294 temp1
= ANDSI (* FLD (i_sr
), -4);
4297 OPRND (h_gr_SI_14
) = opval
;
4298 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4303 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4312 CASE (sem
, INSN_WRITE_JL
) : /* jl $sr */
4314 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4315 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4316 #define FLD(f) abuf->fields.sfmt_jl.f
4317 #define OPRND(f) par_exec->operands.sfmt_jl.f
4318 int UNUSED written
= abuf
->written
;
4319 IADDR UNUSED pc
= abuf
->addr
;
4321 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4323 CPU (h_gr
[((UINT
) 14)]) = OPRND (h_gr_SI_14
);
4324 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
4326 SEM_BRANCH_FINI (vpc
);
4332 CASE (sem
, INSN_PAR_JMP
) : /* jmp $sr */
4334 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4335 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4336 #define FLD(f) abuf->fields.sfmt_jl.f
4337 #define OPRND(f) par_exec->operands.sfmt_jmp.f
4338 int UNUSED written
= 0;
4339 IADDR UNUSED pc
= abuf
->addr
;
4340 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4343 USI opval
= ANDSI (* FLD (i_sr
), -4);
4345 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4353 CASE (sem
, INSN_WRITE_JMP
) : /* jmp $sr */
4355 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4356 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4357 #define FLD(f) abuf->fields.sfmt_jl.f
4358 #define OPRND(f) par_exec->operands.sfmt_jmp.f
4359 int UNUSED written
= abuf
->written
;
4360 IADDR UNUSED pc
= abuf
->addr
;
4362 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4364 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
4366 SEM_BRANCH_FINI (vpc
);
4372 CASE (sem
, INSN_PAR_LD
) : /* ld $dr,@$sr */
4374 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4375 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4376 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4377 #define OPRND(f) par_exec->operands.sfmt_ld.f
4378 int UNUSED written
= 0;
4379 IADDR UNUSED pc
= abuf
->addr
;
4380 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4383 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
4385 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4393 CASE (sem
, INSN_WRITE_LD
) : /* ld $dr,@$sr */
4395 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4396 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4397 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4398 #define OPRND(f) par_exec->operands.sfmt_ld.f
4399 int UNUSED written
= abuf
->written
;
4400 IADDR UNUSED pc
= abuf
->addr
;
4401 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4403 * FLD (i_dr
) = OPRND (dr
);
4410 CASE (sem
, INSN_PAR_LDB
) : /* ldb $dr,@$sr */
4412 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4413 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4414 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4415 #define OPRND(f) par_exec->operands.sfmt_ldb.f
4416 int UNUSED written
= 0;
4417 IADDR UNUSED pc
= abuf
->addr
;
4418 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4421 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, * FLD (i_sr
)));
4423 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4431 CASE (sem
, INSN_WRITE_LDB
) : /* ldb $dr,@$sr */
4433 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4434 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4435 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4436 #define OPRND(f) par_exec->operands.sfmt_ldb.f
4437 int UNUSED written
= abuf
->written
;
4438 IADDR UNUSED pc
= abuf
->addr
;
4439 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4441 * FLD (i_dr
) = OPRND (dr
);
4448 CASE (sem
, INSN_PAR_LDH
) : /* ldh $dr,@$sr */
4450 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4451 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4452 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4453 #define OPRND(f) par_exec->operands.sfmt_ldh.f
4454 int UNUSED written
= 0;
4455 IADDR UNUSED pc
= abuf
->addr
;
4456 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4459 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, * FLD (i_sr
)));
4461 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4469 CASE (sem
, INSN_WRITE_LDH
) : /* ldh $dr,@$sr */
4471 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4472 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4473 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4474 #define OPRND(f) par_exec->operands.sfmt_ldh.f
4475 int UNUSED written
= abuf
->written
;
4476 IADDR UNUSED pc
= abuf
->addr
;
4477 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4479 * FLD (i_dr
) = OPRND (dr
);
4486 CASE (sem
, INSN_PAR_LDUB
) : /* ldub $dr,@$sr */
4488 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4489 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4490 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4491 #define OPRND(f) par_exec->operands.sfmt_ldb.f
4492 int UNUSED written
= 0;
4493 IADDR UNUSED pc
= abuf
->addr
;
4494 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4497 SI opval
= ZEXTQISI (GETMEMQI (current_cpu
, pc
, * FLD (i_sr
)));
4499 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4507 CASE (sem
, INSN_WRITE_LDUB
) : /* ldub $dr,@$sr */
4509 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4510 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4511 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4512 #define OPRND(f) par_exec->operands.sfmt_ldb.f
4513 int UNUSED written
= abuf
->written
;
4514 IADDR UNUSED pc
= abuf
->addr
;
4515 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4517 * FLD (i_dr
) = OPRND (dr
);
4524 CASE (sem
, INSN_PAR_LDUH
) : /* lduh $dr,@$sr */
4526 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4527 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4528 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4529 #define OPRND(f) par_exec->operands.sfmt_ldh.f
4530 int UNUSED written
= 0;
4531 IADDR UNUSED pc
= abuf
->addr
;
4532 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4535 SI opval
= ZEXTHISI (GETMEMHI (current_cpu
, pc
, * FLD (i_sr
)));
4537 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4545 CASE (sem
, INSN_WRITE_LDUH
) : /* lduh $dr,@$sr */
4547 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4548 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4549 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4550 #define OPRND(f) par_exec->operands.sfmt_ldh.f
4551 int UNUSED written
= abuf
->written
;
4552 IADDR UNUSED pc
= abuf
->addr
;
4553 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4555 * FLD (i_dr
) = OPRND (dr
);
4562 CASE (sem
, INSN_PAR_LD_PLUS
) : /* ld $dr,@$sr+ */
4564 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4565 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4566 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4567 #define OPRND(f) par_exec->operands.sfmt_ld_plus.f
4568 int UNUSED written
= 0;
4569 IADDR UNUSED pc
= abuf
->addr
;
4570 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4574 temp0
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
4575 temp1
= ADDSI (* FLD (i_sr
), 4);
4579 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4584 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4593 CASE (sem
, INSN_WRITE_LD_PLUS
) : /* ld $dr,@$sr+ */
4595 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4596 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4597 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4598 #define OPRND(f) par_exec->operands.sfmt_ld_plus.f
4599 int UNUSED written
= abuf
->written
;
4600 IADDR UNUSED pc
= abuf
->addr
;
4601 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4603 * FLD (i_dr
) = OPRND (dr
);
4604 * FLD (i_sr
) = OPRND (sr
);
4611 CASE (sem
, INSN_PAR_LDI8
) : /* ldi8 $dr,$simm8 */
4613 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4614 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4615 #define FLD(f) abuf->fields.sfmt_addi.f
4616 #define OPRND(f) par_exec->operands.sfmt_ldi8.f
4617 int UNUSED written
= 0;
4618 IADDR UNUSED pc
= abuf
->addr
;
4619 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4622 SI opval
= FLD (f_simm8
);
4624 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4632 CASE (sem
, INSN_WRITE_LDI8
) : /* ldi8 $dr,$simm8 */
4634 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4635 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4636 #define FLD(f) abuf->fields.sfmt_addi.f
4637 #define OPRND(f) par_exec->operands.sfmt_ldi8.f
4638 int UNUSED written
= abuf
->written
;
4639 IADDR UNUSED pc
= abuf
->addr
;
4640 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4642 * FLD (i_dr
) = OPRND (dr
);
4649 CASE (sem
, INSN_PAR_LOCK
) : /* lock $dr,@$sr */
4651 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4652 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4653 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4654 #define OPRND(f) par_exec->operands.sfmt_lock.f
4655 int UNUSED written
= 0;
4656 IADDR UNUSED pc
= abuf
->addr
;
4657 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4662 OPRND (h_lock_BI
) = opval
;
4663 CGEN_TRACE_RESULT (current_cpu
, abuf
, "lock", 'x', opval
);
4666 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
4668 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4677 CASE (sem
, INSN_WRITE_LOCK
) : /* lock $dr,@$sr */
4679 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4680 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4681 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4682 #define OPRND(f) par_exec->operands.sfmt_lock.f
4683 int UNUSED written
= abuf
->written
;
4684 IADDR UNUSED pc
= abuf
->addr
;
4685 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4687 * FLD (i_dr
) = OPRND (dr
);
4688 CPU (h_lock
) = OPRND (h_lock_BI
);
4695 CASE (sem
, INSN_PAR_MACHI_A
) : /* machi $src1,$src2,$acc */
4697 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4698 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4699 #define FLD(f) abuf->fields.sfmt_machi_a.f
4700 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4701 int UNUSED written
= 0;
4702 IADDR UNUSED pc
= abuf
->addr
;
4703 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4706 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);
4707 OPRND (acc
) = opval
;
4708 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4716 CASE (sem
, INSN_WRITE_MACHI_A
) : /* machi $src1,$src2,$acc */
4718 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4719 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4720 #define FLD(f) abuf->fields.sfmt_machi_a.f
4721 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4722 int UNUSED written
= abuf
->written
;
4723 IADDR UNUSED pc
= abuf
->addr
;
4724 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4726 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4733 CASE (sem
, INSN_PAR_MACLO_A
) : /* maclo $src1,$src2,$acc */
4735 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4736 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4737 #define FLD(f) abuf->fields.sfmt_machi_a.f
4738 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4739 int UNUSED written
= 0;
4740 IADDR UNUSED pc
= abuf
->addr
;
4741 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4744 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);
4745 OPRND (acc
) = opval
;
4746 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4754 CASE (sem
, INSN_WRITE_MACLO_A
) : /* maclo $src1,$src2,$acc */
4756 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4757 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4758 #define FLD(f) abuf->fields.sfmt_machi_a.f
4759 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4760 int UNUSED written
= abuf
->written
;
4761 IADDR UNUSED pc
= abuf
->addr
;
4762 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4764 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4771 CASE (sem
, INSN_PAR_MACWHI_A
) : /* macwhi $src1,$src2,$acc */
4773 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4774 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4775 #define FLD(f) abuf->fields.sfmt_machi_a.f
4776 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4777 int UNUSED written
= 0;
4778 IADDR UNUSED pc
= abuf
->addr
;
4779 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4782 DI opval
= ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16)))));
4783 OPRND (acc
) = opval
;
4784 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4792 CASE (sem
, INSN_WRITE_MACWHI_A
) : /* macwhi $src1,$src2,$acc */
4794 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4795 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4796 #define FLD(f) abuf->fields.sfmt_machi_a.f
4797 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4798 int UNUSED written
= abuf
->written
;
4799 IADDR UNUSED pc
= abuf
->addr
;
4800 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4802 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4809 CASE (sem
, INSN_PAR_MACWLO_A
) : /* macwlo $src1,$src2,$acc */
4811 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4812 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4813 #define FLD(f) abuf->fields.sfmt_machi_a.f
4814 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4815 int UNUSED written
= 0;
4816 IADDR UNUSED pc
= abuf
->addr
;
4817 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4820 DI opval
= ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))));
4821 OPRND (acc
) = opval
;
4822 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4830 CASE (sem
, INSN_WRITE_MACWLO_A
) : /* macwlo $src1,$src2,$acc */
4832 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4833 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4834 #define FLD(f) abuf->fields.sfmt_machi_a.f
4835 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4836 int UNUSED written
= abuf
->written
;
4837 IADDR UNUSED pc
= abuf
->addr
;
4838 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4840 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4847 CASE (sem
, INSN_PAR_MUL
) : /* mul $dr,$sr */
4849 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4850 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4851 #define FLD(f) abuf->fields.sfmt_add.f
4852 #define OPRND(f) par_exec->operands.sfmt_add.f
4853 int UNUSED written
= 0;
4854 IADDR UNUSED pc
= abuf
->addr
;
4855 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4858 SI opval
= MULSI (* FLD (i_dr
), * FLD (i_sr
));
4860 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4868 CASE (sem
, INSN_WRITE_MUL
) : /* mul $dr,$sr */
4870 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4871 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4872 #define FLD(f) abuf->fields.sfmt_add.f
4873 #define OPRND(f) par_exec->operands.sfmt_add.f
4874 int UNUSED written
= abuf
->written
;
4875 IADDR UNUSED pc
= abuf
->addr
;
4876 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4878 * FLD (i_dr
) = OPRND (dr
);
4885 CASE (sem
, INSN_PAR_MULHI_A
) : /* mulhi $src1,$src2,$acc */
4887 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4888 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4889 #define FLD(f) abuf->fields.sfmt_machi_a.f
4890 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4891 int UNUSED written
= 0;
4892 IADDR UNUSED pc
= abuf
->addr
;
4893 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4896 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (* FLD (i_src1
), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16)))), 16), 16);
4897 OPRND (acc
) = opval
;
4898 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4906 CASE (sem
, INSN_WRITE_MULHI_A
) : /* mulhi $src1,$src2,$acc */
4908 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4909 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4910 #define FLD(f) abuf->fields.sfmt_machi_a.f
4911 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4912 int UNUSED written
= abuf
->written
;
4913 IADDR UNUSED pc
= abuf
->addr
;
4914 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4916 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4923 CASE (sem
, INSN_PAR_MULLO_A
) : /* mullo $src1,$src2,$acc */
4925 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4926 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4927 #define FLD(f) abuf->fields.sfmt_machi_a.f
4928 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4929 int UNUSED written
= 0;
4930 IADDR UNUSED pc
= abuf
->addr
;
4931 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4934 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (* FLD (i_src1
), 16)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))), 16), 16);
4935 OPRND (acc
) = opval
;
4936 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4944 CASE (sem
, INSN_WRITE_MULLO_A
) : /* mullo $src1,$src2,$acc */
4946 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4947 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4948 #define FLD(f) abuf->fields.sfmt_machi_a.f
4949 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4950 int UNUSED written
= abuf
->written
;
4951 IADDR UNUSED pc
= abuf
->addr
;
4952 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4954 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4961 CASE (sem
, INSN_PAR_MULWHI_A
) : /* mulwhi $src1,$src2,$acc */
4963 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4964 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4965 #define FLD(f) abuf->fields.sfmt_machi_a.f
4966 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4967 int UNUSED written
= 0;
4968 IADDR UNUSED pc
= abuf
->addr
;
4969 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4972 DI opval
= MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16))));
4973 OPRND (acc
) = opval
;
4974 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4982 CASE (sem
, INSN_WRITE_MULWHI_A
) : /* mulwhi $src1,$src2,$acc */
4984 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4985 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4986 #define FLD(f) abuf->fields.sfmt_machi_a.f
4987 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4988 int UNUSED written
= abuf
->written
;
4989 IADDR UNUSED pc
= abuf
->addr
;
4990 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4992 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4999 CASE (sem
, INSN_PAR_MULWLO_A
) : /* mulwlo $src1,$src2,$acc */
5001 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5002 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5003 #define FLD(f) abuf->fields.sfmt_machi_a.f
5004 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
5005 int UNUSED written
= 0;
5006 IADDR UNUSED pc
= abuf
->addr
;
5007 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5010 DI opval
= MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
))));
5011 OPRND (acc
) = opval
;
5012 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
5020 CASE (sem
, INSN_WRITE_MULWLO_A
) : /* mulwlo $src1,$src2,$acc */
5022 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5023 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5024 #define FLD(f) abuf->fields.sfmt_machi_a.f
5025 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
5026 int UNUSED written
= abuf
->written
;
5027 IADDR UNUSED pc
= abuf
->addr
;
5028 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5030 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
5037 CASE (sem
, INSN_PAR_MV
) : /* mv $dr,$sr */
5039 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5040 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5041 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5042 #define OPRND(f) par_exec->operands.sfmt_mv.f
5043 int UNUSED written
= 0;
5044 IADDR UNUSED pc
= abuf
->addr
;
5045 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5048 SI opval
= * FLD (i_sr
);
5050 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5058 CASE (sem
, INSN_WRITE_MV
) : /* mv $dr,$sr */
5060 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5061 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5062 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5063 #define OPRND(f) par_exec->operands.sfmt_mv.f
5064 int UNUSED written
= abuf
->written
;
5065 IADDR UNUSED pc
= abuf
->addr
;
5066 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5068 * FLD (i_dr
) = OPRND (dr
);
5075 CASE (sem
, INSN_PAR_MVFACHI_A
) : /* mvfachi $dr,$accs */
5077 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5078 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5079 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
5080 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
5081 int UNUSED written
= 0;
5082 IADDR UNUSED pc
= abuf
->addr
;
5083 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5086 SI opval
= TRUNCDISI (SRADI (GET_H_ACCUMS (FLD (f_accs
)), 32));
5088 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5096 CASE (sem
, INSN_WRITE_MVFACHI_A
) : /* mvfachi $dr,$accs */
5098 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5099 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5100 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
5101 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
5102 int UNUSED written
= abuf
->written
;
5103 IADDR UNUSED pc
= abuf
->addr
;
5104 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5106 * FLD (i_dr
) = OPRND (dr
);
5113 CASE (sem
, INSN_PAR_MVFACLO_A
) : /* mvfaclo $dr,$accs */
5115 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5116 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5117 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
5118 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
5119 int UNUSED written
= 0;
5120 IADDR UNUSED pc
= abuf
->addr
;
5121 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5124 SI opval
= TRUNCDISI (GET_H_ACCUMS (FLD (f_accs
)));
5126 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5134 CASE (sem
, INSN_WRITE_MVFACLO_A
) : /* mvfaclo $dr,$accs */
5136 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5137 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5138 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
5139 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
5140 int UNUSED written
= abuf
->written
;
5141 IADDR UNUSED pc
= abuf
->addr
;
5142 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5144 * FLD (i_dr
) = OPRND (dr
);
5151 CASE (sem
, INSN_PAR_MVFACMI_A
) : /* mvfacmi $dr,$accs */
5153 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5154 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5155 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
5156 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
5157 int UNUSED written
= 0;
5158 IADDR UNUSED pc
= abuf
->addr
;
5159 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5162 SI opval
= TRUNCDISI (SRADI (GET_H_ACCUMS (FLD (f_accs
)), 16));
5164 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5172 CASE (sem
, INSN_WRITE_MVFACMI_A
) : /* mvfacmi $dr,$accs */
5174 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5175 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5176 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
5177 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
5178 int UNUSED written
= abuf
->written
;
5179 IADDR UNUSED pc
= abuf
->addr
;
5180 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5182 * FLD (i_dr
) = OPRND (dr
);
5189 CASE (sem
, INSN_PAR_MVFC
) : /* mvfc $dr,$scr */
5191 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5192 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5193 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5194 #define OPRND(f) par_exec->operands.sfmt_mvfc.f
5195 int UNUSED written
= 0;
5196 IADDR UNUSED pc
= abuf
->addr
;
5197 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5200 SI opval
= GET_H_CR (FLD (f_r2
));
5202 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5210 CASE (sem
, INSN_WRITE_MVFC
) : /* mvfc $dr,$scr */
5212 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5213 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5214 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5215 #define OPRND(f) par_exec->operands.sfmt_mvfc.f
5216 int UNUSED written
= abuf
->written
;
5217 IADDR UNUSED pc
= abuf
->addr
;
5218 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5220 * FLD (i_dr
) = OPRND (dr
);
5227 CASE (sem
, INSN_PAR_MVTACHI_A
) : /* mvtachi $src1,$accs */
5229 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5230 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5231 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
5232 #define OPRND(f) par_exec->operands.sfmt_mvtachi_a.f
5233 int UNUSED written
= 0;
5234 IADDR UNUSED pc
= abuf
->addr
;
5235 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5238 DI opval
= ORDI (ANDDI (GET_H_ACCUMS (FLD (f_accs
)), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (* FLD (i_src1
)), 32));
5239 OPRND (accs
) = opval
;
5240 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
5248 CASE (sem
, INSN_WRITE_MVTACHI_A
) : /* mvtachi $src1,$accs */
5250 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5251 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5252 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
5253 #define OPRND(f) par_exec->operands.sfmt_mvtachi_a.f
5254 int UNUSED written
= abuf
->written
;
5255 IADDR UNUSED pc
= abuf
->addr
;
5256 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5258 SET_H_ACCUMS (FLD (f_accs
), OPRND (accs
));
5265 CASE (sem
, INSN_PAR_MVTACLO_A
) : /* mvtaclo $src1,$accs */
5267 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5268 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5269 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
5270 #define OPRND(f) par_exec->operands.sfmt_mvtachi_a.f
5271 int UNUSED written
= 0;
5272 IADDR UNUSED pc
= abuf
->addr
;
5273 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5276 DI opval
= ORDI (ANDDI (GET_H_ACCUMS (FLD (f_accs
)), MAKEDI (0xffffffff, 0)), ZEXTSIDI (* FLD (i_src1
)));
5277 OPRND (accs
) = opval
;
5278 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
5286 CASE (sem
, INSN_WRITE_MVTACLO_A
) : /* mvtaclo $src1,$accs */
5288 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5289 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5290 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
5291 #define OPRND(f) par_exec->operands.sfmt_mvtachi_a.f
5292 int UNUSED written
= abuf
->written
;
5293 IADDR UNUSED pc
= abuf
->addr
;
5294 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5296 SET_H_ACCUMS (FLD (f_accs
), OPRND (accs
));
5303 CASE (sem
, INSN_PAR_MVTC
) : /* mvtc $sr,$dcr */
5305 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5306 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5307 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5308 #define OPRND(f) par_exec->operands.sfmt_mvtc.f
5309 int UNUSED written
= 0;
5310 IADDR UNUSED pc
= abuf
->addr
;
5311 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5314 USI opval
= * FLD (i_sr
);
5315 OPRND (dcr
) = opval
;
5316 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
5324 CASE (sem
, INSN_WRITE_MVTC
) : /* mvtc $sr,$dcr */
5326 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5327 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5328 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5329 #define OPRND(f) par_exec->operands.sfmt_mvtc.f
5330 int UNUSED written
= abuf
->written
;
5331 IADDR UNUSED pc
= abuf
->addr
;
5332 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5334 SET_H_CR (FLD (f_r1
), OPRND (dcr
));
5341 CASE (sem
, INSN_PAR_NEG
) : /* neg $dr,$sr */
5343 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5344 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5345 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5346 #define OPRND(f) par_exec->operands.sfmt_mv.f
5347 int UNUSED written
= 0;
5348 IADDR UNUSED pc
= abuf
->addr
;
5349 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5352 SI opval
= NEGSI (* FLD (i_sr
));
5354 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5362 CASE (sem
, INSN_WRITE_NEG
) : /* neg $dr,$sr */
5364 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5365 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5366 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5367 #define OPRND(f) par_exec->operands.sfmt_mv.f
5368 int UNUSED written
= abuf
->written
;
5369 IADDR UNUSED pc
= abuf
->addr
;
5370 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5372 * FLD (i_dr
) = OPRND (dr
);
5379 CASE (sem
, INSN_PAR_NOP
) : /* nop */
5381 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5382 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5383 #define FLD(f) abuf->fields.sfmt_empty.f
5384 #define OPRND(f) par_exec->operands.sfmt_nop.f
5385 int UNUSED written
= 0;
5386 IADDR UNUSED pc
= abuf
->addr
;
5387 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5389 PROFILE_COUNT_FILLNOPS (current_cpu
, abuf
->addr
);
5396 CASE (sem
, INSN_WRITE_NOP
) : /* nop */
5398 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5399 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5400 #define FLD(f) abuf->fields.sfmt_empty.f
5401 #define OPRND(f) par_exec->operands.sfmt_nop.f
5402 int UNUSED written
= abuf
->written
;
5403 IADDR UNUSED pc
= abuf
->addr
;
5404 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5412 CASE (sem
, INSN_PAR_NOT
) : /* not $dr,$sr */
5414 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5415 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5416 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5417 #define OPRND(f) par_exec->operands.sfmt_mv.f
5418 int UNUSED written
= 0;
5419 IADDR UNUSED pc
= abuf
->addr
;
5420 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5423 SI opval
= INVSI (* FLD (i_sr
));
5425 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5433 CASE (sem
, INSN_WRITE_NOT
) : /* not $dr,$sr */
5435 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5436 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5437 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5438 #define OPRND(f) par_exec->operands.sfmt_mv.f
5439 int UNUSED written
= abuf
->written
;
5440 IADDR UNUSED pc
= abuf
->addr
;
5441 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5443 * FLD (i_dr
) = OPRND (dr
);
5450 CASE (sem
, INSN_PAR_RAC_DSI
) : /* rac $accd,$accs,$imm1 */
5452 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5453 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5454 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
5455 #define OPRND(f) par_exec->operands.sfmt_rac_dsi.f
5456 int UNUSED written
= 0;
5457 IADDR UNUSED pc
= abuf
->addr
;
5458 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5462 tmp_tmp1
= SLLDI (GET_H_ACCUMS (FLD (f_accs
)), FLD (f_imm1
));
5463 tmp_tmp1
= ADDDI (tmp_tmp1
, MAKEDI (0, 32768));
5465 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)));
5466 OPRND (accd
) = opval
;
5467 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
5476 CASE (sem
, INSN_WRITE_RAC_DSI
) : /* rac $accd,$accs,$imm1 */
5478 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5479 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5480 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
5481 #define OPRND(f) par_exec->operands.sfmt_rac_dsi.f
5482 int UNUSED written
= abuf
->written
;
5483 IADDR UNUSED pc
= abuf
->addr
;
5484 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5486 SET_H_ACCUMS (FLD (f_accd
), OPRND (accd
));
5493 CASE (sem
, INSN_PAR_RACH_DSI
) : /* rach $accd,$accs,$imm1 */
5495 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5496 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5497 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
5498 #define OPRND(f) par_exec->operands.sfmt_rac_dsi.f
5499 int UNUSED written
= 0;
5500 IADDR UNUSED pc
= abuf
->addr
;
5501 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5505 tmp_tmp1
= SLLDI (GET_H_ACCUMS (FLD (f_accs
)), FLD (f_imm1
));
5506 tmp_tmp1
= ADDDI (tmp_tmp1
, MAKEDI (0, 0x80000000));
5508 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)));
5509 OPRND (accd
) = opval
;
5510 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
5519 CASE (sem
, INSN_WRITE_RACH_DSI
) : /* rach $accd,$accs,$imm1 */
5521 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5522 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5523 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
5524 #define OPRND(f) par_exec->operands.sfmt_rac_dsi.f
5525 int UNUSED written
= abuf
->written
;
5526 IADDR UNUSED pc
= abuf
->addr
;
5527 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5529 SET_H_ACCUMS (FLD (f_accd
), OPRND (accd
));
5536 CASE (sem
, INSN_PAR_RTE
) : /* rte */
5538 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5539 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5540 #define FLD(f) abuf->fields.sfmt_empty.f
5541 #define OPRND(f) par_exec->operands.sfmt_rte.f
5542 int UNUSED written
= 0;
5543 IADDR UNUSED pc
= abuf
->addr
;
5544 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5548 USI opval
= ANDSI (GET_H_CR (((UINT
) 6)), -4);
5550 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
5553 USI opval
= GET_H_CR (((UINT
) 14));
5554 OPRND (h_cr_USI_6
) = opval
;
5555 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
5558 UQI opval
= CPU (h_bpsw
);
5559 OPRND (h_psw_UQI
) = opval
;
5560 CGEN_TRACE_RESULT (current_cpu
, abuf
, "psw", 'x', opval
);
5563 UQI opval
= CPU (h_bbpsw
);
5564 OPRND (h_bpsw_UQI
) = opval
;
5565 CGEN_TRACE_RESULT (current_cpu
, abuf
, "bpsw", 'x', opval
);
5574 CASE (sem
, INSN_WRITE_RTE
) : /* rte */
5576 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5577 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5578 #define FLD(f) abuf->fields.sfmt_empty.f
5579 #define OPRND(f) par_exec->operands.sfmt_rte.f
5580 int UNUSED written
= abuf
->written
;
5581 IADDR UNUSED pc
= abuf
->addr
;
5583 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5585 CPU (h_bpsw
) = OPRND (h_bpsw_UQI
);
5586 SET_H_CR (((UINT
) 6), OPRND (h_cr_USI_6
));
5587 SET_H_PSW (OPRND (h_psw_UQI
));
5588 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
5590 SEM_BRANCH_FINI (vpc
);
5596 CASE (sem
, INSN_PAR_SLL
) : /* sll $dr,$sr */
5598 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5599 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5600 #define FLD(f) abuf->fields.sfmt_add.f
5601 #define OPRND(f) par_exec->operands.sfmt_add.f
5602 int UNUSED written
= 0;
5603 IADDR UNUSED pc
= abuf
->addr
;
5604 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5607 SI opval
= SLLSI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
5609 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5617 CASE (sem
, INSN_WRITE_SLL
) : /* sll $dr,$sr */
5619 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5620 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5621 #define FLD(f) abuf->fields.sfmt_add.f
5622 #define OPRND(f) par_exec->operands.sfmt_add.f
5623 int UNUSED written
= abuf
->written
;
5624 IADDR UNUSED pc
= abuf
->addr
;
5625 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5627 * FLD (i_dr
) = OPRND (dr
);
5634 CASE (sem
, INSN_PAR_SLLI
) : /* slli $dr,$uimm5 */
5636 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5637 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5638 #define FLD(f) abuf->fields.sfmt_slli.f
5639 #define OPRND(f) par_exec->operands.sfmt_slli.f
5640 int UNUSED written
= 0;
5641 IADDR UNUSED pc
= abuf
->addr
;
5642 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5645 SI opval
= SLLSI (* FLD (i_dr
), FLD (f_uimm5
));
5647 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5655 CASE (sem
, INSN_WRITE_SLLI
) : /* slli $dr,$uimm5 */
5657 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5658 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5659 #define FLD(f) abuf->fields.sfmt_slli.f
5660 #define OPRND(f) par_exec->operands.sfmt_slli.f
5661 int UNUSED written
= abuf
->written
;
5662 IADDR UNUSED pc
= abuf
->addr
;
5663 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5665 * FLD (i_dr
) = OPRND (dr
);
5672 CASE (sem
, INSN_PAR_SRA
) : /* sra $dr,$sr */
5674 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5675 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5676 #define FLD(f) abuf->fields.sfmt_add.f
5677 #define OPRND(f) par_exec->operands.sfmt_add.f
5678 int UNUSED written
= 0;
5679 IADDR UNUSED pc
= abuf
->addr
;
5680 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5683 SI opval
= SRASI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
5685 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5693 CASE (sem
, INSN_WRITE_SRA
) : /* sra $dr,$sr */
5695 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5696 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5697 #define FLD(f) abuf->fields.sfmt_add.f
5698 #define OPRND(f) par_exec->operands.sfmt_add.f
5699 int UNUSED written
= abuf
->written
;
5700 IADDR UNUSED pc
= abuf
->addr
;
5701 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5703 * FLD (i_dr
) = OPRND (dr
);
5710 CASE (sem
, INSN_PAR_SRAI
) : /* srai $dr,$uimm5 */
5712 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5713 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5714 #define FLD(f) abuf->fields.sfmt_slli.f
5715 #define OPRND(f) par_exec->operands.sfmt_slli.f
5716 int UNUSED written
= 0;
5717 IADDR UNUSED pc
= abuf
->addr
;
5718 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5721 SI opval
= SRASI (* FLD (i_dr
), FLD (f_uimm5
));
5723 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5731 CASE (sem
, INSN_WRITE_SRAI
) : /* srai $dr,$uimm5 */
5733 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5734 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5735 #define FLD(f) abuf->fields.sfmt_slli.f
5736 #define OPRND(f) par_exec->operands.sfmt_slli.f
5737 int UNUSED written
= abuf
->written
;
5738 IADDR UNUSED pc
= abuf
->addr
;
5739 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5741 * FLD (i_dr
) = OPRND (dr
);
5748 CASE (sem
, INSN_PAR_SRL
) : /* srl $dr,$sr */
5750 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5751 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5752 #define FLD(f) abuf->fields.sfmt_add.f
5753 #define OPRND(f) par_exec->operands.sfmt_add.f
5754 int UNUSED written
= 0;
5755 IADDR UNUSED pc
= abuf
->addr
;
5756 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5759 SI opval
= SRLSI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
5761 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5769 CASE (sem
, INSN_WRITE_SRL
) : /* srl $dr,$sr */
5771 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5772 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5773 #define FLD(f) abuf->fields.sfmt_add.f
5774 #define OPRND(f) par_exec->operands.sfmt_add.f
5775 int UNUSED written
= abuf
->written
;
5776 IADDR UNUSED pc
= abuf
->addr
;
5777 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5779 * FLD (i_dr
) = OPRND (dr
);
5786 CASE (sem
, INSN_PAR_SRLI
) : /* srli $dr,$uimm5 */
5788 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5789 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5790 #define FLD(f) abuf->fields.sfmt_slli.f
5791 #define OPRND(f) par_exec->operands.sfmt_slli.f
5792 int UNUSED written
= 0;
5793 IADDR UNUSED pc
= abuf
->addr
;
5794 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5797 SI opval
= SRLSI (* FLD (i_dr
), FLD (f_uimm5
));
5799 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5807 CASE (sem
, INSN_WRITE_SRLI
) : /* srli $dr,$uimm5 */
5809 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5810 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5811 #define FLD(f) abuf->fields.sfmt_slli.f
5812 #define OPRND(f) par_exec->operands.sfmt_slli.f
5813 int UNUSED written
= abuf
->written
;
5814 IADDR UNUSED pc
= abuf
->addr
;
5815 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5817 * FLD (i_dr
) = OPRND (dr
);
5824 CASE (sem
, INSN_PAR_ST
) : /* st $src1,@$src2 */
5826 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5827 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5828 #define FLD(f) abuf->fields.sfmt_st_plus.f
5829 #define OPRND(f) par_exec->operands.sfmt_st.f
5830 int UNUSED written
= 0;
5831 IADDR UNUSED pc
= abuf
->addr
;
5832 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5835 SI opval
= * FLD (i_src1
);
5836 OPRND (h_memory_SI_src2_idx
) = * FLD (i_src2
);
5837 OPRND (h_memory_SI_src2
) = opval
;
5838 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5846 CASE (sem
, INSN_WRITE_ST
) : /* st $src1,@$src2 */
5848 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5849 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5850 #define FLD(f) abuf->fields.sfmt_st_plus.f
5851 #define OPRND(f) par_exec->operands.sfmt_st.f
5852 int UNUSED written
= abuf
->written
;
5853 IADDR UNUSED pc
= abuf
->addr
;
5854 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5856 SETMEMSI (current_cpu
, pc
, OPRND (h_memory_SI_src2_idx
), OPRND (h_memory_SI_src2
));
5863 CASE (sem
, INSN_PAR_STB
) : /* stb $src1,@$src2 */
5865 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5866 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5867 #define FLD(f) abuf->fields.sfmt_st_plus.f
5868 #define OPRND(f) par_exec->operands.sfmt_stb.f
5869 int UNUSED written
= 0;
5870 IADDR UNUSED pc
= abuf
->addr
;
5871 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5874 QI opval
= * FLD (i_src1
);
5875 OPRND (h_memory_QI_src2_idx
) = * FLD (i_src2
);
5876 OPRND (h_memory_QI_src2
) = opval
;
5877 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5885 CASE (sem
, INSN_WRITE_STB
) : /* stb $src1,@$src2 */
5887 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5888 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5889 #define FLD(f) abuf->fields.sfmt_st_plus.f
5890 #define OPRND(f) par_exec->operands.sfmt_stb.f
5891 int UNUSED written
= abuf
->written
;
5892 IADDR UNUSED pc
= abuf
->addr
;
5893 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5895 SETMEMQI (current_cpu
, pc
, OPRND (h_memory_QI_src2_idx
), OPRND (h_memory_QI_src2
));
5902 CASE (sem
, INSN_PAR_STH
) : /* sth $src1,@$src2 */
5904 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5905 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5906 #define FLD(f) abuf->fields.sfmt_st_plus.f
5907 #define OPRND(f) par_exec->operands.sfmt_sth.f
5908 int UNUSED written
= 0;
5909 IADDR UNUSED pc
= abuf
->addr
;
5910 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5913 HI opval
= * FLD (i_src1
);
5914 OPRND (h_memory_HI_src2_idx
) = * FLD (i_src2
);
5915 OPRND (h_memory_HI_src2
) = opval
;
5916 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5924 CASE (sem
, INSN_WRITE_STH
) : /* sth $src1,@$src2 */
5926 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5927 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5928 #define FLD(f) abuf->fields.sfmt_st_plus.f
5929 #define OPRND(f) par_exec->operands.sfmt_sth.f
5930 int UNUSED written
= abuf
->written
;
5931 IADDR UNUSED pc
= abuf
->addr
;
5932 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5934 SETMEMHI (current_cpu
, pc
, OPRND (h_memory_HI_src2_idx
), OPRND (h_memory_HI_src2
));
5941 CASE (sem
, INSN_PAR_ST_PLUS
) : /* st $src1,@+$src2 */
5943 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5944 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5945 #define FLD(f) abuf->fields.sfmt_st_plus.f
5946 #define OPRND(f) par_exec->operands.sfmt_st_plus.f
5947 int UNUSED written
= 0;
5948 IADDR UNUSED pc
= abuf
->addr
;
5949 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5953 tmp_new_src2
= ADDSI (* FLD (i_src2
), 4);
5955 SI opval
= * FLD (i_src1
);
5956 OPRND (h_memory_SI_new_src2_idx
) = tmp_new_src2
;
5957 OPRND (h_memory_SI_new_src2
) = opval
;
5958 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5961 SI opval
= tmp_new_src2
;
5962 OPRND (src2
) = opval
;
5963 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5972 CASE (sem
, INSN_WRITE_ST_PLUS
) : /* st $src1,@+$src2 */
5974 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5975 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5976 #define FLD(f) abuf->fields.sfmt_st_plus.f
5977 #define OPRND(f) par_exec->operands.sfmt_st_plus.f
5978 int UNUSED written
= abuf
->written
;
5979 IADDR UNUSED pc
= abuf
->addr
;
5980 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5982 SETMEMSI (current_cpu
, pc
, OPRND (h_memory_SI_new_src2_idx
), OPRND (h_memory_SI_new_src2
));
5983 * FLD (i_src2
) = OPRND (src2
);
5990 CASE (sem
, INSN_PAR_STH_PLUS
) : /* sth $src1,@$src2+ */
5992 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5993 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5994 #define FLD(f) abuf->fields.sfmt_st_plus.f
5995 #define OPRND(f) par_exec->operands.sfmt_sth_plus.f
5996 int UNUSED written
= 0;
5997 IADDR UNUSED pc
= abuf
->addr
;
5998 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6002 tmp_new_src2
= * FLD (i_src2
);
6004 HI opval
= * FLD (i_src1
);
6005 OPRND (h_memory_HI_new_src2_idx
) = tmp_new_src2
;
6006 OPRND (h_memory_HI_new_src2
) = opval
;
6007 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
6010 SI opval
= ADDSI (tmp_new_src2
, 2);
6011 OPRND (src2
) = opval
;
6012 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6021 CASE (sem
, INSN_WRITE_STH_PLUS
) : /* sth $src1,@$src2+ */
6023 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6024 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6025 #define FLD(f) abuf->fields.sfmt_st_plus.f
6026 #define OPRND(f) par_exec->operands.sfmt_sth_plus.f
6027 int UNUSED written
= abuf
->written
;
6028 IADDR UNUSED pc
= abuf
->addr
;
6029 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6031 SETMEMHI (current_cpu
, pc
, OPRND (h_memory_HI_new_src2_idx
), OPRND (h_memory_HI_new_src2
));
6032 * FLD (i_src2
) = OPRND (src2
);
6039 CASE (sem
, INSN_PAR_STB_PLUS
) : /* stb $src1,@$src2+ */
6041 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6042 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6043 #define FLD(f) abuf->fields.sfmt_st_plus.f
6044 #define OPRND(f) par_exec->operands.sfmt_stb_plus.f
6045 int UNUSED written
= 0;
6046 IADDR UNUSED pc
= abuf
->addr
;
6047 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6051 tmp_new_src2
= * FLD (i_src2
);
6053 QI opval
= * FLD (i_src1
);
6054 OPRND (h_memory_QI_new_src2_idx
) = tmp_new_src2
;
6055 OPRND (h_memory_QI_new_src2
) = opval
;
6056 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
6059 SI opval
= ADDSI (tmp_new_src2
, 1);
6060 OPRND (src2
) = opval
;
6061 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6070 CASE (sem
, INSN_WRITE_STB_PLUS
) : /* stb $src1,@$src2+ */
6072 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6073 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6074 #define FLD(f) abuf->fields.sfmt_st_plus.f
6075 #define OPRND(f) par_exec->operands.sfmt_stb_plus.f
6076 int UNUSED written
= abuf
->written
;
6077 IADDR UNUSED pc
= abuf
->addr
;
6078 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6080 SETMEMQI (current_cpu
, pc
, OPRND (h_memory_QI_new_src2_idx
), OPRND (h_memory_QI_new_src2
));
6081 * FLD (i_src2
) = OPRND (src2
);
6088 CASE (sem
, INSN_PAR_ST_MINUS
) : /* st $src1,@-$src2 */
6090 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6091 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6092 #define FLD(f) abuf->fields.sfmt_st_plus.f
6093 #define OPRND(f) par_exec->operands.sfmt_st_plus.f
6094 int UNUSED written
= 0;
6095 IADDR UNUSED pc
= abuf
->addr
;
6096 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6100 tmp_new_src2
= SUBSI (* FLD (i_src2
), 4);
6102 SI opval
= * FLD (i_src1
);
6103 OPRND (h_memory_SI_new_src2_idx
) = tmp_new_src2
;
6104 OPRND (h_memory_SI_new_src2
) = opval
;
6105 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
6108 SI opval
= tmp_new_src2
;
6109 OPRND (src2
) = opval
;
6110 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6119 CASE (sem
, INSN_WRITE_ST_MINUS
) : /* st $src1,@-$src2 */
6121 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6122 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6123 #define FLD(f) abuf->fields.sfmt_st_plus.f
6124 #define OPRND(f) par_exec->operands.sfmt_st_plus.f
6125 int UNUSED written
= abuf
->written
;
6126 IADDR UNUSED pc
= abuf
->addr
;
6127 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6129 SETMEMSI (current_cpu
, pc
, OPRND (h_memory_SI_new_src2_idx
), OPRND (h_memory_SI_new_src2
));
6130 * FLD (i_src2
) = OPRND (src2
);
6137 CASE (sem
, INSN_PAR_SUB
) : /* sub $dr,$sr */
6139 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6140 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6141 #define FLD(f) abuf->fields.sfmt_add.f
6142 #define OPRND(f) par_exec->operands.sfmt_add.f
6143 int UNUSED written
= 0;
6144 IADDR UNUSED pc
= abuf
->addr
;
6145 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6148 SI opval
= SUBSI (* FLD (i_dr
), * FLD (i_sr
));
6150 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6158 CASE (sem
, INSN_WRITE_SUB
) : /* sub $dr,$sr */
6160 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6161 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6162 #define FLD(f) abuf->fields.sfmt_add.f
6163 #define OPRND(f) par_exec->operands.sfmt_add.f
6164 int UNUSED written
= abuf
->written
;
6165 IADDR UNUSED pc
= abuf
->addr
;
6166 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6168 * FLD (i_dr
) = OPRND (dr
);
6175 CASE (sem
, INSN_PAR_SUBV
) : /* subv $dr,$sr */
6177 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6178 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6179 #define FLD(f) abuf->fields.sfmt_add.f
6180 #define OPRND(f) par_exec->operands.sfmt_addv.f
6181 int UNUSED written
= 0;
6182 IADDR UNUSED pc
= abuf
->addr
;
6183 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6187 temp0
= SUBSI (* FLD (i_dr
), * FLD (i_sr
));
6188 temp1
= SUBOFSI (* FLD (i_dr
), * FLD (i_sr
), 0);
6192 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6196 OPRND (condbit
) = opval
;
6197 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
6206 CASE (sem
, INSN_WRITE_SUBV
) : /* subv $dr,$sr */
6208 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6209 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6210 #define FLD(f) abuf->fields.sfmt_add.f
6211 #define OPRND(f) par_exec->operands.sfmt_addv.f
6212 int UNUSED written
= abuf
->written
;
6213 IADDR UNUSED pc
= abuf
->addr
;
6214 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6216 CPU (h_cond
) = OPRND (condbit
);
6217 * FLD (i_dr
) = OPRND (dr
);
6224 CASE (sem
, INSN_PAR_SUBX
) : /* subx $dr,$sr */
6226 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6227 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6228 #define FLD(f) abuf->fields.sfmt_add.f
6229 #define OPRND(f) par_exec->operands.sfmt_addx.f
6230 int UNUSED written
= 0;
6231 IADDR UNUSED pc
= abuf
->addr
;
6232 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6236 temp0
= SUBCSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
6237 temp1
= SUBCFSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
6241 CGEN_TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
6245 OPRND (condbit
) = opval
;
6246 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
6255 CASE (sem
, INSN_WRITE_SUBX
) : /* subx $dr,$sr */
6257 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6258 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6259 #define FLD(f) abuf->fields.sfmt_add.f
6260 #define OPRND(f) par_exec->operands.sfmt_addx.f
6261 int UNUSED written
= abuf
->written
;
6262 IADDR UNUSED pc
= abuf
->addr
;
6263 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6265 CPU (h_cond
) = OPRND (condbit
);
6266 * FLD (i_dr
) = OPRND (dr
);
6273 CASE (sem
, INSN_PAR_TRAP
) : /* trap $uimm4 */
6275 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6276 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6277 #define FLD(f) abuf->fields.sfmt_trap.f
6278 #define OPRND(f) par_exec->operands.sfmt_trap.f
6279 int UNUSED written
= 0;
6280 IADDR UNUSED pc
= abuf
->addr
;
6281 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6285 USI opval
= GET_H_CR (((UINT
) 6));
6286 OPRND (h_cr_USI_14
) = opval
;
6287 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
6290 USI opval
= ADDSI (pc
, 4);
6291 OPRND (h_cr_USI_6
) = opval
;
6292 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
6295 UQI opval
= CPU (h_bpsw
);
6296 OPRND (h_bbpsw_UQI
) = opval
;
6297 CGEN_TRACE_RESULT (current_cpu
, abuf
, "bbpsw", 'x', opval
);
6300 UQI opval
= GET_H_PSW ();
6301 OPRND (h_bpsw_UQI
) = opval
;
6302 CGEN_TRACE_RESULT (current_cpu
, abuf
, "bpsw", 'x', opval
);
6305 UQI opval
= ANDQI (GET_H_PSW (), 128);
6306 OPRND (h_psw_UQI
) = opval
;
6307 CGEN_TRACE_RESULT (current_cpu
, abuf
, "psw", 'x', opval
);
6310 SI opval
= m32r_trap (current_cpu
, pc
, FLD (f_uimm4
));
6312 CGEN_TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
6321 CASE (sem
, INSN_WRITE_TRAP
) : /* trap $uimm4 */
6323 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6324 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6325 #define FLD(f) abuf->fields.sfmt_trap.f
6326 #define OPRND(f) par_exec->operands.sfmt_trap.f
6327 int UNUSED written
= abuf
->written
;
6328 IADDR UNUSED pc
= abuf
->addr
;
6330 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6332 CPU (h_bbpsw
) = OPRND (h_bbpsw_UQI
);
6333 CPU (h_bpsw
) = OPRND (h_bpsw_UQI
);
6334 SET_H_CR (((UINT
) 14), OPRND (h_cr_USI_14
));
6335 SET_H_CR (((UINT
) 6), OPRND (h_cr_USI_6
));
6336 SET_H_PSW (OPRND (h_psw_UQI
));
6337 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
6339 SEM_BRANCH_FINI (vpc
);
6345 CASE (sem
, INSN_PAR_UNLOCK
) : /* unlock $src1,@$src2 */
6347 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6348 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6349 #define FLD(f) abuf->fields.sfmt_st_plus.f
6350 #define OPRND(f) par_exec->operands.sfmt_unlock.f
6351 int UNUSED written
= 0;
6352 IADDR UNUSED pc
= abuf
->addr
;
6353 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6358 SI opval
= * FLD (i_src1
);
6359 OPRND (h_memory_SI_src2_idx
) = * FLD (i_src2
);
6360 OPRND (h_memory_SI_src2
) = opval
;
6361 written
|= (1 << 4);
6362 CGEN_TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
6367 OPRND (h_lock_BI
) = opval
;
6368 CGEN_TRACE_RESULT (current_cpu
, abuf
, "lock", 'x', opval
);
6372 abuf
->written
= written
;
6378 CASE (sem
, INSN_WRITE_UNLOCK
) : /* unlock $src1,@$src2 */
6380 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6381 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6382 #define FLD(f) abuf->fields.sfmt_st_plus.f
6383 #define OPRND(f) par_exec->operands.sfmt_unlock.f
6384 int UNUSED written
= abuf
->written
;
6385 IADDR UNUSED pc
= abuf
->addr
;
6386 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6388 CPU (h_lock
) = OPRND (h_lock_BI
);
6389 if (written
& (1 << 4))
6391 SETMEMSI (current_cpu
, pc
, OPRND (h_memory_SI_src2_idx
), OPRND (h_memory_SI_src2
));
6399 CASE (sem
, INSN_PAR_PCMPBZ
) : /* pcmpbz $src2 */
6401 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6402 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6403 #define FLD(f) abuf->fields.sfmt_st_plus.f
6404 #define OPRND(f) par_exec->operands.sfmt_cmpz.f
6405 int UNUSED written
= 0;
6406 IADDR UNUSED pc
= abuf
->addr
;
6407 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6410 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);
6411 OPRND (condbit
) = opval
;
6412 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
6420 CASE (sem
, INSN_WRITE_PCMPBZ
) : /* pcmpbz $src2 */
6422 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6423 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6424 #define FLD(f) abuf->fields.sfmt_st_plus.f
6425 #define OPRND(f) par_exec->operands.sfmt_cmpz.f
6426 int UNUSED written
= abuf
->written
;
6427 IADDR UNUSED pc
= abuf
->addr
;
6428 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6430 CPU (h_cond
) = OPRND (condbit
);
6437 CASE (sem
, INSN_PAR_SADD
) : /* sadd */
6439 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6440 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6441 #define FLD(f) abuf->fields.sfmt_empty.f
6442 #define OPRND(f) par_exec->operands.sfmt_sadd.f
6443 int UNUSED written
= 0;
6444 IADDR UNUSED pc
= abuf
->addr
;
6445 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6448 DI opval
= ADDDI (SRADI (GET_H_ACCUMS (((UINT
) 1)), 16), GET_H_ACCUMS (((UINT
) 0)));
6449 OPRND (h_accums_DI_0
) = opval
;
6450 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
6458 CASE (sem
, INSN_WRITE_SADD
) : /* sadd */
6460 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6461 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6462 #define FLD(f) abuf->fields.sfmt_empty.f
6463 #define OPRND(f) par_exec->operands.sfmt_sadd.f
6464 int UNUSED written
= abuf
->written
;
6465 IADDR UNUSED pc
= abuf
->addr
;
6466 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6468 SET_H_ACCUMS (((UINT
) 0), OPRND (h_accums_DI_0
));
6475 CASE (sem
, INSN_PAR_MACWU1
) : /* macwu1 $src1,$src2 */
6477 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6478 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6479 #define FLD(f) abuf->fields.sfmt_st_plus.f
6480 #define OPRND(f) par_exec->operands.sfmt_macwu1.f
6481 int UNUSED written
= 0;
6482 IADDR UNUSED pc
= abuf
->addr
;
6483 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6486 DI opval
= SRADI (SLLDI (ADDDI (GET_H_ACCUMS (((UINT
) 1)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTSIDI (ANDSI (* FLD (i_src2
), 65535)))), 8), 8);
6487 OPRND (h_accums_DI_1
) = opval
;
6488 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
6496 CASE (sem
, INSN_WRITE_MACWU1
) : /* macwu1 $src1,$src2 */
6498 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6499 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6500 #define FLD(f) abuf->fields.sfmt_st_plus.f
6501 #define OPRND(f) par_exec->operands.sfmt_macwu1.f
6502 int UNUSED written
= abuf
->written
;
6503 IADDR UNUSED pc
= abuf
->addr
;
6504 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6506 SET_H_ACCUMS (((UINT
) 1), OPRND (h_accums_DI_1
));
6513 CASE (sem
, INSN_PAR_MSBLO
) : /* msblo $src1,$src2 */
6515 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6516 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6517 #define FLD(f) abuf->fields.sfmt_st_plus.f
6518 #define OPRND(f) par_exec->operands.sfmt_msblo.f
6519 int UNUSED written
= 0;
6520 IADDR UNUSED pc
= abuf
->addr
;
6521 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6524 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);
6525 OPRND (accum
) = opval
;
6526 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accum", 'D', opval
);
6534 CASE (sem
, INSN_WRITE_MSBLO
) : /* msblo $src1,$src2 */
6536 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6537 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6538 #define FLD(f) abuf->fields.sfmt_st_plus.f
6539 #define OPRND(f) par_exec->operands.sfmt_msblo.f
6540 int UNUSED written
= abuf
->written
;
6541 IADDR UNUSED pc
= abuf
->addr
;
6542 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6544 SET_H_ACCUM (OPRND (accum
));
6551 CASE (sem
, INSN_PAR_MULWU1
) : /* mulwu1 $src1,$src2 */
6553 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6554 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6555 #define FLD(f) abuf->fields.sfmt_st_plus.f
6556 #define OPRND(f) par_exec->operands.sfmt_mulwu1.f
6557 int UNUSED written
= 0;
6558 IADDR UNUSED pc
= abuf
->addr
;
6559 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6562 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (* FLD (i_src1
)), EXTSIDI (ANDSI (* FLD (i_src2
), 65535))), 16), 16);
6563 OPRND (h_accums_DI_1
) = opval
;
6564 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
6572 CASE (sem
, INSN_WRITE_MULWU1
) : /* mulwu1 $src1,$src2 */
6574 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6575 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6576 #define FLD(f) abuf->fields.sfmt_st_plus.f
6577 #define OPRND(f) par_exec->operands.sfmt_mulwu1.f
6578 int UNUSED written
= abuf
->written
;
6579 IADDR UNUSED pc
= abuf
->addr
;
6580 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6582 SET_H_ACCUMS (((UINT
) 1), OPRND (h_accums_DI_1
));
6589 CASE (sem
, INSN_PAR_MACLH1
) : /* maclh1 $src1,$src2 */
6591 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6592 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6593 #define FLD(f) abuf->fields.sfmt_st_plus.f
6594 #define OPRND(f) par_exec->operands.sfmt_macwu1.f
6595 int UNUSED written
= 0;
6596 IADDR UNUSED pc
= abuf
->addr
;
6597 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6600 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);
6601 OPRND (h_accums_DI_1
) = opval
;
6602 CGEN_TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
6610 CASE (sem
, INSN_WRITE_MACLH1
) : /* maclh1 $src1,$src2 */
6612 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6613 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6614 #define FLD(f) abuf->fields.sfmt_st_plus.f
6615 #define OPRND(f) par_exec->operands.sfmt_macwu1.f
6616 int UNUSED written
= abuf
->written
;
6617 IADDR UNUSED pc
= abuf
->addr
;
6618 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6620 SET_H_ACCUMS (((UINT
) 1), OPRND (h_accums_DI_1
));
6627 CASE (sem
, INSN_PAR_SC
) : /* sc */
6629 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6630 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6631 #define FLD(f) abuf->fields.sfmt_empty.f
6632 #define OPRND(f) par_exec->operands.sfmt_sc.f
6633 int UNUSED written
= 0;
6634 IADDR UNUSED pc
= abuf
->addr
;
6635 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6637 if (ZEXTBISI (CPU (h_cond
)))
6638 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
6645 CASE (sem
, INSN_WRITE_SC
) : /* sc */
6647 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6648 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6649 #define FLD(f) abuf->fields.sfmt_empty.f
6650 #define OPRND(f) par_exec->operands.sfmt_sc.f
6651 int UNUSED written
= abuf
->written
;
6652 IADDR UNUSED pc
= abuf
->addr
;
6653 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6661 CASE (sem
, INSN_PAR_SNC
) : /* snc */
6663 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6664 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6665 #define FLD(f) abuf->fields.sfmt_empty.f
6666 #define OPRND(f) par_exec->operands.sfmt_sc.f
6667 int UNUSED written
= 0;
6668 IADDR UNUSED pc
= abuf
->addr
;
6669 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6671 if (ZEXTBISI (NOTBI (CPU (h_cond
))))
6672 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
6679 CASE (sem
, INSN_WRITE_SNC
) : /* snc */
6681 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6682 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6683 #define FLD(f) abuf->fields.sfmt_empty.f
6684 #define OPRND(f) par_exec->operands.sfmt_sc.f
6685 int UNUSED written
= abuf
->written
;
6686 IADDR UNUSED pc
= abuf
->addr
;
6687 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6695 CASE (sem
, INSN_PAR_CLRPSW
) : /* clrpsw $uimm8 */
6697 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6698 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6699 #define FLD(f) abuf->fields.sfmt_clrpsw.f
6700 #define OPRND(f) par_exec->operands.sfmt_clrpsw.f
6701 int UNUSED written
= 0;
6702 IADDR UNUSED pc
= abuf
->addr
;
6703 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6706 USI opval
= ANDSI (GET_H_CR (((UINT
) 0)), ORSI (ZEXTQISI (INVQI (FLD (f_uimm8
))), 65280));
6707 OPRND (h_cr_USI_0
) = opval
;
6708 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
6716 CASE (sem
, INSN_WRITE_CLRPSW
) : /* clrpsw $uimm8 */
6718 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6719 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6720 #define FLD(f) abuf->fields.sfmt_clrpsw.f
6721 #define OPRND(f) par_exec->operands.sfmt_clrpsw.f
6722 int UNUSED written
= abuf
->written
;
6723 IADDR UNUSED pc
= abuf
->addr
;
6724 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6726 SET_H_CR (((UINT
) 0), OPRND (h_cr_USI_0
));
6733 CASE (sem
, INSN_PAR_SETPSW
) : /* setpsw $uimm8 */
6735 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6736 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6737 #define FLD(f) abuf->fields.sfmt_clrpsw.f
6738 #define OPRND(f) par_exec->operands.sfmt_setpsw.f
6739 int UNUSED written
= 0;
6740 IADDR UNUSED pc
= abuf
->addr
;
6741 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6744 USI opval
= FLD (f_uimm8
);
6745 OPRND (h_cr_USI_0
) = opval
;
6746 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
6754 CASE (sem
, INSN_WRITE_SETPSW
) : /* setpsw $uimm8 */
6756 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6757 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6758 #define FLD(f) abuf->fields.sfmt_clrpsw.f
6759 #define OPRND(f) par_exec->operands.sfmt_setpsw.f
6760 int UNUSED written
= abuf
->written
;
6761 IADDR UNUSED pc
= abuf
->addr
;
6762 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6764 SET_H_CR (((UINT
) 0), OPRND (h_cr_USI_0
));
6771 CASE (sem
, INSN_PAR_BTST
) : /* btst $uimm3,$sr */
6773 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6774 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6775 #define FLD(f) abuf->fields.sfmt_bset.f
6776 #define OPRND(f) par_exec->operands.sfmt_btst.f
6777 int UNUSED written
= 0;
6778 IADDR UNUSED pc
= abuf
->addr
;
6779 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6782 BI opval
= ANDQI (SRLQI (* FLD (i_sr
), SUBSI (7, FLD (f_uimm3
))), 1);
6783 OPRND (condbit
) = opval
;
6784 CGEN_TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
6792 CASE (sem
, INSN_WRITE_BTST
) : /* btst $uimm3,$sr */
6794 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6795 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6796 #define FLD(f) abuf->fields.sfmt_bset.f
6797 #define OPRND(f) par_exec->operands.sfmt_btst.f
6798 int UNUSED written
= abuf
->written
;
6799 IADDR UNUSED pc
= abuf
->addr
;
6800 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6802 CPU (h_cond
) = OPRND (condbit
);
6811 ENDSWITCH (sem
) /* End of semantic switch. */
6813 /* At this point `vpc' contains the next insn to execute. */
6816 #undef DEFINE_SWITCH
6817 #endif /* DEFINE_SWITCH */