1 /* Simulator instruction semantics for m32rxf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
9 This program 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 2, or (at your option)
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 /* The labels have the case they have because the enum of insn types
28 is all uppercase and in the non-stdc case the insn symbol is built
29 into the enum name. */
35 { M32RXF_INSN_X_INVALID
, && case_sem_INSN_X_INVALID
},
36 { M32RXF_INSN_X_AFTER
, && case_sem_INSN_X_AFTER
},
37 { M32RXF_INSN_X_BEFORE
, && case_sem_INSN_X_BEFORE
},
38 { M32RXF_INSN_X_CTI_CHAIN
, && case_sem_INSN_X_CTI_CHAIN
},
39 { M32RXF_INSN_X_CHAIN
, && case_sem_INSN_X_CHAIN
},
40 { M32RXF_INSN_X_BEGIN
, && case_sem_INSN_X_BEGIN
},
41 { M32RXF_INSN_ADD
, && case_sem_INSN_ADD
},
42 { M32RXF_INSN_ADD3
, && case_sem_INSN_ADD3
},
43 { M32RXF_INSN_AND
, && case_sem_INSN_AND
},
44 { M32RXF_INSN_AND3
, && case_sem_INSN_AND3
},
45 { M32RXF_INSN_OR
, && case_sem_INSN_OR
},
46 { M32RXF_INSN_OR3
, && case_sem_INSN_OR3
},
47 { M32RXF_INSN_XOR
, && case_sem_INSN_XOR
},
48 { M32RXF_INSN_XOR3
, && case_sem_INSN_XOR3
},
49 { M32RXF_INSN_ADDI
, && case_sem_INSN_ADDI
},
50 { M32RXF_INSN_ADDV
, && case_sem_INSN_ADDV
},
51 { M32RXF_INSN_ADDV3
, && case_sem_INSN_ADDV3
},
52 { M32RXF_INSN_ADDX
, && case_sem_INSN_ADDX
},
53 { M32RXF_INSN_BC8
, && case_sem_INSN_BC8
},
54 { M32RXF_INSN_BC24
, && case_sem_INSN_BC24
},
55 { M32RXF_INSN_BEQ
, && case_sem_INSN_BEQ
},
56 { M32RXF_INSN_BEQZ
, && case_sem_INSN_BEQZ
},
57 { M32RXF_INSN_BGEZ
, && case_sem_INSN_BGEZ
},
58 { M32RXF_INSN_BGTZ
, && case_sem_INSN_BGTZ
},
59 { M32RXF_INSN_BLEZ
, && case_sem_INSN_BLEZ
},
60 { M32RXF_INSN_BLTZ
, && case_sem_INSN_BLTZ
},
61 { M32RXF_INSN_BNEZ
, && case_sem_INSN_BNEZ
},
62 { M32RXF_INSN_BL8
, && case_sem_INSN_BL8
},
63 { M32RXF_INSN_BL24
, && case_sem_INSN_BL24
},
64 { M32RXF_INSN_BCL8
, && case_sem_INSN_BCL8
},
65 { M32RXF_INSN_BCL24
, && case_sem_INSN_BCL24
},
66 { M32RXF_INSN_BNC8
, && case_sem_INSN_BNC8
},
67 { M32RXF_INSN_BNC24
, && case_sem_INSN_BNC24
},
68 { M32RXF_INSN_BNE
, && case_sem_INSN_BNE
},
69 { M32RXF_INSN_BRA8
, && case_sem_INSN_BRA8
},
70 { M32RXF_INSN_BRA24
, && case_sem_INSN_BRA24
},
71 { M32RXF_INSN_BNCL8
, && case_sem_INSN_BNCL8
},
72 { M32RXF_INSN_BNCL24
, && case_sem_INSN_BNCL24
},
73 { M32RXF_INSN_CMP
, && case_sem_INSN_CMP
},
74 { M32RXF_INSN_CMPI
, && case_sem_INSN_CMPI
},
75 { M32RXF_INSN_CMPU
, && case_sem_INSN_CMPU
},
76 { M32RXF_INSN_CMPUI
, && case_sem_INSN_CMPUI
},
77 { M32RXF_INSN_CMPEQ
, && case_sem_INSN_CMPEQ
},
78 { M32RXF_INSN_CMPZ
, && case_sem_INSN_CMPZ
},
79 { M32RXF_INSN_DIV
, && case_sem_INSN_DIV
},
80 { M32RXF_INSN_DIVU
, && case_sem_INSN_DIVU
},
81 { M32RXF_INSN_REM
, && case_sem_INSN_REM
},
82 { M32RXF_INSN_REMU
, && case_sem_INSN_REMU
},
83 { M32RXF_INSN_DIVH
, && case_sem_INSN_DIVH
},
84 { M32RXF_INSN_JC
, && case_sem_INSN_JC
},
85 { M32RXF_INSN_JNC
, && case_sem_INSN_JNC
},
86 { M32RXF_INSN_JL
, && case_sem_INSN_JL
},
87 { M32RXF_INSN_JMP
, && case_sem_INSN_JMP
},
88 { M32RXF_INSN_LD
, && case_sem_INSN_LD
},
89 { M32RXF_INSN_LD_D
, && case_sem_INSN_LD_D
},
90 { M32RXF_INSN_LDB
, && case_sem_INSN_LDB
},
91 { M32RXF_INSN_LDB_D
, && case_sem_INSN_LDB_D
},
92 { M32RXF_INSN_LDH
, && case_sem_INSN_LDH
},
93 { M32RXF_INSN_LDH_D
, && case_sem_INSN_LDH_D
},
94 { M32RXF_INSN_LDUB
, && case_sem_INSN_LDUB
},
95 { M32RXF_INSN_LDUB_D
, && case_sem_INSN_LDUB_D
},
96 { M32RXF_INSN_LDUH
, && case_sem_INSN_LDUH
},
97 { M32RXF_INSN_LDUH_D
, && case_sem_INSN_LDUH_D
},
98 { M32RXF_INSN_LD_PLUS
, && case_sem_INSN_LD_PLUS
},
99 { M32RXF_INSN_LD24
, && case_sem_INSN_LD24
},
100 { M32RXF_INSN_LDI8
, && case_sem_INSN_LDI8
},
101 { M32RXF_INSN_LDI16
, && case_sem_INSN_LDI16
},
102 { M32RXF_INSN_LOCK
, && case_sem_INSN_LOCK
},
103 { M32RXF_INSN_MACHI_A
, && case_sem_INSN_MACHI_A
},
104 { M32RXF_INSN_MACLO_A
, && case_sem_INSN_MACLO_A
},
105 { M32RXF_INSN_MACWHI_A
, && case_sem_INSN_MACWHI_A
},
106 { M32RXF_INSN_MACWLO_A
, && case_sem_INSN_MACWLO_A
},
107 { M32RXF_INSN_MUL
, && case_sem_INSN_MUL
},
108 { M32RXF_INSN_MULHI_A
, && case_sem_INSN_MULHI_A
},
109 { M32RXF_INSN_MULLO_A
, && case_sem_INSN_MULLO_A
},
110 { M32RXF_INSN_MULWHI_A
, && case_sem_INSN_MULWHI_A
},
111 { M32RXF_INSN_MULWLO_A
, && case_sem_INSN_MULWLO_A
},
112 { M32RXF_INSN_MV
, && case_sem_INSN_MV
},
113 { M32RXF_INSN_MVFACHI_A
, && case_sem_INSN_MVFACHI_A
},
114 { M32RXF_INSN_MVFACLO_A
, && case_sem_INSN_MVFACLO_A
},
115 { M32RXF_INSN_MVFACMI_A
, && case_sem_INSN_MVFACMI_A
},
116 { M32RXF_INSN_MVFC
, && case_sem_INSN_MVFC
},
117 { M32RXF_INSN_MVTACHI_A
, && case_sem_INSN_MVTACHI_A
},
118 { M32RXF_INSN_MVTACLO_A
, && case_sem_INSN_MVTACLO_A
},
119 { M32RXF_INSN_MVTC
, && case_sem_INSN_MVTC
},
120 { M32RXF_INSN_NEG
, && case_sem_INSN_NEG
},
121 { M32RXF_INSN_NOP
, && case_sem_INSN_NOP
},
122 { M32RXF_INSN_NOT
, && case_sem_INSN_NOT
},
123 { M32RXF_INSN_RAC_DSI
, && case_sem_INSN_RAC_DSI
},
124 { M32RXF_INSN_RACH_DSI
, && case_sem_INSN_RACH_DSI
},
125 { M32RXF_INSN_RTE
, && case_sem_INSN_RTE
},
126 { M32RXF_INSN_SETH
, && case_sem_INSN_SETH
},
127 { M32RXF_INSN_SLL
, && case_sem_INSN_SLL
},
128 { M32RXF_INSN_SLL3
, && case_sem_INSN_SLL3
},
129 { M32RXF_INSN_SLLI
, && case_sem_INSN_SLLI
},
130 { M32RXF_INSN_SRA
, && case_sem_INSN_SRA
},
131 { M32RXF_INSN_SRA3
, && case_sem_INSN_SRA3
},
132 { M32RXF_INSN_SRAI
, && case_sem_INSN_SRAI
},
133 { M32RXF_INSN_SRL
, && case_sem_INSN_SRL
},
134 { M32RXF_INSN_SRL3
, && case_sem_INSN_SRL3
},
135 { M32RXF_INSN_SRLI
, && case_sem_INSN_SRLI
},
136 { M32RXF_INSN_ST
, && case_sem_INSN_ST
},
137 { M32RXF_INSN_ST_D
, && case_sem_INSN_ST_D
},
138 { M32RXF_INSN_STB
, && case_sem_INSN_STB
},
139 { M32RXF_INSN_STB_D
, && case_sem_INSN_STB_D
},
140 { M32RXF_INSN_STH
, && case_sem_INSN_STH
},
141 { M32RXF_INSN_STH_D
, && case_sem_INSN_STH_D
},
142 { M32RXF_INSN_ST_PLUS
, && case_sem_INSN_ST_PLUS
},
143 { M32RXF_INSN_ST_MINUS
, && case_sem_INSN_ST_MINUS
},
144 { M32RXF_INSN_SUB
, && case_sem_INSN_SUB
},
145 { M32RXF_INSN_SUBV
, && case_sem_INSN_SUBV
},
146 { M32RXF_INSN_SUBX
, && case_sem_INSN_SUBX
},
147 { M32RXF_INSN_TRAP
, && case_sem_INSN_TRAP
},
148 { M32RXF_INSN_UNLOCK
, && case_sem_INSN_UNLOCK
},
149 { M32RXF_INSN_SATB
, && case_sem_INSN_SATB
},
150 { M32RXF_INSN_SATH
, && case_sem_INSN_SATH
},
151 { M32RXF_INSN_SAT
, && case_sem_INSN_SAT
},
152 { M32RXF_INSN_PCMPBZ
, && case_sem_INSN_PCMPBZ
},
153 { M32RXF_INSN_SADD
, && case_sem_INSN_SADD
},
154 { M32RXF_INSN_MACWU1
, && case_sem_INSN_MACWU1
},
155 { M32RXF_INSN_MSBLO
, && case_sem_INSN_MSBLO
},
156 { M32RXF_INSN_MULWU1
, && case_sem_INSN_MULWU1
},
157 { M32RXF_INSN_MACLH1
, && case_sem_INSN_MACLH1
},
158 { M32RXF_INSN_SC
, && case_sem_INSN_SC
},
159 { M32RXF_INSN_SNC
, && case_sem_INSN_SNC
},
160 { M32RXF_INSN_PAR_ADD
, && case_sem_INSN_PAR_ADD
},
161 { M32RXF_INSN_WRITE_ADD
, && case_sem_INSN_WRITE_ADD
},
162 { M32RXF_INSN_PAR_AND
, && case_sem_INSN_PAR_AND
},
163 { M32RXF_INSN_WRITE_AND
, && case_sem_INSN_WRITE_AND
},
164 { M32RXF_INSN_PAR_OR
, && case_sem_INSN_PAR_OR
},
165 { M32RXF_INSN_WRITE_OR
, && case_sem_INSN_WRITE_OR
},
166 { M32RXF_INSN_PAR_XOR
, && case_sem_INSN_PAR_XOR
},
167 { M32RXF_INSN_WRITE_XOR
, && case_sem_INSN_WRITE_XOR
},
168 { M32RXF_INSN_PAR_ADDI
, && case_sem_INSN_PAR_ADDI
},
169 { M32RXF_INSN_WRITE_ADDI
, && case_sem_INSN_WRITE_ADDI
},
170 { M32RXF_INSN_PAR_ADDV
, && case_sem_INSN_PAR_ADDV
},
171 { M32RXF_INSN_WRITE_ADDV
, && case_sem_INSN_WRITE_ADDV
},
172 { M32RXF_INSN_PAR_ADDX
, && case_sem_INSN_PAR_ADDX
},
173 { M32RXF_INSN_WRITE_ADDX
, && case_sem_INSN_WRITE_ADDX
},
174 { M32RXF_INSN_PAR_BC8
, && case_sem_INSN_PAR_BC8
},
175 { M32RXF_INSN_WRITE_BC8
, && case_sem_INSN_WRITE_BC8
},
176 { M32RXF_INSN_PAR_BL8
, && case_sem_INSN_PAR_BL8
},
177 { M32RXF_INSN_WRITE_BL8
, && case_sem_INSN_WRITE_BL8
},
178 { M32RXF_INSN_PAR_BCL8
, && case_sem_INSN_PAR_BCL8
},
179 { M32RXF_INSN_WRITE_BCL8
, && case_sem_INSN_WRITE_BCL8
},
180 { M32RXF_INSN_PAR_BNC8
, && case_sem_INSN_PAR_BNC8
},
181 { M32RXF_INSN_WRITE_BNC8
, && case_sem_INSN_WRITE_BNC8
},
182 { M32RXF_INSN_PAR_BRA8
, && case_sem_INSN_PAR_BRA8
},
183 { M32RXF_INSN_WRITE_BRA8
, && case_sem_INSN_WRITE_BRA8
},
184 { M32RXF_INSN_PAR_BNCL8
, && case_sem_INSN_PAR_BNCL8
},
185 { M32RXF_INSN_WRITE_BNCL8
, && case_sem_INSN_WRITE_BNCL8
},
186 { M32RXF_INSN_PAR_CMP
, && case_sem_INSN_PAR_CMP
},
187 { M32RXF_INSN_WRITE_CMP
, && case_sem_INSN_WRITE_CMP
},
188 { M32RXF_INSN_PAR_CMPU
, && case_sem_INSN_PAR_CMPU
},
189 { M32RXF_INSN_WRITE_CMPU
, && case_sem_INSN_WRITE_CMPU
},
190 { M32RXF_INSN_PAR_CMPEQ
, && case_sem_INSN_PAR_CMPEQ
},
191 { M32RXF_INSN_WRITE_CMPEQ
, && case_sem_INSN_WRITE_CMPEQ
},
192 { M32RXF_INSN_PAR_CMPZ
, && case_sem_INSN_PAR_CMPZ
},
193 { M32RXF_INSN_WRITE_CMPZ
, && case_sem_INSN_WRITE_CMPZ
},
194 { M32RXF_INSN_PAR_JC
, && case_sem_INSN_PAR_JC
},
195 { M32RXF_INSN_WRITE_JC
, && case_sem_INSN_WRITE_JC
},
196 { M32RXF_INSN_PAR_JNC
, && case_sem_INSN_PAR_JNC
},
197 { M32RXF_INSN_WRITE_JNC
, && case_sem_INSN_WRITE_JNC
},
198 { M32RXF_INSN_PAR_JL
, && case_sem_INSN_PAR_JL
},
199 { M32RXF_INSN_WRITE_JL
, && case_sem_INSN_WRITE_JL
},
200 { M32RXF_INSN_PAR_JMP
, && case_sem_INSN_PAR_JMP
},
201 { M32RXF_INSN_WRITE_JMP
, && case_sem_INSN_WRITE_JMP
},
202 { M32RXF_INSN_PAR_LD
, && case_sem_INSN_PAR_LD
},
203 { M32RXF_INSN_WRITE_LD
, && case_sem_INSN_WRITE_LD
},
204 { M32RXF_INSN_PAR_LDB
, && case_sem_INSN_PAR_LDB
},
205 { M32RXF_INSN_WRITE_LDB
, && case_sem_INSN_WRITE_LDB
},
206 { M32RXF_INSN_PAR_LDH
, && case_sem_INSN_PAR_LDH
},
207 { M32RXF_INSN_WRITE_LDH
, && case_sem_INSN_WRITE_LDH
},
208 { M32RXF_INSN_PAR_LDUB
, && case_sem_INSN_PAR_LDUB
},
209 { M32RXF_INSN_WRITE_LDUB
, && case_sem_INSN_WRITE_LDUB
},
210 { M32RXF_INSN_PAR_LDUH
, && case_sem_INSN_PAR_LDUH
},
211 { M32RXF_INSN_WRITE_LDUH
, && case_sem_INSN_WRITE_LDUH
},
212 { M32RXF_INSN_PAR_LD_PLUS
, && case_sem_INSN_PAR_LD_PLUS
},
213 { M32RXF_INSN_WRITE_LD_PLUS
, && case_sem_INSN_WRITE_LD_PLUS
},
214 { M32RXF_INSN_PAR_LDI8
, && case_sem_INSN_PAR_LDI8
},
215 { M32RXF_INSN_WRITE_LDI8
, && case_sem_INSN_WRITE_LDI8
},
216 { M32RXF_INSN_PAR_LOCK
, && case_sem_INSN_PAR_LOCK
},
217 { M32RXF_INSN_WRITE_LOCK
, && case_sem_INSN_WRITE_LOCK
},
218 { M32RXF_INSN_PAR_MACHI_A
, && case_sem_INSN_PAR_MACHI_A
},
219 { M32RXF_INSN_WRITE_MACHI_A
, && case_sem_INSN_WRITE_MACHI_A
},
220 { M32RXF_INSN_PAR_MACLO_A
, && case_sem_INSN_PAR_MACLO_A
},
221 { M32RXF_INSN_WRITE_MACLO_A
, && case_sem_INSN_WRITE_MACLO_A
},
222 { M32RXF_INSN_PAR_MACWHI_A
, && case_sem_INSN_PAR_MACWHI_A
},
223 { M32RXF_INSN_WRITE_MACWHI_A
, && case_sem_INSN_WRITE_MACWHI_A
},
224 { M32RXF_INSN_PAR_MACWLO_A
, && case_sem_INSN_PAR_MACWLO_A
},
225 { M32RXF_INSN_WRITE_MACWLO_A
, && case_sem_INSN_WRITE_MACWLO_A
},
226 { M32RXF_INSN_PAR_MUL
, && case_sem_INSN_PAR_MUL
},
227 { M32RXF_INSN_WRITE_MUL
, && case_sem_INSN_WRITE_MUL
},
228 { M32RXF_INSN_PAR_MULHI_A
, && case_sem_INSN_PAR_MULHI_A
},
229 { M32RXF_INSN_WRITE_MULHI_A
, && case_sem_INSN_WRITE_MULHI_A
},
230 { M32RXF_INSN_PAR_MULLO_A
, && case_sem_INSN_PAR_MULLO_A
},
231 { M32RXF_INSN_WRITE_MULLO_A
, && case_sem_INSN_WRITE_MULLO_A
},
232 { M32RXF_INSN_PAR_MULWHI_A
, && case_sem_INSN_PAR_MULWHI_A
},
233 { M32RXF_INSN_WRITE_MULWHI_A
, && case_sem_INSN_WRITE_MULWHI_A
},
234 { M32RXF_INSN_PAR_MULWLO_A
, && case_sem_INSN_PAR_MULWLO_A
},
235 { M32RXF_INSN_WRITE_MULWLO_A
, && case_sem_INSN_WRITE_MULWLO_A
},
236 { M32RXF_INSN_PAR_MV
, && case_sem_INSN_PAR_MV
},
237 { M32RXF_INSN_WRITE_MV
, && case_sem_INSN_WRITE_MV
},
238 { M32RXF_INSN_PAR_MVFACHI_A
, && case_sem_INSN_PAR_MVFACHI_A
},
239 { M32RXF_INSN_WRITE_MVFACHI_A
, && case_sem_INSN_WRITE_MVFACHI_A
},
240 { M32RXF_INSN_PAR_MVFACLO_A
, && case_sem_INSN_PAR_MVFACLO_A
},
241 { M32RXF_INSN_WRITE_MVFACLO_A
, && case_sem_INSN_WRITE_MVFACLO_A
},
242 { M32RXF_INSN_PAR_MVFACMI_A
, && case_sem_INSN_PAR_MVFACMI_A
},
243 { M32RXF_INSN_WRITE_MVFACMI_A
, && case_sem_INSN_WRITE_MVFACMI_A
},
244 { M32RXF_INSN_PAR_MVFC
, && case_sem_INSN_PAR_MVFC
},
245 { M32RXF_INSN_WRITE_MVFC
, && case_sem_INSN_WRITE_MVFC
},
246 { M32RXF_INSN_PAR_MVTACHI_A
, && case_sem_INSN_PAR_MVTACHI_A
},
247 { M32RXF_INSN_WRITE_MVTACHI_A
, && case_sem_INSN_WRITE_MVTACHI_A
},
248 { M32RXF_INSN_PAR_MVTACLO_A
, && case_sem_INSN_PAR_MVTACLO_A
},
249 { M32RXF_INSN_WRITE_MVTACLO_A
, && case_sem_INSN_WRITE_MVTACLO_A
},
250 { M32RXF_INSN_PAR_MVTC
, && case_sem_INSN_PAR_MVTC
},
251 { M32RXF_INSN_WRITE_MVTC
, && case_sem_INSN_WRITE_MVTC
},
252 { M32RXF_INSN_PAR_NEG
, && case_sem_INSN_PAR_NEG
},
253 { M32RXF_INSN_WRITE_NEG
, && case_sem_INSN_WRITE_NEG
},
254 { M32RXF_INSN_PAR_NOP
, && case_sem_INSN_PAR_NOP
},
255 { M32RXF_INSN_WRITE_NOP
, && case_sem_INSN_WRITE_NOP
},
256 { M32RXF_INSN_PAR_NOT
, && case_sem_INSN_PAR_NOT
},
257 { M32RXF_INSN_WRITE_NOT
, && case_sem_INSN_WRITE_NOT
},
258 { M32RXF_INSN_PAR_RAC_DSI
, && case_sem_INSN_PAR_RAC_DSI
},
259 { M32RXF_INSN_WRITE_RAC_DSI
, && case_sem_INSN_WRITE_RAC_DSI
},
260 { M32RXF_INSN_PAR_RACH_DSI
, && case_sem_INSN_PAR_RACH_DSI
},
261 { M32RXF_INSN_WRITE_RACH_DSI
, && case_sem_INSN_WRITE_RACH_DSI
},
262 { M32RXF_INSN_PAR_RTE
, && case_sem_INSN_PAR_RTE
},
263 { M32RXF_INSN_WRITE_RTE
, && case_sem_INSN_WRITE_RTE
},
264 { M32RXF_INSN_PAR_SLL
, && case_sem_INSN_PAR_SLL
},
265 { M32RXF_INSN_WRITE_SLL
, && case_sem_INSN_WRITE_SLL
},
266 { M32RXF_INSN_PAR_SLLI
, && case_sem_INSN_PAR_SLLI
},
267 { M32RXF_INSN_WRITE_SLLI
, && case_sem_INSN_WRITE_SLLI
},
268 { M32RXF_INSN_PAR_SRA
, && case_sem_INSN_PAR_SRA
},
269 { M32RXF_INSN_WRITE_SRA
, && case_sem_INSN_WRITE_SRA
},
270 { M32RXF_INSN_PAR_SRAI
, && case_sem_INSN_PAR_SRAI
},
271 { M32RXF_INSN_WRITE_SRAI
, && case_sem_INSN_WRITE_SRAI
},
272 { M32RXF_INSN_PAR_SRL
, && case_sem_INSN_PAR_SRL
},
273 { M32RXF_INSN_WRITE_SRL
, && case_sem_INSN_WRITE_SRL
},
274 { M32RXF_INSN_PAR_SRLI
, && case_sem_INSN_PAR_SRLI
},
275 { M32RXF_INSN_WRITE_SRLI
, && case_sem_INSN_WRITE_SRLI
},
276 { M32RXF_INSN_PAR_ST
, && case_sem_INSN_PAR_ST
},
277 { M32RXF_INSN_WRITE_ST
, && case_sem_INSN_WRITE_ST
},
278 { M32RXF_INSN_PAR_STB
, && case_sem_INSN_PAR_STB
},
279 { M32RXF_INSN_WRITE_STB
, && case_sem_INSN_WRITE_STB
},
280 { M32RXF_INSN_PAR_STH
, && case_sem_INSN_PAR_STH
},
281 { M32RXF_INSN_WRITE_STH
, && case_sem_INSN_WRITE_STH
},
282 { M32RXF_INSN_PAR_ST_PLUS
, && case_sem_INSN_PAR_ST_PLUS
},
283 { M32RXF_INSN_WRITE_ST_PLUS
, && case_sem_INSN_WRITE_ST_PLUS
},
284 { M32RXF_INSN_PAR_ST_MINUS
, && case_sem_INSN_PAR_ST_MINUS
},
285 { M32RXF_INSN_WRITE_ST_MINUS
, && case_sem_INSN_WRITE_ST_MINUS
},
286 { M32RXF_INSN_PAR_SUB
, && case_sem_INSN_PAR_SUB
},
287 { M32RXF_INSN_WRITE_SUB
, && case_sem_INSN_WRITE_SUB
},
288 { M32RXF_INSN_PAR_SUBV
, && case_sem_INSN_PAR_SUBV
},
289 { M32RXF_INSN_WRITE_SUBV
, && case_sem_INSN_WRITE_SUBV
},
290 { M32RXF_INSN_PAR_SUBX
, && case_sem_INSN_PAR_SUBX
},
291 { M32RXF_INSN_WRITE_SUBX
, && case_sem_INSN_WRITE_SUBX
},
292 { M32RXF_INSN_PAR_TRAP
, && case_sem_INSN_PAR_TRAP
},
293 { M32RXF_INSN_WRITE_TRAP
, && case_sem_INSN_WRITE_TRAP
},
294 { M32RXF_INSN_PAR_UNLOCK
, && case_sem_INSN_PAR_UNLOCK
},
295 { M32RXF_INSN_WRITE_UNLOCK
, && case_sem_INSN_WRITE_UNLOCK
},
296 { M32RXF_INSN_PAR_PCMPBZ
, && case_sem_INSN_PAR_PCMPBZ
},
297 { M32RXF_INSN_WRITE_PCMPBZ
, && case_sem_INSN_WRITE_PCMPBZ
},
298 { M32RXF_INSN_PAR_SADD
, && case_sem_INSN_PAR_SADD
},
299 { M32RXF_INSN_WRITE_SADD
, && case_sem_INSN_WRITE_SADD
},
300 { M32RXF_INSN_PAR_MACWU1
, && case_sem_INSN_PAR_MACWU1
},
301 { M32RXF_INSN_WRITE_MACWU1
, && case_sem_INSN_WRITE_MACWU1
},
302 { M32RXF_INSN_PAR_MSBLO
, && case_sem_INSN_PAR_MSBLO
},
303 { M32RXF_INSN_WRITE_MSBLO
, && case_sem_INSN_WRITE_MSBLO
},
304 { M32RXF_INSN_PAR_MULWU1
, && case_sem_INSN_PAR_MULWU1
},
305 { M32RXF_INSN_WRITE_MULWU1
, && case_sem_INSN_WRITE_MULWU1
},
306 { M32RXF_INSN_PAR_MACLH1
, && case_sem_INSN_PAR_MACLH1
},
307 { M32RXF_INSN_WRITE_MACLH1
, && case_sem_INSN_WRITE_MACLH1
},
308 { M32RXF_INSN_PAR_SC
, && case_sem_INSN_PAR_SC
},
309 { M32RXF_INSN_WRITE_SC
, && case_sem_INSN_WRITE_SC
},
310 { M32RXF_INSN_PAR_SNC
, && case_sem_INSN_PAR_SNC
},
311 { M32RXF_INSN_WRITE_SNC
, && case_sem_INSN_WRITE_SNC
},
316 for (i
= 0; labels
[i
].label
!= 0; ++i
)
319 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_fast_lab
= labels
[i
].label
;
321 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_full_lab
= labels
[i
].label
;
326 #endif /* DEFINE_LABELS */
330 /* If hyper-fast [well not unnecessarily slow] execution is selected, turn
331 off frills like tracing and profiling. */
332 /* FIXME: A better way would be to have TRACE_RESULT check for something
333 that can cause it to be optimized out. Another way would be to emit
334 special handlers into the instruction "stream". */
338 #define TRACE_RESULT(cpu, abuf, name, type, val)
342 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
343 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
345 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
352 /* Branch to next handler without going around main loop. */
353 #define NEXT(vpc) goto * SEM_ARGBUF (vpc) -> semantic.sem_case
354 SWITCH (sem
, SEM_ARGBUF (vpc
) -> semantic
.sem_case
)
356 #else /* ! WITH_SCACHE_PBB */
358 #define NEXT(vpc) BREAK (sem)
361 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_fast_lab
)
363 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_full_lab
)
366 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->num
)
369 #endif /* ! WITH_SCACHE_PBB */
373 CASE (sem
, INSN_X_INVALID
) : /* --invalid-- */
375 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
376 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
377 #define FLD(f) abuf->fields.fmt_empty.f
378 int UNUSED written
= 0;
379 IADDR UNUSED pc
= abuf
->addr
;
380 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
383 /* Update the recorded pc in the cpu state struct.
384 Only necessary for WITH_SCACHE case, but to avoid the
385 conditional compilation .... */
387 /* Virtual insns have zero size. Overwrite vpc with address of next insn
388 using the default-insn-bitsize spec. When executing insns in parallel
389 we may want to queue the fault and continue execution. */
390 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
391 vpc
= sim_engine_invalid_insn (current_cpu
, pc
, vpc
);
398 CASE (sem
, INSN_X_AFTER
) : /* --after-- */
400 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
401 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
402 #define FLD(f) abuf->fields.fmt_empty.f
403 int UNUSED written
= 0;
404 IADDR UNUSED pc
= abuf
->addr
;
405 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
408 #if WITH_SCACHE_PBB_M32RXF
409 m32rxf_pbb_after (current_cpu
, sem_arg
);
417 CASE (sem
, INSN_X_BEFORE
) : /* --before-- */
419 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
420 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
421 #define FLD(f) abuf->fields.fmt_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_M32RXF
428 m32rxf_pbb_before (current_cpu
, sem_arg
);
436 CASE (sem
, INSN_X_CTI_CHAIN
) : /* --cti-chain-- */
438 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
439 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
440 #define FLD(f) abuf->fields.fmt_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_M32RXF
448 vpc
= m32rxf_pbb_cti_chain (current_cpu
, sem_arg
,
449 pbb_br_type
, pbb_br_npc
);
452 /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
453 vpc
= m32rxf_pbb_cti_chain (current_cpu
, sem_arg
,
454 CPU_PBB_BR_TYPE (current_cpu
),
455 CPU_PBB_BR_NPC (current_cpu
));
464 CASE (sem
, INSN_X_CHAIN
) : /* --chain-- */
466 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
467 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
468 #define FLD(f) abuf->fields.fmt_empty.f
469 int UNUSED written
= 0;
470 IADDR UNUSED pc
= abuf
->addr
;
471 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
474 #if WITH_SCACHE_PBB_M32RXF
475 vpc
= m32rxf_pbb_chain (current_cpu
, sem_arg
);
486 CASE (sem
, INSN_X_BEGIN
) : /* --begin-- */
488 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
489 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
490 #define FLD(f) abuf->fields.fmt_empty.f
491 int UNUSED written
= 0;
492 IADDR UNUSED pc
= abuf
->addr
;
493 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
496 #if WITH_SCACHE_PBB_M32RXF
497 #if defined DEFINE_SWITCH || defined FAST_P
498 /* In the switch case FAST_P is a constant, allowing several optimizations
499 in any called inline functions. */
500 vpc
= m32rxf_pbb_begin (current_cpu
, FAST_P
);
502 #if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
503 vpc
= m32rxf_pbb_begin (current_cpu
, STATE_RUN_FAST_P (CPU_STATE (current_cpu
)));
505 vpc
= m32rxf_pbb_begin (current_cpu
, 0);
515 CASE (sem
, INSN_ADD
) : /* add $dr,$sr */
517 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
518 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
519 #define FLD(f) abuf->fields.sfmt_add.f
520 int UNUSED written
= 0;
521 IADDR UNUSED pc
= abuf
->addr
;
522 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
525 SI opval
= ADDSI (* FLD (i_dr
), * FLD (i_sr
));
526 * FLD (i_dr
) = opval
;
527 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
534 CASE (sem
, INSN_ADD3
) : /* add3 $dr,$sr,$hash$slo16 */
536 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
537 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
538 #define FLD(f) abuf->fields.sfmt_add3.f
539 int UNUSED written
= 0;
540 IADDR UNUSED pc
= abuf
->addr
;
541 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
544 SI opval
= ADDSI (* FLD (i_sr
), FLD (f_simm16
));
545 * FLD (i_dr
) = opval
;
546 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
553 CASE (sem
, INSN_AND
) : /* and $dr,$sr */
555 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
556 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
557 #define FLD(f) abuf->fields.sfmt_add.f
558 int UNUSED written
= 0;
559 IADDR UNUSED pc
= abuf
->addr
;
560 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
563 SI opval
= ANDSI (* FLD (i_dr
), * FLD (i_sr
));
564 * FLD (i_dr
) = opval
;
565 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
572 CASE (sem
, INSN_AND3
) : /* and3 $dr,$sr,$uimm16 */
574 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
575 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
576 #define FLD(f) abuf->fields.sfmt_and3.f
577 int UNUSED written
= 0;
578 IADDR UNUSED pc
= abuf
->addr
;
579 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
582 SI opval
= ANDSI (* FLD (i_sr
), FLD (f_uimm16
));
583 * FLD (i_dr
) = opval
;
584 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
591 CASE (sem
, INSN_OR
) : /* or $dr,$sr */
593 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
594 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
595 #define FLD(f) abuf->fields.sfmt_add.f
596 int UNUSED written
= 0;
597 IADDR UNUSED pc
= abuf
->addr
;
598 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
601 SI opval
= ORSI (* FLD (i_dr
), * FLD (i_sr
));
602 * FLD (i_dr
) = opval
;
603 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
610 CASE (sem
, INSN_OR3
) : /* or3 $dr,$sr,$hash$ulo16 */
612 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
613 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
614 #define FLD(f) abuf->fields.sfmt_and3.f
615 int UNUSED written
= 0;
616 IADDR UNUSED pc
= abuf
->addr
;
617 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
620 SI opval
= ORSI (* FLD (i_sr
), FLD (f_uimm16
));
621 * FLD (i_dr
) = opval
;
622 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
629 CASE (sem
, INSN_XOR
) : /* xor $dr,$sr */
631 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
632 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
633 #define FLD(f) abuf->fields.sfmt_add.f
634 int UNUSED written
= 0;
635 IADDR UNUSED pc
= abuf
->addr
;
636 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
639 SI opval
= XORSI (* FLD (i_dr
), * FLD (i_sr
));
640 * FLD (i_dr
) = opval
;
641 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
648 CASE (sem
, INSN_XOR3
) : /* xor3 $dr,$sr,$uimm16 */
650 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
651 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
652 #define FLD(f) abuf->fields.sfmt_and3.f
653 int UNUSED written
= 0;
654 IADDR UNUSED pc
= abuf
->addr
;
655 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
658 SI opval
= XORSI (* FLD (i_sr
), FLD (f_uimm16
));
659 * FLD (i_dr
) = opval
;
660 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
667 CASE (sem
, INSN_ADDI
) : /* addi $dr,$simm8 */
669 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
670 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
671 #define FLD(f) abuf->fields.sfmt_addi.f
672 int UNUSED written
= 0;
673 IADDR UNUSED pc
= abuf
->addr
;
674 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
677 SI opval
= ADDSI (* FLD (i_dr
), FLD (f_simm8
));
678 * FLD (i_dr
) = opval
;
679 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
686 CASE (sem
, INSN_ADDV
) : /* addv $dr,$sr */
688 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
689 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
690 #define FLD(f) abuf->fields.sfmt_add.f
691 int UNUSED written
= 0;
692 IADDR UNUSED pc
= abuf
->addr
;
693 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
697 temp0
= ADDSI (* FLD (i_dr
), * FLD (i_sr
));
698 temp1
= ADDOFSI (* FLD (i_dr
), * FLD (i_sr
), 0);
701 * FLD (i_dr
) = opval
;
702 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
706 CPU (h_cond
) = opval
;
707 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
715 CASE (sem
, INSN_ADDV3
) : /* addv3 $dr,$sr,$simm16 */
717 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
718 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
719 #define FLD(f) abuf->fields.sfmt_add3.f
720 int UNUSED written
= 0;
721 IADDR UNUSED pc
= abuf
->addr
;
722 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
726 temp0
= ADDSI (* FLD (i_sr
), FLD (f_simm16
));
727 temp1
= ADDOFSI (* FLD (i_sr
), FLD (f_simm16
), 0);
730 * FLD (i_dr
) = opval
;
731 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
735 CPU (h_cond
) = opval
;
736 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
744 CASE (sem
, INSN_ADDX
) : /* addx $dr,$sr */
746 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
747 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
748 #define FLD(f) abuf->fields.sfmt_add.f
749 int UNUSED written
= 0;
750 IADDR UNUSED pc
= abuf
->addr
;
751 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
755 temp0
= ADDCSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
756 temp1
= ADDCFSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
759 * FLD (i_dr
) = opval
;
760 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
764 CPU (h_cond
) = opval
;
765 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
773 CASE (sem
, INSN_BC8
) : /* bc.s $disp8 */
775 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
776 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
777 #define FLD(f) abuf->fields.sfmt_bl8.f
778 int UNUSED written
= 0;
779 IADDR UNUSED pc
= abuf
->addr
;
781 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
785 USI opval
= FLD (i_disp8
);
786 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
788 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
792 abuf
->written
= written
;
793 SEM_BRANCH_FINI (vpc
);
798 CASE (sem
, INSN_BC24
) : /* bc.l $disp24 */
800 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
801 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
802 #define FLD(f) abuf->fields.sfmt_bl24.f
803 int UNUSED written
= 0;
804 IADDR UNUSED pc
= abuf
->addr
;
806 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
810 USI opval
= FLD (i_disp24
);
811 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
813 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
817 abuf
->written
= written
;
818 SEM_BRANCH_FINI (vpc
);
823 CASE (sem
, INSN_BEQ
) : /* beq $src1,$src2,$disp16 */
825 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
826 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
827 #define FLD(f) abuf->fields.sfmt_beq.f
828 int UNUSED written
= 0;
829 IADDR UNUSED pc
= abuf
->addr
;
831 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
833 if (EQSI (* FLD (i_src1
), * FLD (i_src2
))) {
835 USI opval
= FLD (i_disp16
);
836 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
838 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
842 abuf
->written
= written
;
843 SEM_BRANCH_FINI (vpc
);
848 CASE (sem
, INSN_BEQZ
) : /* beqz $src2,$disp16 */
850 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
851 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
852 #define FLD(f) abuf->fields.sfmt_beq.f
853 int UNUSED written
= 0;
854 IADDR UNUSED pc
= abuf
->addr
;
856 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
858 if (EQSI (* FLD (i_src2
), 0)) {
860 USI opval
= FLD (i_disp16
);
861 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
863 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
867 abuf
->written
= written
;
868 SEM_BRANCH_FINI (vpc
);
873 CASE (sem
, INSN_BGEZ
) : /* bgez $src2,$disp16 */
875 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
876 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
877 #define FLD(f) abuf->fields.sfmt_beq.f
878 int UNUSED written
= 0;
879 IADDR UNUSED pc
= abuf
->addr
;
881 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
883 if (GESI (* FLD (i_src2
), 0)) {
885 USI opval
= FLD (i_disp16
);
886 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
888 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
892 abuf
->written
= written
;
893 SEM_BRANCH_FINI (vpc
);
898 CASE (sem
, INSN_BGTZ
) : /* bgtz $src2,$disp16 */
900 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
901 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
902 #define FLD(f) abuf->fields.sfmt_beq.f
903 int UNUSED written
= 0;
904 IADDR UNUSED pc
= abuf
->addr
;
906 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
908 if (GTSI (* FLD (i_src2
), 0)) {
910 USI opval
= FLD (i_disp16
);
911 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
913 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
917 abuf
->written
= written
;
918 SEM_BRANCH_FINI (vpc
);
923 CASE (sem
, INSN_BLEZ
) : /* blez $src2,$disp16 */
925 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
926 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
927 #define FLD(f) abuf->fields.sfmt_beq.f
928 int UNUSED written
= 0;
929 IADDR UNUSED pc
= abuf
->addr
;
931 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
933 if (LESI (* FLD (i_src2
), 0)) {
935 USI opval
= FLD (i_disp16
);
936 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
938 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
942 abuf
->written
= written
;
943 SEM_BRANCH_FINI (vpc
);
948 CASE (sem
, INSN_BLTZ
) : /* bltz $src2,$disp16 */
950 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
951 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
952 #define FLD(f) abuf->fields.sfmt_beq.f
953 int UNUSED written
= 0;
954 IADDR UNUSED pc
= abuf
->addr
;
956 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
958 if (LTSI (* FLD (i_src2
), 0)) {
960 USI opval
= FLD (i_disp16
);
961 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
963 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
967 abuf
->written
= written
;
968 SEM_BRANCH_FINI (vpc
);
973 CASE (sem
, INSN_BNEZ
) : /* bnez $src2,$disp16 */
975 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
976 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
977 #define FLD(f) abuf->fields.sfmt_beq.f
978 int UNUSED written
= 0;
979 IADDR UNUSED pc
= abuf
->addr
;
981 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
983 if (NESI (* FLD (i_src2
), 0)) {
985 USI opval
= FLD (i_disp16
);
986 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
988 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
992 abuf
->written
= written
;
993 SEM_BRANCH_FINI (vpc
);
998 CASE (sem
, INSN_BL8
) : /* bl.s $disp8 */
1000 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1001 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1002 #define FLD(f) abuf->fields.sfmt_bl8.f
1003 int UNUSED written
= 0;
1004 IADDR UNUSED pc
= abuf
->addr
;
1006 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1010 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
1011 CPU (h_gr
[((UINT
) 14)]) = opval
;
1012 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1015 USI opval
= FLD (i_disp8
);
1016 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1017 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1021 SEM_BRANCH_FINI (vpc
);
1026 CASE (sem
, INSN_BL24
) : /* bl.l $disp24 */
1028 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1029 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1030 #define FLD(f) abuf->fields.sfmt_bl24.f
1031 int UNUSED written
= 0;
1032 IADDR UNUSED pc
= abuf
->addr
;
1034 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1038 SI opval
= ADDSI (pc
, 4);
1039 CPU (h_gr
[((UINT
) 14)]) = opval
;
1040 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1043 USI opval
= FLD (i_disp24
);
1044 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1045 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1049 SEM_BRANCH_FINI (vpc
);
1054 CASE (sem
, INSN_BCL8
) : /* bcl.s $disp8 */
1056 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1057 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1058 #define FLD(f) abuf->fields.sfmt_bl8.f
1059 int UNUSED written
= 0;
1060 IADDR UNUSED pc
= abuf
->addr
;
1062 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1067 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
1068 CPU (h_gr
[((UINT
) 14)]) = opval
;
1069 written
|= (1 << 3);
1070 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1073 USI opval
= FLD (i_disp8
);
1074 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1075 written
|= (1 << 4);
1076 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1081 abuf
->written
= written
;
1082 SEM_BRANCH_FINI (vpc
);
1087 CASE (sem
, INSN_BCL24
) : /* bcl.l $disp24 */
1089 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1090 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1091 #define FLD(f) abuf->fields.sfmt_bl24.f
1092 int UNUSED written
= 0;
1093 IADDR UNUSED pc
= abuf
->addr
;
1095 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1100 SI opval
= ADDSI (pc
, 4);
1101 CPU (h_gr
[((UINT
) 14)]) = opval
;
1102 written
|= (1 << 3);
1103 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1106 USI opval
= FLD (i_disp24
);
1107 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1108 written
|= (1 << 4);
1109 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1114 abuf
->written
= written
;
1115 SEM_BRANCH_FINI (vpc
);
1120 CASE (sem
, INSN_BNC8
) : /* bnc.s $disp8 */
1122 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1123 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1124 #define FLD(f) abuf->fields.sfmt_bl8.f
1125 int UNUSED written
= 0;
1126 IADDR UNUSED pc
= abuf
->addr
;
1128 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1130 if (NOTBI (CPU (h_cond
))) {
1132 USI opval
= FLD (i_disp8
);
1133 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1134 written
|= (1 << 2);
1135 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1139 abuf
->written
= written
;
1140 SEM_BRANCH_FINI (vpc
);
1145 CASE (sem
, INSN_BNC24
) : /* bnc.l $disp24 */
1147 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1148 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1149 #define FLD(f) abuf->fields.sfmt_bl24.f
1150 int UNUSED written
= 0;
1151 IADDR UNUSED pc
= abuf
->addr
;
1153 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1155 if (NOTBI (CPU (h_cond
))) {
1157 USI opval
= FLD (i_disp24
);
1158 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1159 written
|= (1 << 2);
1160 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1164 abuf
->written
= written
;
1165 SEM_BRANCH_FINI (vpc
);
1170 CASE (sem
, INSN_BNE
) : /* bne $src1,$src2,$disp16 */
1172 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1173 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1174 #define FLD(f) abuf->fields.sfmt_beq.f
1175 int UNUSED written
= 0;
1176 IADDR UNUSED pc
= abuf
->addr
;
1178 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1180 if (NESI (* FLD (i_src1
), * FLD (i_src2
))) {
1182 USI opval
= FLD (i_disp16
);
1183 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1184 written
|= (1 << 3);
1185 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1189 abuf
->written
= written
;
1190 SEM_BRANCH_FINI (vpc
);
1195 CASE (sem
, INSN_BRA8
) : /* bra.s $disp8 */
1197 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1198 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1199 #define FLD(f) abuf->fields.sfmt_bl8.f
1200 int UNUSED written
= 0;
1201 IADDR UNUSED pc
= abuf
->addr
;
1203 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1206 USI opval
= FLD (i_disp8
);
1207 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1208 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1211 SEM_BRANCH_FINI (vpc
);
1216 CASE (sem
, INSN_BRA24
) : /* bra.l $disp24 */
1218 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1219 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1220 #define FLD(f) abuf->fields.sfmt_bl24.f
1221 int UNUSED written
= 0;
1222 IADDR UNUSED pc
= abuf
->addr
;
1224 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1227 USI opval
= FLD (i_disp24
);
1228 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1229 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1232 SEM_BRANCH_FINI (vpc
);
1237 CASE (sem
, INSN_BNCL8
) : /* bncl.s $disp8 */
1239 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1240 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1241 #define FLD(f) abuf->fields.sfmt_bl8.f
1242 int UNUSED written
= 0;
1243 IADDR UNUSED pc
= abuf
->addr
;
1245 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1247 if (NOTBI (CPU (h_cond
))) {
1250 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
1251 CPU (h_gr
[((UINT
) 14)]) = opval
;
1252 written
|= (1 << 3);
1253 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1256 USI opval
= FLD (i_disp8
);
1257 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1258 written
|= (1 << 4);
1259 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1264 abuf
->written
= written
;
1265 SEM_BRANCH_FINI (vpc
);
1270 CASE (sem
, INSN_BNCL24
) : /* bncl.l $disp24 */
1272 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1273 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1274 #define FLD(f) abuf->fields.sfmt_bl24.f
1275 int UNUSED written
= 0;
1276 IADDR UNUSED pc
= abuf
->addr
;
1278 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1280 if (NOTBI (CPU (h_cond
))) {
1283 SI opval
= ADDSI (pc
, 4);
1284 CPU (h_gr
[((UINT
) 14)]) = opval
;
1285 written
|= (1 << 3);
1286 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1289 USI opval
= FLD (i_disp24
);
1290 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1291 written
|= (1 << 4);
1292 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1297 abuf
->written
= written
;
1298 SEM_BRANCH_FINI (vpc
);
1303 CASE (sem
, INSN_CMP
) : /* cmp $src1,$src2 */
1305 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1306 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1307 #define FLD(f) abuf->fields.sfmt_st_plus.f
1308 int UNUSED written
= 0;
1309 IADDR UNUSED pc
= abuf
->addr
;
1310 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1313 BI opval
= LTSI (* FLD (i_src1
), * FLD (i_src2
));
1314 CPU (h_cond
) = opval
;
1315 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1322 CASE (sem
, INSN_CMPI
) : /* cmpi $src2,$simm16 */
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_d.f
1327 int UNUSED written
= 0;
1328 IADDR UNUSED pc
= abuf
->addr
;
1329 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1332 BI opval
= LTSI (* FLD (i_src2
), FLD (f_simm16
));
1333 CPU (h_cond
) = opval
;
1334 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1341 CASE (sem
, INSN_CMPU
) : /* cmpu $src1,$src2 */
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_plus.f
1346 int UNUSED written
= 0;
1347 IADDR UNUSED pc
= abuf
->addr
;
1348 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1351 BI opval
= LTUSI (* FLD (i_src1
), * FLD (i_src2
));
1352 CPU (h_cond
) = opval
;
1353 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1360 CASE (sem
, INSN_CMPUI
) : /* cmpui $src2,$simm16 */
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_d.f
1365 int UNUSED written
= 0;
1366 IADDR UNUSED pc
= abuf
->addr
;
1367 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1370 BI opval
= LTUSI (* FLD (i_src2
), FLD (f_simm16
));
1371 CPU (h_cond
) = opval
;
1372 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1379 CASE (sem
, INSN_CMPEQ
) : /* cmpeq $src1,$src2 */
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_plus.f
1384 int UNUSED written
= 0;
1385 IADDR UNUSED pc
= abuf
->addr
;
1386 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1389 BI opval
= EQSI (* FLD (i_src1
), * FLD (i_src2
));
1390 CPU (h_cond
) = opval
;
1391 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1398 CASE (sem
, INSN_CMPZ
) : /* cmpz $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_src2
), 0);
1409 CPU (h_cond
) = opval
;
1410 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
1417 CASE (sem
, INSN_DIV
) : /* div $dr,$sr */
1419 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1420 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1421 #define FLD(f) abuf->fields.sfmt_add.f
1422 int UNUSED written
= 0;
1423 IADDR UNUSED pc
= abuf
->addr
;
1424 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1426 if (NESI (* FLD (i_sr
), 0)) {
1428 SI opval
= DIVSI (* FLD (i_dr
), * FLD (i_sr
));
1429 * FLD (i_dr
) = opval
;
1430 written
|= (1 << 2);
1431 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1435 abuf
->written
= written
;
1440 CASE (sem
, INSN_DIVU
) : /* divu $dr,$sr */
1442 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1443 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1444 #define FLD(f) abuf->fields.sfmt_add.f
1445 int UNUSED written
= 0;
1446 IADDR UNUSED pc
= abuf
->addr
;
1447 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1449 if (NESI (* FLD (i_sr
), 0)) {
1451 SI opval
= UDIVSI (* FLD (i_dr
), * FLD (i_sr
));
1452 * FLD (i_dr
) = opval
;
1453 written
|= (1 << 2);
1454 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1458 abuf
->written
= written
;
1463 CASE (sem
, INSN_REM
) : /* rem $dr,$sr */
1465 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1466 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1467 #define FLD(f) abuf->fields.sfmt_add.f
1468 int UNUSED written
= 0;
1469 IADDR UNUSED pc
= abuf
->addr
;
1470 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1472 if (NESI (* FLD (i_sr
), 0)) {
1474 SI opval
= MODSI (* FLD (i_dr
), * FLD (i_sr
));
1475 * FLD (i_dr
) = opval
;
1476 written
|= (1 << 2);
1477 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1481 abuf
->written
= written
;
1486 CASE (sem
, INSN_REMU
) : /* remu $dr,$sr */
1488 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1489 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1490 #define FLD(f) abuf->fields.sfmt_add.f
1491 int UNUSED written
= 0;
1492 IADDR UNUSED pc
= abuf
->addr
;
1493 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1495 if (NESI (* FLD (i_sr
), 0)) {
1497 SI opval
= UMODSI (* FLD (i_dr
), * FLD (i_sr
));
1498 * FLD (i_dr
) = opval
;
1499 written
|= (1 << 2);
1500 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1504 abuf
->written
= written
;
1509 CASE (sem
, INSN_DIVH
) : /* divh $dr,$sr */
1511 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1512 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1513 #define FLD(f) abuf->fields.sfmt_add.f
1514 int UNUSED written
= 0;
1515 IADDR UNUSED pc
= abuf
->addr
;
1516 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1518 if (NESI (* FLD (i_sr
), 0)) {
1520 SI opval
= DIVSI (EXTHISI (TRUNCSIHI (* FLD (i_dr
))), * FLD (i_sr
));
1521 * FLD (i_dr
) = opval
;
1522 written
|= (1 << 2);
1523 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1527 abuf
->written
= written
;
1532 CASE (sem
, INSN_JC
) : /* jc $sr */
1534 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1535 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1536 #define FLD(f) abuf->fields.sfmt_jl.f
1537 int UNUSED written
= 0;
1538 IADDR UNUSED pc
= abuf
->addr
;
1540 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1544 USI opval
= ANDSI (* FLD (i_sr
), -4);
1545 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1546 written
|= (1 << 2);
1547 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1551 abuf
->written
= written
;
1552 SEM_BRANCH_FINI (vpc
);
1557 CASE (sem
, INSN_JNC
) : /* jnc $sr */
1559 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1560 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1561 #define FLD(f) abuf->fields.sfmt_jl.f
1562 int UNUSED written
= 0;
1563 IADDR UNUSED pc
= abuf
->addr
;
1565 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1567 if (NOTBI (CPU (h_cond
))) {
1569 USI opval
= ANDSI (* FLD (i_sr
), -4);
1570 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1571 written
|= (1 << 2);
1572 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1576 abuf
->written
= written
;
1577 SEM_BRANCH_FINI (vpc
);
1582 CASE (sem
, INSN_JL
) : /* jl $sr */
1584 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1585 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1586 #define FLD(f) abuf->fields.sfmt_jl.f
1587 int UNUSED written
= 0;
1588 IADDR UNUSED pc
= abuf
->addr
;
1590 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1594 temp0
= ADDSI (ANDSI (pc
, -4), 4);
1595 temp1
= ANDSI (* FLD (i_sr
), -4);
1598 CPU (h_gr
[((UINT
) 14)]) = opval
;
1599 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1603 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1604 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1608 SEM_BRANCH_FINI (vpc
);
1613 CASE (sem
, INSN_JMP
) : /* jmp $sr */
1615 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1616 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1617 #define FLD(f) abuf->fields.sfmt_jl.f
1618 int UNUSED written
= 0;
1619 IADDR UNUSED pc
= abuf
->addr
;
1621 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1624 USI opval
= ANDSI (* FLD (i_sr
), -4);
1625 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1626 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1629 SEM_BRANCH_FINI (vpc
);
1634 CASE (sem
, INSN_LD
) : /* ld $dr,@$sr */
1636 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1637 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1638 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1639 int UNUSED written
= 0;
1640 IADDR UNUSED pc
= abuf
->addr
;
1641 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1644 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
1645 * FLD (i_dr
) = opval
;
1646 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1653 CASE (sem
, INSN_LD_D
) : /* ld $dr,@($slo16,$sr) */
1655 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1656 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1657 #define FLD(f) abuf->fields.sfmt_add3.f
1658 int UNUSED written
= 0;
1659 IADDR UNUSED pc
= abuf
->addr
;
1660 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1663 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
)));
1664 * FLD (i_dr
) = opval
;
1665 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1672 CASE (sem
, INSN_LDB
) : /* ldb $dr,@$sr */
1674 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1675 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1676 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1677 int UNUSED written
= 0;
1678 IADDR UNUSED pc
= abuf
->addr
;
1679 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1682 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, * FLD (i_sr
)));
1683 * FLD (i_dr
) = opval
;
1684 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1691 CASE (sem
, INSN_LDB_D
) : /* ldb $dr,@($slo16,$sr) */
1693 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1694 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1695 #define FLD(f) abuf->fields.sfmt_add3.f
1696 int UNUSED written
= 0;
1697 IADDR UNUSED pc
= abuf
->addr
;
1698 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1701 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))));
1702 * FLD (i_dr
) = opval
;
1703 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1710 CASE (sem
, INSN_LDH
) : /* ldh $dr,@$sr */
1712 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1713 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1714 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1715 int UNUSED written
= 0;
1716 IADDR UNUSED pc
= abuf
->addr
;
1717 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1720 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, * FLD (i_sr
)));
1721 * FLD (i_dr
) = opval
;
1722 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1729 CASE (sem
, INSN_LDH_D
) : /* ldh $dr,@($slo16,$sr) */
1731 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1732 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1733 #define FLD(f) abuf->fields.sfmt_add3.f
1734 int UNUSED written
= 0;
1735 IADDR UNUSED pc
= abuf
->addr
;
1736 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1739 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))));
1740 * FLD (i_dr
) = opval
;
1741 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1748 CASE (sem
, INSN_LDUB
) : /* ldub $dr,@$sr */
1750 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1751 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1752 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1753 int UNUSED written
= 0;
1754 IADDR UNUSED pc
= abuf
->addr
;
1755 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1758 SI opval
= ZEXTQISI (GETMEMQI (current_cpu
, pc
, * FLD (i_sr
)));
1759 * FLD (i_dr
) = opval
;
1760 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1767 CASE (sem
, INSN_LDUB_D
) : /* ldub $dr,@($slo16,$sr) */
1769 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1770 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1771 #define FLD(f) abuf->fields.sfmt_add3.f
1772 int UNUSED written
= 0;
1773 IADDR UNUSED pc
= abuf
->addr
;
1774 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1777 SI opval
= ZEXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))));
1778 * FLD (i_dr
) = opval
;
1779 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1786 CASE (sem
, INSN_LDUH
) : /* lduh $dr,@$sr */
1788 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1789 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1790 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1791 int UNUSED written
= 0;
1792 IADDR UNUSED pc
= abuf
->addr
;
1793 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1796 SI opval
= ZEXTHISI (GETMEMHI (current_cpu
, pc
, * FLD (i_sr
)));
1797 * FLD (i_dr
) = opval
;
1798 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1805 CASE (sem
, INSN_LDUH_D
) : /* lduh $dr,@($slo16,$sr) */
1807 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1808 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1809 #define FLD(f) abuf->fields.sfmt_add3.f
1810 int UNUSED written
= 0;
1811 IADDR UNUSED pc
= abuf
->addr
;
1812 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1815 SI opval
= ZEXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (* FLD (i_sr
), FLD (f_simm16
))));
1816 * FLD (i_dr
) = opval
;
1817 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1824 CASE (sem
, INSN_LD_PLUS
) : /* ld $dr,@$sr+ */
1826 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1827 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1828 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1829 int UNUSED written
= 0;
1830 IADDR UNUSED pc
= abuf
->addr
;
1831 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1835 temp0
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
1836 temp1
= ADDSI (* FLD (i_sr
), 4);
1839 * FLD (i_dr
) = opval
;
1840 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1844 * FLD (i_sr
) = opval
;
1845 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1853 CASE (sem
, INSN_LD24
) : /* ld24 $dr,$uimm24 */
1855 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1856 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1857 #define FLD(f) abuf->fields.sfmt_ld24.f
1858 int UNUSED written
= 0;
1859 IADDR UNUSED pc
= abuf
->addr
;
1860 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1863 SI opval
= FLD (i_uimm24
);
1864 * FLD (i_dr
) = opval
;
1865 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1872 CASE (sem
, INSN_LDI8
) : /* ldi8 $dr,$simm8 */
1874 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1875 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1876 #define FLD(f) abuf->fields.sfmt_addi.f
1877 int UNUSED written
= 0;
1878 IADDR UNUSED pc
= abuf
->addr
;
1879 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1882 SI opval
= FLD (f_simm8
);
1883 * FLD (i_dr
) = opval
;
1884 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1891 CASE (sem
, INSN_LDI16
) : /* ldi16 $dr,$hash$slo16 */
1893 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1894 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1895 #define FLD(f) abuf->fields.sfmt_add3.f
1896 int UNUSED written
= 0;
1897 IADDR UNUSED pc
= abuf
->addr
;
1898 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1901 SI opval
= FLD (f_simm16
);
1902 * FLD (i_dr
) = opval
;
1903 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1910 CASE (sem
, INSN_LOCK
) : /* lock $dr,@$sr */
1912 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1913 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1914 #define FLD(f) abuf->fields.sfmt_ld_plus.f
1915 int UNUSED written
= 0;
1916 IADDR UNUSED pc
= abuf
->addr
;
1917 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1922 CPU (h_lock
) = opval
;
1923 TRACE_RESULT (current_cpu
, abuf
, "lock", 'x', opval
);
1926 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
1927 * FLD (i_dr
) = opval
;
1928 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1936 CASE (sem
, INSN_MACHI_A
) : /* machi $src1,$src2,$acc */
1938 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1939 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1940 #define FLD(f) abuf->fields.sfmt_machi_a.f
1941 int UNUSED written
= 0;
1942 IADDR UNUSED pc
= abuf
->addr
;
1943 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1946 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);
1947 SET_H_ACCUMS (FLD (f_acc
), opval
);
1948 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
1955 CASE (sem
, INSN_MACLO_A
) : /* maclo $src1,$src2,$acc */
1957 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1958 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1959 #define FLD(f) abuf->fields.sfmt_machi_a.f
1960 int UNUSED written
= 0;
1961 IADDR UNUSED pc
= abuf
->addr
;
1962 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1965 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);
1966 SET_H_ACCUMS (FLD (f_acc
), opval
);
1967 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
1974 CASE (sem
, INSN_MACWHI_A
) : /* macwhi $src1,$src2,$acc */
1976 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1977 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1978 #define FLD(f) abuf->fields.sfmt_machi_a.f
1979 int UNUSED written
= 0;
1980 IADDR UNUSED pc
= abuf
->addr
;
1981 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1984 DI opval
= ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16)))));
1985 SET_H_ACCUMS (FLD (f_acc
), opval
);
1986 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
1993 CASE (sem
, INSN_MACWLO_A
) : /* macwlo $src1,$src2,$acc */
1995 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1996 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1997 #define FLD(f) abuf->fields.sfmt_machi_a.f
1998 int UNUSED written
= 0;
1999 IADDR UNUSED pc
= abuf
->addr
;
2000 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2003 DI opval
= ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))));
2004 SET_H_ACCUMS (FLD (f_acc
), opval
);
2005 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2012 CASE (sem
, INSN_MUL
) : /* mul $dr,$sr */
2014 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2015 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2016 #define FLD(f) abuf->fields.sfmt_add.f
2017 int UNUSED written
= 0;
2018 IADDR UNUSED pc
= abuf
->addr
;
2019 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2022 SI opval
= MULSI (* FLD (i_dr
), * FLD (i_sr
));
2023 * FLD (i_dr
) = opval
;
2024 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2031 CASE (sem
, INSN_MULHI_A
) : /* mulhi $src1,$src2,$acc */
2033 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2034 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2035 #define FLD(f) abuf->fields.sfmt_machi_a.f
2036 int UNUSED written
= 0;
2037 IADDR UNUSED pc
= abuf
->addr
;
2038 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2041 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (* FLD (i_src1
), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16)))), 16), 16);
2042 SET_H_ACCUMS (FLD (f_acc
), opval
);
2043 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2050 CASE (sem
, INSN_MULLO_A
) : /* mullo $src1,$src2,$acc */
2052 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2053 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2054 #define FLD(f) abuf->fields.sfmt_machi_a.f
2055 int UNUSED written
= 0;
2056 IADDR UNUSED pc
= abuf
->addr
;
2057 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2060 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (* FLD (i_src1
), 16)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))), 16), 16);
2061 SET_H_ACCUMS (FLD (f_acc
), opval
);
2062 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2069 CASE (sem
, INSN_MULWHI_A
) : /* mulwhi $src1,$src2,$acc */
2071 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2072 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2073 #define FLD(f) abuf->fields.sfmt_machi_a.f
2074 int UNUSED written
= 0;
2075 IADDR UNUSED pc
= abuf
->addr
;
2076 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2079 DI opval
= MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16))));
2080 SET_H_ACCUMS (FLD (f_acc
), opval
);
2081 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2088 CASE (sem
, INSN_MULWLO_A
) : /* mulwlo $src1,$src2,$acc */
2090 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2091 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2092 #define FLD(f) abuf->fields.sfmt_machi_a.f
2093 int UNUSED written
= 0;
2094 IADDR UNUSED pc
= abuf
->addr
;
2095 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2098 DI opval
= MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
))));
2099 SET_H_ACCUMS (FLD (f_acc
), opval
);
2100 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2107 CASE (sem
, INSN_MV
) : /* mv $dr,$sr */
2109 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2110 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2111 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2112 int UNUSED written
= 0;
2113 IADDR UNUSED pc
= abuf
->addr
;
2114 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2117 SI opval
= * FLD (i_sr
);
2118 * FLD (i_dr
) = opval
;
2119 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2126 CASE (sem
, INSN_MVFACHI_A
) : /* mvfachi $dr,$accs */
2128 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2129 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2130 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
2131 int UNUSED written
= 0;
2132 IADDR UNUSED pc
= abuf
->addr
;
2133 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2136 SI opval
= TRUNCDISI (SRADI (GET_H_ACCUMS (FLD (f_accs
)), 32));
2137 * FLD (i_dr
) = opval
;
2138 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2145 CASE (sem
, INSN_MVFACLO_A
) : /* mvfaclo $dr,$accs */
2147 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2148 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2149 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
2150 int UNUSED written
= 0;
2151 IADDR UNUSED pc
= abuf
->addr
;
2152 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2155 SI opval
= TRUNCDISI (GET_H_ACCUMS (FLD (f_accs
)));
2156 * FLD (i_dr
) = opval
;
2157 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2164 CASE (sem
, INSN_MVFACMI_A
) : /* mvfacmi $dr,$accs */
2166 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2167 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2168 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
2169 int UNUSED written
= 0;
2170 IADDR UNUSED pc
= abuf
->addr
;
2171 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2174 SI opval
= TRUNCDISI (SRADI (GET_H_ACCUMS (FLD (f_accs
)), 16));
2175 * FLD (i_dr
) = opval
;
2176 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2183 CASE (sem
, INSN_MVFC
) : /* mvfc $dr,$scr */
2185 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2186 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2187 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2188 int UNUSED written
= 0;
2189 IADDR UNUSED pc
= abuf
->addr
;
2190 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2193 SI opval
= GET_H_CR (FLD (f_r2
));
2194 * FLD (i_dr
) = opval
;
2195 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2202 CASE (sem
, INSN_MVTACHI_A
) : /* mvtachi $src1,$accs */
2204 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2205 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2206 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
2207 int UNUSED written
= 0;
2208 IADDR UNUSED pc
= abuf
->addr
;
2209 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2212 DI opval
= ORDI (ANDDI (GET_H_ACCUMS (FLD (f_accs
)), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (* FLD (i_src1
)), 32));
2213 SET_H_ACCUMS (FLD (f_accs
), opval
);
2214 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2221 CASE (sem
, INSN_MVTACLO_A
) : /* mvtaclo $src1,$accs */
2223 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2224 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2225 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
2226 int UNUSED written
= 0;
2227 IADDR UNUSED pc
= abuf
->addr
;
2228 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2231 DI opval
= ORDI (ANDDI (GET_H_ACCUMS (FLD (f_accs
)), MAKEDI (0xffffffff, 0)), ZEXTSIDI (* FLD (i_src1
)));
2232 SET_H_ACCUMS (FLD (f_accs
), opval
);
2233 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2240 CASE (sem
, INSN_MVTC
) : /* mvtc $sr,$dcr */
2242 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2243 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2244 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2245 int UNUSED written
= 0;
2246 IADDR UNUSED pc
= abuf
->addr
;
2247 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2250 USI opval
= * FLD (i_sr
);
2251 SET_H_CR (FLD (f_r1
), opval
);
2252 TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
2259 CASE (sem
, INSN_NEG
) : /* neg $dr,$sr */
2261 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2262 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2263 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2264 int UNUSED written
= 0;
2265 IADDR UNUSED pc
= abuf
->addr
;
2266 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2269 SI opval
= NEGSI (* FLD (i_sr
));
2270 * FLD (i_dr
) = opval
;
2271 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2278 CASE (sem
, INSN_NOP
) : /* nop */
2280 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2281 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2282 #define FLD(f) abuf->fields.fmt_empty.f
2283 int UNUSED written
= 0;
2284 IADDR UNUSED pc
= abuf
->addr
;
2285 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2287 PROFILE_COUNT_FILLNOPS (current_cpu
, abuf
->addr
);
2293 CASE (sem
, INSN_NOT
) : /* not $dr,$sr */
2295 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2296 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2297 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2298 int UNUSED written
= 0;
2299 IADDR UNUSED pc
= abuf
->addr
;
2300 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2303 SI opval
= INVSI (* FLD (i_sr
));
2304 * FLD (i_dr
) = opval
;
2305 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2312 CASE (sem
, INSN_RAC_DSI
) : /* rac $accd,$accs,$imm1 */
2314 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2315 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2316 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
2317 int UNUSED written
= 0;
2318 IADDR UNUSED pc
= abuf
->addr
;
2319 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2323 tmp_tmp1
= SLLDI (GET_H_ACCUMS (FLD (f_accs
)), FLD (f_imm1
));
2324 tmp_tmp1
= ADDDI (tmp_tmp1
, MAKEDI (0, 32768));
2326 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)));
2327 SET_H_ACCUMS (FLD (f_accd
), opval
);
2328 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2336 CASE (sem
, INSN_RACH_DSI
) : /* rach $accd,$accs,$imm1 */
2338 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2339 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2340 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
2341 int UNUSED written
= 0;
2342 IADDR UNUSED pc
= abuf
->addr
;
2343 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2347 tmp_tmp1
= SLLDI (GET_H_ACCUMS (FLD (f_accs
)), FLD (f_imm1
));
2348 tmp_tmp1
= ADDDI (tmp_tmp1
, MAKEDI (0, 0x80000000));
2350 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)));
2351 SET_H_ACCUMS (FLD (f_accd
), opval
);
2352 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
2360 CASE (sem
, INSN_RTE
) : /* rte */
2362 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2363 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2364 #define FLD(f) abuf->fields.fmt_empty.f
2365 int UNUSED written
= 0;
2366 IADDR UNUSED pc
= abuf
->addr
;
2368 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2372 USI opval
= ANDSI (GET_H_CR (((UINT
) 6)), -4);
2373 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
2374 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
2377 USI opval
= GET_H_CR (((UINT
) 14));
2378 SET_H_CR (((UINT
) 6), opval
);
2379 TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
2382 UQI opval
= CPU (h_bpsw
);
2384 TRACE_RESULT (current_cpu
, abuf
, "psw", 'x', opval
);
2387 UQI opval
= CPU (h_bbpsw
);
2388 CPU (h_bpsw
) = opval
;
2389 TRACE_RESULT (current_cpu
, abuf
, "bpsw", 'x', opval
);
2393 SEM_BRANCH_FINI (vpc
);
2398 CASE (sem
, INSN_SETH
) : /* seth $dr,$hash$hi16 */
2400 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2401 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2402 #define FLD(f) abuf->fields.sfmt_seth.f
2403 int UNUSED written
= 0;
2404 IADDR UNUSED pc
= abuf
->addr
;
2405 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2408 SI opval
= SLLSI (FLD (f_hi16
), 16);
2409 * FLD (i_dr
) = opval
;
2410 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2417 CASE (sem
, INSN_SLL
) : /* sll $dr,$sr */
2419 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2420 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2421 #define FLD(f) abuf->fields.sfmt_add.f
2422 int UNUSED written
= 0;
2423 IADDR UNUSED pc
= abuf
->addr
;
2424 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2427 SI opval
= SLLSI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
2428 * FLD (i_dr
) = opval
;
2429 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2436 CASE (sem
, INSN_SLL3
) : /* sll3 $dr,$sr,$simm16 */
2438 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2439 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2440 #define FLD(f) abuf->fields.sfmt_add3.f
2441 int UNUSED written
= 0;
2442 IADDR UNUSED pc
= abuf
->addr
;
2443 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2446 SI opval
= SLLSI (* FLD (i_sr
), ANDSI (FLD (f_simm16
), 31));
2447 * FLD (i_dr
) = opval
;
2448 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2455 CASE (sem
, INSN_SLLI
) : /* slli $dr,$uimm5 */
2457 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2458 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2459 #define FLD(f) abuf->fields.sfmt_slli.f
2460 int UNUSED written
= 0;
2461 IADDR UNUSED pc
= abuf
->addr
;
2462 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2465 SI opval
= SLLSI (* FLD (i_dr
), FLD (f_uimm5
));
2466 * FLD (i_dr
) = opval
;
2467 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2474 CASE (sem
, INSN_SRA
) : /* sra $dr,$sr */
2476 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2477 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2478 #define FLD(f) abuf->fields.sfmt_add.f
2479 int UNUSED written
= 0;
2480 IADDR UNUSED pc
= abuf
->addr
;
2481 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2484 SI opval
= SRASI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
2485 * FLD (i_dr
) = opval
;
2486 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2493 CASE (sem
, INSN_SRA3
) : /* sra3 $dr,$sr,$simm16 */
2495 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2496 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2497 #define FLD(f) abuf->fields.sfmt_add3.f
2498 int UNUSED written
= 0;
2499 IADDR UNUSED pc
= abuf
->addr
;
2500 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2503 SI opval
= SRASI (* FLD (i_sr
), ANDSI (FLD (f_simm16
), 31));
2504 * FLD (i_dr
) = opval
;
2505 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2512 CASE (sem
, INSN_SRAI
) : /* srai $dr,$uimm5 */
2514 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2515 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2516 #define FLD(f) abuf->fields.sfmt_slli.f
2517 int UNUSED written
= 0;
2518 IADDR UNUSED pc
= abuf
->addr
;
2519 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2522 SI opval
= SRASI (* FLD (i_dr
), FLD (f_uimm5
));
2523 * FLD (i_dr
) = opval
;
2524 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2531 CASE (sem
, INSN_SRL
) : /* srl $dr,$sr */
2533 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2534 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2535 #define FLD(f) abuf->fields.sfmt_add.f
2536 int UNUSED written
= 0;
2537 IADDR UNUSED pc
= abuf
->addr
;
2538 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2541 SI opval
= SRLSI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
2542 * FLD (i_dr
) = opval
;
2543 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2550 CASE (sem
, INSN_SRL3
) : /* srl3 $dr,$sr,$simm16 */
2552 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2553 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2554 #define FLD(f) abuf->fields.sfmt_add3.f
2555 int UNUSED written
= 0;
2556 IADDR UNUSED pc
= abuf
->addr
;
2557 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2560 SI opval
= SRLSI (* FLD (i_sr
), ANDSI (FLD (f_simm16
), 31));
2561 * FLD (i_dr
) = opval
;
2562 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2569 CASE (sem
, INSN_SRLI
) : /* srli $dr,$uimm5 */
2571 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2572 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2573 #define FLD(f) abuf->fields.sfmt_slli.f
2574 int UNUSED written
= 0;
2575 IADDR UNUSED pc
= abuf
->addr
;
2576 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2579 SI opval
= SRLSI (* FLD (i_dr
), FLD (f_uimm5
));
2580 * FLD (i_dr
) = opval
;
2581 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2588 CASE (sem
, INSN_ST
) : /* st $src1,@$src2 */
2590 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2591 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2592 #define FLD(f) abuf->fields.sfmt_st_plus.f
2593 int UNUSED written
= 0;
2594 IADDR UNUSED pc
= abuf
->addr
;
2595 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2598 SI opval
= * FLD (i_src1
);
2599 SETMEMSI (current_cpu
, pc
, * FLD (i_src2
), opval
);
2600 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2607 CASE (sem
, INSN_ST_D
) : /* st $src1,@($slo16,$src2) */
2609 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2610 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2611 #define FLD(f) abuf->fields.sfmt_st_d.f
2612 int UNUSED written
= 0;
2613 IADDR UNUSED pc
= abuf
->addr
;
2614 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2617 SI opval
= * FLD (i_src1
);
2618 SETMEMSI (current_cpu
, pc
, ADDSI (* FLD (i_src2
), FLD (f_simm16
)), opval
);
2619 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2626 CASE (sem
, INSN_STB
) : /* stb $src1,@$src2 */
2628 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2629 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2630 #define FLD(f) abuf->fields.sfmt_st_plus.f
2631 int UNUSED written
= 0;
2632 IADDR UNUSED pc
= abuf
->addr
;
2633 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2636 QI opval
= * FLD (i_src1
);
2637 SETMEMQI (current_cpu
, pc
, * FLD (i_src2
), opval
);
2638 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2645 CASE (sem
, INSN_STB_D
) : /* stb $src1,@($slo16,$src2) */
2647 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2648 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2649 #define FLD(f) abuf->fields.sfmt_st_d.f
2650 int UNUSED written
= 0;
2651 IADDR UNUSED pc
= abuf
->addr
;
2652 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2655 QI opval
= * FLD (i_src1
);
2656 SETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_src2
), FLD (f_simm16
)), opval
);
2657 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2664 CASE (sem
, INSN_STH
) : /* sth $src1,@$src2 */
2666 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2667 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2668 #define FLD(f) abuf->fields.sfmt_st_plus.f
2669 int UNUSED written
= 0;
2670 IADDR UNUSED pc
= abuf
->addr
;
2671 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2674 HI opval
= * FLD (i_src1
);
2675 SETMEMHI (current_cpu
, pc
, * FLD (i_src2
), opval
);
2676 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2683 CASE (sem
, INSN_STH_D
) : /* sth $src1,@($slo16,$src2) */
2685 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2686 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2687 #define FLD(f) abuf->fields.sfmt_st_d.f
2688 int UNUSED written
= 0;
2689 IADDR UNUSED pc
= abuf
->addr
;
2690 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2693 HI opval
= * FLD (i_src1
);
2694 SETMEMHI (current_cpu
, pc
, ADDSI (* FLD (i_src2
), FLD (f_simm16
)), opval
);
2695 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2702 CASE (sem
, INSN_ST_PLUS
) : /* st $src1,@+$src2 */
2704 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2705 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2706 #define FLD(f) abuf->fields.sfmt_st_plus.f
2707 int UNUSED written
= 0;
2708 IADDR UNUSED pc
= abuf
->addr
;
2709 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2713 tmp_new_src2
= ADDSI (* FLD (i_src2
), 4);
2715 SI opval
= * FLD (i_src1
);
2716 SETMEMSI (current_cpu
, pc
, tmp_new_src2
, opval
);
2717 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2720 SI opval
= tmp_new_src2
;
2721 * FLD (i_src2
) = opval
;
2722 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2730 CASE (sem
, INSN_ST_MINUS
) : /* st $src1,@-$src2 */
2732 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2733 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2734 #define FLD(f) abuf->fields.sfmt_st_plus.f
2735 int UNUSED written
= 0;
2736 IADDR UNUSED pc
= abuf
->addr
;
2737 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2741 tmp_new_src2
= SUBSI (* FLD (i_src2
), 4);
2743 SI opval
= * FLD (i_src1
);
2744 SETMEMSI (current_cpu
, pc
, tmp_new_src2
, opval
);
2745 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2748 SI opval
= tmp_new_src2
;
2749 * FLD (i_src2
) = opval
;
2750 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2758 CASE (sem
, INSN_SUB
) : /* sub $dr,$sr */
2760 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2761 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2762 #define FLD(f) abuf->fields.sfmt_add.f
2763 int UNUSED written
= 0;
2764 IADDR UNUSED pc
= abuf
->addr
;
2765 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2768 SI opval
= SUBSI (* FLD (i_dr
), * FLD (i_sr
));
2769 * FLD (i_dr
) = opval
;
2770 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2777 CASE (sem
, INSN_SUBV
) : /* subv $dr,$sr */
2779 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2780 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2781 #define FLD(f) abuf->fields.sfmt_add.f
2782 int UNUSED written
= 0;
2783 IADDR UNUSED pc
= abuf
->addr
;
2784 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2788 temp0
= SUBSI (* FLD (i_dr
), * FLD (i_sr
));
2789 temp1
= SUBOFSI (* FLD (i_dr
), * FLD (i_sr
), 0);
2792 * FLD (i_dr
) = opval
;
2793 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2797 CPU (h_cond
) = opval
;
2798 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
2806 CASE (sem
, INSN_SUBX
) : /* subx $dr,$sr */
2808 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2809 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2810 #define FLD(f) abuf->fields.sfmt_add.f
2811 int UNUSED written
= 0;
2812 IADDR UNUSED pc
= abuf
->addr
;
2813 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2817 temp0
= SUBCSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
2818 temp1
= SUBCFSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
2821 * FLD (i_dr
) = opval
;
2822 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2826 CPU (h_cond
) = opval
;
2827 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
2835 CASE (sem
, INSN_TRAP
) : /* trap $uimm4 */
2837 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2838 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2839 #define FLD(f) abuf->fields.sfmt_trap.f
2840 int UNUSED written
= 0;
2841 IADDR UNUSED pc
= abuf
->addr
;
2843 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2847 USI opval
= GET_H_CR (((UINT
) 6));
2848 SET_H_CR (((UINT
) 14), opval
);
2849 TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
2852 USI opval
= ADDSI (pc
, 4);
2853 SET_H_CR (((UINT
) 6), opval
);
2854 TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
2857 UQI opval
= CPU (h_bpsw
);
2858 CPU (h_bbpsw
) = opval
;
2859 TRACE_RESULT (current_cpu
, abuf
, "bbpsw", 'x', opval
);
2862 UQI opval
= GET_H_PSW ();
2863 CPU (h_bpsw
) = opval
;
2864 TRACE_RESULT (current_cpu
, abuf
, "bpsw", 'x', opval
);
2867 UQI opval
= ANDQI (GET_H_PSW (), 128);
2869 TRACE_RESULT (current_cpu
, abuf
, "psw", 'x', opval
);
2872 SI opval
= m32r_trap (current_cpu
, pc
, FLD (f_uimm4
));
2873 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
2874 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
2878 SEM_BRANCH_FINI (vpc
);
2883 CASE (sem
, INSN_UNLOCK
) : /* unlock $src1,@$src2 */
2885 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2886 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2887 #define FLD(f) abuf->fields.sfmt_st_plus.f
2888 int UNUSED written
= 0;
2889 IADDR UNUSED pc
= abuf
->addr
;
2890 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2895 SI opval
= * FLD (i_src1
);
2896 SETMEMSI (current_cpu
, pc
, * FLD (i_src2
), opval
);
2897 written
|= (1 << 4);
2898 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2903 CPU (h_lock
) = opval
;
2904 TRACE_RESULT (current_cpu
, abuf
, "lock", 'x', opval
);
2908 abuf
->written
= written
;
2913 CASE (sem
, INSN_SATB
) : /* satb $dr,$sr */
2915 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2916 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2917 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2918 int UNUSED written
= 0;
2919 IADDR UNUSED pc
= abuf
->addr
;
2920 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2923 SI opval
= (GESI (* FLD (i_sr
), 127)) ? (127) : (LESI (* FLD (i_sr
), -128)) ? (-128) : (* FLD (i_sr
));
2924 * FLD (i_dr
) = opval
;
2925 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2932 CASE (sem
, INSN_SATH
) : /* sath $dr,$sr */
2934 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2935 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2936 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2937 int UNUSED written
= 0;
2938 IADDR UNUSED pc
= abuf
->addr
;
2939 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2942 SI opval
= (GESI (* FLD (i_sr
), 32767)) ? (32767) : (LESI (* FLD (i_sr
), -32768)) ? (-32768) : (* FLD (i_sr
));
2943 * FLD (i_dr
) = opval
;
2944 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2951 CASE (sem
, INSN_SAT
) : /* sat $dr,$sr */
2953 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2954 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2955 #define FLD(f) abuf->fields.sfmt_ld_plus.f
2956 int UNUSED written
= 0;
2957 IADDR UNUSED pc
= abuf
->addr
;
2958 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2961 SI opval
= ((CPU (h_cond
)) ? (((LTSI (* FLD (i_sr
), 0)) ? (2147483647) : (0x80000000))) : (* FLD (i_sr
)));
2962 * FLD (i_dr
) = opval
;
2963 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2970 CASE (sem
, INSN_PCMPBZ
) : /* pcmpbz $src2 */
2972 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2973 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2974 #define FLD(f) abuf->fields.sfmt_st_plus.f
2975 int UNUSED written
= 0;
2976 IADDR UNUSED pc
= abuf
->addr
;
2977 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2980 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);
2981 CPU (h_cond
) = opval
;
2982 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
2989 CASE (sem
, INSN_SADD
) : /* sadd */
2991 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2992 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2993 #define FLD(f) abuf->fields.fmt_empty.f
2994 int UNUSED written
= 0;
2995 IADDR UNUSED pc
= abuf
->addr
;
2996 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2999 DI opval
= ADDDI (SRADI (GET_H_ACCUMS (((UINT
) 1)), 16), GET_H_ACCUMS (((UINT
) 0)));
3000 SET_H_ACCUMS (((UINT
) 0), opval
);
3001 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
3008 CASE (sem
, INSN_MACWU1
) : /* macwu1 $src1,$src2 */
3010 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3011 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3012 #define FLD(f) abuf->fields.sfmt_st_plus.f
3013 int UNUSED written
= 0;
3014 IADDR UNUSED pc
= abuf
->addr
;
3015 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3018 DI opval
= SRADI (SLLDI (ADDDI (GET_H_ACCUMS (((UINT
) 1)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTSIDI (ANDSI (* FLD (i_src2
), 65535)))), 8), 8);
3019 SET_H_ACCUMS (((UINT
) 1), opval
);
3020 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
3027 CASE (sem
, INSN_MSBLO
) : /* msblo $src1,$src2 */
3029 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3030 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3031 #define FLD(f) abuf->fields.sfmt_st_plus.f
3032 int UNUSED written
= 0;
3033 IADDR UNUSED pc
= abuf
->addr
;
3034 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3037 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);
3038 SET_H_ACCUM (opval
);
3039 TRACE_RESULT (current_cpu
, abuf
, "accum", 'D', opval
);
3046 CASE (sem
, INSN_MULWU1
) : /* mulwu1 $src1,$src2 */
3048 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3049 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3050 #define FLD(f) abuf->fields.sfmt_st_plus.f
3051 int UNUSED written
= 0;
3052 IADDR UNUSED pc
= abuf
->addr
;
3053 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3056 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (* FLD (i_src1
)), EXTSIDI (ANDSI (* FLD (i_src2
), 65535))), 16), 16);
3057 SET_H_ACCUMS (((UINT
) 1), opval
);
3058 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
3065 CASE (sem
, INSN_MACLH1
) : /* maclh1 $src1,$src2 */
3067 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3068 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3069 #define FLD(f) abuf->fields.sfmt_st_plus.f
3070 int UNUSED written
= 0;
3071 IADDR UNUSED pc
= abuf
->addr
;
3072 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3075 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);
3076 SET_H_ACCUMS (((UINT
) 1), opval
);
3077 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
3084 CASE (sem
, INSN_SC
) : /* sc */
3086 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3087 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3088 #define FLD(f) abuf->fields.fmt_empty.f
3089 int UNUSED written
= 0;
3090 IADDR UNUSED pc
= abuf
->addr
;
3091 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3093 if (ZEXTBISI (CPU (h_cond
)))
3094 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
3100 CASE (sem
, INSN_SNC
) : /* snc */
3102 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3103 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3104 #define FLD(f) abuf->fields.fmt_empty.f
3105 int UNUSED written
= 0;
3106 IADDR UNUSED pc
= abuf
->addr
;
3107 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3109 if (ZEXTBISI (NOTBI (CPU (h_cond
))))
3110 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
3116 CASE (sem
, INSN_PAR_ADD
) : /* add $dr,$sr */
3118 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3119 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3120 #define FLD(f) abuf->fields.sfmt_add.f
3121 #define OPRND(f) par_exec->operands.sfmt_add.f
3122 int UNUSED written
= 0;
3123 IADDR UNUSED pc
= abuf
->addr
;
3124 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3127 SI opval
= ADDSI (* FLD (i_dr
), * FLD (i_sr
));
3129 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3137 CASE (sem
, INSN_WRITE_ADD
) : /* add $dr,$sr */
3139 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3140 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3141 #define FLD(f) abuf->fields.sfmt_add.f
3142 #define OPRND(f) par_exec->operands.sfmt_add.f
3143 int UNUSED written
= abuf
->written
;
3144 IADDR UNUSED pc
= abuf
->addr
;
3145 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3147 * FLD (i_dr
) = OPRND (dr
);
3154 CASE (sem
, INSN_PAR_AND
) : /* and $dr,$sr */
3156 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3157 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3158 #define FLD(f) abuf->fields.sfmt_add.f
3159 #define OPRND(f) par_exec->operands.sfmt_add.f
3160 int UNUSED written
= 0;
3161 IADDR UNUSED pc
= abuf
->addr
;
3162 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3165 SI opval
= ANDSI (* FLD (i_dr
), * FLD (i_sr
));
3167 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3175 CASE (sem
, INSN_WRITE_AND
) : /* and $dr,$sr */
3177 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3178 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3179 #define FLD(f) abuf->fields.sfmt_add.f
3180 #define OPRND(f) par_exec->operands.sfmt_add.f
3181 int UNUSED written
= abuf
->written
;
3182 IADDR UNUSED pc
= abuf
->addr
;
3183 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3185 * FLD (i_dr
) = OPRND (dr
);
3192 CASE (sem
, INSN_PAR_OR
) : /* or $dr,$sr */
3194 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3195 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3196 #define FLD(f) abuf->fields.sfmt_add.f
3197 #define OPRND(f) par_exec->operands.sfmt_add.f
3198 int UNUSED written
= 0;
3199 IADDR UNUSED pc
= abuf
->addr
;
3200 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3203 SI opval
= ORSI (* FLD (i_dr
), * FLD (i_sr
));
3205 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3213 CASE (sem
, INSN_WRITE_OR
) : /* or $dr,$sr */
3215 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3216 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3217 #define FLD(f) abuf->fields.sfmt_add.f
3218 #define OPRND(f) par_exec->operands.sfmt_add.f
3219 int UNUSED written
= abuf
->written
;
3220 IADDR UNUSED pc
= abuf
->addr
;
3221 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3223 * FLD (i_dr
) = OPRND (dr
);
3230 CASE (sem
, INSN_PAR_XOR
) : /* xor $dr,$sr */
3232 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3233 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3234 #define FLD(f) abuf->fields.sfmt_add.f
3235 #define OPRND(f) par_exec->operands.sfmt_add.f
3236 int UNUSED written
= 0;
3237 IADDR UNUSED pc
= abuf
->addr
;
3238 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3241 SI opval
= XORSI (* FLD (i_dr
), * FLD (i_sr
));
3243 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3251 CASE (sem
, INSN_WRITE_XOR
) : /* xor $dr,$sr */
3253 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3254 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3255 #define FLD(f) abuf->fields.sfmt_add.f
3256 #define OPRND(f) par_exec->operands.sfmt_add.f
3257 int UNUSED written
= abuf
->written
;
3258 IADDR UNUSED pc
= abuf
->addr
;
3259 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3261 * FLD (i_dr
) = OPRND (dr
);
3268 CASE (sem
, INSN_PAR_ADDI
) : /* addi $dr,$simm8 */
3270 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3271 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3272 #define FLD(f) abuf->fields.sfmt_addi.f
3273 #define OPRND(f) par_exec->operands.sfmt_addi.f
3274 int UNUSED written
= 0;
3275 IADDR UNUSED pc
= abuf
->addr
;
3276 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3279 SI opval
= ADDSI (* FLD (i_dr
), FLD (f_simm8
));
3281 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3289 CASE (sem
, INSN_WRITE_ADDI
) : /* addi $dr,$simm8 */
3291 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3292 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3293 #define FLD(f) abuf->fields.sfmt_addi.f
3294 #define OPRND(f) par_exec->operands.sfmt_addi.f
3295 int UNUSED written
= abuf
->written
;
3296 IADDR UNUSED pc
= abuf
->addr
;
3297 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3299 * FLD (i_dr
) = OPRND (dr
);
3306 CASE (sem
, INSN_PAR_ADDV
) : /* addv $dr,$sr */
3308 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3309 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3310 #define FLD(f) abuf->fields.sfmt_add.f
3311 #define OPRND(f) par_exec->operands.sfmt_addv.f
3312 int UNUSED written
= 0;
3313 IADDR UNUSED pc
= abuf
->addr
;
3314 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3318 temp0
= ADDSI (* FLD (i_dr
), * FLD (i_sr
));
3319 temp1
= ADDOFSI (* FLD (i_dr
), * FLD (i_sr
), 0);
3323 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3327 OPRND (condbit
) = opval
;
3328 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3337 CASE (sem
, INSN_WRITE_ADDV
) : /* addv $dr,$sr */
3339 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3340 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3341 #define FLD(f) abuf->fields.sfmt_add.f
3342 #define OPRND(f) par_exec->operands.sfmt_addv.f
3343 int UNUSED written
= abuf
->written
;
3344 IADDR UNUSED pc
= abuf
->addr
;
3345 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3347 CPU (h_cond
) = OPRND (condbit
);
3348 * FLD (i_dr
) = OPRND (dr
);
3355 CASE (sem
, INSN_PAR_ADDX
) : /* addx $dr,$sr */
3357 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3358 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3359 #define FLD(f) abuf->fields.sfmt_add.f
3360 #define OPRND(f) par_exec->operands.sfmt_addx.f
3361 int UNUSED written
= 0;
3362 IADDR UNUSED pc
= abuf
->addr
;
3363 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3367 temp0
= ADDCSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
3368 temp1
= ADDCFSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
3372 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3376 OPRND (condbit
) = opval
;
3377 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3386 CASE (sem
, INSN_WRITE_ADDX
) : /* addx $dr,$sr */
3388 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3389 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3390 #define FLD(f) abuf->fields.sfmt_add.f
3391 #define OPRND(f) par_exec->operands.sfmt_addx.f
3392 int UNUSED written
= abuf
->written
;
3393 IADDR UNUSED pc
= abuf
->addr
;
3394 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3396 CPU (h_cond
) = OPRND (condbit
);
3397 * FLD (i_dr
) = OPRND (dr
);
3404 CASE (sem
, INSN_PAR_BC8
) : /* bc.s $disp8 */
3406 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3407 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3408 #define FLD(f) abuf->fields.sfmt_bl8.f
3409 #define OPRND(f) par_exec->operands.sfmt_bc8.f
3410 int UNUSED written
= 0;
3411 IADDR UNUSED pc
= abuf
->addr
;
3412 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3416 USI opval
= FLD (i_disp8
);
3418 written
|= (1 << 2);
3419 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3423 abuf
->written
= written
;
3429 CASE (sem
, INSN_WRITE_BC8
) : /* bc.s $disp8 */
3431 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3432 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3433 #define FLD(f) abuf->fields.sfmt_bl8.f
3434 #define OPRND(f) par_exec->operands.sfmt_bc8.f
3435 int UNUSED written
= abuf
->written
;
3436 IADDR UNUSED pc
= abuf
->addr
;
3438 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3440 if (written
& (1 << 2))
3442 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3445 SEM_BRANCH_FINI (vpc
);
3451 CASE (sem
, INSN_PAR_BL8
) : /* bl.s $disp8 */
3453 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3454 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3455 #define FLD(f) abuf->fields.sfmt_bl8.f
3456 #define OPRND(f) par_exec->operands.sfmt_bl8.f
3457 int UNUSED written
= 0;
3458 IADDR UNUSED pc
= abuf
->addr
;
3459 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3463 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
3464 OPRND (h_gr_SI_14
) = opval
;
3465 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3468 USI opval
= FLD (i_disp8
);
3470 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3479 CASE (sem
, INSN_WRITE_BL8
) : /* bl.s $disp8 */
3481 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3482 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3483 #define FLD(f) abuf->fields.sfmt_bl8.f
3484 #define OPRND(f) par_exec->operands.sfmt_bl8.f
3485 int UNUSED written
= abuf
->written
;
3486 IADDR UNUSED pc
= abuf
->addr
;
3488 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3490 CPU (h_gr
[((UINT
) 14)]) = OPRND (h_gr_SI_14
);
3491 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3493 SEM_BRANCH_FINI (vpc
);
3499 CASE (sem
, INSN_PAR_BCL8
) : /* bcl.s $disp8 */
3501 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3502 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3503 #define FLD(f) abuf->fields.sfmt_bl8.f
3504 #define OPRND(f) par_exec->operands.sfmt_bcl8.f
3505 int UNUSED written
= 0;
3506 IADDR UNUSED pc
= abuf
->addr
;
3507 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3512 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
3513 OPRND (h_gr_SI_14
) = opval
;
3514 written
|= (1 << 3);
3515 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3518 USI opval
= FLD (i_disp8
);
3520 written
|= (1 << 4);
3521 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3526 abuf
->written
= written
;
3532 CASE (sem
, INSN_WRITE_BCL8
) : /* bcl.s $disp8 */
3534 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3535 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3536 #define FLD(f) abuf->fields.sfmt_bl8.f
3537 #define OPRND(f) par_exec->operands.sfmt_bcl8.f
3538 int UNUSED written
= abuf
->written
;
3539 IADDR UNUSED pc
= abuf
->addr
;
3541 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3543 if (written
& (1 << 3))
3545 CPU (h_gr
[((UINT
) 14)]) = OPRND (h_gr_SI_14
);
3547 if (written
& (1 << 4))
3549 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3552 SEM_BRANCH_FINI (vpc
);
3558 CASE (sem
, INSN_PAR_BNC8
) : /* bnc.s $disp8 */
3560 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3561 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3562 #define FLD(f) abuf->fields.sfmt_bl8.f
3563 #define OPRND(f) par_exec->operands.sfmt_bc8.f
3564 int UNUSED written
= 0;
3565 IADDR UNUSED pc
= abuf
->addr
;
3566 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3568 if (NOTBI (CPU (h_cond
))) {
3570 USI opval
= FLD (i_disp8
);
3572 written
|= (1 << 2);
3573 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3577 abuf
->written
= written
;
3583 CASE (sem
, INSN_WRITE_BNC8
) : /* bnc.s $disp8 */
3585 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3586 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3587 #define FLD(f) abuf->fields.sfmt_bl8.f
3588 #define OPRND(f) par_exec->operands.sfmt_bc8.f
3589 int UNUSED written
= abuf
->written
;
3590 IADDR UNUSED pc
= abuf
->addr
;
3592 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3594 if (written
& (1 << 2))
3596 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3599 SEM_BRANCH_FINI (vpc
);
3605 CASE (sem
, INSN_PAR_BRA8
) : /* bra.s $disp8 */
3607 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3608 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3609 #define FLD(f) abuf->fields.sfmt_bl8.f
3610 #define OPRND(f) par_exec->operands.sfmt_bra8.f
3611 int UNUSED written
= 0;
3612 IADDR UNUSED pc
= abuf
->addr
;
3613 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3616 USI opval
= FLD (i_disp8
);
3618 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3626 CASE (sem
, INSN_WRITE_BRA8
) : /* bra.s $disp8 */
3628 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3629 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3630 #define FLD(f) abuf->fields.sfmt_bl8.f
3631 #define OPRND(f) par_exec->operands.sfmt_bra8.f
3632 int UNUSED written
= abuf
->written
;
3633 IADDR UNUSED pc
= abuf
->addr
;
3635 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3637 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3639 SEM_BRANCH_FINI (vpc
);
3645 CASE (sem
, INSN_PAR_BNCL8
) : /* bncl.s $disp8 */
3647 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3648 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3649 #define FLD(f) abuf->fields.sfmt_bl8.f
3650 #define OPRND(f) par_exec->operands.sfmt_bcl8.f
3651 int UNUSED written
= 0;
3652 IADDR UNUSED pc
= abuf
->addr
;
3653 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3655 if (NOTBI (CPU (h_cond
))) {
3658 SI opval
= ADDSI (ANDSI (pc
, -4), 4);
3659 OPRND (h_gr_SI_14
) = opval
;
3660 written
|= (1 << 3);
3661 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3664 USI opval
= FLD (i_disp8
);
3666 written
|= (1 << 4);
3667 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3672 abuf
->written
= written
;
3678 CASE (sem
, INSN_WRITE_BNCL8
) : /* bncl.s $disp8 */
3680 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3681 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3682 #define FLD(f) abuf->fields.sfmt_bl8.f
3683 #define OPRND(f) par_exec->operands.sfmt_bcl8.f
3684 int UNUSED written
= abuf
->written
;
3685 IADDR UNUSED pc
= abuf
->addr
;
3687 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3689 if (written
& (1 << 3))
3691 CPU (h_gr
[((UINT
) 14)]) = OPRND (h_gr_SI_14
);
3693 if (written
& (1 << 4))
3695 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3698 SEM_BRANCH_FINI (vpc
);
3704 CASE (sem
, INSN_PAR_CMP
) : /* cmp $src1,$src2 */
3706 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3707 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3708 #define FLD(f) abuf->fields.sfmt_st_plus.f
3709 #define OPRND(f) par_exec->operands.sfmt_cmp.f
3710 int UNUSED written
= 0;
3711 IADDR UNUSED pc
= abuf
->addr
;
3712 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3715 BI opval
= LTSI (* FLD (i_src1
), * FLD (i_src2
));
3716 OPRND (condbit
) = opval
;
3717 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3725 CASE (sem
, INSN_WRITE_CMP
) : /* cmp $src1,$src2 */
3727 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3728 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3729 #define FLD(f) abuf->fields.sfmt_st_plus.f
3730 #define OPRND(f) par_exec->operands.sfmt_cmp.f
3731 int UNUSED written
= abuf
->written
;
3732 IADDR UNUSED pc
= abuf
->addr
;
3733 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3735 CPU (h_cond
) = OPRND (condbit
);
3742 CASE (sem
, INSN_PAR_CMPU
) : /* cmpu $src1,$src2 */
3744 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3745 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3746 #define FLD(f) abuf->fields.sfmt_st_plus.f
3747 #define OPRND(f) par_exec->operands.sfmt_cmp.f
3748 int UNUSED written
= 0;
3749 IADDR UNUSED pc
= abuf
->addr
;
3750 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3753 BI opval
= LTUSI (* FLD (i_src1
), * FLD (i_src2
));
3754 OPRND (condbit
) = opval
;
3755 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3763 CASE (sem
, INSN_WRITE_CMPU
) : /* cmpu $src1,$src2 */
3765 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3766 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3767 #define FLD(f) abuf->fields.sfmt_st_plus.f
3768 #define OPRND(f) par_exec->operands.sfmt_cmp.f
3769 int UNUSED written
= abuf
->written
;
3770 IADDR UNUSED pc
= abuf
->addr
;
3771 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3773 CPU (h_cond
) = OPRND (condbit
);
3780 CASE (sem
, INSN_PAR_CMPEQ
) : /* cmpeq $src1,$src2 */
3782 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3783 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3784 #define FLD(f) abuf->fields.sfmt_st_plus.f
3785 #define OPRND(f) par_exec->operands.sfmt_cmp.f
3786 int UNUSED written
= 0;
3787 IADDR UNUSED pc
= abuf
->addr
;
3788 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3791 BI opval
= EQSI (* FLD (i_src1
), * FLD (i_src2
));
3792 OPRND (condbit
) = opval
;
3793 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3801 CASE (sem
, INSN_WRITE_CMPEQ
) : /* cmpeq $src1,$src2 */
3803 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3804 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3805 #define FLD(f) abuf->fields.sfmt_st_plus.f
3806 #define OPRND(f) par_exec->operands.sfmt_cmp.f
3807 int UNUSED written
= abuf
->written
;
3808 IADDR UNUSED pc
= abuf
->addr
;
3809 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3811 CPU (h_cond
) = OPRND (condbit
);
3818 CASE (sem
, INSN_PAR_CMPZ
) : /* cmpz $src2 */
3820 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3821 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3822 #define FLD(f) abuf->fields.sfmt_st_plus.f
3823 #define OPRND(f) par_exec->operands.sfmt_cmpz.f
3824 int UNUSED written
= 0;
3825 IADDR UNUSED pc
= abuf
->addr
;
3826 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3829 BI opval
= EQSI (* FLD (i_src2
), 0);
3830 OPRND (condbit
) = opval
;
3831 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
3839 CASE (sem
, INSN_WRITE_CMPZ
) : /* cmpz $src2 */
3841 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3842 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3843 #define FLD(f) abuf->fields.sfmt_st_plus.f
3844 #define OPRND(f) par_exec->operands.sfmt_cmpz.f
3845 int UNUSED written
= abuf
->written
;
3846 IADDR UNUSED pc
= abuf
->addr
;
3847 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3849 CPU (h_cond
) = OPRND (condbit
);
3856 CASE (sem
, INSN_PAR_JC
) : /* jc $sr */
3858 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3859 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3860 #define FLD(f) abuf->fields.sfmt_jl.f
3861 #define OPRND(f) par_exec->operands.sfmt_jc.f
3862 int UNUSED written
= 0;
3863 IADDR UNUSED pc
= abuf
->addr
;
3864 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3868 USI opval
= ANDSI (* FLD (i_sr
), -4);
3870 written
|= (1 << 2);
3871 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3875 abuf
->written
= written
;
3881 CASE (sem
, INSN_WRITE_JC
) : /* jc $sr */
3883 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3884 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3885 #define FLD(f) abuf->fields.sfmt_jl.f
3886 #define OPRND(f) par_exec->operands.sfmt_jc.f
3887 int UNUSED written
= abuf
->written
;
3888 IADDR UNUSED pc
= abuf
->addr
;
3890 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3892 if (written
& (1 << 2))
3894 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3897 SEM_BRANCH_FINI (vpc
);
3903 CASE (sem
, INSN_PAR_JNC
) : /* jnc $sr */
3905 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3906 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3907 #define FLD(f) abuf->fields.sfmt_jl.f
3908 #define OPRND(f) par_exec->operands.sfmt_jc.f
3909 int UNUSED written
= 0;
3910 IADDR UNUSED pc
= abuf
->addr
;
3911 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3913 if (NOTBI (CPU (h_cond
))) {
3915 USI opval
= ANDSI (* FLD (i_sr
), -4);
3917 written
|= (1 << 2);
3918 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3922 abuf
->written
= written
;
3928 CASE (sem
, INSN_WRITE_JNC
) : /* jnc $sr */
3930 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3931 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3932 #define FLD(f) abuf->fields.sfmt_jl.f
3933 #define OPRND(f) par_exec->operands.sfmt_jc.f
3934 int UNUSED written
= abuf
->written
;
3935 IADDR UNUSED pc
= abuf
->addr
;
3937 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3939 if (written
& (1 << 2))
3941 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3944 SEM_BRANCH_FINI (vpc
);
3950 CASE (sem
, INSN_PAR_JL
) : /* jl $sr */
3952 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3953 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3954 #define FLD(f) abuf->fields.sfmt_jl.f
3955 #define OPRND(f) par_exec->operands.sfmt_jl.f
3956 int UNUSED written
= 0;
3957 IADDR UNUSED pc
= abuf
->addr
;
3958 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3962 temp0
= ADDSI (ANDSI (pc
, -4), 4);
3963 temp1
= ANDSI (* FLD (i_sr
), -4);
3966 OPRND (h_gr_SI_14
) = opval
;
3967 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3972 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3981 CASE (sem
, INSN_WRITE_JL
) : /* jl $sr */
3983 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3984 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
3985 #define FLD(f) abuf->fields.sfmt_jl.f
3986 #define OPRND(f) par_exec->operands.sfmt_jl.f
3987 int UNUSED written
= abuf
->written
;
3988 IADDR UNUSED pc
= abuf
->addr
;
3990 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
3992 CPU (h_gr
[((UINT
) 14)]) = OPRND (h_gr_SI_14
);
3993 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
3995 SEM_BRANCH_FINI (vpc
);
4001 CASE (sem
, INSN_PAR_JMP
) : /* jmp $sr */
4003 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4004 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4005 #define FLD(f) abuf->fields.sfmt_jl.f
4006 #define OPRND(f) par_exec->operands.sfmt_jmp.f
4007 int UNUSED written
= 0;
4008 IADDR UNUSED pc
= abuf
->addr
;
4009 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4012 USI opval
= ANDSI (* FLD (i_sr
), -4);
4014 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4022 CASE (sem
, INSN_WRITE_JMP
) : /* jmp $sr */
4024 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4025 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4026 #define FLD(f) abuf->fields.sfmt_jl.f
4027 #define OPRND(f) par_exec->operands.sfmt_jmp.f
4028 int UNUSED written
= abuf
->written
;
4029 IADDR UNUSED pc
= abuf
->addr
;
4031 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4033 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
4035 SEM_BRANCH_FINI (vpc
);
4041 CASE (sem
, INSN_PAR_LD
) : /* ld $dr,@$sr */
4043 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4044 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4045 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4046 #define OPRND(f) par_exec->operands.sfmt_ld.f
4047 int UNUSED written
= 0;
4048 IADDR UNUSED pc
= abuf
->addr
;
4049 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4052 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
4054 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4062 CASE (sem
, INSN_WRITE_LD
) : /* ld $dr,@$sr */
4064 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4065 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4066 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4067 #define OPRND(f) par_exec->operands.sfmt_ld.f
4068 int UNUSED written
= abuf
->written
;
4069 IADDR UNUSED pc
= abuf
->addr
;
4070 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4072 * FLD (i_dr
) = OPRND (dr
);
4079 CASE (sem
, INSN_PAR_LDB
) : /* ldb $dr,@$sr */
4081 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4082 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4083 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4084 #define OPRND(f) par_exec->operands.sfmt_ldb.f
4085 int UNUSED written
= 0;
4086 IADDR UNUSED pc
= abuf
->addr
;
4087 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4090 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, * FLD (i_sr
)));
4092 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4100 CASE (sem
, INSN_WRITE_LDB
) : /* ldb $dr,@$sr */
4102 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4103 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4104 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4105 #define OPRND(f) par_exec->operands.sfmt_ldb.f
4106 int UNUSED written
= abuf
->written
;
4107 IADDR UNUSED pc
= abuf
->addr
;
4108 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4110 * FLD (i_dr
) = OPRND (dr
);
4117 CASE (sem
, INSN_PAR_LDH
) : /* ldh $dr,@$sr */
4119 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4120 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4121 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4122 #define OPRND(f) par_exec->operands.sfmt_ldh.f
4123 int UNUSED written
= 0;
4124 IADDR UNUSED pc
= abuf
->addr
;
4125 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4128 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, * FLD (i_sr
)));
4130 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4138 CASE (sem
, INSN_WRITE_LDH
) : /* ldh $dr,@$sr */
4140 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4141 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4142 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4143 #define OPRND(f) par_exec->operands.sfmt_ldh.f
4144 int UNUSED written
= abuf
->written
;
4145 IADDR UNUSED pc
= abuf
->addr
;
4146 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4148 * FLD (i_dr
) = OPRND (dr
);
4155 CASE (sem
, INSN_PAR_LDUB
) : /* ldub $dr,@$sr */
4157 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4158 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4159 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4160 #define OPRND(f) par_exec->operands.sfmt_ldb.f
4161 int UNUSED written
= 0;
4162 IADDR UNUSED pc
= abuf
->addr
;
4163 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4166 SI opval
= ZEXTQISI (GETMEMQI (current_cpu
, pc
, * FLD (i_sr
)));
4168 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4176 CASE (sem
, INSN_WRITE_LDUB
) : /* ldub $dr,@$sr */
4178 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4179 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4180 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4181 #define OPRND(f) par_exec->operands.sfmt_ldb.f
4182 int UNUSED written
= abuf
->written
;
4183 IADDR UNUSED pc
= abuf
->addr
;
4184 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4186 * FLD (i_dr
) = OPRND (dr
);
4193 CASE (sem
, INSN_PAR_LDUH
) : /* lduh $dr,@$sr */
4195 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4196 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4197 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4198 #define OPRND(f) par_exec->operands.sfmt_ldh.f
4199 int UNUSED written
= 0;
4200 IADDR UNUSED pc
= abuf
->addr
;
4201 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4204 SI opval
= ZEXTHISI (GETMEMHI (current_cpu
, pc
, * FLD (i_sr
)));
4206 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4214 CASE (sem
, INSN_WRITE_LDUH
) : /* lduh $dr,@$sr */
4216 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4217 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4218 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4219 #define OPRND(f) par_exec->operands.sfmt_ldh.f
4220 int UNUSED written
= abuf
->written
;
4221 IADDR UNUSED pc
= abuf
->addr
;
4222 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4224 * FLD (i_dr
) = OPRND (dr
);
4231 CASE (sem
, INSN_PAR_LD_PLUS
) : /* ld $dr,@$sr+ */
4233 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4234 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4235 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4236 #define OPRND(f) par_exec->operands.sfmt_ld_plus.f
4237 int UNUSED written
= 0;
4238 IADDR UNUSED pc
= abuf
->addr
;
4239 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4243 temp0
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
4244 temp1
= ADDSI (* FLD (i_sr
), 4);
4248 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4253 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4262 CASE (sem
, INSN_WRITE_LD_PLUS
) : /* ld $dr,@$sr+ */
4264 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4265 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4266 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4267 #define OPRND(f) par_exec->operands.sfmt_ld_plus.f
4268 int UNUSED written
= abuf
->written
;
4269 IADDR UNUSED pc
= abuf
->addr
;
4270 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4272 * FLD (i_dr
) = OPRND (dr
);
4273 * FLD (i_sr
) = OPRND (sr
);
4280 CASE (sem
, INSN_PAR_LDI8
) : /* ldi8 $dr,$simm8 */
4282 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4283 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4284 #define FLD(f) abuf->fields.sfmt_addi.f
4285 #define OPRND(f) par_exec->operands.sfmt_ldi8.f
4286 int UNUSED written
= 0;
4287 IADDR UNUSED pc
= abuf
->addr
;
4288 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4291 SI opval
= FLD (f_simm8
);
4293 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4301 CASE (sem
, INSN_WRITE_LDI8
) : /* ldi8 $dr,$simm8 */
4303 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4304 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4305 #define FLD(f) abuf->fields.sfmt_addi.f
4306 #define OPRND(f) par_exec->operands.sfmt_ldi8.f
4307 int UNUSED written
= abuf
->written
;
4308 IADDR UNUSED pc
= abuf
->addr
;
4309 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4311 * FLD (i_dr
) = OPRND (dr
);
4318 CASE (sem
, INSN_PAR_LOCK
) : /* lock $dr,@$sr */
4320 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4321 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4322 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4323 #define OPRND(f) par_exec->operands.sfmt_lock.f
4324 int UNUSED written
= 0;
4325 IADDR UNUSED pc
= abuf
->addr
;
4326 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4331 OPRND (h_lock_BI
) = opval
;
4332 TRACE_RESULT (current_cpu
, abuf
, "lock", 'x', opval
);
4335 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_sr
));
4337 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4346 CASE (sem
, INSN_WRITE_LOCK
) : /* lock $dr,@$sr */
4348 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4349 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4350 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4351 #define OPRND(f) par_exec->operands.sfmt_lock.f
4352 int UNUSED written
= abuf
->written
;
4353 IADDR UNUSED pc
= abuf
->addr
;
4354 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4356 * FLD (i_dr
) = OPRND (dr
);
4357 CPU (h_lock
) = OPRND (h_lock_BI
);
4364 CASE (sem
, INSN_PAR_MACHI_A
) : /* machi $src1,$src2,$acc */
4366 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4367 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4368 #define FLD(f) abuf->fields.sfmt_machi_a.f
4369 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4370 int UNUSED written
= 0;
4371 IADDR UNUSED pc
= abuf
->addr
;
4372 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4375 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);
4376 OPRND (acc
) = opval
;
4377 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4385 CASE (sem
, INSN_WRITE_MACHI_A
) : /* machi $src1,$src2,$acc */
4387 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4388 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4389 #define FLD(f) abuf->fields.sfmt_machi_a.f
4390 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4391 int UNUSED written
= abuf
->written
;
4392 IADDR UNUSED pc
= abuf
->addr
;
4393 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4395 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4402 CASE (sem
, INSN_PAR_MACLO_A
) : /* maclo $src1,$src2,$acc */
4404 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4405 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4406 #define FLD(f) abuf->fields.sfmt_machi_a.f
4407 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4408 int UNUSED written
= 0;
4409 IADDR UNUSED pc
= abuf
->addr
;
4410 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4413 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);
4414 OPRND (acc
) = opval
;
4415 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4423 CASE (sem
, INSN_WRITE_MACLO_A
) : /* maclo $src1,$src2,$acc */
4425 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4426 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4427 #define FLD(f) abuf->fields.sfmt_machi_a.f
4428 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4429 int UNUSED written
= abuf
->written
;
4430 IADDR UNUSED pc
= abuf
->addr
;
4431 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4433 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4440 CASE (sem
, INSN_PAR_MACWHI_A
) : /* macwhi $src1,$src2,$acc */
4442 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4443 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4444 #define FLD(f) abuf->fields.sfmt_machi_a.f
4445 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4446 int UNUSED written
= 0;
4447 IADDR UNUSED pc
= abuf
->addr
;
4448 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4451 DI opval
= ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16)))));
4452 OPRND (acc
) = opval
;
4453 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4461 CASE (sem
, INSN_WRITE_MACWHI_A
) : /* macwhi $src1,$src2,$acc */
4463 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4464 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4465 #define FLD(f) abuf->fields.sfmt_machi_a.f
4466 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4467 int UNUSED written
= abuf
->written
;
4468 IADDR UNUSED pc
= abuf
->addr
;
4469 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4471 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4478 CASE (sem
, INSN_PAR_MACWLO_A
) : /* macwlo $src1,$src2,$acc */
4480 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4481 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4482 #define FLD(f) abuf->fields.sfmt_machi_a.f
4483 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4484 int UNUSED written
= 0;
4485 IADDR UNUSED pc
= abuf
->addr
;
4486 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4489 DI opval
= ADDDI (GET_H_ACCUMS (FLD (f_acc
)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))));
4490 OPRND (acc
) = opval
;
4491 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4499 CASE (sem
, INSN_WRITE_MACWLO_A
) : /* macwlo $src1,$src2,$acc */
4501 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4502 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4503 #define FLD(f) abuf->fields.sfmt_machi_a.f
4504 #define OPRND(f) par_exec->operands.sfmt_machi_a.f
4505 int UNUSED written
= abuf
->written
;
4506 IADDR UNUSED pc
= abuf
->addr
;
4507 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4509 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4516 CASE (sem
, INSN_PAR_MUL
) : /* mul $dr,$sr */
4518 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4519 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4520 #define FLD(f) abuf->fields.sfmt_add.f
4521 #define OPRND(f) par_exec->operands.sfmt_add.f
4522 int UNUSED written
= 0;
4523 IADDR UNUSED pc
= abuf
->addr
;
4524 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4527 SI opval
= MULSI (* FLD (i_dr
), * FLD (i_sr
));
4529 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4537 CASE (sem
, INSN_WRITE_MUL
) : /* mul $dr,$sr */
4539 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4540 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4541 #define FLD(f) abuf->fields.sfmt_add.f
4542 #define OPRND(f) par_exec->operands.sfmt_add.f
4543 int UNUSED written
= abuf
->written
;
4544 IADDR UNUSED pc
= abuf
->addr
;
4545 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4547 * FLD (i_dr
) = OPRND (dr
);
4554 CASE (sem
, INSN_PAR_MULHI_A
) : /* mulhi $src1,$src2,$acc */
4556 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4557 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4558 #define FLD(f) abuf->fields.sfmt_machi_a.f
4559 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4560 int UNUSED written
= 0;
4561 IADDR UNUSED pc
= abuf
->addr
;
4562 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4565 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (* FLD (i_src1
), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16)))), 16), 16);
4566 OPRND (acc
) = opval
;
4567 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4575 CASE (sem
, INSN_WRITE_MULHI_A
) : /* mulhi $src1,$src2,$acc */
4577 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4578 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4579 #define FLD(f) abuf->fields.sfmt_machi_a.f
4580 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4581 int UNUSED written
= abuf
->written
;
4582 IADDR UNUSED pc
= abuf
->addr
;
4583 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4585 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4592 CASE (sem
, INSN_PAR_MULLO_A
) : /* mullo $src1,$src2,$acc */
4594 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4595 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4596 #define FLD(f) abuf->fields.sfmt_machi_a.f
4597 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4598 int UNUSED written
= 0;
4599 IADDR UNUSED pc
= abuf
->addr
;
4600 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4603 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (* FLD (i_src1
), 16)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
)))), 16), 16);
4604 OPRND (acc
) = opval
;
4605 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4613 CASE (sem
, INSN_WRITE_MULLO_A
) : /* mullo $src1,$src2,$acc */
4615 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4616 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4617 #define FLD(f) abuf->fields.sfmt_machi_a.f
4618 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4619 int UNUSED written
= abuf
->written
;
4620 IADDR UNUSED pc
= abuf
->addr
;
4621 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4623 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4630 CASE (sem
, INSN_PAR_MULWHI_A
) : /* mulwhi $src1,$src2,$acc */
4632 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4633 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4634 #define FLD(f) abuf->fields.sfmt_machi_a.f
4635 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4636 int UNUSED written
= 0;
4637 IADDR UNUSED pc
= abuf
->addr
;
4638 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4641 DI opval
= MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (i_src2
), 16))));
4642 OPRND (acc
) = opval
;
4643 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4651 CASE (sem
, INSN_WRITE_MULWHI_A
) : /* mulwhi $src1,$src2,$acc */
4653 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4654 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4655 #define FLD(f) abuf->fields.sfmt_machi_a.f
4656 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4657 int UNUSED written
= abuf
->written
;
4658 IADDR UNUSED pc
= abuf
->addr
;
4659 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4661 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4668 CASE (sem
, INSN_PAR_MULWLO_A
) : /* mulwlo $src1,$src2,$acc */
4670 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4671 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4672 #define FLD(f) abuf->fields.sfmt_machi_a.f
4673 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4674 int UNUSED written
= 0;
4675 IADDR UNUSED pc
= abuf
->addr
;
4676 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4679 DI opval
= MULDI (EXTSIDI (* FLD (i_src1
)), EXTHIDI (TRUNCSIHI (* FLD (i_src2
))));
4680 OPRND (acc
) = opval
;
4681 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4689 CASE (sem
, INSN_WRITE_MULWLO_A
) : /* mulwlo $src1,$src2,$acc */
4691 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4692 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4693 #define FLD(f) abuf->fields.sfmt_machi_a.f
4694 #define OPRND(f) par_exec->operands.sfmt_mulhi_a.f
4695 int UNUSED written
= abuf
->written
;
4696 IADDR UNUSED pc
= abuf
->addr
;
4697 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4699 SET_H_ACCUMS (FLD (f_acc
), OPRND (acc
));
4706 CASE (sem
, INSN_PAR_MV
) : /* mv $dr,$sr */
4708 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4709 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4710 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4711 #define OPRND(f) par_exec->operands.sfmt_mv.f
4712 int UNUSED written
= 0;
4713 IADDR UNUSED pc
= abuf
->addr
;
4714 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4717 SI opval
= * FLD (i_sr
);
4719 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4727 CASE (sem
, INSN_WRITE_MV
) : /* mv $dr,$sr */
4729 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4730 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4731 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4732 #define OPRND(f) par_exec->operands.sfmt_mv.f
4733 int UNUSED written
= abuf
->written
;
4734 IADDR UNUSED pc
= abuf
->addr
;
4735 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4737 * FLD (i_dr
) = OPRND (dr
);
4744 CASE (sem
, INSN_PAR_MVFACHI_A
) : /* mvfachi $dr,$accs */
4746 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4747 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4748 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
4749 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
4750 int UNUSED written
= 0;
4751 IADDR UNUSED pc
= abuf
->addr
;
4752 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4755 SI opval
= TRUNCDISI (SRADI (GET_H_ACCUMS (FLD (f_accs
)), 32));
4757 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4765 CASE (sem
, INSN_WRITE_MVFACHI_A
) : /* mvfachi $dr,$accs */
4767 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4768 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4769 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
4770 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
4771 int UNUSED written
= abuf
->written
;
4772 IADDR UNUSED pc
= abuf
->addr
;
4773 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4775 * FLD (i_dr
) = OPRND (dr
);
4782 CASE (sem
, INSN_PAR_MVFACLO_A
) : /* mvfaclo $dr,$accs */
4784 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4785 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4786 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
4787 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
4788 int UNUSED written
= 0;
4789 IADDR UNUSED pc
= abuf
->addr
;
4790 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4793 SI opval
= TRUNCDISI (GET_H_ACCUMS (FLD (f_accs
)));
4795 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4803 CASE (sem
, INSN_WRITE_MVFACLO_A
) : /* mvfaclo $dr,$accs */
4805 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4806 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4807 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
4808 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
4809 int UNUSED written
= abuf
->written
;
4810 IADDR UNUSED pc
= abuf
->addr
;
4811 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4813 * FLD (i_dr
) = OPRND (dr
);
4820 CASE (sem
, INSN_PAR_MVFACMI_A
) : /* mvfacmi $dr,$accs */
4822 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4823 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4824 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
4825 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
4826 int UNUSED written
= 0;
4827 IADDR UNUSED pc
= abuf
->addr
;
4828 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4831 SI opval
= TRUNCDISI (SRADI (GET_H_ACCUMS (FLD (f_accs
)), 16));
4833 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4841 CASE (sem
, INSN_WRITE_MVFACMI_A
) : /* mvfacmi $dr,$accs */
4843 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4844 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4845 #define FLD(f) abuf->fields.sfmt_mvfachi_a.f
4846 #define OPRND(f) par_exec->operands.sfmt_mvfachi_a.f
4847 int UNUSED written
= abuf
->written
;
4848 IADDR UNUSED pc
= abuf
->addr
;
4849 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4851 * FLD (i_dr
) = OPRND (dr
);
4858 CASE (sem
, INSN_PAR_MVFC
) : /* mvfc $dr,$scr */
4860 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4861 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4862 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4863 #define OPRND(f) par_exec->operands.sfmt_mvfc.f
4864 int UNUSED written
= 0;
4865 IADDR UNUSED pc
= abuf
->addr
;
4866 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4869 SI opval
= GET_H_CR (FLD (f_r2
));
4871 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4879 CASE (sem
, INSN_WRITE_MVFC
) : /* mvfc $dr,$scr */
4881 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4882 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4883 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4884 #define OPRND(f) par_exec->operands.sfmt_mvfc.f
4885 int UNUSED written
= abuf
->written
;
4886 IADDR UNUSED pc
= abuf
->addr
;
4887 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4889 * FLD (i_dr
) = OPRND (dr
);
4896 CASE (sem
, INSN_PAR_MVTACHI_A
) : /* mvtachi $src1,$accs */
4898 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4899 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4900 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
4901 #define OPRND(f) par_exec->operands.sfmt_mvtachi_a.f
4902 int UNUSED written
= 0;
4903 IADDR UNUSED pc
= abuf
->addr
;
4904 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4907 DI opval
= ORDI (ANDDI (GET_H_ACCUMS (FLD (f_accs
)), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (* FLD (i_src1
)), 32));
4908 OPRND (accs
) = opval
;
4909 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4917 CASE (sem
, INSN_WRITE_MVTACHI_A
) : /* mvtachi $src1,$accs */
4919 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4920 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4921 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
4922 #define OPRND(f) par_exec->operands.sfmt_mvtachi_a.f
4923 int UNUSED written
= abuf
->written
;
4924 IADDR UNUSED pc
= abuf
->addr
;
4925 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4927 SET_H_ACCUMS (FLD (f_accs
), OPRND (accs
));
4934 CASE (sem
, INSN_PAR_MVTACLO_A
) : /* mvtaclo $src1,$accs */
4936 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4937 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4938 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
4939 #define OPRND(f) par_exec->operands.sfmt_mvtachi_a.f
4940 int UNUSED written
= 0;
4941 IADDR UNUSED pc
= abuf
->addr
;
4942 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4945 DI opval
= ORDI (ANDDI (GET_H_ACCUMS (FLD (f_accs
)), MAKEDI (0xffffffff, 0)), ZEXTSIDI (* FLD (i_src1
)));
4946 OPRND (accs
) = opval
;
4947 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
4955 CASE (sem
, INSN_WRITE_MVTACLO_A
) : /* mvtaclo $src1,$accs */
4957 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4958 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4959 #define FLD(f) abuf->fields.sfmt_mvtachi_a.f
4960 #define OPRND(f) par_exec->operands.sfmt_mvtachi_a.f
4961 int UNUSED written
= abuf
->written
;
4962 IADDR UNUSED pc
= abuf
->addr
;
4963 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
4965 SET_H_ACCUMS (FLD (f_accs
), OPRND (accs
));
4972 CASE (sem
, INSN_PAR_MVTC
) : /* mvtc $sr,$dcr */
4974 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4975 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4976 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4977 #define OPRND(f) par_exec->operands.sfmt_mvtc.f
4978 int UNUSED written
= 0;
4979 IADDR UNUSED pc
= abuf
->addr
;
4980 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4983 USI opval
= * FLD (i_sr
);
4984 OPRND (dcr
) = opval
;
4985 TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
4993 CASE (sem
, INSN_WRITE_MVTC
) : /* mvtc $sr,$dcr */
4995 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
4996 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
4997 #define FLD(f) abuf->fields.sfmt_ld_plus.f
4998 #define OPRND(f) par_exec->operands.sfmt_mvtc.f
4999 int UNUSED written
= abuf
->written
;
5000 IADDR UNUSED pc
= abuf
->addr
;
5001 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5003 SET_H_CR (FLD (f_r1
), OPRND (dcr
));
5010 CASE (sem
, INSN_PAR_NEG
) : /* neg $dr,$sr */
5012 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5013 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5014 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5015 #define OPRND(f) par_exec->operands.sfmt_mv.f
5016 int UNUSED written
= 0;
5017 IADDR UNUSED pc
= abuf
->addr
;
5018 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5021 SI opval
= NEGSI (* FLD (i_sr
));
5023 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5031 CASE (sem
, INSN_WRITE_NEG
) : /* neg $dr,$sr */
5033 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5034 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5035 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5036 #define OPRND(f) par_exec->operands.sfmt_mv.f
5037 int UNUSED written
= abuf
->written
;
5038 IADDR UNUSED pc
= abuf
->addr
;
5039 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5041 * FLD (i_dr
) = OPRND (dr
);
5048 CASE (sem
, INSN_PAR_NOP
) : /* nop */
5050 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5051 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5052 #define FLD(f) abuf->fields.fmt_empty.f
5053 #define OPRND(f) par_exec->operands.sfmt_nop.f
5054 int UNUSED written
= 0;
5055 IADDR UNUSED pc
= abuf
->addr
;
5056 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5058 PROFILE_COUNT_FILLNOPS (current_cpu
, abuf
->addr
);
5065 CASE (sem
, INSN_WRITE_NOP
) : /* nop */
5067 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5068 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5069 #define FLD(f) abuf->fields.fmt_empty.f
5070 #define OPRND(f) par_exec->operands.sfmt_nop.f
5071 int UNUSED written
= abuf
->written
;
5072 IADDR UNUSED pc
= abuf
->addr
;
5073 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5081 CASE (sem
, INSN_PAR_NOT
) : /* not $dr,$sr */
5083 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5084 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5085 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5086 #define OPRND(f) par_exec->operands.sfmt_mv.f
5087 int UNUSED written
= 0;
5088 IADDR UNUSED pc
= abuf
->addr
;
5089 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5092 SI opval
= INVSI (* FLD (i_sr
));
5094 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5102 CASE (sem
, INSN_WRITE_NOT
) : /* not $dr,$sr */
5104 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5105 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5106 #define FLD(f) abuf->fields.sfmt_ld_plus.f
5107 #define OPRND(f) par_exec->operands.sfmt_mv.f
5108 int UNUSED written
= abuf
->written
;
5109 IADDR UNUSED pc
= abuf
->addr
;
5110 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5112 * FLD (i_dr
) = OPRND (dr
);
5119 CASE (sem
, INSN_PAR_RAC_DSI
) : /* rac $accd,$accs,$imm1 */
5121 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5122 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5123 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
5124 #define OPRND(f) par_exec->operands.sfmt_rac_dsi.f
5125 int UNUSED written
= 0;
5126 IADDR UNUSED pc
= abuf
->addr
;
5127 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5131 tmp_tmp1
= SLLDI (GET_H_ACCUMS (FLD (f_accs
)), FLD (f_imm1
));
5132 tmp_tmp1
= ADDDI (tmp_tmp1
, MAKEDI (0, 32768));
5134 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)));
5135 OPRND (accd
) = opval
;
5136 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
5145 CASE (sem
, INSN_WRITE_RAC_DSI
) : /* rac $accd,$accs,$imm1 */
5147 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5148 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5149 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
5150 #define OPRND(f) par_exec->operands.sfmt_rac_dsi.f
5151 int UNUSED written
= abuf
->written
;
5152 IADDR UNUSED pc
= abuf
->addr
;
5153 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5155 SET_H_ACCUMS (FLD (f_accd
), OPRND (accd
));
5162 CASE (sem
, INSN_PAR_RACH_DSI
) : /* rach $accd,$accs,$imm1 */
5164 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5165 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5166 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
5167 #define OPRND(f) par_exec->operands.sfmt_rac_dsi.f
5168 int UNUSED written
= 0;
5169 IADDR UNUSED pc
= abuf
->addr
;
5170 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5174 tmp_tmp1
= SLLDI (GET_H_ACCUMS (FLD (f_accs
)), FLD (f_imm1
));
5175 tmp_tmp1
= ADDDI (tmp_tmp1
, MAKEDI (0, 0x80000000));
5177 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)));
5178 OPRND (accd
) = opval
;
5179 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
5188 CASE (sem
, INSN_WRITE_RACH_DSI
) : /* rach $accd,$accs,$imm1 */
5190 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5191 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5192 #define FLD(f) abuf->fields.sfmt_rac_dsi.f
5193 #define OPRND(f) par_exec->operands.sfmt_rac_dsi.f
5194 int UNUSED written
= abuf
->written
;
5195 IADDR UNUSED pc
= abuf
->addr
;
5196 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5198 SET_H_ACCUMS (FLD (f_accd
), OPRND (accd
));
5205 CASE (sem
, INSN_PAR_RTE
) : /* rte */
5207 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5208 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5209 #define FLD(f) abuf->fields.fmt_empty.f
5210 #define OPRND(f) par_exec->operands.sfmt_rte.f
5211 int UNUSED written
= 0;
5212 IADDR UNUSED pc
= abuf
->addr
;
5213 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5217 USI opval
= ANDSI (GET_H_CR (((UINT
) 6)), -4);
5219 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
5222 USI opval
= GET_H_CR (((UINT
) 14));
5223 OPRND (h_cr_USI_6
) = opval
;
5224 TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
5227 UQI opval
= CPU (h_bpsw
);
5228 OPRND (h_psw_UQI
) = opval
;
5229 TRACE_RESULT (current_cpu
, abuf
, "psw", 'x', opval
);
5232 UQI opval
= CPU (h_bbpsw
);
5233 OPRND (h_bpsw_UQI
) = opval
;
5234 TRACE_RESULT (current_cpu
, abuf
, "bpsw", 'x', opval
);
5243 CASE (sem
, INSN_WRITE_RTE
) : /* rte */
5245 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5246 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5247 #define FLD(f) abuf->fields.fmt_empty.f
5248 #define OPRND(f) par_exec->operands.sfmt_rte.f
5249 int UNUSED written
= abuf
->written
;
5250 IADDR UNUSED pc
= abuf
->addr
;
5252 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5254 CPU (h_bpsw
) = OPRND (h_bpsw_UQI
);
5255 SET_H_CR (((UINT
) 6), OPRND (h_cr_USI_6
));
5256 SET_H_PSW (OPRND (h_psw_UQI
));
5257 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
5259 SEM_BRANCH_FINI (vpc
);
5265 CASE (sem
, INSN_PAR_SLL
) : /* sll $dr,$sr */
5267 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5268 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5269 #define FLD(f) abuf->fields.sfmt_add.f
5270 #define OPRND(f) par_exec->operands.sfmt_add.f
5271 int UNUSED written
= 0;
5272 IADDR UNUSED pc
= abuf
->addr
;
5273 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5276 SI opval
= SLLSI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
5278 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5286 CASE (sem
, INSN_WRITE_SLL
) : /* sll $dr,$sr */
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_add.f
5291 #define OPRND(f) par_exec->operands.sfmt_add.f
5292 int UNUSED written
= abuf
->written
;
5293 IADDR UNUSED pc
= abuf
->addr
;
5294 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5296 * FLD (i_dr
) = OPRND (dr
);
5303 CASE (sem
, INSN_PAR_SLLI
) : /* slli $dr,$uimm5 */
5305 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5306 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5307 #define FLD(f) abuf->fields.sfmt_slli.f
5308 #define OPRND(f) par_exec->operands.sfmt_slli.f
5309 int UNUSED written
= 0;
5310 IADDR UNUSED pc
= abuf
->addr
;
5311 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5314 SI opval
= SLLSI (* FLD (i_dr
), FLD (f_uimm5
));
5316 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5324 CASE (sem
, INSN_WRITE_SLLI
) : /* slli $dr,$uimm5 */
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_slli.f
5329 #define OPRND(f) par_exec->operands.sfmt_slli.f
5330 int UNUSED written
= abuf
->written
;
5331 IADDR UNUSED pc
= abuf
->addr
;
5332 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5334 * FLD (i_dr
) = OPRND (dr
);
5341 CASE (sem
, INSN_PAR_SRA
) : /* sra $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_add.f
5346 #define OPRND(f) par_exec->operands.sfmt_add.f
5347 int UNUSED written
= 0;
5348 IADDR UNUSED pc
= abuf
->addr
;
5349 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5352 SI opval
= SRASI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
5354 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5362 CASE (sem
, INSN_WRITE_SRA
) : /* sra $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_add.f
5367 #define OPRND(f) par_exec->operands.sfmt_add.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_SRAI
) : /* srai $dr,$uimm5 */
5381 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5382 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5383 #define FLD(f) abuf->fields.sfmt_slli.f
5384 #define OPRND(f) par_exec->operands.sfmt_slli.f
5385 int UNUSED written
= 0;
5386 IADDR UNUSED pc
= abuf
->addr
;
5387 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5390 SI opval
= SRASI (* FLD (i_dr
), FLD (f_uimm5
));
5392 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5400 CASE (sem
, INSN_WRITE_SRAI
) : /* srai $dr,$uimm5 */
5402 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5403 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5404 #define FLD(f) abuf->fields.sfmt_slli.f
5405 #define OPRND(f) par_exec->operands.sfmt_slli.f
5406 int UNUSED written
= abuf
->written
;
5407 IADDR UNUSED pc
= abuf
->addr
;
5408 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5410 * FLD (i_dr
) = OPRND (dr
);
5417 CASE (sem
, INSN_PAR_SRL
) : /* srl $dr,$sr */
5419 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5420 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5421 #define FLD(f) abuf->fields.sfmt_add.f
5422 #define OPRND(f) par_exec->operands.sfmt_add.f
5423 int UNUSED written
= 0;
5424 IADDR UNUSED pc
= abuf
->addr
;
5425 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5428 SI opval
= SRLSI (* FLD (i_dr
), ANDSI (* FLD (i_sr
), 31));
5430 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5438 CASE (sem
, INSN_WRITE_SRL
) : /* srl $dr,$sr */
5440 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5441 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5442 #define FLD(f) abuf->fields.sfmt_add.f
5443 #define OPRND(f) par_exec->operands.sfmt_add.f
5444 int UNUSED written
= abuf
->written
;
5445 IADDR UNUSED pc
= abuf
->addr
;
5446 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5448 * FLD (i_dr
) = OPRND (dr
);
5455 CASE (sem
, INSN_PAR_SRLI
) : /* srli $dr,$uimm5 */
5457 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5458 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5459 #define FLD(f) abuf->fields.sfmt_slli.f
5460 #define OPRND(f) par_exec->operands.sfmt_slli.f
5461 int UNUSED written
= 0;
5462 IADDR UNUSED pc
= abuf
->addr
;
5463 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5466 SI opval
= SRLSI (* FLD (i_dr
), FLD (f_uimm5
));
5468 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5476 CASE (sem
, INSN_WRITE_SRLI
) : /* srli $dr,$uimm5 */
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_slli.f
5481 #define OPRND(f) par_exec->operands.sfmt_slli.f
5482 int UNUSED written
= abuf
->written
;
5483 IADDR UNUSED pc
= abuf
->addr
;
5484 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5486 * FLD (i_dr
) = OPRND (dr
);
5493 CASE (sem
, INSN_PAR_ST
) : /* st $src1,@$src2 */
5495 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5496 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5497 #define FLD(f) abuf->fields.sfmt_st_plus.f
5498 #define OPRND(f) par_exec->operands.sfmt_st.f
5499 int UNUSED written
= 0;
5500 IADDR UNUSED pc
= abuf
->addr
;
5501 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5504 SI opval
= * FLD (i_src1
);
5505 OPRND (h_memory_SI_src2_idx
) = * FLD (i_src2
);
5506 OPRND (h_memory_SI_src2
) = opval
;
5507 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5515 CASE (sem
, INSN_WRITE_ST
) : /* st $src1,@$src2 */
5517 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5518 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5519 #define FLD(f) abuf->fields.sfmt_st_plus.f
5520 #define OPRND(f) par_exec->operands.sfmt_st.f
5521 int UNUSED written
= abuf
->written
;
5522 IADDR UNUSED pc
= abuf
->addr
;
5523 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5525 SETMEMSI (current_cpu
, pc
, OPRND (h_memory_SI_src2_idx
), OPRND (h_memory_SI_src2
));
5532 CASE (sem
, INSN_PAR_STB
) : /* stb $src1,@$src2 */
5534 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5535 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5536 #define FLD(f) abuf->fields.sfmt_st_plus.f
5537 #define OPRND(f) par_exec->operands.sfmt_stb.f
5538 int UNUSED written
= 0;
5539 IADDR UNUSED pc
= abuf
->addr
;
5540 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5543 QI opval
= * FLD (i_src1
);
5544 OPRND (h_memory_QI_src2_idx
) = * FLD (i_src2
);
5545 OPRND (h_memory_QI_src2
) = opval
;
5546 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5554 CASE (sem
, INSN_WRITE_STB
) : /* stb $src1,@$src2 */
5556 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5557 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5558 #define FLD(f) abuf->fields.sfmt_st_plus.f
5559 #define OPRND(f) par_exec->operands.sfmt_stb.f
5560 int UNUSED written
= abuf
->written
;
5561 IADDR UNUSED pc
= abuf
->addr
;
5562 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5564 SETMEMQI (current_cpu
, pc
, OPRND (h_memory_QI_src2_idx
), OPRND (h_memory_QI_src2
));
5571 CASE (sem
, INSN_PAR_STH
) : /* sth $src1,@$src2 */
5573 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5574 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5575 #define FLD(f) abuf->fields.sfmt_st_plus.f
5576 #define OPRND(f) par_exec->operands.sfmt_sth.f
5577 int UNUSED written
= 0;
5578 IADDR UNUSED pc
= abuf
->addr
;
5579 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5582 HI opval
= * FLD (i_src1
);
5583 OPRND (h_memory_HI_src2_idx
) = * FLD (i_src2
);
5584 OPRND (h_memory_HI_src2
) = opval
;
5585 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5593 CASE (sem
, INSN_WRITE_STH
) : /* sth $src1,@$src2 */
5595 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5596 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5597 #define FLD(f) abuf->fields.sfmt_st_plus.f
5598 #define OPRND(f) par_exec->operands.sfmt_sth.f
5599 int UNUSED written
= abuf
->written
;
5600 IADDR UNUSED pc
= abuf
->addr
;
5601 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5603 SETMEMHI (current_cpu
, pc
, OPRND (h_memory_HI_src2_idx
), OPRND (h_memory_HI_src2
));
5610 CASE (sem
, INSN_PAR_ST_PLUS
) : /* st $src1,@+$src2 */
5612 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5613 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5614 #define FLD(f) abuf->fields.sfmt_st_plus.f
5615 #define OPRND(f) par_exec->operands.sfmt_st_plus.f
5616 int UNUSED written
= 0;
5617 IADDR UNUSED pc
= abuf
->addr
;
5618 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5622 tmp_new_src2
= ADDSI (* FLD (i_src2
), 4);
5624 SI opval
= * FLD (i_src1
);
5625 OPRND (h_memory_SI_new_src2_idx
) = tmp_new_src2
;
5626 OPRND (h_memory_SI_new_src2
) = opval
;
5627 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5630 SI opval
= tmp_new_src2
;
5631 OPRND (src2
) = opval
;
5632 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5641 CASE (sem
, INSN_WRITE_ST_PLUS
) : /* st $src1,@+$src2 */
5643 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5644 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5645 #define FLD(f) abuf->fields.sfmt_st_plus.f
5646 #define OPRND(f) par_exec->operands.sfmt_st_plus.f
5647 int UNUSED written
= abuf
->written
;
5648 IADDR UNUSED pc
= abuf
->addr
;
5649 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5651 SETMEMSI (current_cpu
, pc
, OPRND (h_memory_SI_new_src2_idx
), OPRND (h_memory_SI_new_src2
));
5652 * FLD (i_src2
) = OPRND (src2
);
5659 CASE (sem
, INSN_PAR_ST_MINUS
) : /* st $src1,@-$src2 */
5661 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5662 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5663 #define FLD(f) abuf->fields.sfmt_st_plus.f
5664 #define OPRND(f) par_exec->operands.sfmt_st_plus.f
5665 int UNUSED written
= 0;
5666 IADDR UNUSED pc
= abuf
->addr
;
5667 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5671 tmp_new_src2
= SUBSI (* FLD (i_src2
), 4);
5673 SI opval
= * FLD (i_src1
);
5674 OPRND (h_memory_SI_new_src2_idx
) = tmp_new_src2
;
5675 OPRND (h_memory_SI_new_src2
) = opval
;
5676 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5679 SI opval
= tmp_new_src2
;
5680 OPRND (src2
) = opval
;
5681 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5690 CASE (sem
, INSN_WRITE_ST_MINUS
) : /* st $src1,@-$src2 */
5692 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5693 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5694 #define FLD(f) abuf->fields.sfmt_st_plus.f
5695 #define OPRND(f) par_exec->operands.sfmt_st_plus.f
5696 int UNUSED written
= abuf
->written
;
5697 IADDR UNUSED pc
= abuf
->addr
;
5698 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5700 SETMEMSI (current_cpu
, pc
, OPRND (h_memory_SI_new_src2_idx
), OPRND (h_memory_SI_new_src2
));
5701 * FLD (i_src2
) = OPRND (src2
);
5708 CASE (sem
, INSN_PAR_SUB
) : /* sub $dr,$sr */
5710 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5711 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5712 #define FLD(f) abuf->fields.sfmt_add.f
5713 #define OPRND(f) par_exec->operands.sfmt_add.f
5714 int UNUSED written
= 0;
5715 IADDR UNUSED pc
= abuf
->addr
;
5716 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5719 SI opval
= SUBSI (* FLD (i_dr
), * FLD (i_sr
));
5721 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5729 CASE (sem
, INSN_WRITE_SUB
) : /* sub $dr,$sr */
5731 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5732 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5733 #define FLD(f) abuf->fields.sfmt_add.f
5734 #define OPRND(f) par_exec->operands.sfmt_add.f
5735 int UNUSED written
= abuf
->written
;
5736 IADDR UNUSED pc
= abuf
->addr
;
5737 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5739 * FLD (i_dr
) = OPRND (dr
);
5746 CASE (sem
, INSN_PAR_SUBV
) : /* subv $dr,$sr */
5748 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5749 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5750 #define FLD(f) abuf->fields.sfmt_add.f
5751 #define OPRND(f) par_exec->operands.sfmt_addv.f
5752 int UNUSED written
= 0;
5753 IADDR UNUSED pc
= abuf
->addr
;
5754 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5758 temp0
= SUBSI (* FLD (i_dr
), * FLD (i_sr
));
5759 temp1
= SUBOFSI (* FLD (i_dr
), * FLD (i_sr
), 0);
5763 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5767 OPRND (condbit
) = opval
;
5768 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
5777 CASE (sem
, INSN_WRITE_SUBV
) : /* subv $dr,$sr */
5779 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5780 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5781 #define FLD(f) abuf->fields.sfmt_add.f
5782 #define OPRND(f) par_exec->operands.sfmt_addv.f
5783 int UNUSED written
= abuf
->written
;
5784 IADDR UNUSED pc
= abuf
->addr
;
5785 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5787 CPU (h_cond
) = OPRND (condbit
);
5788 * FLD (i_dr
) = OPRND (dr
);
5795 CASE (sem
, INSN_PAR_SUBX
) : /* subx $dr,$sr */
5797 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5798 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5799 #define FLD(f) abuf->fields.sfmt_add.f
5800 #define OPRND(f) par_exec->operands.sfmt_addx.f
5801 int UNUSED written
= 0;
5802 IADDR UNUSED pc
= abuf
->addr
;
5803 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5807 temp0
= SUBCSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
5808 temp1
= SUBCFSI (* FLD (i_dr
), * FLD (i_sr
), CPU (h_cond
));
5812 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5816 OPRND (condbit
) = opval
;
5817 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
5826 CASE (sem
, INSN_WRITE_SUBX
) : /* subx $dr,$sr */
5828 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5829 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5830 #define FLD(f) abuf->fields.sfmt_add.f
5831 #define OPRND(f) par_exec->operands.sfmt_addx.f
5832 int UNUSED written
= abuf
->written
;
5833 IADDR UNUSED pc
= abuf
->addr
;
5834 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5836 CPU (h_cond
) = OPRND (condbit
);
5837 * FLD (i_dr
) = OPRND (dr
);
5844 CASE (sem
, INSN_PAR_TRAP
) : /* trap $uimm4 */
5846 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5847 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5848 #define FLD(f) abuf->fields.sfmt_trap.f
5849 #define OPRND(f) par_exec->operands.sfmt_trap.f
5850 int UNUSED written
= 0;
5851 IADDR UNUSED pc
= abuf
->addr
;
5852 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5856 USI opval
= GET_H_CR (((UINT
) 6));
5857 OPRND (h_cr_USI_14
) = opval
;
5858 TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
5861 USI opval
= ADDSI (pc
, 4);
5862 OPRND (h_cr_USI_6
) = opval
;
5863 TRACE_RESULT (current_cpu
, abuf
, "cr", 'x', opval
);
5866 UQI opval
= CPU (h_bpsw
);
5867 OPRND (h_bbpsw_UQI
) = opval
;
5868 TRACE_RESULT (current_cpu
, abuf
, "bbpsw", 'x', opval
);
5871 UQI opval
= GET_H_PSW ();
5872 OPRND (h_bpsw_UQI
) = opval
;
5873 TRACE_RESULT (current_cpu
, abuf
, "bpsw", 'x', opval
);
5876 UQI opval
= ANDQI (GET_H_PSW (), 128);
5877 OPRND (h_psw_UQI
) = opval
;
5878 TRACE_RESULT (current_cpu
, abuf
, "psw", 'x', opval
);
5881 SI opval
= m32r_trap (current_cpu
, pc
, FLD (f_uimm4
));
5883 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
5892 CASE (sem
, INSN_WRITE_TRAP
) : /* trap $uimm4 */
5894 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5895 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5896 #define FLD(f) abuf->fields.sfmt_trap.f
5897 #define OPRND(f) par_exec->operands.sfmt_trap.f
5898 int UNUSED written
= abuf
->written
;
5899 IADDR UNUSED pc
= abuf
->addr
;
5901 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5903 CPU (h_bbpsw
) = OPRND (h_bbpsw_UQI
);
5904 CPU (h_bpsw
) = OPRND (h_bpsw_UQI
);
5905 SET_H_CR (((UINT
) 14), OPRND (h_cr_USI_14
));
5906 SET_H_CR (((UINT
) 6), OPRND (h_cr_USI_6
));
5907 SET_H_PSW (OPRND (h_psw_UQI
));
5908 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, OPRND (pc
), vpc
);
5910 SEM_BRANCH_FINI (vpc
);
5916 CASE (sem
, INSN_PAR_UNLOCK
) : /* unlock $src1,@$src2 */
5918 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5919 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5920 #define FLD(f) abuf->fields.sfmt_st_plus.f
5921 #define OPRND(f) par_exec->operands.sfmt_unlock.f
5922 int UNUSED written
= 0;
5923 IADDR UNUSED pc
= abuf
->addr
;
5924 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5929 SI opval
= * FLD (i_src1
);
5930 OPRND (h_memory_SI_src2_idx
) = * FLD (i_src2
);
5931 OPRND (h_memory_SI_src2
) = opval
;
5932 written
|= (1 << 4);
5933 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5938 OPRND (h_lock_BI
) = opval
;
5939 TRACE_RESULT (current_cpu
, abuf
, "lock", 'x', opval
);
5943 abuf
->written
= written
;
5949 CASE (sem
, INSN_WRITE_UNLOCK
) : /* unlock $src1,@$src2 */
5951 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5952 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5953 #define FLD(f) abuf->fields.sfmt_st_plus.f
5954 #define OPRND(f) par_exec->operands.sfmt_unlock.f
5955 int UNUSED written
= abuf
->written
;
5956 IADDR UNUSED pc
= abuf
->addr
;
5957 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
5959 CPU (h_lock
) = OPRND (h_lock_BI
);
5960 if (written
& (1 << 4))
5962 SETMEMSI (current_cpu
, pc
, OPRND (h_memory_SI_src2_idx
), OPRND (h_memory_SI_src2
));
5970 CASE (sem
, INSN_PAR_PCMPBZ
) : /* pcmpbz $src2 */
5972 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5973 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5974 #define FLD(f) abuf->fields.sfmt_st_plus.f
5975 #define OPRND(f) par_exec->operands.sfmt_cmpz.f
5976 int UNUSED written
= 0;
5977 IADDR UNUSED pc
= abuf
->addr
;
5978 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5981 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);
5982 OPRND (condbit
) = opval
;
5983 TRACE_RESULT (current_cpu
, abuf
, "cond", 'x', opval
);
5991 CASE (sem
, INSN_WRITE_PCMPBZ
) : /* pcmpbz $src2 */
5993 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
5994 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
5995 #define FLD(f) abuf->fields.sfmt_st_plus.f
5996 #define OPRND(f) par_exec->operands.sfmt_cmpz.f
5997 int UNUSED written
= abuf
->written
;
5998 IADDR UNUSED pc
= abuf
->addr
;
5999 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6001 CPU (h_cond
) = OPRND (condbit
);
6008 CASE (sem
, INSN_PAR_SADD
) : /* sadd */
6010 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6011 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6012 #define FLD(f) abuf->fields.fmt_empty.f
6013 #define OPRND(f) par_exec->operands.sfmt_sadd.f
6014 int UNUSED written
= 0;
6015 IADDR UNUSED pc
= abuf
->addr
;
6016 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6019 DI opval
= ADDDI (SRADI (GET_H_ACCUMS (((UINT
) 1)), 16), GET_H_ACCUMS (((UINT
) 0)));
6020 OPRND (h_accums_DI_0
) = opval
;
6021 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
6029 CASE (sem
, INSN_WRITE_SADD
) : /* sadd */
6031 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6032 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6033 #define FLD(f) abuf->fields.fmt_empty.f
6034 #define OPRND(f) par_exec->operands.sfmt_sadd.f
6035 int UNUSED written
= abuf
->written
;
6036 IADDR UNUSED pc
= abuf
->addr
;
6037 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6039 SET_H_ACCUMS (((UINT
) 0), OPRND (h_accums_DI_0
));
6046 CASE (sem
, INSN_PAR_MACWU1
) : /* macwu1 $src1,$src2 */
6048 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6049 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6050 #define FLD(f) abuf->fields.sfmt_st_plus.f
6051 #define OPRND(f) par_exec->operands.sfmt_macwu1.f
6052 int UNUSED written
= 0;
6053 IADDR UNUSED pc
= abuf
->addr
;
6054 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6057 DI opval
= SRADI (SLLDI (ADDDI (GET_H_ACCUMS (((UINT
) 1)), MULDI (EXTSIDI (* FLD (i_src1
)), EXTSIDI (ANDSI (* FLD (i_src2
), 65535)))), 8), 8);
6058 OPRND (h_accums_DI_1
) = opval
;
6059 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
6067 CASE (sem
, INSN_WRITE_MACWU1
) : /* macwu1 $src1,$src2 */
6069 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6070 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6071 #define FLD(f) abuf->fields.sfmt_st_plus.f
6072 #define OPRND(f) par_exec->operands.sfmt_macwu1.f
6073 int UNUSED written
= abuf
->written
;
6074 IADDR UNUSED pc
= abuf
->addr
;
6075 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6077 SET_H_ACCUMS (((UINT
) 1), OPRND (h_accums_DI_1
));
6084 CASE (sem
, INSN_PAR_MSBLO
) : /* msblo $src1,$src2 */
6086 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6087 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6088 #define FLD(f) abuf->fields.sfmt_st_plus.f
6089 #define OPRND(f) par_exec->operands.sfmt_msblo.f
6090 int UNUSED written
= 0;
6091 IADDR UNUSED pc
= abuf
->addr
;
6092 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6095 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);
6096 OPRND (accum
) = opval
;
6097 TRACE_RESULT (current_cpu
, abuf
, "accum", 'D', opval
);
6105 CASE (sem
, INSN_WRITE_MSBLO
) : /* msblo $src1,$src2 */
6107 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6108 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6109 #define FLD(f) abuf->fields.sfmt_st_plus.f
6110 #define OPRND(f) par_exec->operands.sfmt_msblo.f
6111 int UNUSED written
= abuf
->written
;
6112 IADDR UNUSED pc
= abuf
->addr
;
6113 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6115 SET_H_ACCUM (OPRND (accum
));
6122 CASE (sem
, INSN_PAR_MULWU1
) : /* mulwu1 $src1,$src2 */
6124 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6125 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6126 #define FLD(f) abuf->fields.sfmt_st_plus.f
6127 #define OPRND(f) par_exec->operands.sfmt_mulwu1.f
6128 int UNUSED written
= 0;
6129 IADDR UNUSED pc
= abuf
->addr
;
6130 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6133 DI opval
= SRADI (SLLDI (MULDI (EXTSIDI (* FLD (i_src1
)), EXTSIDI (ANDSI (* FLD (i_src2
), 65535))), 16), 16);
6134 OPRND (h_accums_DI_1
) = opval
;
6135 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
6143 CASE (sem
, INSN_WRITE_MULWU1
) : /* mulwu1 $src1,$src2 */
6145 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6146 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6147 #define FLD(f) abuf->fields.sfmt_st_plus.f
6148 #define OPRND(f) par_exec->operands.sfmt_mulwu1.f
6149 int UNUSED written
= abuf
->written
;
6150 IADDR UNUSED pc
= abuf
->addr
;
6151 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6153 SET_H_ACCUMS (((UINT
) 1), OPRND (h_accums_DI_1
));
6160 CASE (sem
, INSN_PAR_MACLH1
) : /* maclh1 $src1,$src2 */
6162 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6163 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6164 #define FLD(f) abuf->fields.sfmt_st_plus.f
6165 #define OPRND(f) par_exec->operands.sfmt_macwu1.f
6166 int UNUSED written
= 0;
6167 IADDR UNUSED pc
= abuf
->addr
;
6168 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6171 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);
6172 OPRND (h_accums_DI_1
) = opval
;
6173 TRACE_RESULT (current_cpu
, abuf
, "accums", 'D', opval
);
6181 CASE (sem
, INSN_WRITE_MACLH1
) : /* maclh1 $src1,$src2 */
6183 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6184 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6185 #define FLD(f) abuf->fields.sfmt_st_plus.f
6186 #define OPRND(f) par_exec->operands.sfmt_macwu1.f
6187 int UNUSED written
= abuf
->written
;
6188 IADDR UNUSED pc
= abuf
->addr
;
6189 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6191 SET_H_ACCUMS (((UINT
) 1), OPRND (h_accums_DI_1
));
6198 CASE (sem
, INSN_PAR_SC
) : /* sc */
6200 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6201 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6202 #define FLD(f) abuf->fields.fmt_empty.f
6203 #define OPRND(f) par_exec->operands.sfmt_sc.f
6204 int UNUSED written
= 0;
6205 IADDR UNUSED pc
= abuf
->addr
;
6206 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6208 if (ZEXTBISI (CPU (h_cond
)))
6209 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
6216 CASE (sem
, INSN_WRITE_SC
) : /* sc */
6218 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6219 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6220 #define FLD(f) abuf->fields.fmt_empty.f
6221 #define OPRND(f) par_exec->operands.sfmt_sc.f
6222 int UNUSED written
= abuf
->written
;
6223 IADDR UNUSED pc
= abuf
->addr
;
6224 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6232 CASE (sem
, INSN_PAR_SNC
) : /* snc */
6234 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6235 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
6236 #define FLD(f) abuf->fields.fmt_empty.f
6237 #define OPRND(f) par_exec->operands.sfmt_sc.f
6238 int UNUSED written
= 0;
6239 IADDR UNUSED pc
= abuf
->addr
;
6240 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
6242 if (ZEXTBISI (NOTBI (CPU (h_cond
))))
6243 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
6250 CASE (sem
, INSN_WRITE_SNC
) : /* snc */
6252 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
6253 const ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
)->fields
.write
.abuf
;
6254 #define FLD(f) abuf->fields.fmt_empty.f
6255 #define OPRND(f) par_exec->operands.sfmt_sc.f
6256 int UNUSED written
= abuf
->written
;
6257 IADDR UNUSED pc
= abuf
->addr
;
6258 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
6268 ENDSWITCH (sem
) /* End of semantic switch. */
6270 /* At this point `vpc' contains the next insn to execute. */
6273 #undef DEFINE_SWITCH
6274 #endif /* DEFINE_SWITCH */