Commit | Line | Data |
---|---|---|
c906108c SS |
1 | /* Simulator instruction decoder for fr30bf. |
2 | ||
3 | THIS FILE IS MACHINE GENERATED WITH CGEN. | |
4 | ||
52fa932e | 5 | Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. |
c906108c SS |
6 | |
7 | This file is part of the GNU Simulators. | |
8 | ||
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) | |
12 | any later version. | |
13 | ||
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. | |
18 | ||
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. | |
22 | ||
23 | */ | |
24 | ||
25 | #define WANT_CPU fr30bf | |
26 | #define WANT_CPU_FR30BF | |
27 | ||
28 | #include "sim-main.h" | |
29 | #include "sim-assert.h" | |
30 | ||
c906108c SS |
31 | /* The instruction descriptor array. |
32 | This is computed at runtime. Space for it is not malloc'd to save a | |
33 | teensy bit of cpu in the decoder. Moving it to malloc space is trivial | |
34 | but won't be done until necessary (we don't currently support the runtime | |
35 | addition of instructions nor an SMP machine with different cpus). */ | |
36 | static IDESC fr30bf_insn_data[FR30BF_INSN_MAX]; | |
37 | ||
c906108c SS |
38 | /* Commas between elements are contained in the macros. |
39 | Some of these are conditionally compiled out. */ | |
40 | ||
41 | static const struct insn_sem fr30bf_insn_sem[] = | |
42 | { | |
96baa820 JM |
43 | { VIRTUAL_INSN_X_INVALID, FR30BF_INSN_X_INVALID, FR30BF_SFMT_EMPTY }, |
44 | { VIRTUAL_INSN_X_AFTER, FR30BF_INSN_X_AFTER, FR30BF_SFMT_EMPTY }, | |
45 | { VIRTUAL_INSN_X_BEFORE, FR30BF_INSN_X_BEFORE, FR30BF_SFMT_EMPTY }, | |
46 | { VIRTUAL_INSN_X_CTI_CHAIN, FR30BF_INSN_X_CTI_CHAIN, FR30BF_SFMT_EMPTY }, | |
47 | { VIRTUAL_INSN_X_CHAIN, FR30BF_INSN_X_CHAIN, FR30BF_SFMT_EMPTY }, | |
48 | { VIRTUAL_INSN_X_BEGIN, FR30BF_INSN_X_BEGIN, FR30BF_SFMT_EMPTY }, | |
49 | { FR30_INSN_ADD, FR30BF_INSN_ADD, FR30BF_SFMT_ADD }, | |
50 | { FR30_INSN_ADDI, FR30BF_INSN_ADDI, FR30BF_SFMT_ADDI }, | |
51 | { FR30_INSN_ADD2, FR30BF_INSN_ADD2, FR30BF_SFMT_ADD2 }, | |
52 | { FR30_INSN_ADDC, FR30BF_INSN_ADDC, FR30BF_SFMT_ADDC }, | |
53 | { FR30_INSN_ADDN, FR30BF_INSN_ADDN, FR30BF_SFMT_ADDN }, | |
54 | { FR30_INSN_ADDNI, FR30BF_INSN_ADDNI, FR30BF_SFMT_ADDNI }, | |
55 | { FR30_INSN_ADDN2, FR30BF_INSN_ADDN2, FR30BF_SFMT_ADDN2 }, | |
56 | { FR30_INSN_SUB, FR30BF_INSN_SUB, FR30BF_SFMT_ADD }, | |
57 | { FR30_INSN_SUBC, FR30BF_INSN_SUBC, FR30BF_SFMT_ADDC }, | |
58 | { FR30_INSN_SUBN, FR30BF_INSN_SUBN, FR30BF_SFMT_ADDN }, | |
59 | { FR30_INSN_CMP, FR30BF_INSN_CMP, FR30BF_SFMT_CMP }, | |
60 | { FR30_INSN_CMPI, FR30BF_INSN_CMPI, FR30BF_SFMT_CMPI }, | |
61 | { FR30_INSN_CMP2, FR30BF_INSN_CMP2, FR30BF_SFMT_CMP2 }, | |
62 | { FR30_INSN_AND, FR30BF_INSN_AND, FR30BF_SFMT_AND }, | |
63 | { FR30_INSN_OR, FR30BF_INSN_OR, FR30BF_SFMT_AND }, | |
64 | { FR30_INSN_EOR, FR30BF_INSN_EOR, FR30BF_SFMT_AND }, | |
65 | { FR30_INSN_ANDM, FR30BF_INSN_ANDM, FR30BF_SFMT_ANDM }, | |
66 | { FR30_INSN_ANDH, FR30BF_INSN_ANDH, FR30BF_SFMT_ANDH }, | |
67 | { FR30_INSN_ANDB, FR30BF_INSN_ANDB, FR30BF_SFMT_ANDB }, | |
68 | { FR30_INSN_ORM, FR30BF_INSN_ORM, FR30BF_SFMT_ANDM }, | |
69 | { FR30_INSN_ORH, FR30BF_INSN_ORH, FR30BF_SFMT_ANDH }, | |
70 | { FR30_INSN_ORB, FR30BF_INSN_ORB, FR30BF_SFMT_ANDB }, | |
71 | { FR30_INSN_EORM, FR30BF_INSN_EORM, FR30BF_SFMT_ANDM }, | |
72 | { FR30_INSN_EORH, FR30BF_INSN_EORH, FR30BF_SFMT_ANDH }, | |
73 | { FR30_INSN_EORB, FR30BF_INSN_EORB, FR30BF_SFMT_ANDB }, | |
74 | { FR30_INSN_BANDL, FR30BF_INSN_BANDL, FR30BF_SFMT_BANDL }, | |
75 | { FR30_INSN_BORL, FR30BF_INSN_BORL, FR30BF_SFMT_BANDL }, | |
76 | { FR30_INSN_BEORL, FR30BF_INSN_BEORL, FR30BF_SFMT_BANDL }, | |
77 | { FR30_INSN_BANDH, FR30BF_INSN_BANDH, FR30BF_SFMT_BANDL }, | |
78 | { FR30_INSN_BORH, FR30BF_INSN_BORH, FR30BF_SFMT_BANDL }, | |
79 | { FR30_INSN_BEORH, FR30BF_INSN_BEORH, FR30BF_SFMT_BANDL }, | |
80 | { FR30_INSN_BTSTL, FR30BF_INSN_BTSTL, FR30BF_SFMT_BTSTL }, | |
81 | { FR30_INSN_BTSTH, FR30BF_INSN_BTSTH, FR30BF_SFMT_BTSTL }, | |
82 | { FR30_INSN_MUL, FR30BF_INSN_MUL, FR30BF_SFMT_MUL }, | |
83 | { FR30_INSN_MULU, FR30BF_INSN_MULU, FR30BF_SFMT_MULU }, | |
84 | { FR30_INSN_MULH, FR30BF_INSN_MULH, FR30BF_SFMT_MULH }, | |
85 | { FR30_INSN_MULUH, FR30BF_INSN_MULUH, FR30BF_SFMT_MULH }, | |
86 | { FR30_INSN_DIV0S, FR30BF_INSN_DIV0S, FR30BF_SFMT_DIV0S }, | |
87 | { FR30_INSN_DIV0U, FR30BF_INSN_DIV0U, FR30BF_SFMT_DIV0U }, | |
88 | { FR30_INSN_DIV1, FR30BF_INSN_DIV1, FR30BF_SFMT_DIV1 }, | |
89 | { FR30_INSN_DIV2, FR30BF_INSN_DIV2, FR30BF_SFMT_DIV2 }, | |
90 | { FR30_INSN_DIV3, FR30BF_INSN_DIV3, FR30BF_SFMT_DIV3 }, | |
91 | { FR30_INSN_DIV4S, FR30BF_INSN_DIV4S, FR30BF_SFMT_DIV4S }, | |
92 | { FR30_INSN_LSL, FR30BF_INSN_LSL, FR30BF_SFMT_LSL }, | |
93 | { FR30_INSN_LSLI, FR30BF_INSN_LSLI, FR30BF_SFMT_LSLI }, | |
94 | { FR30_INSN_LSL2, FR30BF_INSN_LSL2, FR30BF_SFMT_LSLI }, | |
95 | { FR30_INSN_LSR, FR30BF_INSN_LSR, FR30BF_SFMT_LSL }, | |
96 | { FR30_INSN_LSRI, FR30BF_INSN_LSRI, FR30BF_SFMT_LSLI }, | |
97 | { FR30_INSN_LSR2, FR30BF_INSN_LSR2, FR30BF_SFMT_LSLI }, | |
98 | { FR30_INSN_ASR, FR30BF_INSN_ASR, FR30BF_SFMT_LSL }, | |
99 | { FR30_INSN_ASRI, FR30BF_INSN_ASRI, FR30BF_SFMT_LSLI }, | |
100 | { FR30_INSN_ASR2, FR30BF_INSN_ASR2, FR30BF_SFMT_LSLI }, | |
101 | { FR30_INSN_LDI8, FR30BF_INSN_LDI8, FR30BF_SFMT_LDI8 }, | |
102 | { FR30_INSN_LDI20, FR30BF_INSN_LDI20, FR30BF_SFMT_LDI20 }, | |
103 | { FR30_INSN_LDI32, FR30BF_INSN_LDI32, FR30BF_SFMT_LDI32 }, | |
104 | { FR30_INSN_LD, FR30BF_INSN_LD, FR30BF_SFMT_LD }, | |
105 | { FR30_INSN_LDUH, FR30BF_INSN_LDUH, FR30BF_SFMT_LD }, | |
106 | { FR30_INSN_LDUB, FR30BF_INSN_LDUB, FR30BF_SFMT_LD }, | |
107 | { FR30_INSN_LDR13, FR30BF_INSN_LDR13, FR30BF_SFMT_LDR13 }, | |
108 | { FR30_INSN_LDR13UH, FR30BF_INSN_LDR13UH, FR30BF_SFMT_LDR13 }, | |
109 | { FR30_INSN_LDR13UB, FR30BF_INSN_LDR13UB, FR30BF_SFMT_LDR13 }, | |
110 | { FR30_INSN_LDR14, FR30BF_INSN_LDR14, FR30BF_SFMT_LDR14 }, | |
111 | { FR30_INSN_LDR14UH, FR30BF_INSN_LDR14UH, FR30BF_SFMT_LDR14UH }, | |
112 | { FR30_INSN_LDR14UB, FR30BF_INSN_LDR14UB, FR30BF_SFMT_LDR14UB }, | |
113 | { FR30_INSN_LDR15, FR30BF_INSN_LDR15, FR30BF_SFMT_LDR15 }, | |
114 | { FR30_INSN_LDR15GR, FR30BF_INSN_LDR15GR, FR30BF_SFMT_LDR15GR }, | |
115 | { FR30_INSN_LDR15DR, FR30BF_INSN_LDR15DR, FR30BF_SFMT_LDR15DR }, | |
116 | { FR30_INSN_LDR15PS, FR30BF_INSN_LDR15PS, FR30BF_SFMT_LDR15PS }, | |
117 | { FR30_INSN_ST, FR30BF_INSN_ST, FR30BF_SFMT_ST }, | |
118 | { FR30_INSN_STH, FR30BF_INSN_STH, FR30BF_SFMT_ST }, | |
119 | { FR30_INSN_STB, FR30BF_INSN_STB, FR30BF_SFMT_ST }, | |
120 | { FR30_INSN_STR13, FR30BF_INSN_STR13, FR30BF_SFMT_STR13 }, | |
121 | { FR30_INSN_STR13H, FR30BF_INSN_STR13H, FR30BF_SFMT_STR13 }, | |
122 | { FR30_INSN_STR13B, FR30BF_INSN_STR13B, FR30BF_SFMT_STR13 }, | |
123 | { FR30_INSN_STR14, FR30BF_INSN_STR14, FR30BF_SFMT_STR14 }, | |
124 | { FR30_INSN_STR14H, FR30BF_INSN_STR14H, FR30BF_SFMT_STR14H }, | |
125 | { FR30_INSN_STR14B, FR30BF_INSN_STR14B, FR30BF_SFMT_STR14B }, | |
126 | { FR30_INSN_STR15, FR30BF_INSN_STR15, FR30BF_SFMT_STR15 }, | |
127 | { FR30_INSN_STR15GR, FR30BF_INSN_STR15GR, FR30BF_SFMT_STR15GR }, | |
128 | { FR30_INSN_STR15DR, FR30BF_INSN_STR15DR, FR30BF_SFMT_STR15DR }, | |
129 | { FR30_INSN_STR15PS, FR30BF_INSN_STR15PS, FR30BF_SFMT_STR15PS }, | |
130 | { FR30_INSN_MOV, FR30BF_INSN_MOV, FR30BF_SFMT_MOV }, | |
131 | { FR30_INSN_MOVDR, FR30BF_INSN_MOVDR, FR30BF_SFMT_MOVDR }, | |
132 | { FR30_INSN_MOVPS, FR30BF_INSN_MOVPS, FR30BF_SFMT_MOVPS }, | |
133 | { FR30_INSN_MOV2DR, FR30BF_INSN_MOV2DR, FR30BF_SFMT_MOV2DR }, | |
134 | { FR30_INSN_MOV2PS, FR30BF_INSN_MOV2PS, FR30BF_SFMT_MOV2PS }, | |
135 | { FR30_INSN_JMP, FR30BF_INSN_JMP, FR30BF_SFMT_JMP }, | |
136 | { FR30_INSN_JMPD, FR30BF_INSN_JMPD, FR30BF_SFMT_JMP }, | |
137 | { FR30_INSN_CALLR, FR30BF_INSN_CALLR, FR30BF_SFMT_CALLR }, | |
138 | { FR30_INSN_CALLRD, FR30BF_INSN_CALLRD, FR30BF_SFMT_CALLR }, | |
139 | { FR30_INSN_CALL, FR30BF_INSN_CALL, FR30BF_SFMT_CALL }, | |
140 | { FR30_INSN_CALLD, FR30BF_INSN_CALLD, FR30BF_SFMT_CALL }, | |
141 | { FR30_INSN_RET, FR30BF_INSN_RET, FR30BF_SFMT_RET }, | |
142 | { FR30_INSN_RET_D, FR30BF_INSN_RET_D, FR30BF_SFMT_RET }, | |
143 | { FR30_INSN_INT, FR30BF_INSN_INT, FR30BF_SFMT_INT }, | |
144 | { FR30_INSN_INTE, FR30BF_INSN_INTE, FR30BF_SFMT_INTE }, | |
145 | { FR30_INSN_RETI, FR30BF_INSN_RETI, FR30BF_SFMT_RETI }, | |
146 | { FR30_INSN_BRAD, FR30BF_INSN_BRAD, FR30BF_SFMT_BRAD }, | |
147 | { FR30_INSN_BRA, FR30BF_INSN_BRA, FR30BF_SFMT_BRAD }, | |
148 | { FR30_INSN_BNOD, FR30BF_INSN_BNOD, FR30BF_SFMT_BNOD }, | |
149 | { FR30_INSN_BNO, FR30BF_INSN_BNO, FR30BF_SFMT_BNOD }, | |
150 | { FR30_INSN_BEQD, FR30BF_INSN_BEQD, FR30BF_SFMT_BEQD }, | |
151 | { FR30_INSN_BEQ, FR30BF_INSN_BEQ, FR30BF_SFMT_BEQD }, | |
152 | { FR30_INSN_BNED, FR30BF_INSN_BNED, FR30BF_SFMT_BEQD }, | |
153 | { FR30_INSN_BNE, FR30BF_INSN_BNE, FR30BF_SFMT_BEQD }, | |
154 | { FR30_INSN_BCD, FR30BF_INSN_BCD, FR30BF_SFMT_BCD }, | |
155 | { FR30_INSN_BC, FR30BF_INSN_BC, FR30BF_SFMT_BCD }, | |
156 | { FR30_INSN_BNCD, FR30BF_INSN_BNCD, FR30BF_SFMT_BCD }, | |
157 | { FR30_INSN_BNC, FR30BF_INSN_BNC, FR30BF_SFMT_BCD }, | |
158 | { FR30_INSN_BND, FR30BF_INSN_BND, FR30BF_SFMT_BND }, | |
159 | { FR30_INSN_BN, FR30BF_INSN_BN, FR30BF_SFMT_BND }, | |
160 | { FR30_INSN_BPD, FR30BF_INSN_BPD, FR30BF_SFMT_BND }, | |
161 | { FR30_INSN_BP, FR30BF_INSN_BP, FR30BF_SFMT_BND }, | |
162 | { FR30_INSN_BVD, FR30BF_INSN_BVD, FR30BF_SFMT_BVD }, | |
163 | { FR30_INSN_BV, FR30BF_INSN_BV, FR30BF_SFMT_BVD }, | |
164 | { FR30_INSN_BNVD, FR30BF_INSN_BNVD, FR30BF_SFMT_BVD }, | |
165 | { FR30_INSN_BNV, FR30BF_INSN_BNV, FR30BF_SFMT_BVD }, | |
166 | { FR30_INSN_BLTD, FR30BF_INSN_BLTD, FR30BF_SFMT_BLTD }, | |
167 | { FR30_INSN_BLT, FR30BF_INSN_BLT, FR30BF_SFMT_BLTD }, | |
168 | { FR30_INSN_BGED, FR30BF_INSN_BGED, FR30BF_SFMT_BLTD }, | |
169 | { FR30_INSN_BGE, FR30BF_INSN_BGE, FR30BF_SFMT_BLTD }, | |
170 | { FR30_INSN_BLED, FR30BF_INSN_BLED, FR30BF_SFMT_BLED }, | |
171 | { FR30_INSN_BLE, FR30BF_INSN_BLE, FR30BF_SFMT_BLED }, | |
172 | { FR30_INSN_BGTD, FR30BF_INSN_BGTD, FR30BF_SFMT_BLED }, | |
173 | { FR30_INSN_BGT, FR30BF_INSN_BGT, FR30BF_SFMT_BLED }, | |
174 | { FR30_INSN_BLSD, FR30BF_INSN_BLSD, FR30BF_SFMT_BLSD }, | |
175 | { FR30_INSN_BLS, FR30BF_INSN_BLS, FR30BF_SFMT_BLSD }, | |
176 | { FR30_INSN_BHID, FR30BF_INSN_BHID, FR30BF_SFMT_BLSD }, | |
177 | { FR30_INSN_BHI, FR30BF_INSN_BHI, FR30BF_SFMT_BLSD }, | |
178 | { FR30_INSN_DMOVR13, FR30BF_INSN_DMOVR13, FR30BF_SFMT_DMOVR13 }, | |
179 | { FR30_INSN_DMOVR13H, FR30BF_INSN_DMOVR13H, FR30BF_SFMT_DMOVR13H }, | |
180 | { FR30_INSN_DMOVR13B, FR30BF_INSN_DMOVR13B, FR30BF_SFMT_DMOVR13B }, | |
181 | { FR30_INSN_DMOVR13PI, FR30BF_INSN_DMOVR13PI, FR30BF_SFMT_DMOVR13PI }, | |
182 | { FR30_INSN_DMOVR13PIH, FR30BF_INSN_DMOVR13PIH, FR30BF_SFMT_DMOVR13PIH }, | |
183 | { FR30_INSN_DMOVR13PIB, FR30BF_INSN_DMOVR13PIB, FR30BF_SFMT_DMOVR13PIB }, | |
184 | { FR30_INSN_DMOVR15PI, FR30BF_INSN_DMOVR15PI, FR30BF_SFMT_DMOVR15PI }, | |
185 | { FR30_INSN_DMOV2R13, FR30BF_INSN_DMOV2R13, FR30BF_SFMT_DMOV2R13 }, | |
186 | { FR30_INSN_DMOV2R13H, FR30BF_INSN_DMOV2R13H, FR30BF_SFMT_DMOV2R13H }, | |
187 | { FR30_INSN_DMOV2R13B, FR30BF_INSN_DMOV2R13B, FR30BF_SFMT_DMOV2R13B }, | |
188 | { FR30_INSN_DMOV2R13PI, FR30BF_INSN_DMOV2R13PI, FR30BF_SFMT_DMOV2R13PI }, | |
189 | { FR30_INSN_DMOV2R13PIH, FR30BF_INSN_DMOV2R13PIH, FR30BF_SFMT_DMOV2R13PIH }, | |
190 | { FR30_INSN_DMOV2R13PIB, FR30BF_INSN_DMOV2R13PIB, FR30BF_SFMT_DMOV2R13PIB }, | |
191 | { FR30_INSN_DMOV2R15PD, FR30BF_INSN_DMOV2R15PD, FR30BF_SFMT_DMOV2R15PD }, | |
192 | { FR30_INSN_LDRES, FR30BF_INSN_LDRES, FR30BF_SFMT_LDRES }, | |
193 | { FR30_INSN_STRES, FR30BF_INSN_STRES, FR30BF_SFMT_LDRES }, | |
194 | { FR30_INSN_COPOP, FR30BF_INSN_COPOP, FR30BF_SFMT_COPOP }, | |
195 | { FR30_INSN_COPLD, FR30BF_INSN_COPLD, FR30BF_SFMT_COPOP }, | |
196 | { FR30_INSN_COPST, FR30BF_INSN_COPST, FR30BF_SFMT_COPOP }, | |
197 | { FR30_INSN_COPSV, FR30BF_INSN_COPSV, FR30BF_SFMT_COPOP }, | |
198 | { FR30_INSN_NOP, FR30BF_INSN_NOP, FR30BF_SFMT_BNOD }, | |
199 | { FR30_INSN_ANDCCR, FR30BF_INSN_ANDCCR, FR30BF_SFMT_ANDCCR }, | |
200 | { FR30_INSN_ORCCR, FR30BF_INSN_ORCCR, FR30BF_SFMT_ANDCCR }, | |
201 | { FR30_INSN_STILM, FR30BF_INSN_STILM, FR30BF_SFMT_STILM }, | |
202 | { FR30_INSN_ADDSP, FR30BF_INSN_ADDSP, FR30BF_SFMT_ADDSP }, | |
203 | { FR30_INSN_EXTSB, FR30BF_INSN_EXTSB, FR30BF_SFMT_EXTSB }, | |
204 | { FR30_INSN_EXTUB, FR30BF_INSN_EXTUB, FR30BF_SFMT_EXTUB }, | |
205 | { FR30_INSN_EXTSH, FR30BF_INSN_EXTSH, FR30BF_SFMT_EXTSH }, | |
206 | { FR30_INSN_EXTUH, FR30BF_INSN_EXTUH, FR30BF_SFMT_EXTUH }, | |
207 | { FR30_INSN_LDM0, FR30BF_INSN_LDM0, FR30BF_SFMT_LDM0 }, | |
208 | { FR30_INSN_LDM1, FR30BF_INSN_LDM1, FR30BF_SFMT_LDM1 }, | |
209 | { FR30_INSN_STM0, FR30BF_INSN_STM0, FR30BF_SFMT_STM0 }, | |
210 | { FR30_INSN_STM1, FR30BF_INSN_STM1, FR30BF_SFMT_STM1 }, | |
211 | { FR30_INSN_ENTER, FR30BF_INSN_ENTER, FR30BF_SFMT_ENTER }, | |
212 | { FR30_INSN_LEAVE, FR30BF_INSN_LEAVE, FR30BF_SFMT_LEAVE }, | |
213 | { FR30_INSN_XCHB, FR30BF_INSN_XCHB, FR30BF_SFMT_XCHB }, | |
c906108c SS |
214 | }; |
215 | ||
96baa820 JM |
216 | static const struct insn_sem fr30bf_insn_sem_invalid = { |
217 | VIRTUAL_INSN_X_INVALID, FR30BF_INSN_X_INVALID, FR30BF_SFMT_EMPTY | |
c906108c SS |
218 | }; |
219 | ||
c906108c SS |
220 | /* Initialize an IDESC from the compile-time computable parts. */ |
221 | ||
222 | static INLINE void | |
223 | init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t) | |
224 | { | |
225 | const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries; | |
226 | ||
227 | id->num = t->index; | |
96baa820 | 228 | id->sfmt = t->sfmt; |
c906108c SS |
229 | if ((int) t->type <= 0) |
230 | id->idata = & cgen_virtual_insn_table[- (int) t->type]; | |
231 | else | |
232 | id->idata = & insn_table[t->type]; | |
233 | id->attrs = CGEN_INSN_ATTRS (id->idata); | |
234 | /* Oh my god, a magic number. */ | |
235 | id->length = CGEN_INSN_BITSIZE (id->idata) / 8; | |
96baa820 | 236 | |
c906108c SS |
237 | #if WITH_PROFILE_MODEL_P |
238 | id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index]; | |
239 | { | |
240 | SIM_DESC sd = CPU_STATE (cpu); | |
241 | SIM_ASSERT (t->index == id->timing->num); | |
242 | } | |
243 | #endif | |
96baa820 JM |
244 | |
245 | /* Semantic pointers are initialized elsewhere. */ | |
c906108c SS |
246 | } |
247 | ||
248 | /* Initialize the instruction descriptor table. */ | |
249 | ||
250 | void | |
251 | fr30bf_init_idesc_table (SIM_CPU *cpu) | |
252 | { | |
253 | IDESC *id,*tabend; | |
254 | const struct insn_sem *t,*tend; | |
255 | int tabsize = FR30BF_INSN_MAX; | |
256 | IDESC *table = fr30bf_insn_data; | |
257 | ||
258 | memset (table, 0, tabsize * sizeof (IDESC)); | |
259 | ||
260 | /* First set all entries to the `invalid insn'. */ | |
261 | t = & fr30bf_insn_sem_invalid; | |
262 | for (id = table, tabend = table + tabsize; id < tabend; ++id) | |
263 | init_idesc (cpu, id, t); | |
264 | ||
265 | /* Now fill in the values for the chosen cpu. */ | |
266 | for (t = fr30bf_insn_sem, tend = t + sizeof (fr30bf_insn_sem) / sizeof (*t); | |
267 | t != tend; ++t) | |
268 | { | |
269 | init_idesc (cpu, & table[t->index], t); | |
270 | } | |
271 | ||
272 | /* Link the IDESC table into the cpu. */ | |
273 | CPU_IDESC (cpu) = table; | |
274 | } | |
275 | ||
c906108c SS |
276 | /* Given an instruction, return a pointer to its IDESC entry. */ |
277 | ||
278 | const IDESC * | |
279 | fr30bf_decode (SIM_CPU *current_cpu, IADDR pc, | |
280 | CGEN_INSN_INT base_insn, | |
281 | ARGBUF *abuf) | |
282 | { | |
7a292a7a SS |
283 | /* Result of decoder. */ |
284 | FR30BF_INSN_TYPE itype; | |
52fa932e | 285 | CGEN_INSN_INT insn = base_insn; |
c906108c SS |
286 | |
287 | { | |
7a292a7a SS |
288 | |
289 | { | |
290 | unsigned int val = (((insn >> 8) & (255 << 0))); | |
291 | switch (val) | |
292 | { | |
52fa932e | 293 | case 0 : itype = FR30BF_INSN_LDR13; goto extract_sfmt_ldr13; case 1 : itype = FR30BF_INSN_LDR13UH; goto extract_sfmt_ldr13; case 2 : itype = FR30BF_INSN_LDR13UB; goto extract_sfmt_ldr13; case 3 : itype = FR30BF_INSN_LDR15; goto extract_sfmt_ldr15; case 4 : itype = FR30BF_INSN_LD; goto extract_sfmt_ld; case 5 : itype = FR30BF_INSN_LDUH; goto extract_sfmt_ld; case 6 : itype = FR30BF_INSN_LDUB; goto extract_sfmt_ld; case 7 : |
c906108c | 294 | { |
52fa932e | 295 | unsigned int val = (((insn >> 6) & (1 << 1)) | ((insn >> 4) & (1 << 0))); |
7a292a7a | 296 | switch (val) |
c906108c | 297 | { |
52fa932e | 298 | case 0 : itype = FR30BF_INSN_LDR15GR; goto extract_sfmt_ldr15gr; case 1 : itype = FR30BF_INSN_MOV2PS; goto extract_sfmt_mov2ps; case 2 : itype = FR30BF_INSN_LDR15DR; goto extract_sfmt_ldr15dr; case 3 : itype = FR30BF_INSN_LDR15PS; goto extract_sfmt_ldr15ps; default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty; |
c906108c | 299 | } |
7a292a7a | 300 | } |
52fa932e | 301 | case 8 : itype = FR30BF_INSN_DMOV2R13; goto extract_sfmt_dmov2r13; case 9 : itype = FR30BF_INSN_DMOV2R13H; goto extract_sfmt_dmov2r13h; case 10 : itype = FR30BF_INSN_DMOV2R13B; goto extract_sfmt_dmov2r13b; case 11 : itype = FR30BF_INSN_DMOV2R15PD; goto extract_sfmt_dmov2r15pd; case 12 : itype = FR30BF_INSN_DMOV2R13PI; goto extract_sfmt_dmov2r13pi; case 13 : itype = FR30BF_INSN_DMOV2R13PIH; goto extract_sfmt_dmov2r13pih; case 14 : itype = FR30BF_INSN_DMOV2R13PIB; goto extract_sfmt_dmov2r13pib; case 15 : itype = FR30BF_INSN_ENTER; goto extract_sfmt_enter; case 16 : itype = FR30BF_INSN_STR13; goto extract_sfmt_str13; case 17 : itype = FR30BF_INSN_STR13H; goto extract_sfmt_str13; case 18 : itype = FR30BF_INSN_STR13B; goto extract_sfmt_str13; case 19 : itype = FR30BF_INSN_STR15; goto extract_sfmt_str15; case 20 : itype = FR30BF_INSN_ST; goto extract_sfmt_st; case 21 : itype = FR30BF_INSN_STH; goto extract_sfmt_st; case 22 : itype = FR30BF_INSN_STB; goto extract_sfmt_st; case 23 : |
7a292a7a | 302 | { |
52fa932e | 303 | unsigned int val = (((insn >> 6) & (1 << 1)) | ((insn >> 4) & (1 << 0))); |
7a292a7a | 304 | switch (val) |
c906108c | 305 | { |
52fa932e | 306 | case 0 : itype = FR30BF_INSN_STR15GR; goto extract_sfmt_str15gr; case 1 : itype = FR30BF_INSN_MOVPS; goto extract_sfmt_movps; case 2 : itype = FR30BF_INSN_STR15DR; goto extract_sfmt_str15dr; case 3 : itype = FR30BF_INSN_STR15PS; goto extract_sfmt_str15ps; default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty; |
c906108c | 307 | } |
7a292a7a | 308 | } |
52fa932e | 309 | case 24 : itype = FR30BF_INSN_DMOVR13; goto extract_sfmt_dmovr13; case 25 : itype = FR30BF_INSN_DMOVR13H; goto extract_sfmt_dmovr13h; case 26 : itype = FR30BF_INSN_DMOVR13B; goto extract_sfmt_dmovr13b; case 27 : itype = FR30BF_INSN_DMOVR15PI; goto extract_sfmt_dmovr15pi; case 28 : itype = FR30BF_INSN_DMOVR13PI; goto extract_sfmt_dmovr13pi; case 29 : itype = FR30BF_INSN_DMOVR13PIH; goto extract_sfmt_dmovr13pih; case 30 : itype = FR30BF_INSN_DMOVR13PIB; goto extract_sfmt_dmovr13pib; case 31 : itype = FR30BF_INSN_INT; goto extract_sfmt_int; case 32 : /* fall through */ |
7a292a7a SS |
310 | case 33 : /* fall through */ |
311 | case 34 : /* fall through */ | |
312 | case 35 : /* fall through */ | |
313 | case 36 : /* fall through */ | |
314 | case 37 : /* fall through */ | |
315 | case 38 : /* fall through */ | |
316 | case 39 : /* fall through */ | |
317 | case 40 : /* fall through */ | |
318 | case 41 : /* fall through */ | |
319 | case 42 : /* fall through */ | |
320 | case 43 : /* fall through */ | |
321 | case 44 : /* fall through */ | |
322 | case 45 : /* fall through */ | |
323 | case 46 : /* fall through */ | |
52fa932e | 324 | case 47 : itype = FR30BF_INSN_LDR14; goto extract_sfmt_ldr14; case 48 : /* fall through */ |
7a292a7a SS |
325 | case 49 : /* fall through */ |
326 | case 50 : /* fall through */ | |
327 | case 51 : /* fall through */ | |
328 | case 52 : /* fall through */ | |
329 | case 53 : /* fall through */ | |
330 | case 54 : /* fall through */ | |
331 | case 55 : /* fall through */ | |
332 | case 56 : /* fall through */ | |
333 | case 57 : /* fall through */ | |
334 | case 58 : /* fall through */ | |
335 | case 59 : /* fall through */ | |
336 | case 60 : /* fall through */ | |
337 | case 61 : /* fall through */ | |
338 | case 62 : /* fall through */ | |
52fa932e | 339 | case 63 : itype = FR30BF_INSN_STR14; goto extract_sfmt_str14; case 64 : /* fall through */ |
7a292a7a SS |
340 | case 65 : /* fall through */ |
341 | case 66 : /* fall through */ | |
342 | case 67 : /* fall through */ | |
343 | case 68 : /* fall through */ | |
344 | case 69 : /* fall through */ | |
345 | case 70 : /* fall through */ | |
346 | case 71 : /* fall through */ | |
347 | case 72 : /* fall through */ | |
348 | case 73 : /* fall through */ | |
349 | case 74 : /* fall through */ | |
350 | case 75 : /* fall through */ | |
351 | case 76 : /* fall through */ | |
352 | case 77 : /* fall through */ | |
353 | case 78 : /* fall through */ | |
52fa932e | 354 | case 79 : itype = FR30BF_INSN_LDR14UH; goto extract_sfmt_ldr14uh; case 80 : /* fall through */ |
7a292a7a SS |
355 | case 81 : /* fall through */ |
356 | case 82 : /* fall through */ | |
357 | case 83 : /* fall through */ | |
358 | case 84 : /* fall through */ | |
359 | case 85 : /* fall through */ | |
360 | case 86 : /* fall through */ | |
361 | case 87 : /* fall through */ | |
362 | case 88 : /* fall through */ | |
363 | case 89 : /* fall through */ | |
364 | case 90 : /* fall through */ | |
365 | case 91 : /* fall through */ | |
366 | case 92 : /* fall through */ | |
367 | case 93 : /* fall through */ | |
368 | case 94 : /* fall through */ | |
52fa932e | 369 | case 95 : itype = FR30BF_INSN_STR14H; goto extract_sfmt_str14h; case 96 : /* fall through */ |
7a292a7a SS |
370 | case 97 : /* fall through */ |
371 | case 98 : /* fall through */ | |
372 | case 99 : /* fall through */ | |
373 | case 100 : /* fall through */ | |
374 | case 101 : /* fall through */ | |
375 | case 102 : /* fall through */ | |
376 | case 103 : /* fall through */ | |
377 | case 104 : /* fall through */ | |
378 | case 105 : /* fall through */ | |
379 | case 106 : /* fall through */ | |
380 | case 107 : /* fall through */ | |
381 | case 108 : /* fall through */ | |
382 | case 109 : /* fall through */ | |
383 | case 110 : /* fall through */ | |
52fa932e | 384 | case 111 : itype = FR30BF_INSN_LDR14UB; goto extract_sfmt_ldr14ub; case 112 : /* fall through */ |
7a292a7a SS |
385 | case 113 : /* fall through */ |
386 | case 114 : /* fall through */ | |
387 | case 115 : /* fall through */ | |
388 | case 116 : /* fall through */ | |
389 | case 117 : /* fall through */ | |
390 | case 118 : /* fall through */ | |
391 | case 119 : /* fall through */ | |
392 | case 120 : /* fall through */ | |
393 | case 121 : /* fall through */ | |
394 | case 122 : /* fall through */ | |
395 | case 123 : /* fall through */ | |
396 | case 124 : /* fall through */ | |
397 | case 125 : /* fall through */ | |
398 | case 126 : /* fall through */ | |
52fa932e | 399 | case 127 : itype = FR30BF_INSN_STR14B; goto extract_sfmt_str14b; case 128 : itype = FR30BF_INSN_BANDL; goto extract_sfmt_bandl; case 129 : itype = FR30BF_INSN_BANDH; goto extract_sfmt_bandl; case 130 : itype = FR30BF_INSN_AND; goto extract_sfmt_and; case 131 : itype = FR30BF_INSN_ANDCCR; goto extract_sfmt_andccr; case 132 : itype = FR30BF_INSN_ANDM; goto extract_sfmt_andm; case 133 : itype = FR30BF_INSN_ANDH; goto extract_sfmt_andh; case 134 : itype = FR30BF_INSN_ANDB; goto extract_sfmt_andb; case 135 : itype = FR30BF_INSN_STILM; goto extract_sfmt_stilm; case 136 : itype = FR30BF_INSN_BTSTL; goto extract_sfmt_btstl; case 137 : itype = FR30BF_INSN_BTSTH; goto extract_sfmt_btstl; case 138 : itype = FR30BF_INSN_XCHB; goto extract_sfmt_xchb; case 139 : itype = FR30BF_INSN_MOV; goto extract_sfmt_mov; case 140 : itype = FR30BF_INSN_LDM0; goto extract_sfmt_ldm0; case 141 : itype = FR30BF_INSN_LDM1; goto extract_sfmt_ldm1; case 142 : itype = FR30BF_INSN_STM0; goto extract_sfmt_stm0; case 143 : itype = FR30BF_INSN_STM1; goto extract_sfmt_stm1; case 144 : itype = FR30BF_INSN_BORL; goto extract_sfmt_bandl; case 145 : itype = FR30BF_INSN_BORH; goto extract_sfmt_bandl; case 146 : itype = FR30BF_INSN_OR; goto extract_sfmt_and; case 147 : itype = FR30BF_INSN_ORCCR; goto extract_sfmt_andccr; case 148 : itype = FR30BF_INSN_ORM; goto extract_sfmt_andm; case 149 : itype = FR30BF_INSN_ORH; goto extract_sfmt_andh; case 150 : itype = FR30BF_INSN_ORB; goto extract_sfmt_andb; case 151 : |
7a292a7a SS |
400 | { |
401 | unsigned int val = (((insn >> 4) & (15 << 0))); | |
402 | switch (val) | |
c906108c | 403 | { |
52fa932e | 404 | case 0 : itype = FR30BF_INSN_JMP; goto extract_sfmt_jmp; case 1 : itype = FR30BF_INSN_CALLR; goto extract_sfmt_callr; case 2 : itype = FR30BF_INSN_RET; goto extract_sfmt_ret; case 3 : itype = FR30BF_INSN_RETI; goto extract_sfmt_reti; case 4 : itype = FR30BF_INSN_DIV0S; goto extract_sfmt_div0s; case 5 : itype = FR30BF_INSN_DIV0U; goto extract_sfmt_div0u; case 6 : itype = FR30BF_INSN_DIV1; goto extract_sfmt_div1; case 7 : itype = FR30BF_INSN_DIV2; goto extract_sfmt_div2; case 8 : itype = FR30BF_INSN_EXTSB; goto extract_sfmt_extsb; case 9 : itype = FR30BF_INSN_EXTUB; goto extract_sfmt_extub; case 10 : itype = FR30BF_INSN_EXTSH; goto extract_sfmt_extsh; case 11 : itype = FR30BF_INSN_EXTUH; goto extract_sfmt_extuh; default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty; |
c906108c | 405 | } |
7a292a7a | 406 | } |
52fa932e | 407 | case 152 : itype = FR30BF_INSN_BEORL; goto extract_sfmt_bandl; case 153 : itype = FR30BF_INSN_BEORH; goto extract_sfmt_bandl; case 154 : itype = FR30BF_INSN_EOR; goto extract_sfmt_and; case 155 : itype = FR30BF_INSN_LDI20; goto extract_sfmt_ldi20; case 156 : itype = FR30BF_INSN_EORM; goto extract_sfmt_andm; case 157 : itype = FR30BF_INSN_EORH; goto extract_sfmt_andh; case 158 : itype = FR30BF_INSN_EORB; goto extract_sfmt_andb; case 159 : |
7a292a7a SS |
408 | { |
409 | unsigned int val = (((insn >> 4) & (15 << 0))); | |
410 | switch (val) | |
c906108c | 411 | { |
52fa932e | 412 | case 0 : itype = FR30BF_INSN_JMPD; goto extract_sfmt_jmp; case 1 : itype = FR30BF_INSN_CALLRD; goto extract_sfmt_callr; case 2 : itype = FR30BF_INSN_RET_D; goto extract_sfmt_ret; case 3 : itype = FR30BF_INSN_INTE; goto extract_sfmt_inte; case 6 : itype = FR30BF_INSN_DIV3; goto extract_sfmt_div3; case 7 : itype = FR30BF_INSN_DIV4S; goto extract_sfmt_div4s; case 8 : itype = FR30BF_INSN_LDI32; goto extract_sfmt_ldi32; case 9 : itype = FR30BF_INSN_LEAVE; goto extract_sfmt_leave; case 10 : itype = FR30BF_INSN_NOP; goto extract_sfmt_bnod; case 12 : itype = FR30BF_INSN_COPOP; goto extract_sfmt_copop; case 13 : itype = FR30BF_INSN_COPLD; goto extract_sfmt_copop; case 14 : itype = FR30BF_INSN_COPST; goto extract_sfmt_copop; case 15 : itype = FR30BF_INSN_COPSV; goto extract_sfmt_copop; default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty; |
c906108c | 413 | } |
c906108c | 414 | } |
52fa932e | 415 | case 160 : itype = FR30BF_INSN_ADDNI; goto extract_sfmt_addni; case 161 : itype = FR30BF_INSN_ADDN2; goto extract_sfmt_addn2; case 162 : itype = FR30BF_INSN_ADDN; goto extract_sfmt_addn; case 163 : itype = FR30BF_INSN_ADDSP; goto extract_sfmt_addsp; case 164 : itype = FR30BF_INSN_ADDI; goto extract_sfmt_addi; case 165 : itype = FR30BF_INSN_ADD2; goto extract_sfmt_add2; case 166 : itype = FR30BF_INSN_ADD; goto extract_sfmt_add; case 167 : itype = FR30BF_INSN_ADDC; goto extract_sfmt_addc; case 168 : itype = FR30BF_INSN_CMPI; goto extract_sfmt_cmpi; case 169 : itype = FR30BF_INSN_CMP2; goto extract_sfmt_cmp2; case 170 : itype = FR30BF_INSN_CMP; goto extract_sfmt_cmp; case 171 : itype = FR30BF_INSN_MULU; goto extract_sfmt_mulu; case 172 : itype = FR30BF_INSN_SUB; goto extract_sfmt_add; case 173 : itype = FR30BF_INSN_SUBC; goto extract_sfmt_addc; case 174 : itype = FR30BF_INSN_SUBN; goto extract_sfmt_addn; case 175 : itype = FR30BF_INSN_MUL; goto extract_sfmt_mul; case 176 : itype = FR30BF_INSN_LSRI; goto extract_sfmt_lsli; case 177 : itype = FR30BF_INSN_LSR2; goto extract_sfmt_lsli; case 178 : itype = FR30BF_INSN_LSR; goto extract_sfmt_lsl; case 179 : itype = FR30BF_INSN_MOV2DR; goto extract_sfmt_mov2dr; case 180 : itype = FR30BF_INSN_LSLI; goto extract_sfmt_lsli; case 181 : itype = FR30BF_INSN_LSL2; goto extract_sfmt_lsli; case 182 : itype = FR30BF_INSN_LSL; goto extract_sfmt_lsl; case 183 : itype = FR30BF_INSN_MOVDR; goto extract_sfmt_movdr; case 184 : itype = FR30BF_INSN_ASRI; goto extract_sfmt_lsli; case 185 : itype = FR30BF_INSN_ASR2; goto extract_sfmt_lsli; case 186 : itype = FR30BF_INSN_ASR; goto extract_sfmt_lsl; case 187 : itype = FR30BF_INSN_MULUH; goto extract_sfmt_mulh; case 188 : itype = FR30BF_INSN_LDRES; goto extract_sfmt_ldres; case 189 : itype = FR30BF_INSN_STRES; goto extract_sfmt_ldres; case 191 : itype = FR30BF_INSN_MULH; goto extract_sfmt_mulh; case 192 : /* fall through */ |
7a292a7a SS |
416 | case 193 : /* fall through */ |
417 | case 194 : /* fall through */ | |
418 | case 195 : /* fall through */ | |
419 | case 196 : /* fall through */ | |
420 | case 197 : /* fall through */ | |
421 | case 198 : /* fall through */ | |
422 | case 199 : /* fall through */ | |
423 | case 200 : /* fall through */ | |
424 | case 201 : /* fall through */ | |
425 | case 202 : /* fall through */ | |
426 | case 203 : /* fall through */ | |
427 | case 204 : /* fall through */ | |
428 | case 205 : /* fall through */ | |
429 | case 206 : /* fall through */ | |
52fa932e | 430 | case 207 : itype = FR30BF_INSN_LDI8; goto extract_sfmt_ldi8; case 208 : /* fall through */ |
7a292a7a SS |
431 | case 209 : /* fall through */ |
432 | case 210 : /* fall through */ | |
433 | case 211 : /* fall through */ | |
434 | case 212 : /* fall through */ | |
435 | case 213 : /* fall through */ | |
436 | case 214 : /* fall through */ | |
52fa932e | 437 | case 215 : itype = FR30BF_INSN_CALL; goto extract_sfmt_call; case 216 : /* fall through */ |
7a292a7a SS |
438 | case 217 : /* fall through */ |
439 | case 218 : /* fall through */ | |
440 | case 219 : /* fall through */ | |
441 | case 220 : /* fall through */ | |
442 | case 221 : /* fall through */ | |
443 | case 222 : /* fall through */ | |
52fa932e | 444 | case 223 : itype = FR30BF_INSN_CALLD; goto extract_sfmt_call; case 224 : itype = FR30BF_INSN_BRA; goto extract_sfmt_brad; case 225 : itype = FR30BF_INSN_BNO; goto extract_sfmt_bnod; case 226 : itype = FR30BF_INSN_BEQ; goto extract_sfmt_beqd; case 227 : itype = FR30BF_INSN_BNE; goto extract_sfmt_beqd; case 228 : itype = FR30BF_INSN_BC; goto extract_sfmt_bcd; case 229 : itype = FR30BF_INSN_BNC; goto extract_sfmt_bcd; case 230 : itype = FR30BF_INSN_BN; goto extract_sfmt_bnd; case 231 : itype = FR30BF_INSN_BP; goto extract_sfmt_bnd; case 232 : itype = FR30BF_INSN_BV; goto extract_sfmt_bvd; case 233 : itype = FR30BF_INSN_BNV; goto extract_sfmt_bvd; case 234 : itype = FR30BF_INSN_BLT; goto extract_sfmt_bltd; case 235 : itype = FR30BF_INSN_BGE; goto extract_sfmt_bltd; case 236 : itype = FR30BF_INSN_BLE; goto extract_sfmt_bled; case 237 : itype = FR30BF_INSN_BGT; goto extract_sfmt_bled; case 238 : itype = FR30BF_INSN_BLS; goto extract_sfmt_blsd; case 239 : itype = FR30BF_INSN_BHI; goto extract_sfmt_blsd; case 240 : itype = FR30BF_INSN_BRAD; goto extract_sfmt_brad; case 241 : itype = FR30BF_INSN_BNOD; goto extract_sfmt_bnod; case 242 : itype = FR30BF_INSN_BEQD; goto extract_sfmt_beqd; case 243 : itype = FR30BF_INSN_BNED; goto extract_sfmt_beqd; case 244 : itype = FR30BF_INSN_BCD; goto extract_sfmt_bcd; case 245 : itype = FR30BF_INSN_BNCD; goto extract_sfmt_bcd; case 246 : itype = FR30BF_INSN_BND; goto extract_sfmt_bnd; case 247 : itype = FR30BF_INSN_BPD; goto extract_sfmt_bnd; case 248 : itype = FR30BF_INSN_BVD; goto extract_sfmt_bvd; case 249 : itype = FR30BF_INSN_BNVD; goto extract_sfmt_bvd; case 250 : itype = FR30BF_INSN_BLTD; goto extract_sfmt_bltd; case 251 : itype = FR30BF_INSN_BGED; goto extract_sfmt_bltd; case 252 : itype = FR30BF_INSN_BLED; goto extract_sfmt_bled; case 253 : itype = FR30BF_INSN_BGTD; goto extract_sfmt_bled; case 254 : itype = FR30BF_INSN_BLSD; goto extract_sfmt_blsd; case 255 : itype = FR30BF_INSN_BHID; goto extract_sfmt_blsd; default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty; |
7a292a7a | 445 | } |
c906108c | 446 | } |
c906108c SS |
447 | } |
448 | ||
449 | /* The instruction has been decoded, now extract the fields. */ | |
450 | ||
96baa820 | 451 | extract_sfmt_empty: |
c906108c | 452 | { |
7a292a7a | 453 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 454 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 455 | |
c906108c SS |
456 | |
457 | /* Record the fields for the semantic handler. */ | |
96baa820 | 458 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0)); |
c906108c SS |
459 | |
460 | #undef FLD | |
7a292a7a | 461 | return idesc; |
c906108c SS |
462 | } |
463 | ||
96baa820 | 464 | extract_sfmt_add: |
c906108c | 465 | { |
7a292a7a | 466 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 467 | #define FLD(f) abuf->fields.sfmt_add.f |
9846de1b JM |
468 | UINT f_Rj; |
469 | UINT f_Ri; | |
c906108c | 470 | |
9846de1b JM |
471 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
472 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
473 | |
474 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
475 | FLD (f_Ri) = f_Ri; |
476 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
477 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
478 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 479 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
480 | |
481 | #if WITH_PROFILE_MODEL_P | |
482 | /* Record the fields for profiling. */ | |
483 | if (PROFILE_MODEL_P (current_cpu)) | |
484 | { | |
485 | FLD (in_Ri) = f_Ri; | |
486 | FLD (in_Rj) = f_Rj; | |
487 | FLD (out_Ri) = f_Ri; | |
488 | } | |
489 | #endif | |
490 | #undef FLD | |
7a292a7a | 491 | return idesc; |
c906108c SS |
492 | } |
493 | ||
96baa820 | 494 | extract_sfmt_addi: |
c906108c | 495 | { |
7a292a7a | 496 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 497 | #define FLD(f) abuf->fields.sfmt_addi.f |
9846de1b JM |
498 | UINT f_u4; |
499 | UINT f_Ri; | |
c906108c | 500 | |
9846de1b JM |
501 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
502 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
503 | |
504 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 505 | FLD (f_Ri) = f_Ri; |
c906108c SS |
506 | FLD (f_u4) = f_u4; |
507 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 508 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
509 | |
510 | #if WITH_PROFILE_MODEL_P | |
511 | /* Record the fields for profiling. */ | |
512 | if (PROFILE_MODEL_P (current_cpu)) | |
513 | { | |
514 | FLD (in_Ri) = f_Ri; | |
515 | FLD (out_Ri) = f_Ri; | |
516 | } | |
517 | #endif | |
518 | #undef FLD | |
7a292a7a | 519 | return idesc; |
c906108c SS |
520 | } |
521 | ||
96baa820 | 522 | extract_sfmt_add2: |
c906108c | 523 | { |
7a292a7a | 524 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 525 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b JM |
526 | SI f_m4; |
527 | UINT f_Ri; | |
c906108c | 528 | |
9846de1b JM |
529 | f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4)))); |
530 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
531 | |
532 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 533 | FLD (f_Ri) = f_Ri; |
c906108c SS |
534 | FLD (f_m4) = f_m4; |
535 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 536 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add2", "f_Ri 0x%x", 'x', f_Ri, "f_m4 0x%x", 'x', f_m4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
537 | |
538 | #if WITH_PROFILE_MODEL_P | |
539 | /* Record the fields for profiling. */ | |
540 | if (PROFILE_MODEL_P (current_cpu)) | |
541 | { | |
542 | FLD (in_Ri) = f_Ri; | |
543 | FLD (out_Ri) = f_Ri; | |
544 | } | |
545 | #endif | |
546 | #undef FLD | |
7a292a7a | 547 | return idesc; |
c906108c SS |
548 | } |
549 | ||
96baa820 | 550 | extract_sfmt_addc: |
c906108c | 551 | { |
7a292a7a | 552 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 553 | #define FLD(f) abuf->fields.sfmt_add.f |
9846de1b JM |
554 | UINT f_Rj; |
555 | UINT f_Ri; | |
c906108c | 556 | |
9846de1b JM |
557 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
558 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
559 | |
560 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
561 | FLD (f_Ri) = f_Ri; |
562 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
563 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
564 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 565 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addc", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
566 | |
567 | #if WITH_PROFILE_MODEL_P | |
568 | /* Record the fields for profiling. */ | |
569 | if (PROFILE_MODEL_P (current_cpu)) | |
570 | { | |
571 | FLD (in_Ri) = f_Ri; | |
572 | FLD (in_Rj) = f_Rj; | |
573 | FLD (out_Ri) = f_Ri; | |
574 | } | |
575 | #endif | |
576 | #undef FLD | |
7a292a7a | 577 | return idesc; |
c906108c SS |
578 | } |
579 | ||
96baa820 | 580 | extract_sfmt_addn: |
c906108c | 581 | { |
7a292a7a | 582 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 583 | #define FLD(f) abuf->fields.sfmt_add.f |
9846de1b JM |
584 | UINT f_Rj; |
585 | UINT f_Ri; | |
c906108c | 586 | |
9846de1b JM |
587 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
588 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
589 | |
590 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
591 | FLD (f_Ri) = f_Ri; |
592 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
593 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
594 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 595 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addn", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
596 | |
597 | #if WITH_PROFILE_MODEL_P | |
598 | /* Record the fields for profiling. */ | |
599 | if (PROFILE_MODEL_P (current_cpu)) | |
600 | { | |
601 | FLD (in_Ri) = f_Ri; | |
602 | FLD (in_Rj) = f_Rj; | |
603 | FLD (out_Ri) = f_Ri; | |
604 | } | |
605 | #endif | |
606 | #undef FLD | |
7a292a7a | 607 | return idesc; |
c906108c SS |
608 | } |
609 | ||
96baa820 | 610 | extract_sfmt_addni: |
c906108c | 611 | { |
7a292a7a | 612 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 613 | #define FLD(f) abuf->fields.sfmt_addi.f |
9846de1b JM |
614 | UINT f_u4; |
615 | UINT f_Ri; | |
c906108c | 616 | |
9846de1b JM |
617 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
618 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
619 | |
620 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 621 | FLD (f_Ri) = f_Ri; |
c906108c SS |
622 | FLD (f_u4) = f_u4; |
623 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 624 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addni", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
625 | |
626 | #if WITH_PROFILE_MODEL_P | |
627 | /* Record the fields for profiling. */ | |
628 | if (PROFILE_MODEL_P (current_cpu)) | |
629 | { | |
630 | FLD (in_Ri) = f_Ri; | |
631 | FLD (out_Ri) = f_Ri; | |
632 | } | |
633 | #endif | |
634 | #undef FLD | |
7a292a7a | 635 | return idesc; |
c906108c SS |
636 | } |
637 | ||
96baa820 | 638 | extract_sfmt_addn2: |
c906108c | 639 | { |
7a292a7a | 640 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 641 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b JM |
642 | SI f_m4; |
643 | UINT f_Ri; | |
c906108c | 644 | |
9846de1b JM |
645 | f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4)))); |
646 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
647 | |
648 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 649 | FLD (f_Ri) = f_Ri; |
c906108c SS |
650 | FLD (f_m4) = f_m4; |
651 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 652 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addn2", "f_Ri 0x%x", 'x', f_Ri, "f_m4 0x%x", 'x', f_m4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
653 | |
654 | #if WITH_PROFILE_MODEL_P | |
655 | /* Record the fields for profiling. */ | |
656 | if (PROFILE_MODEL_P (current_cpu)) | |
657 | { | |
658 | FLD (in_Ri) = f_Ri; | |
659 | FLD (out_Ri) = f_Ri; | |
660 | } | |
661 | #endif | |
662 | #undef FLD | |
7a292a7a | 663 | return idesc; |
c906108c SS |
664 | } |
665 | ||
96baa820 | 666 | extract_sfmt_cmp: |
c906108c | 667 | { |
7a292a7a | 668 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 669 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
670 | UINT f_Rj; |
671 | UINT f_Ri; | |
c906108c | 672 | |
9846de1b JM |
673 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
674 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
675 | |
676 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
677 | FLD (f_Ri) = f_Ri; |
678 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
679 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
680 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 681 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
682 | |
683 | #if WITH_PROFILE_MODEL_P | |
684 | /* Record the fields for profiling. */ | |
685 | if (PROFILE_MODEL_P (current_cpu)) | |
686 | { | |
687 | FLD (in_Ri) = f_Ri; | |
688 | FLD (in_Rj) = f_Rj; | |
689 | } | |
690 | #endif | |
691 | #undef FLD | |
7a292a7a | 692 | return idesc; |
c906108c SS |
693 | } |
694 | ||
96baa820 | 695 | extract_sfmt_cmpi: |
c906108c | 696 | { |
7a292a7a | 697 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 698 | #define FLD(f) abuf->fields.sfmt_addi.f |
9846de1b JM |
699 | UINT f_u4; |
700 | UINT f_Ri; | |
c906108c | 701 | |
9846de1b JM |
702 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
703 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
704 | |
705 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 706 | FLD (f_Ri) = f_Ri; |
c906108c SS |
707 | FLD (f_u4) = f_u4; |
708 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 709 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpi", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
710 | |
711 | #if WITH_PROFILE_MODEL_P | |
712 | /* Record the fields for profiling. */ | |
713 | if (PROFILE_MODEL_P (current_cpu)) | |
714 | { | |
715 | FLD (in_Ri) = f_Ri; | |
716 | } | |
717 | #endif | |
718 | #undef FLD | |
7a292a7a | 719 | return idesc; |
c906108c SS |
720 | } |
721 | ||
96baa820 | 722 | extract_sfmt_cmp2: |
c906108c | 723 | { |
7a292a7a | 724 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 725 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b JM |
726 | SI f_m4; |
727 | UINT f_Ri; | |
c906108c | 728 | |
9846de1b JM |
729 | f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4)))); |
730 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
731 | |
732 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 733 | FLD (f_Ri) = f_Ri; |
c906108c SS |
734 | FLD (f_m4) = f_m4; |
735 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 736 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp2", "f_Ri 0x%x", 'x', f_Ri, "f_m4 0x%x", 'x', f_m4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
737 | |
738 | #if WITH_PROFILE_MODEL_P | |
739 | /* Record the fields for profiling. */ | |
740 | if (PROFILE_MODEL_P (current_cpu)) | |
741 | { | |
742 | FLD (in_Ri) = f_Ri; | |
743 | } | |
744 | #endif | |
745 | #undef FLD | |
7a292a7a | 746 | return idesc; |
c906108c SS |
747 | } |
748 | ||
96baa820 | 749 | extract_sfmt_and: |
c906108c | 750 | { |
7a292a7a | 751 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 752 | #define FLD(f) abuf->fields.sfmt_add.f |
9846de1b JM |
753 | UINT f_Rj; |
754 | UINT f_Ri; | |
c906108c | 755 | |
9846de1b JM |
756 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
757 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
758 | |
759 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
760 | FLD (f_Ri) = f_Ri; |
761 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
762 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
763 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 764 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
765 | |
766 | #if WITH_PROFILE_MODEL_P | |
767 | /* Record the fields for profiling. */ | |
768 | if (PROFILE_MODEL_P (current_cpu)) | |
769 | { | |
770 | FLD (in_Ri) = f_Ri; | |
771 | FLD (in_Rj) = f_Rj; | |
772 | FLD (out_Ri) = f_Ri; | |
773 | } | |
774 | #endif | |
775 | #undef FLD | |
7a292a7a | 776 | return idesc; |
c906108c SS |
777 | } |
778 | ||
96baa820 | 779 | extract_sfmt_andm: |
c906108c | 780 | { |
7a292a7a | 781 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 782 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
783 | UINT f_Rj; |
784 | UINT f_Ri; | |
c906108c | 785 | |
9846de1b JM |
786 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
787 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
788 | |
789 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
790 | FLD (f_Ri) = f_Ri; |
791 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
792 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
793 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 794 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andm", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
795 | |
796 | #if WITH_PROFILE_MODEL_P | |
797 | /* Record the fields for profiling. */ | |
798 | if (PROFILE_MODEL_P (current_cpu)) | |
799 | { | |
800 | FLD (in_Ri) = f_Ri; | |
801 | FLD (in_Rj) = f_Rj; | |
802 | } | |
803 | #endif | |
804 | #undef FLD | |
7a292a7a | 805 | return idesc; |
c906108c SS |
806 | } |
807 | ||
96baa820 | 808 | extract_sfmt_andh: |
c906108c | 809 | { |
7a292a7a | 810 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 811 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
812 | UINT f_Rj; |
813 | UINT f_Ri; | |
c906108c | 814 | |
9846de1b JM |
815 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
816 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
817 | |
818 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
819 | FLD (f_Ri) = f_Ri; |
820 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
821 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
822 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 823 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andh", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
824 | |
825 | #if WITH_PROFILE_MODEL_P | |
826 | /* Record the fields for profiling. */ | |
827 | if (PROFILE_MODEL_P (current_cpu)) | |
828 | { | |
829 | FLD (in_Ri) = f_Ri; | |
830 | FLD (in_Rj) = f_Rj; | |
831 | } | |
832 | #endif | |
833 | #undef FLD | |
7a292a7a | 834 | return idesc; |
c906108c SS |
835 | } |
836 | ||
96baa820 | 837 | extract_sfmt_andb: |
c906108c | 838 | { |
7a292a7a | 839 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 840 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
841 | UINT f_Rj; |
842 | UINT f_Ri; | |
c906108c | 843 | |
9846de1b JM |
844 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
845 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
846 | |
847 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
848 | FLD (f_Ri) = f_Ri; |
849 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
850 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
851 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 852 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andb", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
853 | |
854 | #if WITH_PROFILE_MODEL_P | |
855 | /* Record the fields for profiling. */ | |
856 | if (PROFILE_MODEL_P (current_cpu)) | |
857 | { | |
858 | FLD (in_Ri) = f_Ri; | |
859 | FLD (in_Rj) = f_Rj; | |
860 | } | |
861 | #endif | |
862 | #undef FLD | |
7a292a7a | 863 | return idesc; |
c906108c SS |
864 | } |
865 | ||
96baa820 | 866 | extract_sfmt_bandl: |
c906108c | 867 | { |
7a292a7a | 868 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 869 | #define FLD(f) abuf->fields.sfmt_addi.f |
9846de1b JM |
870 | UINT f_u4; |
871 | UINT f_Ri; | |
c906108c | 872 | |
9846de1b JM |
873 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
874 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
875 | |
876 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 877 | FLD (f_Ri) = f_Ri; |
c906108c SS |
878 | FLD (f_u4) = f_u4; |
879 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 880 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bandl", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
881 | |
882 | #if WITH_PROFILE_MODEL_P | |
883 | /* Record the fields for profiling. */ | |
884 | if (PROFILE_MODEL_P (current_cpu)) | |
885 | { | |
886 | FLD (in_Ri) = f_Ri; | |
887 | } | |
888 | #endif | |
889 | #undef FLD | |
7a292a7a | 890 | return idesc; |
c906108c SS |
891 | } |
892 | ||
96baa820 | 893 | extract_sfmt_btstl: |
c906108c | 894 | { |
7a292a7a | 895 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 896 | #define FLD(f) abuf->fields.sfmt_addi.f |
9846de1b JM |
897 | UINT f_u4; |
898 | UINT f_Ri; | |
c906108c | 899 | |
9846de1b JM |
900 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
901 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
902 | |
903 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 904 | FLD (f_Ri) = f_Ri; |
c906108c SS |
905 | FLD (f_u4) = f_u4; |
906 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 907 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_btstl", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
908 | |
909 | #if WITH_PROFILE_MODEL_P | |
910 | /* Record the fields for profiling. */ | |
911 | if (PROFILE_MODEL_P (current_cpu)) | |
912 | { | |
913 | FLD (in_Ri) = f_Ri; | |
914 | } | |
915 | #endif | |
916 | #undef FLD | |
7a292a7a | 917 | return idesc; |
c906108c SS |
918 | } |
919 | ||
96baa820 | 920 | extract_sfmt_mul: |
c906108c | 921 | { |
7a292a7a | 922 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 923 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
924 | UINT f_Rj; |
925 | UINT f_Ri; | |
c906108c | 926 | |
9846de1b JM |
927 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
928 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
929 | |
930 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
931 | FLD (f_Ri) = f_Ri; |
932 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
933 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
934 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 935 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mul", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
936 | |
937 | #if WITH_PROFILE_MODEL_P | |
938 | /* Record the fields for profiling. */ | |
939 | if (PROFILE_MODEL_P (current_cpu)) | |
940 | { | |
941 | FLD (in_Ri) = f_Ri; | |
942 | FLD (in_Rj) = f_Rj; | |
943 | } | |
944 | #endif | |
945 | #undef FLD | |
7a292a7a | 946 | return idesc; |
c906108c SS |
947 | } |
948 | ||
96baa820 | 949 | extract_sfmt_mulu: |
c906108c | 950 | { |
7a292a7a | 951 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 952 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
953 | UINT f_Rj; |
954 | UINT f_Ri; | |
c906108c | 955 | |
9846de1b JM |
956 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
957 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
958 | |
959 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
960 | FLD (f_Ri) = f_Ri; |
961 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
962 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
963 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 964 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mulu", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
965 | |
966 | #if WITH_PROFILE_MODEL_P | |
967 | /* Record the fields for profiling. */ | |
968 | if (PROFILE_MODEL_P (current_cpu)) | |
969 | { | |
970 | FLD (in_Ri) = f_Ri; | |
971 | FLD (in_Rj) = f_Rj; | |
972 | } | |
973 | #endif | |
974 | #undef FLD | |
7a292a7a | 975 | return idesc; |
c906108c SS |
976 | } |
977 | ||
96baa820 | 978 | extract_sfmt_mulh: |
c906108c | 979 | { |
7a292a7a | 980 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 981 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
982 | UINT f_Rj; |
983 | UINT f_Ri; | |
c906108c | 984 | |
9846de1b JM |
985 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
986 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
987 | |
988 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
989 | FLD (f_Ri) = f_Ri; |
990 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
991 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
992 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 993 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mulh", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
994 | |
995 | #if WITH_PROFILE_MODEL_P | |
996 | /* Record the fields for profiling. */ | |
997 | if (PROFILE_MODEL_P (current_cpu)) | |
998 | { | |
999 | FLD (in_Ri) = f_Ri; | |
1000 | FLD (in_Rj) = f_Rj; | |
1001 | } | |
1002 | #endif | |
1003 | #undef FLD | |
7a292a7a | 1004 | return idesc; |
c906108c SS |
1005 | } |
1006 | ||
96baa820 | 1007 | extract_sfmt_div0s: |
c906108c | 1008 | { |
7a292a7a | 1009 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1010 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b | 1011 | UINT f_Ri; |
c906108c | 1012 | |
9846de1b | 1013 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1014 | |
1015 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1016 | FLD (f_Ri) = f_Ri; |
c906108c | 1017 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1018 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div0s", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1019 | |
1020 | #if WITH_PROFILE_MODEL_P | |
1021 | /* Record the fields for profiling. */ | |
1022 | if (PROFILE_MODEL_P (current_cpu)) | |
1023 | { | |
1024 | FLD (in_Ri) = f_Ri; | |
1025 | } | |
1026 | #endif | |
1027 | #undef FLD | |
7a292a7a | 1028 | return idesc; |
c906108c SS |
1029 | } |
1030 | ||
96baa820 | 1031 | extract_sfmt_div0u: |
c906108c | 1032 | { |
7a292a7a | 1033 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1034 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 1035 | |
c906108c SS |
1036 | |
1037 | /* Record the fields for the semantic handler. */ | |
96baa820 | 1038 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div0u", (char *) 0)); |
c906108c SS |
1039 | |
1040 | #undef FLD | |
7a292a7a | 1041 | return idesc; |
c906108c SS |
1042 | } |
1043 | ||
96baa820 | 1044 | extract_sfmt_div1: |
c906108c | 1045 | { |
7a292a7a | 1046 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1047 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b | 1048 | UINT f_Ri; |
c906108c | 1049 | |
9846de1b | 1050 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1051 | |
1052 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1053 | FLD (f_Ri) = f_Ri; |
c906108c | 1054 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1055 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div1", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1056 | |
1057 | #if WITH_PROFILE_MODEL_P | |
1058 | /* Record the fields for profiling. */ | |
1059 | if (PROFILE_MODEL_P (current_cpu)) | |
1060 | { | |
1061 | FLD (in_Ri) = f_Ri; | |
1062 | } | |
1063 | #endif | |
1064 | #undef FLD | |
7a292a7a | 1065 | return idesc; |
c906108c SS |
1066 | } |
1067 | ||
96baa820 | 1068 | extract_sfmt_div2: |
c906108c | 1069 | { |
7a292a7a | 1070 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1071 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b | 1072 | UINT f_Ri; |
c906108c | 1073 | |
9846de1b | 1074 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1075 | |
1076 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1077 | FLD (f_Ri) = f_Ri; |
c906108c | 1078 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1079 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div2", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1080 | |
1081 | #if WITH_PROFILE_MODEL_P | |
1082 | /* Record the fields for profiling. */ | |
1083 | if (PROFILE_MODEL_P (current_cpu)) | |
1084 | { | |
1085 | FLD (in_Ri) = f_Ri; | |
1086 | } | |
1087 | #endif | |
1088 | #undef FLD | |
7a292a7a | 1089 | return idesc; |
c906108c SS |
1090 | } |
1091 | ||
96baa820 | 1092 | extract_sfmt_div3: |
c906108c | 1093 | { |
7a292a7a | 1094 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1095 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 1096 | |
c906108c SS |
1097 | |
1098 | /* Record the fields for the semantic handler. */ | |
96baa820 | 1099 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div3", (char *) 0)); |
c906108c SS |
1100 | |
1101 | #undef FLD | |
7a292a7a | 1102 | return idesc; |
c906108c SS |
1103 | } |
1104 | ||
96baa820 | 1105 | extract_sfmt_div4s: |
c906108c | 1106 | { |
7a292a7a | 1107 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1108 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 1109 | |
c906108c SS |
1110 | |
1111 | /* Record the fields for the semantic handler. */ | |
96baa820 | 1112 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div4s", (char *) 0)); |
c906108c SS |
1113 | |
1114 | #undef FLD | |
7a292a7a | 1115 | return idesc; |
c906108c SS |
1116 | } |
1117 | ||
96baa820 | 1118 | extract_sfmt_lsl: |
c906108c | 1119 | { |
7a292a7a | 1120 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1121 | #define FLD(f) abuf->fields.sfmt_add.f |
9846de1b JM |
1122 | UINT f_Rj; |
1123 | UINT f_Ri; | |
c906108c | 1124 | |
9846de1b JM |
1125 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1126 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1127 | |
1128 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1129 | FLD (f_Ri) = f_Ri; |
1130 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
1131 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
1132 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 1133 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lsl", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
1134 | |
1135 | #if WITH_PROFILE_MODEL_P | |
1136 | /* Record the fields for profiling. */ | |
1137 | if (PROFILE_MODEL_P (current_cpu)) | |
1138 | { | |
1139 | FLD (in_Ri) = f_Ri; | |
1140 | FLD (in_Rj) = f_Rj; | |
1141 | FLD (out_Ri) = f_Ri; | |
1142 | } | |
1143 | #endif | |
1144 | #undef FLD | |
7a292a7a | 1145 | return idesc; |
c906108c SS |
1146 | } |
1147 | ||
96baa820 | 1148 | extract_sfmt_lsli: |
c906108c | 1149 | { |
7a292a7a | 1150 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1151 | #define FLD(f) abuf->fields.sfmt_addi.f |
9846de1b JM |
1152 | UINT f_u4; |
1153 | UINT f_Ri; | |
c906108c | 1154 | |
9846de1b JM |
1155 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1156 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1157 | |
1158 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1159 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1160 | FLD (f_u4) = f_u4; |
1161 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1162 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lsli", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1163 | |
1164 | #if WITH_PROFILE_MODEL_P | |
1165 | /* Record the fields for profiling. */ | |
1166 | if (PROFILE_MODEL_P (current_cpu)) | |
1167 | { | |
1168 | FLD (in_Ri) = f_Ri; | |
1169 | FLD (out_Ri) = f_Ri; | |
1170 | } | |
1171 | #endif | |
1172 | #undef FLD | |
7a292a7a | 1173 | return idesc; |
c906108c SS |
1174 | } |
1175 | ||
96baa820 | 1176 | extract_sfmt_ldi8: |
c906108c | 1177 | { |
7a292a7a | 1178 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1179 | #define FLD(f) abuf->fields.sfmt_ldi8.f |
9846de1b JM |
1180 | UINT f_i8; |
1181 | UINT f_Ri; | |
c906108c | 1182 | |
9846de1b JM |
1183 | f_i8 = EXTRACT_MSB0_UINT (insn, 16, 4, 8); |
1184 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1185 | |
1186 | /* Record the fields for the semantic handler. */ | |
1187 | FLD (f_i8) = f_i8; | |
e5c59029 | 1188 | FLD (f_Ri) = f_Ri; |
c906108c | 1189 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1190 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi8", "f_i8 0x%x", 'x', f_i8, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1191 | |
1192 | #if WITH_PROFILE_MODEL_P | |
1193 | /* Record the fields for profiling. */ | |
1194 | if (PROFILE_MODEL_P (current_cpu)) | |
1195 | { | |
1196 | FLD (out_Ri) = f_Ri; | |
1197 | } | |
1198 | #endif | |
1199 | #undef FLD | |
7a292a7a | 1200 | return idesc; |
c906108c SS |
1201 | } |
1202 | ||
96baa820 | 1203 | extract_sfmt_ldi20: |
c906108c | 1204 | { |
7a292a7a | 1205 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1206 | #define FLD(f) abuf->fields.sfmt_ldi20.f |
9846de1b JM |
1207 | UINT f_i20_16; |
1208 | UINT f_i20_4; | |
1209 | UINT f_Ri; | |
1210 | UINT f_i20; | |
1211 | /* Contents of trailing part of insn. */ | |
1212 | UINT word_1; | |
1213 | ||
1214 | word_1 = GETIMEMUHI (current_cpu, pc + 2); | |
1215 | f_i20_16 = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 0)); | |
1216 | f_i20_4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); | |
1217 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
1218 | { | |
1219 | f_i20 = ((((f_i20_4) << (16))) | (f_i20_16)); | |
1220 | } | |
c906108c SS |
1221 | |
1222 | /* Record the fields for the semantic handler. */ | |
1223 | FLD (f_i20) = f_i20; | |
e5c59029 | 1224 | FLD (f_Ri) = f_Ri; |
c906108c | 1225 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1226 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi20", "f_i20 0x%x", 'x', f_i20, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1227 | |
1228 | #if WITH_PROFILE_MODEL_P | |
1229 | /* Record the fields for profiling. */ | |
1230 | if (PROFILE_MODEL_P (current_cpu)) | |
1231 | { | |
1232 | FLD (out_Ri) = f_Ri; | |
1233 | } | |
1234 | #endif | |
1235 | #undef FLD | |
7a292a7a | 1236 | return idesc; |
c906108c SS |
1237 | } |
1238 | ||
96baa820 | 1239 | extract_sfmt_ldi32: |
c906108c | 1240 | { |
7a292a7a | 1241 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1242 | #define FLD(f) abuf->fields.sfmt_ldi32.f |
9846de1b JM |
1243 | UINT f_i32; |
1244 | UINT f_Ri; | |
1245 | /* Contents of trailing part of insn. */ | |
1246 | UINT word_1; | |
1247 | UINT word_2; | |
c906108c | 1248 | |
9846de1b JM |
1249 | word_1 = GETIMEMUHI (current_cpu, pc + 2); |
1250 | word_2 = GETIMEMUHI (current_cpu, pc + 4); | |
1251 | f_i32 = (0|(EXTRACT_MSB0_UINT (word_2, 16, 0, 16) << 0)|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 16)); | |
1252 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1253 | |
1254 | /* Record the fields for the semantic handler. */ | |
1255 | FLD (f_i32) = f_i32; | |
e5c59029 | 1256 | FLD (f_Ri) = f_Ri; |
c906108c | 1257 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1258 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi32", "f_i32 0x%x", 'x', f_i32, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1259 | |
1260 | #if WITH_PROFILE_MODEL_P | |
1261 | /* Record the fields for profiling. */ | |
1262 | if (PROFILE_MODEL_P (current_cpu)) | |
1263 | { | |
1264 | FLD (out_Ri) = f_Ri; | |
1265 | } | |
1266 | #endif | |
1267 | #undef FLD | |
7a292a7a | 1268 | return idesc; |
c906108c SS |
1269 | } |
1270 | ||
96baa820 | 1271 | extract_sfmt_ld: |
c906108c | 1272 | { |
7a292a7a | 1273 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1274 | #define FLD(f) abuf->fields.sfmt_ldr13.f |
9846de1b JM |
1275 | UINT f_Rj; |
1276 | UINT f_Ri; | |
c906108c | 1277 | |
9846de1b JM |
1278 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1279 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1280 | |
1281 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1282 | FLD (f_Rj) = f_Rj; |
1283 | FLD (f_Ri) = f_Ri; | |
c906108c SS |
1284 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; |
1285 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1286 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ld", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c | 1287 | |
c906108c SS |
1288 | #if WITH_PROFILE_MODEL_P |
1289 | /* Record the fields for profiling. */ | |
1290 | if (PROFILE_MODEL_P (current_cpu)) | |
1291 | { | |
1292 | FLD (in_Rj) = f_Rj; | |
1293 | FLD (out_Ri) = f_Ri; | |
1294 | } | |
1295 | #endif | |
1296 | #undef FLD | |
7a292a7a | 1297 | return idesc; |
c906108c SS |
1298 | } |
1299 | ||
96baa820 | 1300 | extract_sfmt_ldr13: |
c906108c | 1301 | { |
7a292a7a | 1302 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1303 | #define FLD(f) abuf->fields.sfmt_ldr13.f |
9846de1b JM |
1304 | UINT f_Rj; |
1305 | UINT f_Ri; | |
c906108c | 1306 | |
9846de1b JM |
1307 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1308 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1309 | |
1310 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1311 | FLD (f_Rj) = f_Rj; |
1312 | FLD (f_Ri) = f_Ri; | |
c906108c SS |
1313 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; |
1314 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1315 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr13", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c | 1316 | |
c906108c SS |
1317 | #if WITH_PROFILE_MODEL_P |
1318 | /* Record the fields for profiling. */ | |
1319 | if (PROFILE_MODEL_P (current_cpu)) | |
1320 | { | |
1321 | FLD (in_Rj) = f_Rj; | |
1322 | FLD (in_h_gr_13) = 13; | |
1323 | FLD (out_Ri) = f_Ri; | |
1324 | } | |
1325 | #endif | |
1326 | #undef FLD | |
7a292a7a | 1327 | return idesc; |
c906108c SS |
1328 | } |
1329 | ||
96baa820 | 1330 | extract_sfmt_ldr14: |
c906108c | 1331 | { |
7a292a7a | 1332 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1333 | #define FLD(f) abuf->fields.sfmt_ldr14.f |
9846de1b JM |
1334 | SI f_disp10; |
1335 | UINT f_Ri; | |
c906108c | 1336 | |
9846de1b JM |
1337 | f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2)); |
1338 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1339 | |
1340 | /* Record the fields for the semantic handler. */ | |
1341 | FLD (f_disp10) = f_disp10; | |
e5c59029 | 1342 | FLD (f_Ri) = f_Ri; |
c906108c | 1343 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1344 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr14", "f_disp10 0x%x", 'x', f_disp10, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1345 | |
1346 | #if WITH_PROFILE_MODEL_P | |
1347 | /* Record the fields for profiling. */ | |
1348 | if (PROFILE_MODEL_P (current_cpu)) | |
1349 | { | |
1350 | FLD (in_h_gr_14) = 14; | |
1351 | FLD (out_Ri) = f_Ri; | |
1352 | } | |
1353 | #endif | |
1354 | #undef FLD | |
7a292a7a | 1355 | return idesc; |
c906108c SS |
1356 | } |
1357 | ||
96baa820 | 1358 | extract_sfmt_ldr14uh: |
c906108c | 1359 | { |
7a292a7a | 1360 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1361 | #define FLD(f) abuf->fields.sfmt_ldr14uh.f |
9846de1b JM |
1362 | SI f_disp9; |
1363 | UINT f_Ri; | |
c906108c | 1364 | |
9846de1b JM |
1365 | f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1)); |
1366 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1367 | |
1368 | /* Record the fields for the semantic handler. */ | |
1369 | FLD (f_disp9) = f_disp9; | |
e5c59029 | 1370 | FLD (f_Ri) = f_Ri; |
c906108c | 1371 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1372 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr14uh", "f_disp9 0x%x", 'x', f_disp9, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1373 | |
1374 | #if WITH_PROFILE_MODEL_P | |
1375 | /* Record the fields for profiling. */ | |
1376 | if (PROFILE_MODEL_P (current_cpu)) | |
1377 | { | |
1378 | FLD (in_h_gr_14) = 14; | |
1379 | FLD (out_Ri) = f_Ri; | |
1380 | } | |
1381 | #endif | |
1382 | #undef FLD | |
7a292a7a | 1383 | return idesc; |
c906108c SS |
1384 | } |
1385 | ||
96baa820 | 1386 | extract_sfmt_ldr14ub: |
c906108c | 1387 | { |
7a292a7a | 1388 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1389 | #define FLD(f) abuf->fields.sfmt_ldr14ub.f |
9846de1b JM |
1390 | INT f_disp8; |
1391 | UINT f_Ri; | |
c906108c | 1392 | |
9846de1b JM |
1393 | f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8); |
1394 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1395 | |
1396 | /* Record the fields for the semantic handler. */ | |
1397 | FLD (f_disp8) = f_disp8; | |
e5c59029 | 1398 | FLD (f_Ri) = f_Ri; |
c906108c | 1399 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1400 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr14ub", "f_disp8 0x%x", 'x', f_disp8, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1401 | |
1402 | #if WITH_PROFILE_MODEL_P | |
1403 | /* Record the fields for profiling. */ | |
1404 | if (PROFILE_MODEL_P (current_cpu)) | |
1405 | { | |
1406 | FLD (in_h_gr_14) = 14; | |
1407 | FLD (out_Ri) = f_Ri; | |
1408 | } | |
1409 | #endif | |
1410 | #undef FLD | |
7a292a7a | 1411 | return idesc; |
c906108c SS |
1412 | } |
1413 | ||
96baa820 | 1414 | extract_sfmt_ldr15: |
c906108c | 1415 | { |
7a292a7a | 1416 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1417 | #define FLD(f) abuf->fields.sfmt_ldr15.f |
9846de1b JM |
1418 | USI f_udisp6; |
1419 | UINT f_Ri; | |
c906108c | 1420 | |
9846de1b JM |
1421 | f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2)); |
1422 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1423 | |
1424 | /* Record the fields for the semantic handler. */ | |
1425 | FLD (f_udisp6) = f_udisp6; | |
e5c59029 | 1426 | FLD (f_Ri) = f_Ri; |
c906108c | 1427 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1428 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15", "f_udisp6 0x%x", 'x', f_udisp6, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1429 | |
1430 | #if WITH_PROFILE_MODEL_P | |
1431 | /* Record the fields for profiling. */ | |
1432 | if (PROFILE_MODEL_P (current_cpu)) | |
1433 | { | |
1434 | FLD (in_h_gr_15) = 15; | |
1435 | FLD (out_Ri) = f_Ri; | |
1436 | } | |
1437 | #endif | |
1438 | #undef FLD | |
7a292a7a | 1439 | return idesc; |
c906108c SS |
1440 | } |
1441 | ||
96baa820 | 1442 | extract_sfmt_ldr15gr: |
c906108c | 1443 | { |
7a292a7a | 1444 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1445 | #define FLD(f) abuf->fields.sfmt_ldr15gr.f |
9846de1b | 1446 | UINT f_Ri; |
c906108c | 1447 | |
9846de1b | 1448 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1449 | |
1450 | /* Record the fields for the semantic handler. */ | |
1451 | FLD (f_Ri) = f_Ri; | |
1452 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
96baa820 | 1453 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15gr", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1454 | |
1455 | #if WITH_PROFILE_MODEL_P | |
1456 | /* Record the fields for profiling. */ | |
1457 | if (PROFILE_MODEL_P (current_cpu)) | |
1458 | { | |
1459 | FLD (in_h_gr_15) = 15; | |
1460 | FLD (out_Ri) = f_Ri; | |
1461 | FLD (out_h_gr_15) = 15; | |
1462 | } | |
1463 | #endif | |
1464 | #undef FLD | |
7a292a7a | 1465 | return idesc; |
c906108c SS |
1466 | } |
1467 | ||
96baa820 | 1468 | extract_sfmt_ldr15dr: |
c906108c | 1469 | { |
7a292a7a | 1470 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1471 | #define FLD(f) abuf->fields.sfmt_ldr15dr.f |
9846de1b | 1472 | UINT f_Rs2; |
c906108c | 1473 | |
9846de1b | 1474 | f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1475 | |
1476 | /* Record the fields for the semantic handler. */ | |
1477 | FLD (f_Rs2) = f_Rs2; | |
96baa820 | 1478 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15dr", "f_Rs2 0x%x", 'x', f_Rs2, (char *) 0)); |
c906108c SS |
1479 | |
1480 | #if WITH_PROFILE_MODEL_P | |
1481 | /* Record the fields for profiling. */ | |
1482 | if (PROFILE_MODEL_P (current_cpu)) | |
1483 | { | |
1484 | FLD (in_h_gr_15) = 15; | |
1485 | FLD (out_h_gr_15) = 15; | |
1486 | } | |
1487 | #endif | |
1488 | #undef FLD | |
7a292a7a | 1489 | return idesc; |
c906108c SS |
1490 | } |
1491 | ||
96baa820 | 1492 | extract_sfmt_ldr15ps: |
c906108c | 1493 | { |
7a292a7a | 1494 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1495 | #define FLD(f) abuf->fields.sfmt_addsp.f |
c906108c | 1496 | |
c906108c SS |
1497 | |
1498 | /* Record the fields for the semantic handler. */ | |
96baa820 | 1499 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15ps", (char *) 0)); |
c906108c SS |
1500 | |
1501 | #if WITH_PROFILE_MODEL_P | |
1502 | /* Record the fields for profiling. */ | |
1503 | if (PROFILE_MODEL_P (current_cpu)) | |
1504 | { | |
1505 | FLD (in_h_gr_15) = 15; | |
1506 | FLD (out_h_gr_15) = 15; | |
1507 | } | |
1508 | #endif | |
1509 | #undef FLD | |
7a292a7a | 1510 | return idesc; |
c906108c SS |
1511 | } |
1512 | ||
96baa820 | 1513 | extract_sfmt_st: |
c906108c | 1514 | { |
7a292a7a | 1515 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1516 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
1517 | UINT f_Rj; |
1518 | UINT f_Ri; | |
c906108c | 1519 | |
9846de1b JM |
1520 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1521 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1522 | |
1523 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1524 | FLD (f_Ri) = f_Ri; |
1525 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
1526 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
1527 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 1528 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_st", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c | 1529 | |
c906108c SS |
1530 | #if WITH_PROFILE_MODEL_P |
1531 | /* Record the fields for profiling. */ | |
1532 | if (PROFILE_MODEL_P (current_cpu)) | |
1533 | { | |
1534 | FLD (in_Ri) = f_Ri; | |
1535 | FLD (in_Rj) = f_Rj; | |
1536 | } | |
1537 | #endif | |
1538 | #undef FLD | |
7a292a7a | 1539 | return idesc; |
c906108c SS |
1540 | } |
1541 | ||
96baa820 | 1542 | extract_sfmt_str13: |
c906108c | 1543 | { |
7a292a7a | 1544 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1545 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
1546 | UINT f_Rj; |
1547 | UINT f_Ri; | |
c906108c | 1548 | |
9846de1b JM |
1549 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1550 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1551 | |
1552 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1553 | FLD (f_Ri) = f_Ri; |
1554 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
1555 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
1556 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 1557 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str13", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c | 1558 | |
c906108c SS |
1559 | #if WITH_PROFILE_MODEL_P |
1560 | /* Record the fields for profiling. */ | |
1561 | if (PROFILE_MODEL_P (current_cpu)) | |
1562 | { | |
1563 | FLD (in_Ri) = f_Ri; | |
1564 | FLD (in_Rj) = f_Rj; | |
1565 | FLD (in_h_gr_13) = 13; | |
1566 | } | |
1567 | #endif | |
1568 | #undef FLD | |
7a292a7a | 1569 | return idesc; |
c906108c SS |
1570 | } |
1571 | ||
96baa820 | 1572 | extract_sfmt_str14: |
c906108c | 1573 | { |
7a292a7a | 1574 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1575 | #define FLD(f) abuf->fields.sfmt_str14.f |
9846de1b JM |
1576 | SI f_disp10; |
1577 | UINT f_Ri; | |
c906108c | 1578 | |
9846de1b JM |
1579 | f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2)); |
1580 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1581 | |
1582 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1583 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1584 | FLD (f_disp10) = f_disp10; |
1585 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1586 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str14", "f_Ri 0x%x", 'x', f_Ri, "f_disp10 0x%x", 'x', f_disp10, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1587 | |
1588 | #if WITH_PROFILE_MODEL_P | |
1589 | /* Record the fields for profiling. */ | |
1590 | if (PROFILE_MODEL_P (current_cpu)) | |
1591 | { | |
1592 | FLD (in_Ri) = f_Ri; | |
1593 | FLD (in_h_gr_14) = 14; | |
1594 | } | |
1595 | #endif | |
1596 | #undef FLD | |
7a292a7a | 1597 | return idesc; |
c906108c SS |
1598 | } |
1599 | ||
96baa820 | 1600 | extract_sfmt_str14h: |
c906108c | 1601 | { |
7a292a7a | 1602 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1603 | #define FLD(f) abuf->fields.sfmt_str14h.f |
9846de1b JM |
1604 | SI f_disp9; |
1605 | UINT f_Ri; | |
c906108c | 1606 | |
9846de1b JM |
1607 | f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1)); |
1608 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1609 | |
1610 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1611 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1612 | FLD (f_disp9) = f_disp9; |
1613 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1614 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str14h", "f_Ri 0x%x", 'x', f_Ri, "f_disp9 0x%x", 'x', f_disp9, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1615 | |
1616 | #if WITH_PROFILE_MODEL_P | |
1617 | /* Record the fields for profiling. */ | |
1618 | if (PROFILE_MODEL_P (current_cpu)) | |
1619 | { | |
1620 | FLD (in_Ri) = f_Ri; | |
1621 | FLD (in_h_gr_14) = 14; | |
1622 | } | |
1623 | #endif | |
1624 | #undef FLD | |
7a292a7a | 1625 | return idesc; |
c906108c SS |
1626 | } |
1627 | ||
96baa820 | 1628 | extract_sfmt_str14b: |
c906108c | 1629 | { |
7a292a7a | 1630 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1631 | #define FLD(f) abuf->fields.sfmt_str14b.f |
9846de1b JM |
1632 | INT f_disp8; |
1633 | UINT f_Ri; | |
c906108c | 1634 | |
9846de1b JM |
1635 | f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8); |
1636 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1637 | |
1638 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1639 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1640 | FLD (f_disp8) = f_disp8; |
1641 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1642 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str14b", "f_Ri 0x%x", 'x', f_Ri, "f_disp8 0x%x", 'x', f_disp8, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1643 | |
1644 | #if WITH_PROFILE_MODEL_P | |
1645 | /* Record the fields for profiling. */ | |
1646 | if (PROFILE_MODEL_P (current_cpu)) | |
1647 | { | |
1648 | FLD (in_Ri) = f_Ri; | |
1649 | FLD (in_h_gr_14) = 14; | |
1650 | } | |
1651 | #endif | |
1652 | #undef FLD | |
7a292a7a | 1653 | return idesc; |
c906108c SS |
1654 | } |
1655 | ||
96baa820 | 1656 | extract_sfmt_str15: |
c906108c | 1657 | { |
7a292a7a | 1658 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1659 | #define FLD(f) abuf->fields.sfmt_str15.f |
9846de1b JM |
1660 | USI f_udisp6; |
1661 | UINT f_Ri; | |
c906108c | 1662 | |
9846de1b JM |
1663 | f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2)); |
1664 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1665 | |
1666 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1667 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1668 | FLD (f_udisp6) = f_udisp6; |
1669 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1670 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15", "f_Ri 0x%x", 'x', f_Ri, "f_udisp6 0x%x", 'x', f_udisp6, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1671 | |
1672 | #if WITH_PROFILE_MODEL_P | |
1673 | /* Record the fields for profiling. */ | |
1674 | if (PROFILE_MODEL_P (current_cpu)) | |
1675 | { | |
1676 | FLD (in_Ri) = f_Ri; | |
1677 | FLD (in_h_gr_15) = 15; | |
1678 | } | |
1679 | #endif | |
1680 | #undef FLD | |
7a292a7a | 1681 | return idesc; |
c906108c SS |
1682 | } |
1683 | ||
96baa820 | 1684 | extract_sfmt_str15gr: |
c906108c | 1685 | { |
7a292a7a | 1686 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1687 | #define FLD(f) abuf->fields.sfmt_str15gr.f |
9846de1b | 1688 | UINT f_Ri; |
c906108c | 1689 | |
9846de1b | 1690 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1691 | |
1692 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1693 | FLD (f_Ri) = f_Ri; |
c906108c | 1694 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1695 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15gr", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1696 | |
1697 | #if WITH_PROFILE_MODEL_P | |
1698 | /* Record the fields for profiling. */ | |
1699 | if (PROFILE_MODEL_P (current_cpu)) | |
1700 | { | |
1701 | FLD (in_Ri) = f_Ri; | |
1702 | FLD (in_h_gr_15) = 15; | |
1703 | FLD (out_h_gr_15) = 15; | |
1704 | } | |
1705 | #endif | |
1706 | #undef FLD | |
7a292a7a | 1707 | return idesc; |
c906108c SS |
1708 | } |
1709 | ||
96baa820 | 1710 | extract_sfmt_str15dr: |
c906108c | 1711 | { |
7a292a7a | 1712 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1713 | #define FLD(f) abuf->fields.sfmt_ldr15dr.f |
9846de1b | 1714 | UINT f_Rs2; |
c906108c | 1715 | |
9846de1b | 1716 | f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1717 | |
1718 | /* Record the fields for the semantic handler. */ | |
1719 | FLD (f_Rs2) = f_Rs2; | |
96baa820 | 1720 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15dr", "f_Rs2 0x%x", 'x', f_Rs2, (char *) 0)); |
c906108c SS |
1721 | |
1722 | #if WITH_PROFILE_MODEL_P | |
1723 | /* Record the fields for profiling. */ | |
1724 | if (PROFILE_MODEL_P (current_cpu)) | |
1725 | { | |
1726 | FLD (in_h_gr_15) = 15; | |
1727 | FLD (out_h_gr_15) = 15; | |
1728 | } | |
1729 | #endif | |
1730 | #undef FLD | |
7a292a7a | 1731 | return idesc; |
c906108c SS |
1732 | } |
1733 | ||
96baa820 | 1734 | extract_sfmt_str15ps: |
c906108c | 1735 | { |
7a292a7a | 1736 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1737 | #define FLD(f) abuf->fields.sfmt_addsp.f |
c906108c | 1738 | |
c906108c SS |
1739 | |
1740 | /* Record the fields for the semantic handler. */ | |
96baa820 | 1741 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15ps", (char *) 0)); |
c906108c SS |
1742 | |
1743 | #if WITH_PROFILE_MODEL_P | |
1744 | /* Record the fields for profiling. */ | |
1745 | if (PROFILE_MODEL_P (current_cpu)) | |
1746 | { | |
1747 | FLD (in_h_gr_15) = 15; | |
1748 | FLD (out_h_gr_15) = 15; | |
1749 | } | |
1750 | #endif | |
1751 | #undef FLD | |
7a292a7a | 1752 | return idesc; |
c906108c SS |
1753 | } |
1754 | ||
96baa820 | 1755 | extract_sfmt_mov: |
c906108c | 1756 | { |
7a292a7a | 1757 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1758 | #define FLD(f) abuf->fields.sfmt_ldr13.f |
9846de1b JM |
1759 | UINT f_Rj; |
1760 | UINT f_Ri; | |
c906108c | 1761 | |
9846de1b JM |
1762 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1763 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1764 | |
1765 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1766 | FLD (f_Rj) = f_Rj; |
1767 | FLD (f_Ri) = f_Ri; | |
c906108c SS |
1768 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; |
1769 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1770 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1771 | |
1772 | #if WITH_PROFILE_MODEL_P | |
1773 | /* Record the fields for profiling. */ | |
1774 | if (PROFILE_MODEL_P (current_cpu)) | |
1775 | { | |
1776 | FLD (in_Rj) = f_Rj; | |
1777 | FLD (out_Ri) = f_Ri; | |
1778 | } | |
1779 | #endif | |
1780 | #undef FLD | |
7a292a7a | 1781 | return idesc; |
c906108c SS |
1782 | } |
1783 | ||
96baa820 | 1784 | extract_sfmt_movdr: |
c906108c | 1785 | { |
7a292a7a | 1786 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1787 | #define FLD(f) abuf->fields.sfmt_movdr.f |
9846de1b JM |
1788 | UINT f_Rs1; |
1789 | UINT f_Ri; | |
c906108c | 1790 | |
9846de1b JM |
1791 | f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1792 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1793 | |
1794 | /* Record the fields for the semantic handler. */ | |
1795 | FLD (f_Rs1) = f_Rs1; | |
e5c59029 | 1796 | FLD (f_Ri) = f_Ri; |
c906108c | 1797 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1798 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movdr", "f_Rs1 0x%x", 'x', f_Rs1, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1799 | |
1800 | #if WITH_PROFILE_MODEL_P | |
1801 | /* Record the fields for profiling. */ | |
1802 | if (PROFILE_MODEL_P (current_cpu)) | |
1803 | { | |
1804 | FLD (out_Ri) = f_Ri; | |
1805 | } | |
1806 | #endif | |
1807 | #undef FLD | |
7a292a7a | 1808 | return idesc; |
c906108c SS |
1809 | } |
1810 | ||
96baa820 | 1811 | extract_sfmt_movps: |
c906108c | 1812 | { |
7a292a7a | 1813 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1814 | #define FLD(f) abuf->fields.sfmt_movdr.f |
9846de1b | 1815 | UINT f_Ri; |
c906108c | 1816 | |
9846de1b | 1817 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1818 | |
1819 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1820 | FLD (f_Ri) = f_Ri; |
c906108c | 1821 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1822 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movps", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1823 | |
1824 | #if WITH_PROFILE_MODEL_P | |
1825 | /* Record the fields for profiling. */ | |
1826 | if (PROFILE_MODEL_P (current_cpu)) | |
1827 | { | |
1828 | FLD (out_Ri) = f_Ri; | |
1829 | } | |
1830 | #endif | |
1831 | #undef FLD | |
7a292a7a | 1832 | return idesc; |
c906108c SS |
1833 | } |
1834 | ||
96baa820 | 1835 | extract_sfmt_mov2dr: |
c906108c | 1836 | { |
7a292a7a | 1837 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1838 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b JM |
1839 | UINT f_Rs1; |
1840 | UINT f_Ri; | |
c906108c | 1841 | |
9846de1b JM |
1842 | f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1843 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1844 | |
1845 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1846 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1847 | FLD (f_Rs1) = f_Rs1; |
1848 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1849 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov2dr", "f_Ri 0x%x", 'x', f_Ri, "f_Rs1 0x%x", 'x', f_Rs1, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1850 | |
1851 | #if WITH_PROFILE_MODEL_P | |
1852 | /* Record the fields for profiling. */ | |
1853 | if (PROFILE_MODEL_P (current_cpu)) | |
1854 | { | |
1855 | FLD (in_Ri) = f_Ri; | |
1856 | } | |
1857 | #endif | |
1858 | #undef FLD | |
7a292a7a | 1859 | return idesc; |
c906108c SS |
1860 | } |
1861 | ||
96baa820 | 1862 | extract_sfmt_mov2ps: |
c906108c | 1863 | { |
7a292a7a | 1864 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1865 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b | 1866 | UINT f_Ri; |
c906108c | 1867 | |
9846de1b | 1868 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1869 | |
1870 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1871 | FLD (f_Ri) = f_Ri; |
c906108c | 1872 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1873 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov2ps", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1874 | |
1875 | #if WITH_PROFILE_MODEL_P | |
1876 | /* Record the fields for profiling. */ | |
1877 | if (PROFILE_MODEL_P (current_cpu)) | |
1878 | { | |
1879 | FLD (in_Ri) = f_Ri; | |
1880 | } | |
1881 | #endif | |
1882 | #undef FLD | |
7a292a7a | 1883 | return idesc; |
c906108c SS |
1884 | } |
1885 | ||
96baa820 | 1886 | extract_sfmt_jmp: |
c906108c | 1887 | { |
7a292a7a | 1888 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1889 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b | 1890 | UINT f_Ri; |
c906108c | 1891 | |
9846de1b | 1892 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1893 | |
1894 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1895 | FLD (f_Ri) = f_Ri; |
c906108c | 1896 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1897 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jmp", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1898 | |
1899 | #if WITH_PROFILE_MODEL_P | |
1900 | /* Record the fields for profiling. */ | |
1901 | if (PROFILE_MODEL_P (current_cpu)) | |
1902 | { | |
1903 | FLD (in_Ri) = f_Ri; | |
1904 | } | |
1905 | #endif | |
1906 | #undef FLD | |
7a292a7a | 1907 | return idesc; |
c906108c SS |
1908 | } |
1909 | ||
96baa820 | 1910 | extract_sfmt_callr: |
c906108c | 1911 | { |
7a292a7a | 1912 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1913 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b | 1914 | UINT f_Ri; |
c906108c | 1915 | |
9846de1b | 1916 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1917 | |
1918 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1919 | FLD (f_Ri) = f_Ri; |
c906108c | 1920 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1921 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_callr", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1922 | |
1923 | #if WITH_PROFILE_MODEL_P | |
1924 | /* Record the fields for profiling. */ | |
1925 | if (PROFILE_MODEL_P (current_cpu)) | |
1926 | { | |
1927 | FLD (in_Ri) = f_Ri; | |
1928 | } | |
1929 | #endif | |
1930 | #undef FLD | |
7a292a7a | 1931 | return idesc; |
c906108c SS |
1932 | } |
1933 | ||
96baa820 | 1934 | extract_sfmt_call: |
c906108c | 1935 | { |
7a292a7a | 1936 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1937 | #define FLD(f) abuf->fields.sfmt_call.f |
9846de1b | 1938 | SI f_rel12; |
c906108c | 1939 | |
9846de1b | 1940 | f_rel12 = ((((EXTRACT_MSB0_INT (insn, 16, 5, 11)) << (1))) + (((pc) + (2)))); |
c906108c SS |
1941 | |
1942 | /* Record the fields for the semantic handler. */ | |
1943 | FLD (i_label12) = f_rel12; | |
96baa820 | 1944 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_call", "label12 0x%x", 'x', f_rel12, (char *) 0)); |
c906108c SS |
1945 | |
1946 | #if WITH_PROFILE_MODEL_P | |
1947 | /* Record the fields for profiling. */ | |
1948 | if (PROFILE_MODEL_P (current_cpu)) | |
1949 | { | |
1950 | } | |
1951 | #endif | |
1952 | #undef FLD | |
7a292a7a | 1953 | return idesc; |
c906108c SS |
1954 | } |
1955 | ||
96baa820 | 1956 | extract_sfmt_ret: |
c906108c | 1957 | { |
7a292a7a | 1958 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1959 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 1960 | |
c906108c SS |
1961 | |
1962 | /* Record the fields for the semantic handler. */ | |
96baa820 | 1963 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ret", (char *) 0)); |
c906108c SS |
1964 | |
1965 | #if WITH_PROFILE_MODEL_P | |
1966 | /* Record the fields for profiling. */ | |
1967 | if (PROFILE_MODEL_P (current_cpu)) | |
1968 | { | |
1969 | } | |
1970 | #endif | |
1971 | #undef FLD | |
7a292a7a | 1972 | return idesc; |
c906108c SS |
1973 | } |
1974 | ||
96baa820 | 1975 | extract_sfmt_int: |
c906108c | 1976 | { |
7a292a7a | 1977 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 1978 | #define FLD(f) abuf->fields.sfmt_int.f |
9846de1b | 1979 | UINT f_u8; |
c906108c | 1980 | |
9846de1b | 1981 | f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
1982 | |
1983 | /* Record the fields for the semantic handler. */ | |
1984 | FLD (f_u8) = f_u8; | |
96baa820 | 1985 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_int", "f_u8 0x%x", 'x', f_u8, (char *) 0)); |
c906108c SS |
1986 | |
1987 | #if WITH_PROFILE_MODEL_P | |
1988 | /* Record the fields for profiling. */ | |
1989 | if (PROFILE_MODEL_P (current_cpu)) | |
1990 | { | |
1991 | } | |
1992 | #endif | |
1993 | #undef FLD | |
7a292a7a | 1994 | return idesc; |
c906108c SS |
1995 | } |
1996 | ||
96baa820 | 1997 | extract_sfmt_inte: |
c906108c | 1998 | { |
7a292a7a | 1999 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2000 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 2001 | |
c906108c SS |
2002 | |
2003 | /* Record the fields for the semantic handler. */ | |
96baa820 | 2004 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_inte", (char *) 0)); |
c906108c SS |
2005 | |
2006 | #if WITH_PROFILE_MODEL_P | |
2007 | /* Record the fields for profiling. */ | |
2008 | if (PROFILE_MODEL_P (current_cpu)) | |
2009 | { | |
2010 | } | |
2011 | #endif | |
2012 | #undef FLD | |
7a292a7a | 2013 | return idesc; |
c906108c SS |
2014 | } |
2015 | ||
96baa820 | 2016 | extract_sfmt_reti: |
c906108c | 2017 | { |
7a292a7a | 2018 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2019 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 2020 | |
c906108c SS |
2021 | |
2022 | /* Record the fields for the semantic handler. */ | |
96baa820 | 2023 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_reti", (char *) 0)); |
c906108c SS |
2024 | |
2025 | #if WITH_PROFILE_MODEL_P | |
2026 | /* Record the fields for profiling. */ | |
2027 | if (PROFILE_MODEL_P (current_cpu)) | |
2028 | { | |
2029 | } | |
2030 | #endif | |
2031 | #undef FLD | |
7a292a7a | 2032 | return idesc; |
c906108c SS |
2033 | } |
2034 | ||
96baa820 | 2035 | extract_sfmt_brad: |
c906108c | 2036 | { |
7a292a7a | 2037 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2038 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2039 | SI f_rel9; |
c906108c | 2040 | |
9846de1b | 2041 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2042 | |
2043 | /* Record the fields for the semantic handler. */ | |
2044 | FLD (i_label9) = f_rel9; | |
96baa820 | 2045 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_brad", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2046 | |
2047 | #if WITH_PROFILE_MODEL_P | |
2048 | /* Record the fields for profiling. */ | |
2049 | if (PROFILE_MODEL_P (current_cpu)) | |
2050 | { | |
2051 | } | |
2052 | #endif | |
2053 | #undef FLD | |
7a292a7a | 2054 | return idesc; |
c906108c SS |
2055 | } |
2056 | ||
96baa820 | 2057 | extract_sfmt_bnod: |
c906108c | 2058 | { |
7a292a7a | 2059 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2060 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 2061 | |
c906108c SS |
2062 | |
2063 | /* Record the fields for the semantic handler. */ | |
96baa820 | 2064 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bnod", (char *) 0)); |
c906108c SS |
2065 | |
2066 | #undef FLD | |
7a292a7a | 2067 | return idesc; |
c906108c SS |
2068 | } |
2069 | ||
96baa820 | 2070 | extract_sfmt_beqd: |
c906108c | 2071 | { |
7a292a7a | 2072 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2073 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2074 | SI f_rel9; |
c906108c | 2075 | |
9846de1b | 2076 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2077 | |
2078 | /* Record the fields for the semantic handler. */ | |
2079 | FLD (i_label9) = f_rel9; | |
96baa820 | 2080 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_beqd", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2081 | |
2082 | #if WITH_PROFILE_MODEL_P | |
2083 | /* Record the fields for profiling. */ | |
2084 | if (PROFILE_MODEL_P (current_cpu)) | |
2085 | { | |
2086 | } | |
2087 | #endif | |
2088 | #undef FLD | |
7a292a7a | 2089 | return idesc; |
c906108c SS |
2090 | } |
2091 | ||
96baa820 | 2092 | extract_sfmt_bcd: |
c906108c | 2093 | { |
7a292a7a | 2094 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2095 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2096 | SI f_rel9; |
c906108c | 2097 | |
9846de1b | 2098 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2099 | |
2100 | /* Record the fields for the semantic handler. */ | |
2101 | FLD (i_label9) = f_rel9; | |
96baa820 | 2102 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcd", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2103 | |
2104 | #if WITH_PROFILE_MODEL_P | |
2105 | /* Record the fields for profiling. */ | |
2106 | if (PROFILE_MODEL_P (current_cpu)) | |
2107 | { | |
2108 | } | |
2109 | #endif | |
2110 | #undef FLD | |
7a292a7a | 2111 | return idesc; |
c906108c SS |
2112 | } |
2113 | ||
96baa820 | 2114 | extract_sfmt_bnd: |
c906108c | 2115 | { |
7a292a7a | 2116 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2117 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2118 | SI f_rel9; |
c906108c | 2119 | |
9846de1b | 2120 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2121 | |
2122 | /* Record the fields for the semantic handler. */ | |
2123 | FLD (i_label9) = f_rel9; | |
96baa820 | 2124 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bnd", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2125 | |
2126 | #if WITH_PROFILE_MODEL_P | |
2127 | /* Record the fields for profiling. */ | |
2128 | if (PROFILE_MODEL_P (current_cpu)) | |
2129 | { | |
2130 | } | |
2131 | #endif | |
2132 | #undef FLD | |
7a292a7a | 2133 | return idesc; |
c906108c SS |
2134 | } |
2135 | ||
96baa820 | 2136 | extract_sfmt_bvd: |
c906108c | 2137 | { |
7a292a7a | 2138 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2139 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2140 | SI f_rel9; |
c906108c | 2141 | |
9846de1b | 2142 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2143 | |
2144 | /* Record the fields for the semantic handler. */ | |
2145 | FLD (i_label9) = f_rel9; | |
96baa820 | 2146 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bvd", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2147 | |
2148 | #if WITH_PROFILE_MODEL_P | |
2149 | /* Record the fields for profiling. */ | |
2150 | if (PROFILE_MODEL_P (current_cpu)) | |
2151 | { | |
2152 | } | |
2153 | #endif | |
2154 | #undef FLD | |
7a292a7a | 2155 | return idesc; |
c906108c SS |
2156 | } |
2157 | ||
96baa820 | 2158 | extract_sfmt_bltd: |
c906108c | 2159 | { |
7a292a7a | 2160 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2161 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2162 | SI f_rel9; |
c906108c | 2163 | |
9846de1b | 2164 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2165 | |
2166 | /* Record the fields for the semantic handler. */ | |
2167 | FLD (i_label9) = f_rel9; | |
96baa820 | 2168 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bltd", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2169 | |
2170 | #if WITH_PROFILE_MODEL_P | |
2171 | /* Record the fields for profiling. */ | |
2172 | if (PROFILE_MODEL_P (current_cpu)) | |
2173 | { | |
2174 | } | |
2175 | #endif | |
2176 | #undef FLD | |
7a292a7a | 2177 | return idesc; |
c906108c SS |
2178 | } |
2179 | ||
96baa820 | 2180 | extract_sfmt_bled: |
c906108c | 2181 | { |
7a292a7a | 2182 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2183 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2184 | SI f_rel9; |
c906108c | 2185 | |
9846de1b | 2186 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2187 | |
2188 | /* Record the fields for the semantic handler. */ | |
2189 | FLD (i_label9) = f_rel9; | |
96baa820 | 2190 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bled", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2191 | |
2192 | #if WITH_PROFILE_MODEL_P | |
2193 | /* Record the fields for profiling. */ | |
2194 | if (PROFILE_MODEL_P (current_cpu)) | |
2195 | { | |
2196 | } | |
2197 | #endif | |
2198 | #undef FLD | |
7a292a7a | 2199 | return idesc; |
c906108c SS |
2200 | } |
2201 | ||
96baa820 | 2202 | extract_sfmt_blsd: |
c906108c | 2203 | { |
7a292a7a | 2204 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2205 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2206 | SI f_rel9; |
c906108c | 2207 | |
9846de1b | 2208 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2209 | |
2210 | /* Record the fields for the semantic handler. */ | |
2211 | FLD (i_label9) = f_rel9; | |
96baa820 | 2212 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_blsd", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2213 | |
2214 | #if WITH_PROFILE_MODEL_P | |
2215 | /* Record the fields for profiling. */ | |
2216 | if (PROFILE_MODEL_P (current_cpu)) | |
2217 | { | |
2218 | } | |
2219 | #endif | |
2220 | #undef FLD | |
7a292a7a | 2221 | return idesc; |
c906108c SS |
2222 | } |
2223 | ||
96baa820 | 2224 | extract_sfmt_dmovr13: |
c906108c | 2225 | { |
7a292a7a | 2226 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2227 | #define FLD(f) abuf->fields.sfmt_dmovr13pi.f |
9846de1b | 2228 | USI f_dir10; |
c906108c | 2229 | |
9846de1b | 2230 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2231 | |
2232 | /* Record the fields for the semantic handler. */ | |
2233 | FLD (f_dir10) = f_dir10; | |
96baa820 | 2234 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13", "f_dir10 0x%x", 'x', f_dir10, (char *) 0)); |
c906108c SS |
2235 | |
2236 | #if WITH_PROFILE_MODEL_P | |
2237 | /* Record the fields for profiling. */ | |
2238 | if (PROFILE_MODEL_P (current_cpu)) | |
2239 | { | |
2240 | FLD (in_h_gr_13) = 13; | |
2241 | } | |
2242 | #endif | |
2243 | #undef FLD | |
7a292a7a | 2244 | return idesc; |
c906108c SS |
2245 | } |
2246 | ||
96baa820 | 2247 | extract_sfmt_dmovr13h: |
c906108c | 2248 | { |
7a292a7a | 2249 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2250 | #define FLD(f) abuf->fields.sfmt_dmovr13pih.f |
9846de1b | 2251 | USI f_dir9; |
c906108c | 2252 | |
9846de1b | 2253 | f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1)); |
c906108c SS |
2254 | |
2255 | /* Record the fields for the semantic handler. */ | |
2256 | FLD (f_dir9) = f_dir9; | |
96baa820 | 2257 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13h", "f_dir9 0x%x", 'x', f_dir9, (char *) 0)); |
c906108c SS |
2258 | |
2259 | #if WITH_PROFILE_MODEL_P | |
2260 | /* Record the fields for profiling. */ | |
2261 | if (PROFILE_MODEL_P (current_cpu)) | |
2262 | { | |
2263 | FLD (in_h_gr_13) = 13; | |
2264 | } | |
2265 | #endif | |
2266 | #undef FLD | |
7a292a7a | 2267 | return idesc; |
c906108c SS |
2268 | } |
2269 | ||
96baa820 | 2270 | extract_sfmt_dmovr13b: |
c906108c | 2271 | { |
7a292a7a | 2272 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2273 | #define FLD(f) abuf->fields.sfmt_dmovr13pib.f |
9846de1b | 2274 | UINT f_dir8; |
c906108c | 2275 | |
9846de1b | 2276 | f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2277 | |
2278 | /* Record the fields for the semantic handler. */ | |
2279 | FLD (f_dir8) = f_dir8; | |
96baa820 | 2280 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13b", "f_dir8 0x%x", 'x', f_dir8, (char *) 0)); |
c906108c SS |
2281 | |
2282 | #if WITH_PROFILE_MODEL_P | |
2283 | /* Record the fields for profiling. */ | |
2284 | if (PROFILE_MODEL_P (current_cpu)) | |
2285 | { | |
2286 | FLD (in_h_gr_13) = 13; | |
2287 | } | |
2288 | #endif | |
2289 | #undef FLD | |
7a292a7a | 2290 | return idesc; |
c906108c SS |
2291 | } |
2292 | ||
96baa820 | 2293 | extract_sfmt_dmovr13pi: |
c906108c | 2294 | { |
7a292a7a | 2295 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2296 | #define FLD(f) abuf->fields.sfmt_dmovr13pi.f |
9846de1b | 2297 | USI f_dir10; |
c906108c | 2298 | |
9846de1b | 2299 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2300 | |
2301 | /* Record the fields for the semantic handler. */ | |
2302 | FLD (f_dir10) = f_dir10; | |
96baa820 | 2303 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13pi", "f_dir10 0x%x", 'x', f_dir10, (char *) 0)); |
c906108c SS |
2304 | |
2305 | #if WITH_PROFILE_MODEL_P | |
2306 | /* Record the fields for profiling. */ | |
2307 | if (PROFILE_MODEL_P (current_cpu)) | |
2308 | { | |
2309 | FLD (in_h_gr_13) = 13; | |
2310 | FLD (out_h_gr_13) = 13; | |
2311 | } | |
2312 | #endif | |
2313 | #undef FLD | |
7a292a7a | 2314 | return idesc; |
c906108c SS |
2315 | } |
2316 | ||
96baa820 | 2317 | extract_sfmt_dmovr13pih: |
c906108c | 2318 | { |
7a292a7a | 2319 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2320 | #define FLD(f) abuf->fields.sfmt_dmovr13pih.f |
9846de1b | 2321 | USI f_dir9; |
c906108c | 2322 | |
9846de1b | 2323 | f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1)); |
c906108c SS |
2324 | |
2325 | /* Record the fields for the semantic handler. */ | |
2326 | FLD (f_dir9) = f_dir9; | |
96baa820 | 2327 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13pih", "f_dir9 0x%x", 'x', f_dir9, (char *) 0)); |
c906108c SS |
2328 | |
2329 | #if WITH_PROFILE_MODEL_P | |
2330 | /* Record the fields for profiling. */ | |
2331 | if (PROFILE_MODEL_P (current_cpu)) | |
2332 | { | |
2333 | FLD (in_h_gr_13) = 13; | |
2334 | FLD (out_h_gr_13) = 13; | |
2335 | } | |
2336 | #endif | |
2337 | #undef FLD | |
7a292a7a | 2338 | return idesc; |
c906108c SS |
2339 | } |
2340 | ||
96baa820 | 2341 | extract_sfmt_dmovr13pib: |
c906108c | 2342 | { |
7a292a7a | 2343 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2344 | #define FLD(f) abuf->fields.sfmt_dmovr13pib.f |
9846de1b | 2345 | UINT f_dir8; |
c906108c | 2346 | |
9846de1b | 2347 | f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2348 | |
2349 | /* Record the fields for the semantic handler. */ | |
2350 | FLD (f_dir8) = f_dir8; | |
96baa820 | 2351 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13pib", "f_dir8 0x%x", 'x', f_dir8, (char *) 0)); |
c906108c SS |
2352 | |
2353 | #if WITH_PROFILE_MODEL_P | |
2354 | /* Record the fields for profiling. */ | |
2355 | if (PROFILE_MODEL_P (current_cpu)) | |
2356 | { | |
2357 | FLD (in_h_gr_13) = 13; | |
2358 | FLD (out_h_gr_13) = 13; | |
2359 | } | |
2360 | #endif | |
2361 | #undef FLD | |
7a292a7a | 2362 | return idesc; |
c906108c SS |
2363 | } |
2364 | ||
96baa820 | 2365 | extract_sfmt_dmovr15pi: |
c906108c | 2366 | { |
7a292a7a | 2367 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2368 | #define FLD(f) abuf->fields.sfmt_dmovr15pi.f |
9846de1b | 2369 | USI f_dir10; |
c906108c | 2370 | |
9846de1b | 2371 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2372 | |
2373 | /* Record the fields for the semantic handler. */ | |
2374 | FLD (f_dir10) = f_dir10; | |
96baa820 | 2375 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr15pi", "f_dir10 0x%x", 'x', f_dir10, (char *) 0)); |
c906108c SS |
2376 | |
2377 | #if WITH_PROFILE_MODEL_P | |
2378 | /* Record the fields for profiling. */ | |
2379 | if (PROFILE_MODEL_P (current_cpu)) | |
2380 | { | |
2381 | FLD (in_h_gr_15) = 15; | |
2382 | FLD (out_h_gr_15) = 15; | |
2383 | } | |
2384 | #endif | |
2385 | #undef FLD | |
7a292a7a | 2386 | return idesc; |
c906108c SS |
2387 | } |
2388 | ||
96baa820 | 2389 | extract_sfmt_dmov2r13: |
c906108c | 2390 | { |
7a292a7a | 2391 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2392 | #define FLD(f) abuf->fields.sfmt_dmovr13pi.f |
9846de1b | 2393 | USI f_dir10; |
c906108c | 2394 | |
9846de1b | 2395 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2396 | |
2397 | /* Record the fields for the semantic handler. */ | |
2398 | FLD (f_dir10) = f_dir10; | |
96baa820 | 2399 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13", "f_dir10 0x%x", 'x', f_dir10, (char *) 0)); |
c906108c SS |
2400 | |
2401 | #if WITH_PROFILE_MODEL_P | |
2402 | /* Record the fields for profiling. */ | |
2403 | if (PROFILE_MODEL_P (current_cpu)) | |
2404 | { | |
2405 | FLD (out_h_gr_13) = 13; | |
2406 | } | |
2407 | #endif | |
2408 | #undef FLD | |
7a292a7a | 2409 | return idesc; |
c906108c SS |
2410 | } |
2411 | ||
96baa820 | 2412 | extract_sfmt_dmov2r13h: |
c906108c | 2413 | { |
7a292a7a | 2414 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2415 | #define FLD(f) abuf->fields.sfmt_dmovr13pih.f |
9846de1b | 2416 | USI f_dir9; |
c906108c | 2417 | |
9846de1b | 2418 | f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1)); |
c906108c SS |
2419 | |
2420 | /* Record the fields for the semantic handler. */ | |
2421 | FLD (f_dir9) = f_dir9; | |
96baa820 | 2422 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13h", "f_dir9 0x%x", 'x', f_dir9, (char *) 0)); |
c906108c SS |
2423 | |
2424 | #if WITH_PROFILE_MODEL_P | |
2425 | /* Record the fields for profiling. */ | |
2426 | if (PROFILE_MODEL_P (current_cpu)) | |
2427 | { | |
2428 | FLD (out_h_gr_13) = 13; | |
2429 | } | |
2430 | #endif | |
2431 | #undef FLD | |
7a292a7a | 2432 | return idesc; |
c906108c SS |
2433 | } |
2434 | ||
96baa820 | 2435 | extract_sfmt_dmov2r13b: |
c906108c | 2436 | { |
7a292a7a | 2437 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2438 | #define FLD(f) abuf->fields.sfmt_dmovr13pib.f |
9846de1b | 2439 | UINT f_dir8; |
c906108c | 2440 | |
9846de1b | 2441 | f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2442 | |
2443 | /* Record the fields for the semantic handler. */ | |
2444 | FLD (f_dir8) = f_dir8; | |
96baa820 | 2445 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13b", "f_dir8 0x%x", 'x', f_dir8, (char *) 0)); |
c906108c SS |
2446 | |
2447 | #if WITH_PROFILE_MODEL_P | |
2448 | /* Record the fields for profiling. */ | |
2449 | if (PROFILE_MODEL_P (current_cpu)) | |
2450 | { | |
2451 | FLD (out_h_gr_13) = 13; | |
2452 | } | |
2453 | #endif | |
2454 | #undef FLD | |
7a292a7a | 2455 | return idesc; |
c906108c SS |
2456 | } |
2457 | ||
96baa820 | 2458 | extract_sfmt_dmov2r13pi: |
c906108c | 2459 | { |
7a292a7a | 2460 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2461 | #define FLD(f) abuf->fields.sfmt_dmovr13pi.f |
9846de1b | 2462 | USI f_dir10; |
c906108c | 2463 | |
9846de1b | 2464 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2465 | |
2466 | /* Record the fields for the semantic handler. */ | |
2467 | FLD (f_dir10) = f_dir10; | |
96baa820 | 2468 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13pi", "f_dir10 0x%x", 'x', f_dir10, (char *) 0)); |
c906108c SS |
2469 | |
2470 | #if WITH_PROFILE_MODEL_P | |
2471 | /* Record the fields for profiling. */ | |
2472 | if (PROFILE_MODEL_P (current_cpu)) | |
2473 | { | |
2474 | FLD (in_h_gr_13) = 13; | |
2475 | FLD (out_h_gr_13) = 13; | |
2476 | } | |
2477 | #endif | |
2478 | #undef FLD | |
7a292a7a | 2479 | return idesc; |
c906108c SS |
2480 | } |
2481 | ||
96baa820 | 2482 | extract_sfmt_dmov2r13pih: |
c906108c | 2483 | { |
7a292a7a | 2484 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2485 | #define FLD(f) abuf->fields.sfmt_dmovr13pih.f |
9846de1b | 2486 | USI f_dir9; |
c906108c | 2487 | |
9846de1b | 2488 | f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1)); |
c906108c SS |
2489 | |
2490 | /* Record the fields for the semantic handler. */ | |
2491 | FLD (f_dir9) = f_dir9; | |
96baa820 | 2492 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13pih", "f_dir9 0x%x", 'x', f_dir9, (char *) 0)); |
c906108c SS |
2493 | |
2494 | #if WITH_PROFILE_MODEL_P | |
2495 | /* Record the fields for profiling. */ | |
2496 | if (PROFILE_MODEL_P (current_cpu)) | |
2497 | { | |
2498 | FLD (in_h_gr_13) = 13; | |
2499 | FLD (out_h_gr_13) = 13; | |
2500 | } | |
2501 | #endif | |
2502 | #undef FLD | |
7a292a7a | 2503 | return idesc; |
c906108c SS |
2504 | } |
2505 | ||
96baa820 | 2506 | extract_sfmt_dmov2r13pib: |
c906108c | 2507 | { |
7a292a7a | 2508 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2509 | #define FLD(f) abuf->fields.sfmt_dmovr13pib.f |
9846de1b | 2510 | UINT f_dir8; |
c906108c | 2511 | |
9846de1b | 2512 | f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2513 | |
2514 | /* Record the fields for the semantic handler. */ | |
2515 | FLD (f_dir8) = f_dir8; | |
96baa820 | 2516 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13pib", "f_dir8 0x%x", 'x', f_dir8, (char *) 0)); |
c906108c SS |
2517 | |
2518 | #if WITH_PROFILE_MODEL_P | |
2519 | /* Record the fields for profiling. */ | |
2520 | if (PROFILE_MODEL_P (current_cpu)) | |
2521 | { | |
2522 | FLD (in_h_gr_13) = 13; | |
2523 | FLD (out_h_gr_13) = 13; | |
2524 | } | |
2525 | #endif | |
2526 | #undef FLD | |
7a292a7a | 2527 | return idesc; |
c906108c SS |
2528 | } |
2529 | ||
96baa820 | 2530 | extract_sfmt_dmov2r15pd: |
c906108c | 2531 | { |
7a292a7a | 2532 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2533 | #define FLD(f) abuf->fields.sfmt_dmovr15pi.f |
9846de1b | 2534 | USI f_dir10; |
c906108c | 2535 | |
9846de1b | 2536 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2537 | |
2538 | /* Record the fields for the semantic handler. */ | |
2539 | FLD (f_dir10) = f_dir10; | |
96baa820 | 2540 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r15pd", "f_dir10 0x%x", 'x', f_dir10, (char *) 0)); |
c906108c SS |
2541 | |
2542 | #if WITH_PROFILE_MODEL_P | |
2543 | /* Record the fields for profiling. */ | |
2544 | if (PROFILE_MODEL_P (current_cpu)) | |
2545 | { | |
2546 | FLD (in_h_gr_15) = 15; | |
2547 | FLD (out_h_gr_15) = 15; | |
2548 | } | |
2549 | #endif | |
2550 | #undef FLD | |
7a292a7a | 2551 | return idesc; |
c906108c SS |
2552 | } |
2553 | ||
96baa820 | 2554 | extract_sfmt_ldres: |
c906108c | 2555 | { |
7a292a7a | 2556 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2557 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b | 2558 | UINT f_Ri; |
c906108c | 2559 | |
9846de1b | 2560 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2561 | |
2562 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2563 | FLD (f_Ri) = f_Ri; |
c906108c | 2564 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2565 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldres", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2566 | |
2567 | #if WITH_PROFILE_MODEL_P | |
2568 | /* Record the fields for profiling. */ | |
2569 | if (PROFILE_MODEL_P (current_cpu)) | |
2570 | { | |
2571 | FLD (in_Ri) = f_Ri; | |
2572 | FLD (out_Ri) = f_Ri; | |
2573 | } | |
2574 | #endif | |
2575 | #undef FLD | |
7a292a7a | 2576 | return idesc; |
c906108c SS |
2577 | } |
2578 | ||
96baa820 | 2579 | extract_sfmt_copop: |
c906108c | 2580 | { |
7a292a7a | 2581 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2582 | #define FLD(f) abuf->fields.fmt_empty.f |
9846de1b JM |
2583 | /* Contents of trailing part of insn. */ |
2584 | UINT word_1; | |
c906108c | 2585 | |
9846de1b | 2586 | word_1 = GETIMEMUHI (current_cpu, pc + 2); |
c906108c SS |
2587 | |
2588 | /* Record the fields for the semantic handler. */ | |
96baa820 | 2589 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_copop", (char *) 0)); |
c906108c | 2590 | |
c906108c | 2591 | #undef FLD |
7a292a7a | 2592 | return idesc; |
c906108c SS |
2593 | } |
2594 | ||
96baa820 | 2595 | extract_sfmt_andccr: |
c906108c | 2596 | { |
7a292a7a | 2597 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2598 | #define FLD(f) abuf->fields.sfmt_int.f |
9846de1b | 2599 | UINT f_u8; |
c906108c | 2600 | |
9846de1b | 2601 | f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2602 | |
2603 | /* Record the fields for the semantic handler. */ | |
2604 | FLD (f_u8) = f_u8; | |
96baa820 | 2605 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andccr", "f_u8 0x%x", 'x', f_u8, (char *) 0)); |
c906108c SS |
2606 | |
2607 | #undef FLD | |
7a292a7a | 2608 | return idesc; |
c906108c SS |
2609 | } |
2610 | ||
96baa820 | 2611 | extract_sfmt_stilm: |
c906108c | 2612 | { |
7a292a7a | 2613 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2614 | #define FLD(f) abuf->fields.sfmt_int.f |
9846de1b | 2615 | UINT f_u8; |
c906108c | 2616 | |
9846de1b | 2617 | f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2618 | |
2619 | /* Record the fields for the semantic handler. */ | |
2620 | FLD (f_u8) = f_u8; | |
96baa820 | 2621 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stilm", "f_u8 0x%x", 'x', f_u8, (char *) 0)); |
c906108c SS |
2622 | |
2623 | #undef FLD | |
7a292a7a | 2624 | return idesc; |
c906108c SS |
2625 | } |
2626 | ||
96baa820 | 2627 | extract_sfmt_addsp: |
c906108c | 2628 | { |
7a292a7a | 2629 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2630 | #define FLD(f) abuf->fields.sfmt_addsp.f |
9846de1b | 2631 | SI f_s10; |
c906108c | 2632 | |
9846de1b | 2633 | f_s10 = ((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2634 | |
2635 | /* Record the fields for the semantic handler. */ | |
2636 | FLD (f_s10) = f_s10; | |
96baa820 | 2637 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addsp", "f_s10 0x%x", 'x', f_s10, (char *) 0)); |
c906108c SS |
2638 | |
2639 | #if WITH_PROFILE_MODEL_P | |
2640 | /* Record the fields for profiling. */ | |
2641 | if (PROFILE_MODEL_P (current_cpu)) | |
2642 | { | |
2643 | FLD (in_h_gr_15) = 15; | |
2644 | FLD (out_h_gr_15) = 15; | |
2645 | } | |
2646 | #endif | |
2647 | #undef FLD | |
7a292a7a | 2648 | return idesc; |
c906108c SS |
2649 | } |
2650 | ||
96baa820 | 2651 | extract_sfmt_extsb: |
c906108c | 2652 | { |
7a292a7a | 2653 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2654 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b | 2655 | UINT f_Ri; |
c906108c | 2656 | |
9846de1b | 2657 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2658 | |
2659 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2660 | FLD (f_Ri) = f_Ri; |
c906108c | 2661 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2662 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extsb", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2663 | |
2664 | #if WITH_PROFILE_MODEL_P | |
2665 | /* Record the fields for profiling. */ | |
2666 | if (PROFILE_MODEL_P (current_cpu)) | |
2667 | { | |
2668 | FLD (in_Ri) = f_Ri; | |
2669 | FLD (out_Ri) = f_Ri; | |
2670 | } | |
2671 | #endif | |
2672 | #undef FLD | |
7a292a7a | 2673 | return idesc; |
c906108c SS |
2674 | } |
2675 | ||
96baa820 | 2676 | extract_sfmt_extub: |
c906108c | 2677 | { |
7a292a7a | 2678 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2679 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b | 2680 | UINT f_Ri; |
c906108c | 2681 | |
9846de1b | 2682 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2683 | |
2684 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2685 | FLD (f_Ri) = f_Ri; |
c906108c | 2686 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2687 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extub", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2688 | |
2689 | #if WITH_PROFILE_MODEL_P | |
2690 | /* Record the fields for profiling. */ | |
2691 | if (PROFILE_MODEL_P (current_cpu)) | |
2692 | { | |
2693 | FLD (in_Ri) = f_Ri; | |
2694 | FLD (out_Ri) = f_Ri; | |
2695 | } | |
2696 | #endif | |
2697 | #undef FLD | |
7a292a7a | 2698 | return idesc; |
c906108c SS |
2699 | } |
2700 | ||
96baa820 | 2701 | extract_sfmt_extsh: |
c906108c | 2702 | { |
7a292a7a | 2703 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2704 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b | 2705 | UINT f_Ri; |
c906108c | 2706 | |
9846de1b | 2707 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2708 | |
2709 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2710 | FLD (f_Ri) = f_Ri; |
c906108c | 2711 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2712 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extsh", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2713 | |
2714 | #if WITH_PROFILE_MODEL_P | |
2715 | /* Record the fields for profiling. */ | |
2716 | if (PROFILE_MODEL_P (current_cpu)) | |
2717 | { | |
2718 | FLD (in_Ri) = f_Ri; | |
2719 | FLD (out_Ri) = f_Ri; | |
2720 | } | |
2721 | #endif | |
2722 | #undef FLD | |
7a292a7a | 2723 | return idesc; |
c906108c SS |
2724 | } |
2725 | ||
96baa820 | 2726 | extract_sfmt_extuh: |
c906108c | 2727 | { |
7a292a7a | 2728 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2729 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b | 2730 | UINT f_Ri; |
c906108c | 2731 | |
9846de1b | 2732 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2733 | |
2734 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2735 | FLD (f_Ri) = f_Ri; |
c906108c | 2736 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2737 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extuh", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2738 | |
2739 | #if WITH_PROFILE_MODEL_P | |
2740 | /* Record the fields for profiling. */ | |
2741 | if (PROFILE_MODEL_P (current_cpu)) | |
2742 | { | |
2743 | FLD (in_Ri) = f_Ri; | |
2744 | FLD (out_Ri) = f_Ri; | |
2745 | } | |
2746 | #endif | |
2747 | #undef FLD | |
7a292a7a | 2748 | return idesc; |
c906108c SS |
2749 | } |
2750 | ||
96baa820 | 2751 | extract_sfmt_ldm0: |
c906108c | 2752 | { |
7a292a7a | 2753 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2754 | #define FLD(f) abuf->fields.sfmt_ldm0.f |
9846de1b | 2755 | UINT f_reglist_low_ld; |
c906108c | 2756 | |
9846de1b | 2757 | f_reglist_low_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2758 | |
2759 | /* Record the fields for the semantic handler. */ | |
2760 | FLD (f_reglist_low_ld) = f_reglist_low_ld; | |
96baa820 | 2761 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldm0", "f_reglist_low_ld 0x%x", 'x', f_reglist_low_ld, (char *) 0)); |
c906108c SS |
2762 | |
2763 | #if WITH_PROFILE_MODEL_P | |
2764 | /* Record the fields for profiling. */ | |
2765 | if (PROFILE_MODEL_P (current_cpu)) | |
2766 | { | |
2767 | FLD (in_h_gr_15) = 15; | |
2768 | FLD (out_h_gr_0) = 0; | |
2769 | FLD (out_h_gr_1) = 1; | |
2770 | FLD (out_h_gr_15) = 15; | |
2771 | FLD (out_h_gr_2) = 2; | |
2772 | FLD (out_h_gr_3) = 3; | |
2773 | FLD (out_h_gr_4) = 4; | |
2774 | FLD (out_h_gr_5) = 5; | |
2775 | FLD (out_h_gr_6) = 6; | |
2776 | FLD (out_h_gr_7) = 7; | |
2777 | } | |
2778 | #endif | |
2779 | #undef FLD | |
7a292a7a | 2780 | return idesc; |
c906108c SS |
2781 | } |
2782 | ||
96baa820 | 2783 | extract_sfmt_ldm1: |
c906108c | 2784 | { |
7a292a7a | 2785 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2786 | #define FLD(f) abuf->fields.sfmt_ldm1.f |
9846de1b | 2787 | UINT f_reglist_hi_ld; |
c906108c | 2788 | |
9846de1b | 2789 | f_reglist_hi_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2790 | |
2791 | /* Record the fields for the semantic handler. */ | |
2792 | FLD (f_reglist_hi_ld) = f_reglist_hi_ld; | |
96baa820 | 2793 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldm1", "f_reglist_hi_ld 0x%x", 'x', f_reglist_hi_ld, (char *) 0)); |
c906108c SS |
2794 | |
2795 | #if WITH_PROFILE_MODEL_P | |
2796 | /* Record the fields for profiling. */ | |
2797 | if (PROFILE_MODEL_P (current_cpu)) | |
2798 | { | |
2799 | FLD (in_h_gr_15) = 15; | |
2800 | FLD (out_h_gr_10) = 10; | |
2801 | FLD (out_h_gr_11) = 11; | |
2802 | FLD (out_h_gr_12) = 12; | |
2803 | FLD (out_h_gr_13) = 13; | |
2804 | FLD (out_h_gr_14) = 14; | |
2805 | FLD (out_h_gr_15) = 15; | |
2806 | FLD (out_h_gr_8) = 8; | |
2807 | FLD (out_h_gr_9) = 9; | |
2808 | } | |
2809 | #endif | |
2810 | #undef FLD | |
7a292a7a | 2811 | return idesc; |
c906108c SS |
2812 | } |
2813 | ||
96baa820 | 2814 | extract_sfmt_stm0: |
c906108c | 2815 | { |
7a292a7a | 2816 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2817 | #define FLD(f) abuf->fields.sfmt_stm0.f |
9846de1b | 2818 | UINT f_reglist_low_st; |
c906108c | 2819 | |
9846de1b | 2820 | f_reglist_low_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2821 | |
2822 | /* Record the fields for the semantic handler. */ | |
2823 | FLD (f_reglist_low_st) = f_reglist_low_st; | |
96baa820 | 2824 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stm0", "f_reglist_low_st 0x%x", 'x', f_reglist_low_st, (char *) 0)); |
c906108c SS |
2825 | |
2826 | #if WITH_PROFILE_MODEL_P | |
2827 | /* Record the fields for profiling. */ | |
2828 | if (PROFILE_MODEL_P (current_cpu)) | |
2829 | { | |
2830 | FLD (in_h_gr_0) = 0; | |
2831 | FLD (in_h_gr_1) = 1; | |
2832 | FLD (in_h_gr_15) = 15; | |
2833 | FLD (in_h_gr_2) = 2; | |
2834 | FLD (in_h_gr_3) = 3; | |
2835 | FLD (in_h_gr_4) = 4; | |
2836 | FLD (in_h_gr_5) = 5; | |
2837 | FLD (in_h_gr_6) = 6; | |
2838 | FLD (in_h_gr_7) = 7; | |
2839 | FLD (out_h_gr_15) = 15; | |
2840 | } | |
2841 | #endif | |
2842 | #undef FLD | |
7a292a7a | 2843 | return idesc; |
c906108c SS |
2844 | } |
2845 | ||
96baa820 | 2846 | extract_sfmt_stm1: |
c906108c | 2847 | { |
7a292a7a | 2848 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2849 | #define FLD(f) abuf->fields.sfmt_stm1.f |
9846de1b | 2850 | UINT f_reglist_hi_st; |
c906108c | 2851 | |
9846de1b | 2852 | f_reglist_hi_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2853 | |
2854 | /* Record the fields for the semantic handler. */ | |
2855 | FLD (f_reglist_hi_st) = f_reglist_hi_st; | |
96baa820 | 2856 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stm1", "f_reglist_hi_st 0x%x", 'x', f_reglist_hi_st, (char *) 0)); |
c906108c SS |
2857 | |
2858 | #if WITH_PROFILE_MODEL_P | |
2859 | /* Record the fields for profiling. */ | |
2860 | if (PROFILE_MODEL_P (current_cpu)) | |
2861 | { | |
2862 | FLD (in_h_gr_10) = 10; | |
2863 | FLD (in_h_gr_11) = 11; | |
2864 | FLD (in_h_gr_12) = 12; | |
2865 | FLD (in_h_gr_13) = 13; | |
2866 | FLD (in_h_gr_14) = 14; | |
2867 | FLD (in_h_gr_15) = 15; | |
2868 | FLD (in_h_gr_8) = 8; | |
2869 | FLD (in_h_gr_9) = 9; | |
2870 | FLD (out_h_gr_15) = 15; | |
2871 | } | |
2872 | #endif | |
2873 | #undef FLD | |
7a292a7a | 2874 | return idesc; |
c906108c SS |
2875 | } |
2876 | ||
96baa820 | 2877 | extract_sfmt_enter: |
c906108c | 2878 | { |
7a292a7a | 2879 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2880 | #define FLD(f) abuf->fields.sfmt_enter.f |
9846de1b | 2881 | USI f_u10; |
c906108c | 2882 | |
9846de1b | 2883 | f_u10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2884 | |
2885 | /* Record the fields for the semantic handler. */ | |
2886 | FLD (f_u10) = f_u10; | |
96baa820 | 2887 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_enter", "f_u10 0x%x", 'x', f_u10, (char *) 0)); |
c906108c SS |
2888 | |
2889 | #if WITH_PROFILE_MODEL_P | |
2890 | /* Record the fields for profiling. */ | |
2891 | if (PROFILE_MODEL_P (current_cpu)) | |
2892 | { | |
2893 | FLD (in_h_gr_14) = 14; | |
2894 | FLD (in_h_gr_15) = 15; | |
2895 | FLD (out_h_gr_14) = 14; | |
2896 | FLD (out_h_gr_15) = 15; | |
2897 | } | |
2898 | #endif | |
2899 | #undef FLD | |
7a292a7a | 2900 | return idesc; |
c906108c SS |
2901 | } |
2902 | ||
96baa820 | 2903 | extract_sfmt_leave: |
c906108c | 2904 | { |
7a292a7a | 2905 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2906 | #define FLD(f) abuf->fields.sfmt_enter.f |
c906108c | 2907 | |
c906108c SS |
2908 | |
2909 | /* Record the fields for the semantic handler. */ | |
96baa820 | 2910 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_leave", (char *) 0)); |
c906108c SS |
2911 | |
2912 | #if WITH_PROFILE_MODEL_P | |
2913 | /* Record the fields for profiling. */ | |
2914 | if (PROFILE_MODEL_P (current_cpu)) | |
2915 | { | |
2916 | FLD (in_h_gr_14) = 14; | |
2917 | FLD (in_h_gr_15) = 15; | |
2918 | FLD (out_h_gr_14) = 14; | |
2919 | FLD (out_h_gr_15) = 15; | |
2920 | } | |
2921 | #endif | |
2922 | #undef FLD | |
7a292a7a | 2923 | return idesc; |
c906108c SS |
2924 | } |
2925 | ||
96baa820 | 2926 | extract_sfmt_xchb: |
c906108c | 2927 | { |
7a292a7a | 2928 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
96baa820 | 2929 | #define FLD(f) abuf->fields.sfmt_add.f |
9846de1b JM |
2930 | UINT f_Rj; |
2931 | UINT f_Ri; | |
c906108c | 2932 | |
9846de1b JM |
2933 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
2934 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
2935 | |
2936 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
2937 | FLD (f_Ri) = f_Ri; |
2938 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
2939 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
2940 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 2941 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_xchb", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
2942 | |
2943 | #if WITH_PROFILE_MODEL_P | |
2944 | /* Record the fields for profiling. */ | |
2945 | if (PROFILE_MODEL_P (current_cpu)) | |
2946 | { | |
2947 | FLD (in_Ri) = f_Ri; | |
2948 | FLD (in_Rj) = f_Rj; | |
2949 | FLD (out_Ri) = f_Ri; | |
2950 | } | |
2951 | #endif | |
2952 | #undef FLD | |
7a292a7a | 2953 | return idesc; |
c906108c SS |
2954 | } |
2955 | ||
c906108c | 2956 | } |