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