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. */ | |
e5c59029 DB |
642 | FLD (f_Ri) = f_Ri; |
643 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
644 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
645 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 646 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
647 | |
648 | #if WITH_PROFILE_MODEL_P | |
649 | /* Record the fields for profiling. */ | |
650 | if (PROFILE_MODEL_P (current_cpu)) | |
651 | { | |
652 | FLD (in_Ri) = f_Ri; | |
653 | FLD (in_Rj) = f_Rj; | |
654 | FLD (out_Ri) = f_Ri; | |
655 | } | |
656 | #endif | |
657 | #undef FLD | |
7a292a7a | 658 | return idesc; |
c906108c SS |
659 | } |
660 | ||
96baa820 | 661 | extract_sfmt_addi: |
c906108c | 662 | { |
7a292a7a | 663 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 664 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 665 | #define FLD(f) abuf->fields.sfmt_addi.f |
9846de1b JM |
666 | UINT f_u4; |
667 | UINT f_Ri; | |
c906108c | 668 | |
9846de1b JM |
669 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
670 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
671 | |
672 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 673 | FLD (f_Ri) = f_Ri; |
c906108c SS |
674 | FLD (f_u4) = f_u4; |
675 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 676 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
677 | |
678 | #if WITH_PROFILE_MODEL_P | |
679 | /* Record the fields for profiling. */ | |
680 | if (PROFILE_MODEL_P (current_cpu)) | |
681 | { | |
682 | FLD (in_Ri) = f_Ri; | |
683 | FLD (out_Ri) = f_Ri; | |
684 | } | |
685 | #endif | |
686 | #undef FLD | |
7a292a7a | 687 | return idesc; |
c906108c SS |
688 | } |
689 | ||
96baa820 | 690 | extract_sfmt_add2: |
c906108c | 691 | { |
7a292a7a | 692 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 693 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 694 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b JM |
695 | SI f_m4; |
696 | UINT f_Ri; | |
c906108c | 697 | |
9846de1b JM |
698 | f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4)))); |
699 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
700 | |
701 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 702 | FLD (f_Ri) = f_Ri; |
c906108c SS |
703 | FLD (f_m4) = f_m4; |
704 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 705 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add2", "f_Ri 0x%x", 'x', f_Ri, "f_m4 0x%x", 'x', f_m4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
706 | |
707 | #if WITH_PROFILE_MODEL_P | |
708 | /* Record the fields for profiling. */ | |
709 | if (PROFILE_MODEL_P (current_cpu)) | |
710 | { | |
711 | FLD (in_Ri) = f_Ri; | |
712 | FLD (out_Ri) = f_Ri; | |
713 | } | |
714 | #endif | |
715 | #undef FLD | |
7a292a7a | 716 | return idesc; |
c906108c SS |
717 | } |
718 | ||
96baa820 | 719 | extract_sfmt_addc: |
c906108c | 720 | { |
7a292a7a | 721 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 722 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 723 | #define FLD(f) abuf->fields.sfmt_add.f |
9846de1b JM |
724 | UINT f_Rj; |
725 | UINT f_Ri; | |
c906108c | 726 | |
9846de1b JM |
727 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
728 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
729 | |
730 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
731 | FLD (f_Ri) = f_Ri; |
732 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
733 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
734 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 735 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addc", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
736 | |
737 | #if WITH_PROFILE_MODEL_P | |
738 | /* Record the fields for profiling. */ | |
739 | if (PROFILE_MODEL_P (current_cpu)) | |
740 | { | |
741 | FLD (in_Ri) = f_Ri; | |
742 | FLD (in_Rj) = f_Rj; | |
743 | FLD (out_Ri) = f_Ri; | |
744 | } | |
745 | #endif | |
746 | #undef FLD | |
7a292a7a | 747 | return idesc; |
c906108c SS |
748 | } |
749 | ||
96baa820 | 750 | extract_sfmt_addn: |
c906108c | 751 | { |
7a292a7a | 752 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 753 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 754 | #define FLD(f) abuf->fields.sfmt_add.f |
9846de1b JM |
755 | UINT f_Rj; |
756 | UINT f_Ri; | |
c906108c | 757 | |
9846de1b JM |
758 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
759 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
760 | |
761 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
762 | FLD (f_Ri) = f_Ri; |
763 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
764 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
765 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 766 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addn", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
767 | |
768 | #if WITH_PROFILE_MODEL_P | |
769 | /* Record the fields for profiling. */ | |
770 | if (PROFILE_MODEL_P (current_cpu)) | |
771 | { | |
772 | FLD (in_Ri) = f_Ri; | |
773 | FLD (in_Rj) = f_Rj; | |
774 | FLD (out_Ri) = f_Ri; | |
775 | } | |
776 | #endif | |
777 | #undef FLD | |
7a292a7a | 778 | return idesc; |
c906108c SS |
779 | } |
780 | ||
96baa820 | 781 | extract_sfmt_addni: |
c906108c | 782 | { |
7a292a7a | 783 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 784 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 785 | #define FLD(f) abuf->fields.sfmt_addi.f |
9846de1b JM |
786 | UINT f_u4; |
787 | UINT f_Ri; | |
c906108c | 788 | |
9846de1b JM |
789 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
790 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
791 | |
792 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 793 | FLD (f_Ri) = f_Ri; |
c906108c SS |
794 | FLD (f_u4) = f_u4; |
795 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 796 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addni", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
797 | |
798 | #if WITH_PROFILE_MODEL_P | |
799 | /* Record the fields for profiling. */ | |
800 | if (PROFILE_MODEL_P (current_cpu)) | |
801 | { | |
802 | FLD (in_Ri) = f_Ri; | |
803 | FLD (out_Ri) = f_Ri; | |
804 | } | |
805 | #endif | |
806 | #undef FLD | |
7a292a7a | 807 | return idesc; |
c906108c SS |
808 | } |
809 | ||
96baa820 | 810 | extract_sfmt_addn2: |
c906108c | 811 | { |
7a292a7a | 812 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 813 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 814 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b JM |
815 | SI f_m4; |
816 | UINT f_Ri; | |
c906108c | 817 | |
9846de1b JM |
818 | f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4)))); |
819 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
820 | |
821 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 822 | FLD (f_Ri) = f_Ri; |
c906108c SS |
823 | FLD (f_m4) = f_m4; |
824 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 825 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addn2", "f_Ri 0x%x", 'x', f_Ri, "f_m4 0x%x", 'x', f_m4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
826 | |
827 | #if WITH_PROFILE_MODEL_P | |
828 | /* Record the fields for profiling. */ | |
829 | if (PROFILE_MODEL_P (current_cpu)) | |
830 | { | |
831 | FLD (in_Ri) = f_Ri; | |
832 | FLD (out_Ri) = f_Ri; | |
833 | } | |
834 | #endif | |
835 | #undef FLD | |
7a292a7a | 836 | return idesc; |
c906108c SS |
837 | } |
838 | ||
96baa820 | 839 | extract_sfmt_cmp: |
c906108c | 840 | { |
7a292a7a | 841 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 842 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 843 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
844 | UINT f_Rj; |
845 | UINT f_Ri; | |
c906108c | 846 | |
9846de1b JM |
847 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
848 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
849 | |
850 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
851 | FLD (f_Ri) = f_Ri; |
852 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
853 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
854 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 855 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
856 | |
857 | #if WITH_PROFILE_MODEL_P | |
858 | /* Record the fields for profiling. */ | |
859 | if (PROFILE_MODEL_P (current_cpu)) | |
860 | { | |
861 | FLD (in_Ri) = f_Ri; | |
862 | FLD (in_Rj) = f_Rj; | |
863 | } | |
864 | #endif | |
865 | #undef FLD | |
7a292a7a | 866 | return idesc; |
c906108c SS |
867 | } |
868 | ||
96baa820 | 869 | extract_sfmt_cmpi: |
c906108c | 870 | { |
7a292a7a | 871 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 872 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 873 | #define FLD(f) abuf->fields.sfmt_addi.f |
9846de1b JM |
874 | UINT f_u4; |
875 | UINT f_Ri; | |
c906108c | 876 | |
9846de1b JM |
877 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
878 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
879 | |
880 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 881 | FLD (f_Ri) = f_Ri; |
c906108c SS |
882 | FLD (f_u4) = f_u4; |
883 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 884 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpi", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
885 | |
886 | #if WITH_PROFILE_MODEL_P | |
887 | /* Record the fields for profiling. */ | |
888 | if (PROFILE_MODEL_P (current_cpu)) | |
889 | { | |
890 | FLD (in_Ri) = f_Ri; | |
891 | } | |
892 | #endif | |
893 | #undef FLD | |
7a292a7a | 894 | return idesc; |
c906108c SS |
895 | } |
896 | ||
96baa820 | 897 | extract_sfmt_cmp2: |
c906108c | 898 | { |
7a292a7a | 899 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 900 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 901 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b JM |
902 | SI f_m4; |
903 | UINT f_Ri; | |
c906108c | 904 | |
9846de1b JM |
905 | f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4)))); |
906 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
907 | |
908 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 909 | FLD (f_Ri) = f_Ri; |
c906108c SS |
910 | FLD (f_m4) = f_m4; |
911 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 912 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp2", "f_Ri 0x%x", 'x', f_Ri, "f_m4 0x%x", 'x', f_m4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
913 | |
914 | #if WITH_PROFILE_MODEL_P | |
915 | /* Record the fields for profiling. */ | |
916 | if (PROFILE_MODEL_P (current_cpu)) | |
917 | { | |
918 | FLD (in_Ri) = f_Ri; | |
919 | } | |
920 | #endif | |
921 | #undef FLD | |
7a292a7a | 922 | return idesc; |
c906108c SS |
923 | } |
924 | ||
96baa820 | 925 | extract_sfmt_and: |
c906108c | 926 | { |
7a292a7a | 927 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 928 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 929 | #define FLD(f) abuf->fields.sfmt_add.f |
9846de1b JM |
930 | UINT f_Rj; |
931 | UINT f_Ri; | |
c906108c | 932 | |
9846de1b JM |
933 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
934 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
935 | |
936 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
937 | FLD (f_Ri) = f_Ri; |
938 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
939 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
940 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 941 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
942 | |
943 | #if WITH_PROFILE_MODEL_P | |
944 | /* Record the fields for profiling. */ | |
945 | if (PROFILE_MODEL_P (current_cpu)) | |
946 | { | |
947 | FLD (in_Ri) = f_Ri; | |
948 | FLD (in_Rj) = f_Rj; | |
949 | FLD (out_Ri) = f_Ri; | |
950 | } | |
951 | #endif | |
952 | #undef FLD | |
7a292a7a | 953 | return idesc; |
c906108c SS |
954 | } |
955 | ||
96baa820 | 956 | extract_sfmt_andm: |
c906108c | 957 | { |
7a292a7a | 958 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 959 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 960 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
961 | UINT f_Rj; |
962 | UINT f_Ri; | |
c906108c | 963 | |
9846de1b JM |
964 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
965 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
966 | |
967 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
968 | FLD (f_Ri) = f_Ri; |
969 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
970 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
971 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 972 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andm", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
973 | |
974 | #if WITH_PROFILE_MODEL_P | |
975 | /* Record the fields for profiling. */ | |
976 | if (PROFILE_MODEL_P (current_cpu)) | |
977 | { | |
978 | FLD (in_Ri) = f_Ri; | |
979 | FLD (in_Rj) = f_Rj; | |
980 | } | |
981 | #endif | |
982 | #undef FLD | |
7a292a7a | 983 | return idesc; |
c906108c SS |
984 | } |
985 | ||
96baa820 | 986 | extract_sfmt_andh: |
c906108c | 987 | { |
7a292a7a | 988 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 989 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 990 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
991 | UINT f_Rj; |
992 | UINT f_Ri; | |
c906108c | 993 | |
9846de1b JM |
994 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
995 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
996 | |
997 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
998 | FLD (f_Ri) = f_Ri; |
999 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
1000 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
1001 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 1002 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andh", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
1003 | |
1004 | #if WITH_PROFILE_MODEL_P | |
1005 | /* Record the fields for profiling. */ | |
1006 | if (PROFILE_MODEL_P (current_cpu)) | |
1007 | { | |
1008 | FLD (in_Ri) = f_Ri; | |
1009 | FLD (in_Rj) = f_Rj; | |
1010 | } | |
1011 | #endif | |
1012 | #undef FLD | |
7a292a7a | 1013 | return idesc; |
c906108c SS |
1014 | } |
1015 | ||
96baa820 | 1016 | extract_sfmt_andb: |
c906108c | 1017 | { |
7a292a7a | 1018 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1019 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1020 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
1021 | UINT f_Rj; |
1022 | UINT f_Ri; | |
c906108c | 1023 | |
9846de1b JM |
1024 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1025 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1026 | |
1027 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1028 | FLD (f_Ri) = f_Ri; |
1029 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
1030 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
1031 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 1032 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andb", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
1033 | |
1034 | #if WITH_PROFILE_MODEL_P | |
1035 | /* Record the fields for profiling. */ | |
1036 | if (PROFILE_MODEL_P (current_cpu)) | |
1037 | { | |
1038 | FLD (in_Ri) = f_Ri; | |
1039 | FLD (in_Rj) = f_Rj; | |
1040 | } | |
1041 | #endif | |
1042 | #undef FLD | |
7a292a7a | 1043 | return idesc; |
c906108c SS |
1044 | } |
1045 | ||
96baa820 | 1046 | extract_sfmt_bandl: |
c906108c | 1047 | { |
7a292a7a | 1048 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1049 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1050 | #define FLD(f) abuf->fields.sfmt_addi.f |
9846de1b JM |
1051 | UINT f_u4; |
1052 | UINT f_Ri; | |
c906108c | 1053 | |
9846de1b JM |
1054 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1055 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1056 | |
1057 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1058 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1059 | FLD (f_u4) = f_u4; |
1060 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1061 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bandl", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1062 | |
1063 | #if WITH_PROFILE_MODEL_P | |
1064 | /* Record the fields for profiling. */ | |
1065 | if (PROFILE_MODEL_P (current_cpu)) | |
1066 | { | |
1067 | FLD (in_Ri) = f_Ri; | |
1068 | } | |
1069 | #endif | |
1070 | #undef FLD | |
7a292a7a | 1071 | return idesc; |
c906108c SS |
1072 | } |
1073 | ||
96baa820 | 1074 | extract_sfmt_btstl: |
c906108c | 1075 | { |
7a292a7a | 1076 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1077 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1078 | #define FLD(f) abuf->fields.sfmt_addi.f |
9846de1b JM |
1079 | UINT f_u4; |
1080 | UINT f_Ri; | |
c906108c | 1081 | |
9846de1b JM |
1082 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1083 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1084 | |
1085 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1086 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1087 | FLD (f_u4) = f_u4; |
1088 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1089 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_btstl", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1090 | |
1091 | #if WITH_PROFILE_MODEL_P | |
1092 | /* Record the fields for profiling. */ | |
1093 | if (PROFILE_MODEL_P (current_cpu)) | |
1094 | { | |
1095 | FLD (in_Ri) = f_Ri; | |
1096 | } | |
1097 | #endif | |
1098 | #undef FLD | |
7a292a7a | 1099 | return idesc; |
c906108c SS |
1100 | } |
1101 | ||
96baa820 | 1102 | extract_sfmt_mul: |
c906108c | 1103 | { |
7a292a7a | 1104 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1105 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1106 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
1107 | UINT f_Rj; |
1108 | UINT f_Ri; | |
c906108c | 1109 | |
9846de1b JM |
1110 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1111 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1112 | |
1113 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1114 | FLD (f_Ri) = f_Ri; |
1115 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
1116 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
1117 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 1118 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mul", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
1119 | |
1120 | #if WITH_PROFILE_MODEL_P | |
1121 | /* Record the fields for profiling. */ | |
1122 | if (PROFILE_MODEL_P (current_cpu)) | |
1123 | { | |
1124 | FLD (in_Ri) = f_Ri; | |
1125 | FLD (in_Rj) = f_Rj; | |
1126 | } | |
1127 | #endif | |
1128 | #undef FLD | |
7a292a7a | 1129 | return idesc; |
c906108c SS |
1130 | } |
1131 | ||
96baa820 | 1132 | extract_sfmt_mulu: |
c906108c | 1133 | { |
7a292a7a | 1134 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1135 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1136 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
1137 | UINT f_Rj; |
1138 | UINT f_Ri; | |
c906108c | 1139 | |
9846de1b JM |
1140 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1141 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1142 | |
1143 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1144 | FLD (f_Ri) = f_Ri; |
1145 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
1146 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
1147 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 1148 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mulu", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
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_mulh: |
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_str13.f |
9846de1b JM |
1167 | UINT f_Rj; |
1168 | UINT f_Ri; | |
c906108c | 1169 | |
9846de1b JM |
1170 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1171 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1172 | |
1173 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1174 | FLD (f_Ri) = f_Ri; |
1175 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
1176 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
1177 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 1178 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mulh", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
1179 | |
1180 | #if WITH_PROFILE_MODEL_P | |
1181 | /* Record the fields for profiling. */ | |
1182 | if (PROFILE_MODEL_P (current_cpu)) | |
1183 | { | |
1184 | FLD (in_Ri) = f_Ri; | |
1185 | FLD (in_Rj) = f_Rj; | |
1186 | } | |
1187 | #endif | |
1188 | #undef FLD | |
7a292a7a | 1189 | return idesc; |
c906108c SS |
1190 | } |
1191 | ||
96baa820 | 1192 | extract_sfmt_div0s: |
c906108c | 1193 | { |
7a292a7a | 1194 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1195 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1196 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b | 1197 | UINT f_Ri; |
c906108c | 1198 | |
9846de1b | 1199 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1200 | |
1201 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1202 | FLD (f_Ri) = f_Ri; |
c906108c | 1203 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1204 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div0s", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1205 | |
1206 | #if WITH_PROFILE_MODEL_P | |
1207 | /* Record the fields for profiling. */ | |
1208 | if (PROFILE_MODEL_P (current_cpu)) | |
1209 | { | |
1210 | FLD (in_Ri) = f_Ri; | |
1211 | } | |
1212 | #endif | |
1213 | #undef FLD | |
7a292a7a | 1214 | return idesc; |
c906108c SS |
1215 | } |
1216 | ||
96baa820 | 1217 | extract_sfmt_div0u: |
c906108c | 1218 | { |
7a292a7a | 1219 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1220 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1221 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 1222 | |
c906108c SS |
1223 | |
1224 | /* Record the fields for the semantic handler. */ | |
96baa820 | 1225 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div0u", (char *) 0)); |
c906108c SS |
1226 | |
1227 | #undef FLD | |
7a292a7a | 1228 | return idesc; |
c906108c SS |
1229 | } |
1230 | ||
96baa820 | 1231 | extract_sfmt_div1: |
c906108c | 1232 | { |
7a292a7a | 1233 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1234 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1235 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b | 1236 | UINT f_Ri; |
c906108c | 1237 | |
9846de1b | 1238 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1239 | |
1240 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1241 | FLD (f_Ri) = f_Ri; |
c906108c | 1242 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1243 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div1", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1244 | |
1245 | #if WITH_PROFILE_MODEL_P | |
1246 | /* Record the fields for profiling. */ | |
1247 | if (PROFILE_MODEL_P (current_cpu)) | |
1248 | { | |
1249 | FLD (in_Ri) = f_Ri; | |
1250 | } | |
1251 | #endif | |
1252 | #undef FLD | |
7a292a7a | 1253 | return idesc; |
c906108c SS |
1254 | } |
1255 | ||
96baa820 | 1256 | extract_sfmt_div2: |
c906108c | 1257 | { |
7a292a7a | 1258 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1259 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1260 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b | 1261 | UINT f_Ri; |
c906108c | 1262 | |
9846de1b | 1263 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1264 | |
1265 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1266 | FLD (f_Ri) = f_Ri; |
c906108c | 1267 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1268 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div2", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1269 | |
1270 | #if WITH_PROFILE_MODEL_P | |
1271 | /* Record the fields for profiling. */ | |
1272 | if (PROFILE_MODEL_P (current_cpu)) | |
1273 | { | |
1274 | FLD (in_Ri) = f_Ri; | |
1275 | } | |
1276 | #endif | |
1277 | #undef FLD | |
7a292a7a | 1278 | return idesc; |
c906108c SS |
1279 | } |
1280 | ||
96baa820 | 1281 | extract_sfmt_div3: |
c906108c | 1282 | { |
7a292a7a | 1283 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1284 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1285 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 1286 | |
c906108c SS |
1287 | |
1288 | /* Record the fields for the semantic handler. */ | |
96baa820 | 1289 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div3", (char *) 0)); |
c906108c SS |
1290 | |
1291 | #undef FLD | |
7a292a7a | 1292 | return idesc; |
c906108c SS |
1293 | } |
1294 | ||
96baa820 | 1295 | extract_sfmt_div4s: |
c906108c | 1296 | { |
7a292a7a | 1297 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1298 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1299 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 1300 | |
c906108c SS |
1301 | |
1302 | /* Record the fields for the semantic handler. */ | |
96baa820 | 1303 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div4s", (char *) 0)); |
c906108c SS |
1304 | |
1305 | #undef FLD | |
7a292a7a | 1306 | return idesc; |
c906108c SS |
1307 | } |
1308 | ||
96baa820 | 1309 | extract_sfmt_lsl: |
c906108c | 1310 | { |
7a292a7a | 1311 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1312 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1313 | #define FLD(f) abuf->fields.sfmt_add.f |
9846de1b JM |
1314 | UINT f_Rj; |
1315 | UINT f_Ri; | |
c906108c | 1316 | |
9846de1b JM |
1317 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1318 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1319 | |
1320 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1321 | FLD (f_Ri) = f_Ri; |
1322 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
1323 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
1324 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 1325 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lsl", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
1326 | |
1327 | #if WITH_PROFILE_MODEL_P | |
1328 | /* Record the fields for profiling. */ | |
1329 | if (PROFILE_MODEL_P (current_cpu)) | |
1330 | { | |
1331 | FLD (in_Ri) = f_Ri; | |
1332 | FLD (in_Rj) = f_Rj; | |
1333 | FLD (out_Ri) = f_Ri; | |
1334 | } | |
1335 | #endif | |
1336 | #undef FLD | |
7a292a7a | 1337 | return idesc; |
c906108c SS |
1338 | } |
1339 | ||
96baa820 | 1340 | extract_sfmt_lsli: |
c906108c | 1341 | { |
7a292a7a | 1342 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1343 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1344 | #define FLD(f) abuf->fields.sfmt_addi.f |
9846de1b JM |
1345 | UINT f_u4; |
1346 | UINT f_Ri; | |
c906108c | 1347 | |
9846de1b JM |
1348 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1349 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1350 | |
1351 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1352 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1353 | FLD (f_u4) = f_u4; |
1354 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1355 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lsli", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1356 | |
1357 | #if WITH_PROFILE_MODEL_P | |
1358 | /* Record the fields for profiling. */ | |
1359 | if (PROFILE_MODEL_P (current_cpu)) | |
1360 | { | |
1361 | FLD (in_Ri) = f_Ri; | |
1362 | FLD (out_Ri) = f_Ri; | |
1363 | } | |
1364 | #endif | |
1365 | #undef FLD | |
7a292a7a | 1366 | return idesc; |
c906108c SS |
1367 | } |
1368 | ||
96baa820 | 1369 | extract_sfmt_ldi8: |
c906108c | 1370 | { |
7a292a7a | 1371 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1372 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1373 | #define FLD(f) abuf->fields.sfmt_ldi8.f |
9846de1b JM |
1374 | UINT f_i8; |
1375 | UINT f_Ri; | |
c906108c | 1376 | |
9846de1b JM |
1377 | f_i8 = EXTRACT_MSB0_UINT (insn, 16, 4, 8); |
1378 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1379 | |
1380 | /* Record the fields for the semantic handler. */ | |
1381 | FLD (f_i8) = f_i8; | |
e5c59029 | 1382 | FLD (f_Ri) = f_Ri; |
c906108c | 1383 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1384 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi8", "f_i8 0x%x", 'x', f_i8, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1385 | |
1386 | #if WITH_PROFILE_MODEL_P | |
1387 | /* Record the fields for profiling. */ | |
1388 | if (PROFILE_MODEL_P (current_cpu)) | |
1389 | { | |
1390 | FLD (out_Ri) = f_Ri; | |
1391 | } | |
1392 | #endif | |
1393 | #undef FLD | |
7a292a7a | 1394 | return idesc; |
c906108c SS |
1395 | } |
1396 | ||
96baa820 | 1397 | extract_sfmt_ldi20: |
c906108c | 1398 | { |
7a292a7a | 1399 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1400 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1401 | #define FLD(f) abuf->fields.sfmt_ldi20.f |
9846de1b JM |
1402 | UINT f_i20_16; |
1403 | UINT f_i20_4; | |
1404 | UINT f_Ri; | |
1405 | UINT f_i20; | |
1406 | /* Contents of trailing part of insn. */ | |
1407 | UINT word_1; | |
1408 | ||
1409 | word_1 = GETIMEMUHI (current_cpu, pc + 2); | |
1410 | f_i20_16 = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 0)); | |
1411 | f_i20_4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); | |
1412 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
1413 | { | |
1414 | f_i20 = ((((f_i20_4) << (16))) | (f_i20_16)); | |
1415 | } | |
c906108c SS |
1416 | |
1417 | /* Record the fields for the semantic handler. */ | |
1418 | FLD (f_i20) = f_i20; | |
e5c59029 | 1419 | FLD (f_Ri) = f_Ri; |
c906108c | 1420 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1421 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi20", "f_i20 0x%x", 'x', f_i20, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1422 | |
1423 | #if WITH_PROFILE_MODEL_P | |
1424 | /* Record the fields for profiling. */ | |
1425 | if (PROFILE_MODEL_P (current_cpu)) | |
1426 | { | |
1427 | FLD (out_Ri) = f_Ri; | |
1428 | } | |
1429 | #endif | |
1430 | #undef FLD | |
7a292a7a | 1431 | return idesc; |
c906108c SS |
1432 | } |
1433 | ||
96baa820 | 1434 | extract_sfmt_ldi32: |
c906108c | 1435 | { |
7a292a7a | 1436 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1437 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1438 | #define FLD(f) abuf->fields.sfmt_ldi32.f |
9846de1b JM |
1439 | UINT f_i32; |
1440 | UINT f_Ri; | |
1441 | /* Contents of trailing part of insn. */ | |
1442 | UINT word_1; | |
1443 | UINT word_2; | |
c906108c | 1444 | |
9846de1b JM |
1445 | word_1 = GETIMEMUHI (current_cpu, pc + 2); |
1446 | word_2 = GETIMEMUHI (current_cpu, pc + 4); | |
1447 | f_i32 = (0|(EXTRACT_MSB0_UINT (word_2, 16, 0, 16) << 0)|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 16)); | |
1448 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1449 | |
1450 | /* Record the fields for the semantic handler. */ | |
1451 | FLD (f_i32) = f_i32; | |
e5c59029 | 1452 | FLD (f_Ri) = f_Ri; |
c906108c | 1453 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1454 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi32", "f_i32 0x%x", 'x', f_i32, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1455 | |
1456 | #if WITH_PROFILE_MODEL_P | |
1457 | /* Record the fields for profiling. */ | |
1458 | if (PROFILE_MODEL_P (current_cpu)) | |
1459 | { | |
1460 | FLD (out_Ri) = f_Ri; | |
1461 | } | |
1462 | #endif | |
1463 | #undef FLD | |
7a292a7a | 1464 | return idesc; |
c906108c SS |
1465 | } |
1466 | ||
96baa820 | 1467 | extract_sfmt_ld: |
c906108c | 1468 | { |
7a292a7a | 1469 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1470 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1471 | #define FLD(f) abuf->fields.sfmt_ldr13.f |
9846de1b JM |
1472 | UINT f_Rj; |
1473 | UINT f_Ri; | |
c906108c | 1474 | |
9846de1b JM |
1475 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1476 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1477 | |
1478 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1479 | FLD (f_Rj) = f_Rj; |
1480 | FLD (f_Ri) = f_Ri; | |
c906108c SS |
1481 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; |
1482 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1483 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ld", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c | 1484 | |
c906108c SS |
1485 | #if WITH_PROFILE_MODEL_P |
1486 | /* Record the fields for profiling. */ | |
1487 | if (PROFILE_MODEL_P (current_cpu)) | |
1488 | { | |
1489 | FLD (in_Rj) = f_Rj; | |
1490 | FLD (out_Ri) = f_Ri; | |
1491 | } | |
1492 | #endif | |
1493 | #undef FLD | |
7a292a7a | 1494 | return idesc; |
c906108c SS |
1495 | } |
1496 | ||
96baa820 | 1497 | extract_sfmt_ldr13: |
c906108c | 1498 | { |
7a292a7a | 1499 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1500 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1501 | #define FLD(f) abuf->fields.sfmt_ldr13.f |
9846de1b JM |
1502 | UINT f_Rj; |
1503 | UINT f_Ri; | |
c906108c | 1504 | |
9846de1b JM |
1505 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1506 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1507 | |
1508 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1509 | FLD (f_Rj) = f_Rj; |
1510 | FLD (f_Ri) = f_Ri; | |
c906108c SS |
1511 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; |
1512 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1513 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr13", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c | 1514 | |
c906108c SS |
1515 | #if WITH_PROFILE_MODEL_P |
1516 | /* Record the fields for profiling. */ | |
1517 | if (PROFILE_MODEL_P (current_cpu)) | |
1518 | { | |
1519 | FLD (in_Rj) = f_Rj; | |
1520 | FLD (in_h_gr_13) = 13; | |
1521 | FLD (out_Ri) = f_Ri; | |
1522 | } | |
1523 | #endif | |
1524 | #undef FLD | |
7a292a7a | 1525 | return idesc; |
c906108c SS |
1526 | } |
1527 | ||
96baa820 | 1528 | extract_sfmt_ldr14: |
c906108c | 1529 | { |
7a292a7a | 1530 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1531 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1532 | #define FLD(f) abuf->fields.sfmt_ldr14.f |
9846de1b JM |
1533 | SI f_disp10; |
1534 | UINT f_Ri; | |
c906108c | 1535 | |
9846de1b JM |
1536 | f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2)); |
1537 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1538 | |
1539 | /* Record the fields for the semantic handler. */ | |
1540 | FLD (f_disp10) = f_disp10; | |
e5c59029 | 1541 | FLD (f_Ri) = f_Ri; |
c906108c | 1542 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1543 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr14", "f_disp10 0x%x", 'x', f_disp10, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1544 | |
1545 | #if WITH_PROFILE_MODEL_P | |
1546 | /* Record the fields for profiling. */ | |
1547 | if (PROFILE_MODEL_P (current_cpu)) | |
1548 | { | |
1549 | FLD (in_h_gr_14) = 14; | |
1550 | FLD (out_Ri) = f_Ri; | |
1551 | } | |
1552 | #endif | |
1553 | #undef FLD | |
7a292a7a | 1554 | return idesc; |
c906108c SS |
1555 | } |
1556 | ||
96baa820 | 1557 | extract_sfmt_ldr14uh: |
c906108c | 1558 | { |
7a292a7a | 1559 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1560 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1561 | #define FLD(f) abuf->fields.sfmt_ldr14uh.f |
9846de1b JM |
1562 | SI f_disp9; |
1563 | UINT f_Ri; | |
c906108c | 1564 | |
9846de1b JM |
1565 | f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1)); |
1566 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1567 | |
1568 | /* Record the fields for the semantic handler. */ | |
1569 | FLD (f_disp9) = f_disp9; | |
e5c59029 | 1570 | FLD (f_Ri) = f_Ri; |
c906108c | 1571 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1572 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr14uh", "f_disp9 0x%x", 'x', f_disp9, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1573 | |
1574 | #if WITH_PROFILE_MODEL_P | |
1575 | /* Record the fields for profiling. */ | |
1576 | if (PROFILE_MODEL_P (current_cpu)) | |
1577 | { | |
1578 | FLD (in_h_gr_14) = 14; | |
1579 | FLD (out_Ri) = f_Ri; | |
1580 | } | |
1581 | #endif | |
1582 | #undef FLD | |
7a292a7a | 1583 | return idesc; |
c906108c SS |
1584 | } |
1585 | ||
96baa820 | 1586 | extract_sfmt_ldr14ub: |
c906108c | 1587 | { |
7a292a7a | 1588 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1589 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1590 | #define FLD(f) abuf->fields.sfmt_ldr14ub.f |
9846de1b JM |
1591 | INT f_disp8; |
1592 | UINT f_Ri; | |
c906108c | 1593 | |
9846de1b JM |
1594 | f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8); |
1595 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1596 | |
1597 | /* Record the fields for the semantic handler. */ | |
1598 | FLD (f_disp8) = f_disp8; | |
e5c59029 | 1599 | FLD (f_Ri) = f_Ri; |
c906108c | 1600 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1601 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr14ub", "f_disp8 0x%x", 'x', f_disp8, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1602 | |
1603 | #if WITH_PROFILE_MODEL_P | |
1604 | /* Record the fields for profiling. */ | |
1605 | if (PROFILE_MODEL_P (current_cpu)) | |
1606 | { | |
1607 | FLD (in_h_gr_14) = 14; | |
1608 | FLD (out_Ri) = f_Ri; | |
1609 | } | |
1610 | #endif | |
1611 | #undef FLD | |
7a292a7a | 1612 | return idesc; |
c906108c SS |
1613 | } |
1614 | ||
96baa820 | 1615 | extract_sfmt_ldr15: |
c906108c | 1616 | { |
7a292a7a | 1617 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1618 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1619 | #define FLD(f) abuf->fields.sfmt_ldr15.f |
9846de1b JM |
1620 | USI f_udisp6; |
1621 | UINT f_Ri; | |
c906108c | 1622 | |
9846de1b JM |
1623 | f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2)); |
1624 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1625 | |
1626 | /* Record the fields for the semantic handler. */ | |
1627 | FLD (f_udisp6) = f_udisp6; | |
e5c59029 | 1628 | FLD (f_Ri) = f_Ri; |
c906108c | 1629 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1630 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15", "f_udisp6 0x%x", 'x', f_udisp6, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1631 | |
1632 | #if WITH_PROFILE_MODEL_P | |
1633 | /* Record the fields for profiling. */ | |
1634 | if (PROFILE_MODEL_P (current_cpu)) | |
1635 | { | |
1636 | FLD (in_h_gr_15) = 15; | |
1637 | FLD (out_Ri) = f_Ri; | |
1638 | } | |
1639 | #endif | |
1640 | #undef FLD | |
7a292a7a | 1641 | return idesc; |
c906108c SS |
1642 | } |
1643 | ||
96baa820 | 1644 | extract_sfmt_ldr15gr: |
c906108c | 1645 | { |
7a292a7a | 1646 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1647 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1648 | #define FLD(f) abuf->fields.sfmt_ldr15gr.f |
9846de1b | 1649 | UINT f_Ri; |
c906108c | 1650 | |
9846de1b | 1651 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1652 | |
1653 | /* Record the fields for the semantic handler. */ | |
1654 | FLD (f_Ri) = f_Ri; | |
1655 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
96baa820 | 1656 | 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 |
1657 | |
1658 | #if WITH_PROFILE_MODEL_P | |
1659 | /* Record the fields for profiling. */ | |
1660 | if (PROFILE_MODEL_P (current_cpu)) | |
1661 | { | |
1662 | FLD (in_h_gr_15) = 15; | |
1663 | FLD (out_Ri) = f_Ri; | |
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_ldr15dr: |
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_ldr15dr.f |
9846de1b | 1676 | UINT f_Rs2; |
c906108c | 1677 | |
9846de1b | 1678 | f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1679 | |
1680 | /* Record the fields for the semantic handler. */ | |
1681 | FLD (f_Rs2) = f_Rs2; | |
96baa820 | 1682 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15dr", "f_Rs2 0x%x", 'x', f_Rs2, (char *) 0)); |
c906108c SS |
1683 | |
1684 | #if WITH_PROFILE_MODEL_P | |
1685 | /* Record the fields for profiling. */ | |
1686 | if (PROFILE_MODEL_P (current_cpu)) | |
1687 | { | |
1688 | FLD (in_h_gr_15) = 15; | |
1689 | FLD (out_h_gr_15) = 15; | |
1690 | } | |
1691 | #endif | |
1692 | #undef FLD | |
7a292a7a | 1693 | return idesc; |
c906108c SS |
1694 | } |
1695 | ||
96baa820 | 1696 | extract_sfmt_ldr15ps: |
c906108c | 1697 | { |
7a292a7a | 1698 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1699 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1700 | #define FLD(f) abuf->fields.sfmt_addsp.f |
c906108c | 1701 | |
c906108c SS |
1702 | |
1703 | /* Record the fields for the semantic handler. */ | |
96baa820 | 1704 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15ps", (char *) 0)); |
c906108c SS |
1705 | |
1706 | #if WITH_PROFILE_MODEL_P | |
1707 | /* Record the fields for profiling. */ | |
1708 | if (PROFILE_MODEL_P (current_cpu)) | |
1709 | { | |
1710 | FLD (in_h_gr_15) = 15; | |
1711 | FLD (out_h_gr_15) = 15; | |
1712 | } | |
1713 | #endif | |
1714 | #undef FLD | |
7a292a7a | 1715 | return idesc; |
c906108c SS |
1716 | } |
1717 | ||
96baa820 | 1718 | extract_sfmt_st: |
c906108c | 1719 | { |
7a292a7a | 1720 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1721 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1722 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
1723 | UINT f_Rj; |
1724 | UINT f_Ri; | |
c906108c | 1725 | |
9846de1b JM |
1726 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1727 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1728 | |
1729 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1730 | FLD (f_Ri) = f_Ri; |
1731 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
1732 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
1733 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 1734 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_st", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c | 1735 | |
c906108c SS |
1736 | #if WITH_PROFILE_MODEL_P |
1737 | /* Record the fields for profiling. */ | |
1738 | if (PROFILE_MODEL_P (current_cpu)) | |
1739 | { | |
1740 | FLD (in_Ri) = f_Ri; | |
1741 | FLD (in_Rj) = f_Rj; | |
1742 | } | |
1743 | #endif | |
1744 | #undef FLD | |
7a292a7a | 1745 | return idesc; |
c906108c SS |
1746 | } |
1747 | ||
96baa820 | 1748 | extract_sfmt_str13: |
c906108c | 1749 | { |
7a292a7a | 1750 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1751 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1752 | #define FLD(f) abuf->fields.sfmt_str13.f |
9846de1b JM |
1753 | UINT f_Rj; |
1754 | UINT f_Ri; | |
c906108c | 1755 | |
9846de1b JM |
1756 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1757 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1758 | |
1759 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1760 | FLD (f_Ri) = f_Ri; |
1761 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
1762 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
1763 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 1764 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str13", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c | 1765 | |
c906108c SS |
1766 | #if WITH_PROFILE_MODEL_P |
1767 | /* Record the fields for profiling. */ | |
1768 | if (PROFILE_MODEL_P (current_cpu)) | |
1769 | { | |
1770 | FLD (in_Ri) = f_Ri; | |
1771 | FLD (in_Rj) = f_Rj; | |
1772 | FLD (in_h_gr_13) = 13; | |
1773 | } | |
1774 | #endif | |
1775 | #undef FLD | |
7a292a7a | 1776 | return idesc; |
c906108c SS |
1777 | } |
1778 | ||
96baa820 | 1779 | extract_sfmt_str14: |
c906108c | 1780 | { |
7a292a7a | 1781 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1782 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1783 | #define FLD(f) abuf->fields.sfmt_str14.f |
9846de1b JM |
1784 | SI f_disp10; |
1785 | UINT f_Ri; | |
c906108c | 1786 | |
9846de1b JM |
1787 | f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2)); |
1788 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1789 | |
1790 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1791 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1792 | FLD (f_disp10) = f_disp10; |
1793 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1794 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str14", "f_Ri 0x%x", 'x', f_Ri, "f_disp10 0x%x", 'x', f_disp10, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1795 | |
1796 | #if WITH_PROFILE_MODEL_P | |
1797 | /* Record the fields for profiling. */ | |
1798 | if (PROFILE_MODEL_P (current_cpu)) | |
1799 | { | |
1800 | FLD (in_Ri) = f_Ri; | |
1801 | FLD (in_h_gr_14) = 14; | |
1802 | } | |
1803 | #endif | |
1804 | #undef FLD | |
7a292a7a | 1805 | return idesc; |
c906108c SS |
1806 | } |
1807 | ||
96baa820 | 1808 | extract_sfmt_str14h: |
c906108c | 1809 | { |
7a292a7a | 1810 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1811 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1812 | #define FLD(f) abuf->fields.sfmt_str14h.f |
9846de1b JM |
1813 | SI f_disp9; |
1814 | UINT f_Ri; | |
c906108c | 1815 | |
9846de1b JM |
1816 | f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1)); |
1817 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1818 | |
1819 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1820 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1821 | FLD (f_disp9) = f_disp9; |
1822 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1823 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str14h", "f_Ri 0x%x", 'x', f_Ri, "f_disp9 0x%x", 'x', f_disp9, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1824 | |
1825 | #if WITH_PROFILE_MODEL_P | |
1826 | /* Record the fields for profiling. */ | |
1827 | if (PROFILE_MODEL_P (current_cpu)) | |
1828 | { | |
1829 | FLD (in_Ri) = f_Ri; | |
1830 | FLD (in_h_gr_14) = 14; | |
1831 | } | |
1832 | #endif | |
1833 | #undef FLD | |
7a292a7a | 1834 | return idesc; |
c906108c SS |
1835 | } |
1836 | ||
96baa820 | 1837 | extract_sfmt_str14b: |
c906108c | 1838 | { |
7a292a7a | 1839 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1840 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1841 | #define FLD(f) abuf->fields.sfmt_str14b.f |
9846de1b JM |
1842 | INT f_disp8; |
1843 | UINT f_Ri; | |
c906108c | 1844 | |
9846de1b JM |
1845 | f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8); |
1846 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1847 | |
1848 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1849 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1850 | FLD (f_disp8) = f_disp8; |
1851 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1852 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str14b", "f_Ri 0x%x", 'x', f_Ri, "f_disp8 0x%x", 'x', f_disp8, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1853 | |
1854 | #if WITH_PROFILE_MODEL_P | |
1855 | /* Record the fields for profiling. */ | |
1856 | if (PROFILE_MODEL_P (current_cpu)) | |
1857 | { | |
1858 | FLD (in_Ri) = f_Ri; | |
1859 | FLD (in_h_gr_14) = 14; | |
1860 | } | |
1861 | #endif | |
1862 | #undef FLD | |
7a292a7a | 1863 | return idesc; |
c906108c SS |
1864 | } |
1865 | ||
96baa820 | 1866 | extract_sfmt_str15: |
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_str15.f |
9846de1b JM |
1871 | USI f_udisp6; |
1872 | UINT f_Ri; | |
c906108c | 1873 | |
9846de1b JM |
1874 | f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2)); |
1875 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1876 | |
1877 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1878 | FLD (f_Ri) = f_Ri; |
c906108c SS |
1879 | FLD (f_udisp6) = f_udisp6; |
1880 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1881 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15", "f_Ri 0x%x", 'x', f_Ri, "f_udisp6 0x%x", 'x', f_udisp6, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1882 | |
1883 | #if WITH_PROFILE_MODEL_P | |
1884 | /* Record the fields for profiling. */ | |
1885 | if (PROFILE_MODEL_P (current_cpu)) | |
1886 | { | |
1887 | FLD (in_Ri) = f_Ri; | |
1888 | FLD (in_h_gr_15) = 15; | |
1889 | } | |
1890 | #endif | |
1891 | #undef FLD | |
7a292a7a | 1892 | return idesc; |
c906108c SS |
1893 | } |
1894 | ||
96baa820 | 1895 | extract_sfmt_str15gr: |
c906108c | 1896 | { |
7a292a7a | 1897 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1898 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1899 | #define FLD(f) abuf->fields.sfmt_str15gr.f |
9846de1b | 1900 | UINT f_Ri; |
c906108c | 1901 | |
9846de1b | 1902 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1903 | |
1904 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 1905 | FLD (f_Ri) = f_Ri; |
c906108c | 1906 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 1907 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15gr", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1908 | |
1909 | #if WITH_PROFILE_MODEL_P | |
1910 | /* Record the fields for profiling. */ | |
1911 | if (PROFILE_MODEL_P (current_cpu)) | |
1912 | { | |
1913 | FLD (in_Ri) = f_Ri; | |
1914 | FLD (in_h_gr_15) = 15; | |
1915 | FLD (out_h_gr_15) = 15; | |
1916 | } | |
1917 | #endif | |
1918 | #undef FLD | |
7a292a7a | 1919 | return idesc; |
c906108c SS |
1920 | } |
1921 | ||
96baa820 | 1922 | extract_sfmt_str15dr: |
c906108c | 1923 | { |
7a292a7a | 1924 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1925 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1926 | #define FLD(f) abuf->fields.sfmt_ldr15dr.f |
9846de1b | 1927 | UINT f_Rs2; |
c906108c | 1928 | |
9846de1b | 1929 | f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
1930 | |
1931 | /* Record the fields for the semantic handler. */ | |
1932 | FLD (f_Rs2) = f_Rs2; | |
96baa820 | 1933 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15dr", "f_Rs2 0x%x", 'x', f_Rs2, (char *) 0)); |
c906108c SS |
1934 | |
1935 | #if WITH_PROFILE_MODEL_P | |
1936 | /* Record the fields for profiling. */ | |
1937 | if (PROFILE_MODEL_P (current_cpu)) | |
1938 | { | |
1939 | FLD (in_h_gr_15) = 15; | |
1940 | FLD (out_h_gr_15) = 15; | |
1941 | } | |
1942 | #endif | |
1943 | #undef FLD | |
7a292a7a | 1944 | return idesc; |
c906108c SS |
1945 | } |
1946 | ||
96baa820 | 1947 | extract_sfmt_str15ps: |
c906108c | 1948 | { |
7a292a7a | 1949 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1950 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1951 | #define FLD(f) abuf->fields.sfmt_addsp.f |
c906108c | 1952 | |
c906108c SS |
1953 | |
1954 | /* Record the fields for the semantic handler. */ | |
96baa820 | 1955 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15ps", (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 (in_h_gr_15) = 15; | |
1962 | FLD (out_h_gr_15) = 15; | |
1963 | } | |
1964 | #endif | |
1965 | #undef FLD | |
7a292a7a | 1966 | return idesc; |
c906108c SS |
1967 | } |
1968 | ||
96baa820 | 1969 | extract_sfmt_mov: |
c906108c | 1970 | { |
7a292a7a | 1971 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 1972 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 1973 | #define FLD(f) abuf->fields.sfmt_ldr13.f |
9846de1b JM |
1974 | UINT f_Rj; |
1975 | UINT f_Ri; | |
c906108c | 1976 | |
9846de1b JM |
1977 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
1978 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
1979 | |
1980 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
1981 | FLD (f_Rj) = f_Rj; |
1982 | FLD (f_Ri) = f_Ri; | |
c906108c SS |
1983 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; |
1984 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 1985 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
1986 | |
1987 | #if WITH_PROFILE_MODEL_P | |
1988 | /* Record the fields for profiling. */ | |
1989 | if (PROFILE_MODEL_P (current_cpu)) | |
1990 | { | |
1991 | FLD (in_Rj) = f_Rj; | |
1992 | FLD (out_Ri) = f_Ri; | |
1993 | } | |
1994 | #endif | |
1995 | #undef FLD | |
7a292a7a | 1996 | return idesc; |
c906108c SS |
1997 | } |
1998 | ||
96baa820 | 1999 | extract_sfmt_movdr: |
c906108c | 2000 | { |
7a292a7a | 2001 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2002 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2003 | #define FLD(f) abuf->fields.sfmt_movdr.f |
9846de1b JM |
2004 | UINT f_Rs1; |
2005 | UINT f_Ri; | |
c906108c | 2006 | |
9846de1b JM |
2007 | f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
2008 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
2009 | |
2010 | /* Record the fields for the semantic handler. */ | |
2011 | FLD (f_Rs1) = f_Rs1; | |
e5c59029 | 2012 | FLD (f_Ri) = f_Ri; |
c906108c | 2013 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2014 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movdr", "f_Rs1 0x%x", 'x', f_Rs1, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2015 | |
2016 | #if WITH_PROFILE_MODEL_P | |
2017 | /* Record the fields for profiling. */ | |
2018 | if (PROFILE_MODEL_P (current_cpu)) | |
2019 | { | |
2020 | FLD (out_Ri) = f_Ri; | |
2021 | } | |
2022 | #endif | |
2023 | #undef FLD | |
7a292a7a | 2024 | return idesc; |
c906108c SS |
2025 | } |
2026 | ||
96baa820 | 2027 | extract_sfmt_movps: |
c906108c | 2028 | { |
7a292a7a | 2029 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2030 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2031 | #define FLD(f) abuf->fields.sfmt_movdr.f |
9846de1b | 2032 | UINT f_Ri; |
c906108c | 2033 | |
9846de1b | 2034 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2035 | |
2036 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2037 | FLD (f_Ri) = f_Ri; |
c906108c | 2038 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2039 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movps", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2040 | |
2041 | #if WITH_PROFILE_MODEL_P | |
2042 | /* Record the fields for profiling. */ | |
2043 | if (PROFILE_MODEL_P (current_cpu)) | |
2044 | { | |
2045 | FLD (out_Ri) = f_Ri; | |
2046 | } | |
2047 | #endif | |
2048 | #undef FLD | |
7a292a7a | 2049 | return idesc; |
c906108c SS |
2050 | } |
2051 | ||
96baa820 | 2052 | extract_sfmt_mov2dr: |
c906108c | 2053 | { |
7a292a7a | 2054 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2055 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2056 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b JM |
2057 | UINT f_Rs1; |
2058 | UINT f_Ri; | |
c906108c | 2059 | |
9846de1b JM |
2060 | f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
2061 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
2062 | |
2063 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2064 | FLD (f_Ri) = f_Ri; |
c906108c SS |
2065 | FLD (f_Rs1) = f_Rs1; |
2066 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; | |
e5c59029 | 2067 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov2dr", "f_Ri 0x%x", 'x', f_Ri, "f_Rs1 0x%x", 'x', f_Rs1, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2068 | |
2069 | #if WITH_PROFILE_MODEL_P | |
2070 | /* Record the fields for profiling. */ | |
2071 | if (PROFILE_MODEL_P (current_cpu)) | |
2072 | { | |
2073 | FLD (in_Ri) = f_Ri; | |
2074 | } | |
2075 | #endif | |
2076 | #undef FLD | |
7a292a7a | 2077 | return idesc; |
c906108c SS |
2078 | } |
2079 | ||
96baa820 | 2080 | extract_sfmt_mov2ps: |
c906108c | 2081 | { |
7a292a7a | 2082 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2083 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2084 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b | 2085 | UINT f_Ri; |
c906108c | 2086 | |
9846de1b | 2087 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2088 | |
2089 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2090 | FLD (f_Ri) = f_Ri; |
c906108c | 2091 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2092 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov2ps", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2093 | |
2094 | #if WITH_PROFILE_MODEL_P | |
2095 | /* Record the fields for profiling. */ | |
2096 | if (PROFILE_MODEL_P (current_cpu)) | |
2097 | { | |
2098 | FLD (in_Ri) = f_Ri; | |
2099 | } | |
2100 | #endif | |
2101 | #undef FLD | |
7a292a7a | 2102 | return idesc; |
c906108c SS |
2103 | } |
2104 | ||
96baa820 | 2105 | extract_sfmt_jmp: |
c906108c | 2106 | { |
7a292a7a | 2107 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2108 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2109 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b | 2110 | UINT f_Ri; |
c906108c | 2111 | |
9846de1b | 2112 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2113 | |
2114 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2115 | FLD (f_Ri) = f_Ri; |
c906108c | 2116 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2117 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jmp", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2118 | |
2119 | #if WITH_PROFILE_MODEL_P | |
2120 | /* Record the fields for profiling. */ | |
2121 | if (PROFILE_MODEL_P (current_cpu)) | |
2122 | { | |
2123 | FLD (in_Ri) = f_Ri; | |
2124 | } | |
2125 | #endif | |
2126 | #undef FLD | |
7a292a7a | 2127 | return idesc; |
c906108c SS |
2128 | } |
2129 | ||
96baa820 | 2130 | extract_sfmt_callr: |
c906108c | 2131 | { |
7a292a7a | 2132 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2133 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2134 | #define FLD(f) abuf->fields.sfmt_mov2dr.f |
9846de1b | 2135 | UINT f_Ri; |
c906108c | 2136 | |
9846de1b | 2137 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2138 | |
2139 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2140 | FLD (f_Ri) = f_Ri; |
c906108c | 2141 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2142 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_callr", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2143 | |
2144 | #if WITH_PROFILE_MODEL_P | |
2145 | /* Record the fields for profiling. */ | |
2146 | if (PROFILE_MODEL_P (current_cpu)) | |
2147 | { | |
2148 | FLD (in_Ri) = f_Ri; | |
2149 | } | |
2150 | #endif | |
2151 | #undef FLD | |
7a292a7a | 2152 | return idesc; |
c906108c SS |
2153 | } |
2154 | ||
96baa820 | 2155 | extract_sfmt_call: |
c906108c | 2156 | { |
7a292a7a | 2157 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2158 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2159 | #define FLD(f) abuf->fields.sfmt_call.f |
9846de1b | 2160 | SI f_rel12; |
c906108c | 2161 | |
9846de1b | 2162 | f_rel12 = ((((EXTRACT_MSB0_INT (insn, 16, 5, 11)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2163 | |
2164 | /* Record the fields for the semantic handler. */ | |
2165 | FLD (i_label12) = f_rel12; | |
96baa820 | 2166 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_call", "label12 0x%x", 'x', f_rel12, (char *) 0)); |
c906108c SS |
2167 | |
2168 | #if WITH_PROFILE_MODEL_P | |
2169 | /* Record the fields for profiling. */ | |
2170 | if (PROFILE_MODEL_P (current_cpu)) | |
2171 | { | |
2172 | } | |
2173 | #endif | |
2174 | #undef FLD | |
7a292a7a | 2175 | return idesc; |
c906108c SS |
2176 | } |
2177 | ||
96baa820 | 2178 | extract_sfmt_ret: |
c906108c | 2179 | { |
7a292a7a | 2180 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2181 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2182 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 2183 | |
c906108c SS |
2184 | |
2185 | /* Record the fields for the semantic handler. */ | |
96baa820 | 2186 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ret", (char *) 0)); |
c906108c SS |
2187 | |
2188 | #if WITH_PROFILE_MODEL_P | |
2189 | /* Record the fields for profiling. */ | |
2190 | if (PROFILE_MODEL_P (current_cpu)) | |
2191 | { | |
2192 | } | |
2193 | #endif | |
2194 | #undef FLD | |
7a292a7a | 2195 | return idesc; |
c906108c SS |
2196 | } |
2197 | ||
96baa820 | 2198 | extract_sfmt_int: |
c906108c | 2199 | { |
7a292a7a | 2200 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2201 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2202 | #define FLD(f) abuf->fields.sfmt_int.f |
9846de1b | 2203 | UINT f_u8; |
c906108c | 2204 | |
9846de1b | 2205 | f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2206 | |
2207 | /* Record the fields for the semantic handler. */ | |
2208 | FLD (f_u8) = f_u8; | |
96baa820 | 2209 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_int", "f_u8 0x%x", 'x', f_u8, (char *) 0)); |
c906108c SS |
2210 | |
2211 | #if WITH_PROFILE_MODEL_P | |
2212 | /* Record the fields for profiling. */ | |
2213 | if (PROFILE_MODEL_P (current_cpu)) | |
2214 | { | |
2215 | } | |
2216 | #endif | |
2217 | #undef FLD | |
7a292a7a | 2218 | return idesc; |
c906108c SS |
2219 | } |
2220 | ||
96baa820 | 2221 | extract_sfmt_inte: |
c906108c | 2222 | { |
7a292a7a | 2223 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2224 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2225 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 2226 | |
c906108c SS |
2227 | |
2228 | /* Record the fields for the semantic handler. */ | |
96baa820 | 2229 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_inte", (char *) 0)); |
c906108c SS |
2230 | |
2231 | #if WITH_PROFILE_MODEL_P | |
2232 | /* Record the fields for profiling. */ | |
2233 | if (PROFILE_MODEL_P (current_cpu)) | |
2234 | { | |
2235 | } | |
2236 | #endif | |
2237 | #undef FLD | |
7a292a7a | 2238 | return idesc; |
c906108c SS |
2239 | } |
2240 | ||
96baa820 | 2241 | extract_sfmt_reti: |
c906108c | 2242 | { |
7a292a7a | 2243 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2244 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2245 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 2246 | |
c906108c SS |
2247 | |
2248 | /* Record the fields for the semantic handler. */ | |
96baa820 | 2249 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_reti", (char *) 0)); |
c906108c SS |
2250 | |
2251 | #if WITH_PROFILE_MODEL_P | |
2252 | /* Record the fields for profiling. */ | |
2253 | if (PROFILE_MODEL_P (current_cpu)) | |
2254 | { | |
2255 | } | |
2256 | #endif | |
2257 | #undef FLD | |
7a292a7a | 2258 | return idesc; |
c906108c SS |
2259 | } |
2260 | ||
96baa820 | 2261 | extract_sfmt_brad: |
c906108c | 2262 | { |
7a292a7a | 2263 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2264 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2265 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2266 | SI f_rel9; |
c906108c | 2267 | |
9846de1b | 2268 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2269 | |
2270 | /* Record the fields for the semantic handler. */ | |
2271 | FLD (i_label9) = f_rel9; | |
96baa820 | 2272 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_brad", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2273 | |
2274 | #if WITH_PROFILE_MODEL_P | |
2275 | /* Record the fields for profiling. */ | |
2276 | if (PROFILE_MODEL_P (current_cpu)) | |
2277 | { | |
2278 | } | |
2279 | #endif | |
2280 | #undef FLD | |
7a292a7a | 2281 | return idesc; |
c906108c SS |
2282 | } |
2283 | ||
96baa820 | 2284 | extract_sfmt_bnod: |
c906108c | 2285 | { |
7a292a7a | 2286 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2287 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2288 | #define FLD(f) abuf->fields.fmt_empty.f |
c906108c | 2289 | |
c906108c SS |
2290 | |
2291 | /* Record the fields for the semantic handler. */ | |
96baa820 | 2292 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bnod", (char *) 0)); |
c906108c SS |
2293 | |
2294 | #undef FLD | |
7a292a7a | 2295 | return idesc; |
c906108c SS |
2296 | } |
2297 | ||
96baa820 | 2298 | extract_sfmt_beqd: |
c906108c | 2299 | { |
7a292a7a | 2300 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2301 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2302 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2303 | SI f_rel9; |
c906108c | 2304 | |
9846de1b | 2305 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2306 | |
2307 | /* Record the fields for the semantic handler. */ | |
2308 | FLD (i_label9) = f_rel9; | |
96baa820 | 2309 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_beqd", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2310 | |
2311 | #if WITH_PROFILE_MODEL_P | |
2312 | /* Record the fields for profiling. */ | |
2313 | if (PROFILE_MODEL_P (current_cpu)) | |
2314 | { | |
2315 | } | |
2316 | #endif | |
2317 | #undef FLD | |
7a292a7a | 2318 | return idesc; |
c906108c SS |
2319 | } |
2320 | ||
96baa820 | 2321 | extract_sfmt_bcd: |
c906108c | 2322 | { |
7a292a7a | 2323 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2324 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2325 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2326 | SI f_rel9; |
c906108c | 2327 | |
9846de1b | 2328 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2329 | |
2330 | /* Record the fields for the semantic handler. */ | |
2331 | FLD (i_label9) = f_rel9; | |
96baa820 | 2332 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcd", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2333 | |
2334 | #if WITH_PROFILE_MODEL_P | |
2335 | /* Record the fields for profiling. */ | |
2336 | if (PROFILE_MODEL_P (current_cpu)) | |
2337 | { | |
2338 | } | |
2339 | #endif | |
2340 | #undef FLD | |
7a292a7a | 2341 | return idesc; |
c906108c SS |
2342 | } |
2343 | ||
96baa820 | 2344 | extract_sfmt_bnd: |
c906108c | 2345 | { |
7a292a7a | 2346 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2347 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2348 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2349 | SI f_rel9; |
c906108c | 2350 | |
9846de1b | 2351 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2352 | |
2353 | /* Record the fields for the semantic handler. */ | |
2354 | FLD (i_label9) = f_rel9; | |
96baa820 | 2355 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bnd", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2356 | |
2357 | #if WITH_PROFILE_MODEL_P | |
2358 | /* Record the fields for profiling. */ | |
2359 | if (PROFILE_MODEL_P (current_cpu)) | |
2360 | { | |
2361 | } | |
2362 | #endif | |
2363 | #undef FLD | |
7a292a7a | 2364 | return idesc; |
c906108c SS |
2365 | } |
2366 | ||
96baa820 | 2367 | extract_sfmt_bvd: |
c906108c | 2368 | { |
7a292a7a | 2369 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2370 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2371 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2372 | SI f_rel9; |
c906108c | 2373 | |
9846de1b | 2374 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2375 | |
2376 | /* Record the fields for the semantic handler. */ | |
2377 | FLD (i_label9) = f_rel9; | |
96baa820 | 2378 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bvd", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2379 | |
2380 | #if WITH_PROFILE_MODEL_P | |
2381 | /* Record the fields for profiling. */ | |
2382 | if (PROFILE_MODEL_P (current_cpu)) | |
2383 | { | |
2384 | } | |
2385 | #endif | |
2386 | #undef FLD | |
7a292a7a | 2387 | return idesc; |
c906108c SS |
2388 | } |
2389 | ||
96baa820 | 2390 | extract_sfmt_bltd: |
c906108c | 2391 | { |
7a292a7a | 2392 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2393 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2394 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2395 | SI f_rel9; |
c906108c | 2396 | |
9846de1b | 2397 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2398 | |
2399 | /* Record the fields for the semantic handler. */ | |
2400 | FLD (i_label9) = f_rel9; | |
96baa820 | 2401 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bltd", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2402 | |
2403 | #if WITH_PROFILE_MODEL_P | |
2404 | /* Record the fields for profiling. */ | |
2405 | if (PROFILE_MODEL_P (current_cpu)) | |
2406 | { | |
2407 | } | |
2408 | #endif | |
2409 | #undef FLD | |
7a292a7a | 2410 | return idesc; |
c906108c SS |
2411 | } |
2412 | ||
96baa820 | 2413 | extract_sfmt_bled: |
c906108c | 2414 | { |
7a292a7a | 2415 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2416 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2417 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2418 | SI f_rel9; |
c906108c | 2419 | |
9846de1b | 2420 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2421 | |
2422 | /* Record the fields for the semantic handler. */ | |
2423 | FLD (i_label9) = f_rel9; | |
96baa820 | 2424 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bled", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2425 | |
2426 | #if WITH_PROFILE_MODEL_P | |
2427 | /* Record the fields for profiling. */ | |
2428 | if (PROFILE_MODEL_P (current_cpu)) | |
2429 | { | |
2430 | } | |
2431 | #endif | |
2432 | #undef FLD | |
7a292a7a | 2433 | return idesc; |
c906108c SS |
2434 | } |
2435 | ||
96baa820 | 2436 | extract_sfmt_blsd: |
c906108c | 2437 | { |
7a292a7a | 2438 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2439 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2440 | #define FLD(f) abuf->fields.sfmt_brad.f |
9846de1b | 2441 | SI f_rel9; |
c906108c | 2442 | |
9846de1b | 2443 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); |
c906108c SS |
2444 | |
2445 | /* Record the fields for the semantic handler. */ | |
2446 | FLD (i_label9) = f_rel9; | |
96baa820 | 2447 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_blsd", "label9 0x%x", 'x', f_rel9, (char *) 0)); |
c906108c SS |
2448 | |
2449 | #if WITH_PROFILE_MODEL_P | |
2450 | /* Record the fields for profiling. */ | |
2451 | if (PROFILE_MODEL_P (current_cpu)) | |
2452 | { | |
2453 | } | |
2454 | #endif | |
2455 | #undef FLD | |
7a292a7a | 2456 | return idesc; |
c906108c SS |
2457 | } |
2458 | ||
96baa820 | 2459 | extract_sfmt_dmovr13: |
c906108c | 2460 | { |
7a292a7a | 2461 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2462 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2463 | #define FLD(f) abuf->fields.sfmt_dmovr13pi.f |
9846de1b | 2464 | USI f_dir10; |
c906108c | 2465 | |
9846de1b | 2466 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2467 | |
2468 | /* Record the fields for the semantic handler. */ | |
2469 | FLD (f_dir10) = f_dir10; | |
96baa820 | 2470 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13", "f_dir10 0x%x", 'x', f_dir10, (char *) 0)); |
c906108c SS |
2471 | |
2472 | #if WITH_PROFILE_MODEL_P | |
2473 | /* Record the fields for profiling. */ | |
2474 | if (PROFILE_MODEL_P (current_cpu)) | |
2475 | { | |
2476 | FLD (in_h_gr_13) = 13; | |
2477 | } | |
2478 | #endif | |
2479 | #undef FLD | |
7a292a7a | 2480 | return idesc; |
c906108c SS |
2481 | } |
2482 | ||
96baa820 | 2483 | extract_sfmt_dmovr13h: |
c906108c | 2484 | { |
7a292a7a | 2485 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2486 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2487 | #define FLD(f) abuf->fields.sfmt_dmovr13pih.f |
9846de1b | 2488 | USI f_dir9; |
c906108c | 2489 | |
9846de1b | 2490 | f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1)); |
c906108c SS |
2491 | |
2492 | /* Record the fields for the semantic handler. */ | |
2493 | FLD (f_dir9) = f_dir9; | |
96baa820 | 2494 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13h", "f_dir9 0x%x", 'x', f_dir9, (char *) 0)); |
c906108c SS |
2495 | |
2496 | #if WITH_PROFILE_MODEL_P | |
2497 | /* Record the fields for profiling. */ | |
2498 | if (PROFILE_MODEL_P (current_cpu)) | |
2499 | { | |
2500 | FLD (in_h_gr_13) = 13; | |
2501 | } | |
2502 | #endif | |
2503 | #undef FLD | |
7a292a7a | 2504 | return idesc; |
c906108c SS |
2505 | } |
2506 | ||
96baa820 | 2507 | extract_sfmt_dmovr13b: |
c906108c | 2508 | { |
7a292a7a | 2509 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2510 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2511 | #define FLD(f) abuf->fields.sfmt_dmovr13pib.f |
9846de1b | 2512 | UINT f_dir8; |
c906108c | 2513 | |
9846de1b | 2514 | f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2515 | |
2516 | /* Record the fields for the semantic handler. */ | |
2517 | FLD (f_dir8) = f_dir8; | |
96baa820 | 2518 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13b", "f_dir8 0x%x", 'x', f_dir8, (char *) 0)); |
c906108c SS |
2519 | |
2520 | #if WITH_PROFILE_MODEL_P | |
2521 | /* Record the fields for profiling. */ | |
2522 | if (PROFILE_MODEL_P (current_cpu)) | |
2523 | { | |
2524 | FLD (in_h_gr_13) = 13; | |
2525 | } | |
2526 | #endif | |
2527 | #undef FLD | |
7a292a7a | 2528 | return idesc; |
c906108c SS |
2529 | } |
2530 | ||
96baa820 | 2531 | extract_sfmt_dmovr13pi: |
c906108c | 2532 | { |
7a292a7a | 2533 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2534 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2535 | #define FLD(f) abuf->fields.sfmt_dmovr13pi.f |
9846de1b | 2536 | USI f_dir10; |
c906108c | 2537 | |
9846de1b | 2538 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2539 | |
2540 | /* Record the fields for the semantic handler. */ | |
2541 | FLD (f_dir10) = f_dir10; | |
96baa820 | 2542 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13pi", "f_dir10 0x%x", 'x', f_dir10, (char *) 0)); |
c906108c SS |
2543 | |
2544 | #if WITH_PROFILE_MODEL_P | |
2545 | /* Record the fields for profiling. */ | |
2546 | if (PROFILE_MODEL_P (current_cpu)) | |
2547 | { | |
2548 | FLD (in_h_gr_13) = 13; | |
2549 | FLD (out_h_gr_13) = 13; | |
2550 | } | |
2551 | #endif | |
2552 | #undef FLD | |
7a292a7a | 2553 | return idesc; |
c906108c SS |
2554 | } |
2555 | ||
96baa820 | 2556 | extract_sfmt_dmovr13pih: |
c906108c | 2557 | { |
7a292a7a | 2558 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2559 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2560 | #define FLD(f) abuf->fields.sfmt_dmovr13pih.f |
9846de1b | 2561 | USI f_dir9; |
c906108c | 2562 | |
9846de1b | 2563 | f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1)); |
c906108c SS |
2564 | |
2565 | /* Record the fields for the semantic handler. */ | |
2566 | FLD (f_dir9) = f_dir9; | |
96baa820 | 2567 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13pih", "f_dir9 0x%x", 'x', f_dir9, (char *) 0)); |
c906108c SS |
2568 | |
2569 | #if WITH_PROFILE_MODEL_P | |
2570 | /* Record the fields for profiling. */ | |
2571 | if (PROFILE_MODEL_P (current_cpu)) | |
2572 | { | |
2573 | FLD (in_h_gr_13) = 13; | |
2574 | FLD (out_h_gr_13) = 13; | |
2575 | } | |
2576 | #endif | |
2577 | #undef FLD | |
7a292a7a | 2578 | return idesc; |
c906108c SS |
2579 | } |
2580 | ||
96baa820 | 2581 | extract_sfmt_dmovr13pib: |
c906108c | 2582 | { |
7a292a7a | 2583 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2584 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2585 | #define FLD(f) abuf->fields.sfmt_dmovr13pib.f |
9846de1b | 2586 | UINT f_dir8; |
c906108c | 2587 | |
9846de1b | 2588 | f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2589 | |
2590 | /* Record the fields for the semantic handler. */ | |
2591 | FLD (f_dir8) = f_dir8; | |
96baa820 | 2592 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13pib", "f_dir8 0x%x", 'x', f_dir8, (char *) 0)); |
c906108c SS |
2593 | |
2594 | #if WITH_PROFILE_MODEL_P | |
2595 | /* Record the fields for profiling. */ | |
2596 | if (PROFILE_MODEL_P (current_cpu)) | |
2597 | { | |
2598 | FLD (in_h_gr_13) = 13; | |
2599 | FLD (out_h_gr_13) = 13; | |
2600 | } | |
2601 | #endif | |
2602 | #undef FLD | |
7a292a7a | 2603 | return idesc; |
c906108c SS |
2604 | } |
2605 | ||
96baa820 | 2606 | extract_sfmt_dmovr15pi: |
c906108c | 2607 | { |
7a292a7a | 2608 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2609 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2610 | #define FLD(f) abuf->fields.sfmt_dmovr15pi.f |
9846de1b | 2611 | USI f_dir10; |
c906108c | 2612 | |
9846de1b | 2613 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2614 | |
2615 | /* Record the fields for the semantic handler. */ | |
2616 | FLD (f_dir10) = f_dir10; | |
96baa820 | 2617 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr15pi", "f_dir10 0x%x", 'x', f_dir10, (char *) 0)); |
c906108c SS |
2618 | |
2619 | #if WITH_PROFILE_MODEL_P | |
2620 | /* Record the fields for profiling. */ | |
2621 | if (PROFILE_MODEL_P (current_cpu)) | |
2622 | { | |
2623 | FLD (in_h_gr_15) = 15; | |
2624 | FLD (out_h_gr_15) = 15; | |
2625 | } | |
2626 | #endif | |
2627 | #undef FLD | |
7a292a7a | 2628 | return idesc; |
c906108c SS |
2629 | } |
2630 | ||
96baa820 | 2631 | extract_sfmt_dmov2r13: |
c906108c | 2632 | { |
7a292a7a | 2633 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2634 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2635 | #define FLD(f) abuf->fields.sfmt_dmovr13pi.f |
9846de1b | 2636 | USI f_dir10; |
c906108c | 2637 | |
9846de1b | 2638 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2639 | |
2640 | /* Record the fields for the semantic handler. */ | |
2641 | FLD (f_dir10) = f_dir10; | |
96baa820 | 2642 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13", "f_dir10 0x%x", 'x', f_dir10, (char *) 0)); |
c906108c SS |
2643 | |
2644 | #if WITH_PROFILE_MODEL_P | |
2645 | /* Record the fields for profiling. */ | |
2646 | if (PROFILE_MODEL_P (current_cpu)) | |
2647 | { | |
2648 | FLD (out_h_gr_13) = 13; | |
2649 | } | |
2650 | #endif | |
2651 | #undef FLD | |
7a292a7a | 2652 | return idesc; |
c906108c SS |
2653 | } |
2654 | ||
96baa820 | 2655 | extract_sfmt_dmov2r13h: |
c906108c | 2656 | { |
7a292a7a | 2657 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2658 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2659 | #define FLD(f) abuf->fields.sfmt_dmovr13pih.f |
9846de1b | 2660 | USI f_dir9; |
c906108c | 2661 | |
9846de1b | 2662 | f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1)); |
c906108c SS |
2663 | |
2664 | /* Record the fields for the semantic handler. */ | |
2665 | FLD (f_dir9) = f_dir9; | |
96baa820 | 2666 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13h", "f_dir9 0x%x", 'x', f_dir9, (char *) 0)); |
c906108c SS |
2667 | |
2668 | #if WITH_PROFILE_MODEL_P | |
2669 | /* Record the fields for profiling. */ | |
2670 | if (PROFILE_MODEL_P (current_cpu)) | |
2671 | { | |
2672 | FLD (out_h_gr_13) = 13; | |
2673 | } | |
2674 | #endif | |
2675 | #undef FLD | |
7a292a7a | 2676 | return idesc; |
c906108c SS |
2677 | } |
2678 | ||
96baa820 | 2679 | extract_sfmt_dmov2r13b: |
c906108c | 2680 | { |
7a292a7a | 2681 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2682 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2683 | #define FLD(f) abuf->fields.sfmt_dmovr13pib.f |
9846de1b | 2684 | UINT f_dir8; |
c906108c | 2685 | |
9846de1b | 2686 | f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2687 | |
2688 | /* Record the fields for the semantic handler. */ | |
2689 | FLD (f_dir8) = f_dir8; | |
96baa820 | 2690 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13b", "f_dir8 0x%x", 'x', f_dir8, (char *) 0)); |
c906108c SS |
2691 | |
2692 | #if WITH_PROFILE_MODEL_P | |
2693 | /* Record the fields for profiling. */ | |
2694 | if (PROFILE_MODEL_P (current_cpu)) | |
2695 | { | |
2696 | FLD (out_h_gr_13) = 13; | |
2697 | } | |
2698 | #endif | |
2699 | #undef FLD | |
7a292a7a | 2700 | return idesc; |
c906108c SS |
2701 | } |
2702 | ||
96baa820 | 2703 | extract_sfmt_dmov2r13pi: |
c906108c | 2704 | { |
7a292a7a | 2705 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2706 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2707 | #define FLD(f) abuf->fields.sfmt_dmovr13pi.f |
9846de1b | 2708 | USI f_dir10; |
c906108c | 2709 | |
9846de1b | 2710 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2711 | |
2712 | /* Record the fields for the semantic handler. */ | |
2713 | FLD (f_dir10) = f_dir10; | |
96baa820 | 2714 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13pi", "f_dir10 0x%x", 'x', f_dir10, (char *) 0)); |
c906108c SS |
2715 | |
2716 | #if WITH_PROFILE_MODEL_P | |
2717 | /* Record the fields for profiling. */ | |
2718 | if (PROFILE_MODEL_P (current_cpu)) | |
2719 | { | |
2720 | FLD (in_h_gr_13) = 13; | |
2721 | FLD (out_h_gr_13) = 13; | |
2722 | } | |
2723 | #endif | |
2724 | #undef FLD | |
7a292a7a | 2725 | return idesc; |
c906108c SS |
2726 | } |
2727 | ||
96baa820 | 2728 | extract_sfmt_dmov2r13pih: |
c906108c | 2729 | { |
7a292a7a | 2730 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2731 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2732 | #define FLD(f) abuf->fields.sfmt_dmovr13pih.f |
9846de1b | 2733 | USI f_dir9; |
c906108c | 2734 | |
9846de1b | 2735 | f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1)); |
c906108c SS |
2736 | |
2737 | /* Record the fields for the semantic handler. */ | |
2738 | FLD (f_dir9) = f_dir9; | |
96baa820 | 2739 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13pih", "f_dir9 0x%x", 'x', f_dir9, (char *) 0)); |
c906108c SS |
2740 | |
2741 | #if WITH_PROFILE_MODEL_P | |
2742 | /* Record the fields for profiling. */ | |
2743 | if (PROFILE_MODEL_P (current_cpu)) | |
2744 | { | |
2745 | FLD (in_h_gr_13) = 13; | |
2746 | FLD (out_h_gr_13) = 13; | |
2747 | } | |
2748 | #endif | |
2749 | #undef FLD | |
7a292a7a | 2750 | return idesc; |
c906108c SS |
2751 | } |
2752 | ||
96baa820 | 2753 | extract_sfmt_dmov2r13pib: |
c906108c | 2754 | { |
7a292a7a | 2755 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2756 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2757 | #define FLD(f) abuf->fields.sfmt_dmovr13pib.f |
9846de1b | 2758 | UINT f_dir8; |
c906108c | 2759 | |
9846de1b | 2760 | f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2761 | |
2762 | /* Record the fields for the semantic handler. */ | |
2763 | FLD (f_dir8) = f_dir8; | |
96baa820 | 2764 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13pib", "f_dir8 0x%x", 'x', f_dir8, (char *) 0)); |
c906108c SS |
2765 | |
2766 | #if WITH_PROFILE_MODEL_P | |
2767 | /* Record the fields for profiling. */ | |
2768 | if (PROFILE_MODEL_P (current_cpu)) | |
2769 | { | |
2770 | FLD (in_h_gr_13) = 13; | |
2771 | FLD (out_h_gr_13) = 13; | |
2772 | } | |
2773 | #endif | |
2774 | #undef FLD | |
7a292a7a | 2775 | return idesc; |
c906108c SS |
2776 | } |
2777 | ||
96baa820 | 2778 | extract_sfmt_dmov2r15pd: |
c906108c | 2779 | { |
7a292a7a | 2780 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2781 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2782 | #define FLD(f) abuf->fields.sfmt_dmovr15pi.f |
9846de1b | 2783 | USI f_dir10; |
c906108c | 2784 | |
9846de1b | 2785 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2786 | |
2787 | /* Record the fields for the semantic handler. */ | |
2788 | FLD (f_dir10) = f_dir10; | |
96baa820 | 2789 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r15pd", "f_dir10 0x%x", 'x', f_dir10, (char *) 0)); |
c906108c SS |
2790 | |
2791 | #if WITH_PROFILE_MODEL_P | |
2792 | /* Record the fields for profiling. */ | |
2793 | if (PROFILE_MODEL_P (current_cpu)) | |
2794 | { | |
2795 | FLD (in_h_gr_15) = 15; | |
2796 | FLD (out_h_gr_15) = 15; | |
2797 | } | |
2798 | #endif | |
2799 | #undef FLD | |
7a292a7a | 2800 | return idesc; |
c906108c SS |
2801 | } |
2802 | ||
96baa820 | 2803 | extract_sfmt_ldres: |
c906108c | 2804 | { |
7a292a7a | 2805 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2806 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2807 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b | 2808 | UINT f_Ri; |
c906108c | 2809 | |
9846de1b | 2810 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2811 | |
2812 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2813 | FLD (f_Ri) = f_Ri; |
c906108c | 2814 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2815 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldres", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2816 | |
2817 | #if WITH_PROFILE_MODEL_P | |
2818 | /* Record the fields for profiling. */ | |
2819 | if (PROFILE_MODEL_P (current_cpu)) | |
2820 | { | |
2821 | FLD (in_Ri) = f_Ri; | |
2822 | FLD (out_Ri) = f_Ri; | |
2823 | } | |
2824 | #endif | |
2825 | #undef FLD | |
7a292a7a | 2826 | return idesc; |
c906108c SS |
2827 | } |
2828 | ||
96baa820 | 2829 | extract_sfmt_copop: |
c906108c | 2830 | { |
7a292a7a | 2831 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2832 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2833 | #define FLD(f) abuf->fields.fmt_empty.f |
9846de1b JM |
2834 | /* Contents of trailing part of insn. */ |
2835 | UINT word_1; | |
c906108c | 2836 | |
9846de1b | 2837 | word_1 = GETIMEMUHI (current_cpu, pc + 2); |
c906108c SS |
2838 | |
2839 | /* Record the fields for the semantic handler. */ | |
96baa820 | 2840 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_copop", (char *) 0)); |
c906108c | 2841 | |
c906108c | 2842 | #undef FLD |
7a292a7a | 2843 | return idesc; |
c906108c SS |
2844 | } |
2845 | ||
96baa820 | 2846 | extract_sfmt_andccr: |
c906108c | 2847 | { |
7a292a7a | 2848 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2849 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2850 | #define FLD(f) abuf->fields.sfmt_int.f |
9846de1b | 2851 | UINT f_u8; |
c906108c | 2852 | |
9846de1b | 2853 | f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2854 | |
2855 | /* Record the fields for the semantic handler. */ | |
2856 | FLD (f_u8) = f_u8; | |
96baa820 | 2857 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andccr", "f_u8 0x%x", 'x', f_u8, (char *) 0)); |
c906108c SS |
2858 | |
2859 | #undef FLD | |
7a292a7a | 2860 | return idesc; |
c906108c SS |
2861 | } |
2862 | ||
96baa820 | 2863 | extract_sfmt_stilm: |
c906108c | 2864 | { |
7a292a7a | 2865 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2866 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2867 | #define FLD(f) abuf->fields.sfmt_int.f |
9846de1b | 2868 | UINT f_u8; |
c906108c | 2869 | |
9846de1b | 2870 | f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
2871 | |
2872 | /* Record the fields for the semantic handler. */ | |
2873 | FLD (f_u8) = f_u8; | |
96baa820 | 2874 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stilm", "f_u8 0x%x", 'x', f_u8, (char *) 0)); |
c906108c SS |
2875 | |
2876 | #undef FLD | |
7a292a7a | 2877 | return idesc; |
c906108c SS |
2878 | } |
2879 | ||
96baa820 | 2880 | extract_sfmt_addsp: |
c906108c | 2881 | { |
7a292a7a | 2882 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2883 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2884 | #define FLD(f) abuf->fields.sfmt_addsp.f |
9846de1b | 2885 | SI f_s10; |
c906108c | 2886 | |
9846de1b | 2887 | f_s10 = ((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
2888 | |
2889 | /* Record the fields for the semantic handler. */ | |
2890 | FLD (f_s10) = f_s10; | |
96baa820 | 2891 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addsp", "f_s10 0x%x", 'x', f_s10, (char *) 0)); |
c906108c SS |
2892 | |
2893 | #if WITH_PROFILE_MODEL_P | |
2894 | /* Record the fields for profiling. */ | |
2895 | if (PROFILE_MODEL_P (current_cpu)) | |
2896 | { | |
2897 | FLD (in_h_gr_15) = 15; | |
2898 | FLD (out_h_gr_15) = 15; | |
2899 | } | |
2900 | #endif | |
2901 | #undef FLD | |
7a292a7a | 2902 | return idesc; |
c906108c SS |
2903 | } |
2904 | ||
96baa820 | 2905 | extract_sfmt_extsb: |
c906108c | 2906 | { |
7a292a7a | 2907 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2908 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2909 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b | 2910 | UINT f_Ri; |
c906108c | 2911 | |
9846de1b | 2912 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2913 | |
2914 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2915 | FLD (f_Ri) = f_Ri; |
c906108c | 2916 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2917 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extsb", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2918 | |
2919 | #if WITH_PROFILE_MODEL_P | |
2920 | /* Record the fields for profiling. */ | |
2921 | if (PROFILE_MODEL_P (current_cpu)) | |
2922 | { | |
2923 | FLD (in_Ri) = f_Ri; | |
2924 | FLD (out_Ri) = f_Ri; | |
2925 | } | |
2926 | #endif | |
2927 | #undef FLD | |
7a292a7a | 2928 | return idesc; |
c906108c SS |
2929 | } |
2930 | ||
96baa820 | 2931 | extract_sfmt_extub: |
c906108c | 2932 | { |
7a292a7a | 2933 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2934 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2935 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b | 2936 | UINT f_Ri; |
c906108c | 2937 | |
9846de1b | 2938 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2939 | |
2940 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2941 | FLD (f_Ri) = f_Ri; |
c906108c | 2942 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2943 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extub", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2944 | |
2945 | #if WITH_PROFILE_MODEL_P | |
2946 | /* Record the fields for profiling. */ | |
2947 | if (PROFILE_MODEL_P (current_cpu)) | |
2948 | { | |
2949 | FLD (in_Ri) = f_Ri; | |
2950 | FLD (out_Ri) = f_Ri; | |
2951 | } | |
2952 | #endif | |
2953 | #undef FLD | |
7a292a7a | 2954 | return idesc; |
c906108c SS |
2955 | } |
2956 | ||
96baa820 | 2957 | extract_sfmt_extsh: |
c906108c | 2958 | { |
7a292a7a | 2959 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2960 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2961 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b | 2962 | UINT f_Ri; |
c906108c | 2963 | |
9846de1b | 2964 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2965 | |
2966 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2967 | FLD (f_Ri) = f_Ri; |
c906108c | 2968 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2969 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extsh", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2970 | |
2971 | #if WITH_PROFILE_MODEL_P | |
2972 | /* Record the fields for profiling. */ | |
2973 | if (PROFILE_MODEL_P (current_cpu)) | |
2974 | { | |
2975 | FLD (in_Ri) = f_Ri; | |
2976 | FLD (out_Ri) = f_Ri; | |
2977 | } | |
2978 | #endif | |
2979 | #undef FLD | |
7a292a7a | 2980 | return idesc; |
c906108c SS |
2981 | } |
2982 | ||
96baa820 | 2983 | extract_sfmt_extuh: |
c906108c | 2984 | { |
7a292a7a | 2985 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 2986 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 2987 | #define FLD(f) abuf->fields.sfmt_add2.f |
9846de1b | 2988 | UINT f_Ri; |
c906108c | 2989 | |
9846de1b | 2990 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); |
c906108c SS |
2991 | |
2992 | /* Record the fields for the semantic handler. */ | |
e5c59029 | 2993 | FLD (f_Ri) = f_Ri; |
c906108c | 2994 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
e5c59029 | 2995 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extuh", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0)); |
c906108c SS |
2996 | |
2997 | #if WITH_PROFILE_MODEL_P | |
2998 | /* Record the fields for profiling. */ | |
2999 | if (PROFILE_MODEL_P (current_cpu)) | |
3000 | { | |
3001 | FLD (in_Ri) = f_Ri; | |
3002 | FLD (out_Ri) = f_Ri; | |
3003 | } | |
3004 | #endif | |
3005 | #undef FLD | |
7a292a7a | 3006 | return idesc; |
c906108c SS |
3007 | } |
3008 | ||
96baa820 | 3009 | extract_sfmt_ldm0: |
c906108c | 3010 | { |
7a292a7a | 3011 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 3012 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 3013 | #define FLD(f) abuf->fields.sfmt_ldm0.f |
9846de1b | 3014 | UINT f_reglist_low_ld; |
c906108c | 3015 | |
9846de1b | 3016 | f_reglist_low_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
3017 | |
3018 | /* Record the fields for the semantic handler. */ | |
3019 | FLD (f_reglist_low_ld) = f_reglist_low_ld; | |
96baa820 | 3020 | 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 |
3021 | |
3022 | #if WITH_PROFILE_MODEL_P | |
3023 | /* Record the fields for profiling. */ | |
3024 | if (PROFILE_MODEL_P (current_cpu)) | |
3025 | { | |
3026 | FLD (in_h_gr_15) = 15; | |
3027 | FLD (out_h_gr_0) = 0; | |
3028 | FLD (out_h_gr_1) = 1; | |
3029 | FLD (out_h_gr_15) = 15; | |
3030 | FLD (out_h_gr_2) = 2; | |
3031 | FLD (out_h_gr_3) = 3; | |
3032 | FLD (out_h_gr_4) = 4; | |
3033 | FLD (out_h_gr_5) = 5; | |
3034 | FLD (out_h_gr_6) = 6; | |
3035 | FLD (out_h_gr_7) = 7; | |
3036 | } | |
3037 | #endif | |
3038 | #undef FLD | |
7a292a7a | 3039 | return idesc; |
c906108c SS |
3040 | } |
3041 | ||
96baa820 | 3042 | extract_sfmt_ldm1: |
c906108c | 3043 | { |
7a292a7a | 3044 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 3045 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 3046 | #define FLD(f) abuf->fields.sfmt_ldm1.f |
9846de1b | 3047 | UINT f_reglist_hi_ld; |
c906108c | 3048 | |
9846de1b | 3049 | f_reglist_hi_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
3050 | |
3051 | /* Record the fields for the semantic handler. */ | |
3052 | FLD (f_reglist_hi_ld) = f_reglist_hi_ld; | |
96baa820 | 3053 | 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 |
3054 | |
3055 | #if WITH_PROFILE_MODEL_P | |
3056 | /* Record the fields for profiling. */ | |
3057 | if (PROFILE_MODEL_P (current_cpu)) | |
3058 | { | |
3059 | FLD (in_h_gr_15) = 15; | |
3060 | FLD (out_h_gr_10) = 10; | |
3061 | FLD (out_h_gr_11) = 11; | |
3062 | FLD (out_h_gr_12) = 12; | |
3063 | FLD (out_h_gr_13) = 13; | |
3064 | FLD (out_h_gr_14) = 14; | |
3065 | FLD (out_h_gr_15) = 15; | |
3066 | FLD (out_h_gr_8) = 8; | |
3067 | FLD (out_h_gr_9) = 9; | |
3068 | } | |
3069 | #endif | |
3070 | #undef FLD | |
7a292a7a | 3071 | return idesc; |
c906108c SS |
3072 | } |
3073 | ||
96baa820 | 3074 | extract_sfmt_stm0: |
c906108c | 3075 | { |
7a292a7a | 3076 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 3077 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 3078 | #define FLD(f) abuf->fields.sfmt_stm0.f |
9846de1b | 3079 | UINT f_reglist_low_st; |
c906108c | 3080 | |
9846de1b | 3081 | f_reglist_low_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
3082 | |
3083 | /* Record the fields for the semantic handler. */ | |
3084 | FLD (f_reglist_low_st) = f_reglist_low_st; | |
96baa820 | 3085 | 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 |
3086 | |
3087 | #if WITH_PROFILE_MODEL_P | |
3088 | /* Record the fields for profiling. */ | |
3089 | if (PROFILE_MODEL_P (current_cpu)) | |
3090 | { | |
3091 | FLD (in_h_gr_0) = 0; | |
3092 | FLD (in_h_gr_1) = 1; | |
3093 | FLD (in_h_gr_15) = 15; | |
3094 | FLD (in_h_gr_2) = 2; | |
3095 | FLD (in_h_gr_3) = 3; | |
3096 | FLD (in_h_gr_4) = 4; | |
3097 | FLD (in_h_gr_5) = 5; | |
3098 | FLD (in_h_gr_6) = 6; | |
3099 | FLD (in_h_gr_7) = 7; | |
3100 | FLD (out_h_gr_15) = 15; | |
3101 | } | |
3102 | #endif | |
3103 | #undef FLD | |
7a292a7a | 3104 | return idesc; |
c906108c SS |
3105 | } |
3106 | ||
96baa820 | 3107 | extract_sfmt_stm1: |
c906108c | 3108 | { |
7a292a7a | 3109 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 3110 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 3111 | #define FLD(f) abuf->fields.sfmt_stm1.f |
9846de1b | 3112 | UINT f_reglist_hi_st; |
c906108c | 3113 | |
9846de1b | 3114 | f_reglist_hi_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8); |
c906108c SS |
3115 | |
3116 | /* Record the fields for the semantic handler. */ | |
3117 | FLD (f_reglist_hi_st) = f_reglist_hi_st; | |
96baa820 | 3118 | 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 |
3119 | |
3120 | #if WITH_PROFILE_MODEL_P | |
3121 | /* Record the fields for profiling. */ | |
3122 | if (PROFILE_MODEL_P (current_cpu)) | |
3123 | { | |
3124 | FLD (in_h_gr_10) = 10; | |
3125 | FLD (in_h_gr_11) = 11; | |
3126 | FLD (in_h_gr_12) = 12; | |
3127 | FLD (in_h_gr_13) = 13; | |
3128 | FLD (in_h_gr_14) = 14; | |
3129 | FLD (in_h_gr_15) = 15; | |
3130 | FLD (in_h_gr_8) = 8; | |
3131 | FLD (in_h_gr_9) = 9; | |
3132 | FLD (out_h_gr_15) = 15; | |
3133 | } | |
3134 | #endif | |
3135 | #undef FLD | |
7a292a7a | 3136 | return idesc; |
c906108c SS |
3137 | } |
3138 | ||
96baa820 | 3139 | extract_sfmt_enter: |
c906108c | 3140 | { |
7a292a7a | 3141 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 3142 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 3143 | #define FLD(f) abuf->fields.sfmt_enter.f |
9846de1b | 3144 | USI f_u10; |
c906108c | 3145 | |
9846de1b | 3146 | f_u10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); |
c906108c SS |
3147 | |
3148 | /* Record the fields for the semantic handler. */ | |
3149 | FLD (f_u10) = f_u10; | |
96baa820 | 3150 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_enter", "f_u10 0x%x", 'x', f_u10, (char *) 0)); |
c906108c SS |
3151 | |
3152 | #if WITH_PROFILE_MODEL_P | |
3153 | /* Record the fields for profiling. */ | |
3154 | if (PROFILE_MODEL_P (current_cpu)) | |
3155 | { | |
3156 | FLD (in_h_gr_14) = 14; | |
3157 | FLD (in_h_gr_15) = 15; | |
3158 | FLD (out_h_gr_14) = 14; | |
3159 | FLD (out_h_gr_15) = 15; | |
3160 | } | |
3161 | #endif | |
3162 | #undef FLD | |
7a292a7a | 3163 | return idesc; |
c906108c SS |
3164 | } |
3165 | ||
96baa820 | 3166 | extract_sfmt_leave: |
c906108c | 3167 | { |
7a292a7a | 3168 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 3169 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 3170 | #define FLD(f) abuf->fields.sfmt_enter.f |
c906108c | 3171 | |
c906108c SS |
3172 | |
3173 | /* Record the fields for the semantic handler. */ | |
96baa820 | 3174 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_leave", (char *) 0)); |
c906108c SS |
3175 | |
3176 | #if WITH_PROFILE_MODEL_P | |
3177 | /* Record the fields for profiling. */ | |
3178 | if (PROFILE_MODEL_P (current_cpu)) | |
3179 | { | |
3180 | FLD (in_h_gr_14) = 14; | |
3181 | FLD (in_h_gr_15) = 15; | |
3182 | FLD (out_h_gr_14) = 14; | |
3183 | FLD (out_h_gr_15) = 15; | |
3184 | } | |
3185 | #endif | |
3186 | #undef FLD | |
7a292a7a | 3187 | return idesc; |
c906108c SS |
3188 | } |
3189 | ||
96baa820 | 3190 | extract_sfmt_xchb: |
c906108c | 3191 | { |
7a292a7a | 3192 | const IDESC *idesc = &fr30bf_insn_data[itype]; |
c906108c | 3193 | CGEN_INSN_INT insn = base_insn; |
96baa820 | 3194 | #define FLD(f) abuf->fields.sfmt_add.f |
9846de1b JM |
3195 | UINT f_Rj; |
3196 | UINT f_Ri; | |
c906108c | 3197 | |
9846de1b JM |
3198 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); |
3199 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); | |
c906108c SS |
3200 | |
3201 | /* Record the fields for the semantic handler. */ | |
e5c59029 DB |
3202 | FLD (f_Ri) = f_Ri; |
3203 | FLD (f_Rj) = f_Rj; | |
c906108c SS |
3204 | FLD (i_Ri) = & CPU (h_gr)[f_Ri]; |
3205 | FLD (i_Rj) = & CPU (h_gr)[f_Rj]; | |
e5c59029 | 3206 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_xchb", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0)); |
c906108c SS |
3207 | |
3208 | #if WITH_PROFILE_MODEL_P | |
3209 | /* Record the fields for profiling. */ | |
3210 | if (PROFILE_MODEL_P (current_cpu)) | |
3211 | { | |
3212 | FLD (in_Ri) = f_Ri; | |
3213 | FLD (in_Rj) = f_Rj; | |
3214 | FLD (out_Ri) = f_Ri; | |
3215 | } | |
3216 | #endif | |
3217 | #undef FLD | |
7a292a7a | 3218 | return idesc; |
c906108c SS |
3219 | } |
3220 | ||
c906108c | 3221 | } |