decodev32.c revision 1.9.2.1 1 1.1 christos /* Simulator instruction decoder for crisv32f.
2 1.1 christos
3 1.1 christos THIS FILE IS MACHINE GENERATED WITH CGEN.
4 1.1 christos
5 1.9.2.1 perseant Copyright 1996-2023 Free Software Foundation, Inc.
6 1.1 christos
7 1.1 christos This file is part of the GNU simulators.
8 1.1 christos
9 1.1 christos This file is free software; you can redistribute it and/or modify
10 1.1 christos it under the terms of the GNU General Public License as published by
11 1.1 christos the Free Software Foundation; either version 3, or (at your option)
12 1.1 christos any later version.
13 1.1 christos
14 1.1 christos It is distributed in the hope that it will be useful, but WITHOUT
15 1.1 christos ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 1.1 christos or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 1.1 christos License for more details.
18 1.1 christos
19 1.1 christos You should have received a copy of the GNU General Public License along
20 1.1 christos with this program; if not, see <http://www.gnu.org/licenses/>.
21 1.1 christos
22 1.1 christos */
23 1.1 christos
24 1.1 christos #define WANT_CPU crisv32f
25 1.1 christos #define WANT_CPU_CRISV32F
26 1.1 christos
27 1.1 christos #include "sim-main.h"
28 1.1 christos #include "sim-assert.h"
29 1.9.2.1 perseant #include "cgen-mem.h"
30 1.1 christos #include "cgen-ops.h"
31 1.1 christos
32 1.1 christos /* The instruction descriptor array.
33 1.1 christos This is computed at runtime. Space for it is not malloc'd to save a
34 1.1 christos teensy bit of cpu in the decoder. Moving it to malloc space is trivial
35 1.1 christos but won't be done until necessary (we don't currently support the runtime
36 1.1 christos addition of instructions nor an SMP machine with different cpus). */
37 1.1 christos static IDESC crisv32f_insn_data[CRISV32F_INSN__MAX];
38 1.1 christos
39 1.1 christos /* Commas between elements are contained in the macros.
40 1.1 christos Some of these are conditionally compiled out. */
41 1.1 christos
42 1.1 christos static const struct insn_sem crisv32f_insn_sem[] =
43 1.1 christos {
44 1.1 christos { VIRTUAL_INSN_X_INVALID, CRISV32F_INSN_X_INVALID, CRISV32F_SFMT_EMPTY },
45 1.1 christos { VIRTUAL_INSN_X_AFTER, CRISV32F_INSN_X_AFTER, CRISV32F_SFMT_EMPTY },
46 1.1 christos { VIRTUAL_INSN_X_BEFORE, CRISV32F_INSN_X_BEFORE, CRISV32F_SFMT_EMPTY },
47 1.1 christos { VIRTUAL_INSN_X_CTI_CHAIN, CRISV32F_INSN_X_CTI_CHAIN, CRISV32F_SFMT_EMPTY },
48 1.1 christos { VIRTUAL_INSN_X_CHAIN, CRISV32F_INSN_X_CHAIN, CRISV32F_SFMT_EMPTY },
49 1.1 christos { VIRTUAL_INSN_X_BEGIN, CRISV32F_INSN_X_BEGIN, CRISV32F_SFMT_EMPTY },
50 1.1 christos { CRIS_INSN_MOVE_B_R, CRISV32F_INSN_MOVE_B_R, CRISV32F_SFMT_MOVE_B_R },
51 1.1 christos { CRIS_INSN_MOVE_W_R, CRISV32F_INSN_MOVE_W_R, CRISV32F_SFMT_MOVE_B_R },
52 1.1 christos { CRIS_INSN_MOVE_D_R, CRISV32F_INSN_MOVE_D_R, CRISV32F_SFMT_MOVE_D_R },
53 1.1 christos { CRIS_INSN_MOVEQ, CRISV32F_INSN_MOVEQ, CRISV32F_SFMT_MOVEQ },
54 1.1 christos { CRIS_INSN_MOVS_B_R, CRISV32F_INSN_MOVS_B_R, CRISV32F_SFMT_MOVS_B_R },
55 1.1 christos { CRIS_INSN_MOVS_W_R, CRISV32F_INSN_MOVS_W_R, CRISV32F_SFMT_MOVS_B_R },
56 1.1 christos { CRIS_INSN_MOVU_B_R, CRISV32F_INSN_MOVU_B_R, CRISV32F_SFMT_MOVS_B_R },
57 1.1 christos { CRIS_INSN_MOVU_W_R, CRISV32F_INSN_MOVU_W_R, CRISV32F_SFMT_MOVS_B_R },
58 1.1 christos { CRIS_INSN_MOVECBR, CRISV32F_INSN_MOVECBR, CRISV32F_SFMT_MOVECBR },
59 1.1 christos { CRIS_INSN_MOVECWR, CRISV32F_INSN_MOVECWR, CRISV32F_SFMT_MOVECWR },
60 1.1 christos { CRIS_INSN_MOVECDR, CRISV32F_INSN_MOVECDR, CRISV32F_SFMT_MOVECDR },
61 1.1 christos { CRIS_INSN_MOVSCBR, CRISV32F_INSN_MOVSCBR, CRISV32F_SFMT_MOVSCBR },
62 1.1 christos { CRIS_INSN_MOVSCWR, CRISV32F_INSN_MOVSCWR, CRISV32F_SFMT_MOVSCWR },
63 1.1 christos { CRIS_INSN_MOVUCBR, CRISV32F_INSN_MOVUCBR, CRISV32F_SFMT_MOVUCBR },
64 1.1 christos { CRIS_INSN_MOVUCWR, CRISV32F_INSN_MOVUCWR, CRISV32F_SFMT_MOVUCWR },
65 1.1 christos { CRIS_INSN_ADDQ, CRISV32F_INSN_ADDQ, CRISV32F_SFMT_ADDQ },
66 1.1 christos { CRIS_INSN_SUBQ, CRISV32F_INSN_SUBQ, CRISV32F_SFMT_ADDQ },
67 1.1 christos { CRIS_INSN_CMP_R_B_R, CRISV32F_INSN_CMP_R_B_R, CRISV32F_SFMT_CMP_R_B_R },
68 1.1 christos { CRIS_INSN_CMP_R_W_R, CRISV32F_INSN_CMP_R_W_R, CRISV32F_SFMT_CMP_R_B_R },
69 1.1 christos { CRIS_INSN_CMP_R_D_R, CRISV32F_INSN_CMP_R_D_R, CRISV32F_SFMT_CMP_R_B_R },
70 1.1 christos { CRIS_INSN_CMP_M_B_M, CRISV32F_INSN_CMP_M_B_M, CRISV32F_SFMT_CMP_M_B_M },
71 1.1 christos { CRIS_INSN_CMP_M_W_M, CRISV32F_INSN_CMP_M_W_M, CRISV32F_SFMT_CMP_M_W_M },
72 1.1 christos { CRIS_INSN_CMP_M_D_M, CRISV32F_INSN_CMP_M_D_M, CRISV32F_SFMT_CMP_M_D_M },
73 1.1 christos { CRIS_INSN_CMPCBR, CRISV32F_INSN_CMPCBR, CRISV32F_SFMT_CMPCBR },
74 1.1 christos { CRIS_INSN_CMPCWR, CRISV32F_INSN_CMPCWR, CRISV32F_SFMT_CMPCWR },
75 1.1 christos { CRIS_INSN_CMPCDR, CRISV32F_INSN_CMPCDR, CRISV32F_SFMT_CMPCDR },
76 1.1 christos { CRIS_INSN_CMPQ, CRISV32F_INSN_CMPQ, CRISV32F_SFMT_CMPQ },
77 1.1 christos { CRIS_INSN_CMPS_M_B_M, CRISV32F_INSN_CMPS_M_B_M, CRISV32F_SFMT_CMP_M_B_M },
78 1.1 christos { CRIS_INSN_CMPS_M_W_M, CRISV32F_INSN_CMPS_M_W_M, CRISV32F_SFMT_CMP_M_W_M },
79 1.1 christos { CRIS_INSN_CMPSCBR, CRISV32F_INSN_CMPSCBR, CRISV32F_SFMT_CMPCBR },
80 1.1 christos { CRIS_INSN_CMPSCWR, CRISV32F_INSN_CMPSCWR, CRISV32F_SFMT_CMPCWR },
81 1.1 christos { CRIS_INSN_CMPU_M_B_M, CRISV32F_INSN_CMPU_M_B_M, CRISV32F_SFMT_CMP_M_B_M },
82 1.1 christos { CRIS_INSN_CMPU_M_W_M, CRISV32F_INSN_CMPU_M_W_M, CRISV32F_SFMT_CMP_M_W_M },
83 1.1 christos { CRIS_INSN_CMPUCBR, CRISV32F_INSN_CMPUCBR, CRISV32F_SFMT_CMPUCBR },
84 1.1 christos { CRIS_INSN_CMPUCWR, CRISV32F_INSN_CMPUCWR, CRISV32F_SFMT_CMPUCWR },
85 1.1 christos { CRIS_INSN_MOVE_M_B_M, CRISV32F_INSN_MOVE_M_B_M, CRISV32F_SFMT_MOVE_M_B_M },
86 1.1 christos { CRIS_INSN_MOVE_M_W_M, CRISV32F_INSN_MOVE_M_W_M, CRISV32F_SFMT_MOVE_M_W_M },
87 1.1 christos { CRIS_INSN_MOVE_M_D_M, CRISV32F_INSN_MOVE_M_D_M, CRISV32F_SFMT_MOVE_M_D_M },
88 1.1 christos { CRIS_INSN_MOVS_M_B_M, CRISV32F_INSN_MOVS_M_B_M, CRISV32F_SFMT_MOVS_M_B_M },
89 1.1 christos { CRIS_INSN_MOVS_M_W_M, CRISV32F_INSN_MOVS_M_W_M, CRISV32F_SFMT_MOVS_M_W_M },
90 1.1 christos { CRIS_INSN_MOVU_M_B_M, CRISV32F_INSN_MOVU_M_B_M, CRISV32F_SFMT_MOVS_M_B_M },
91 1.1 christos { CRIS_INSN_MOVU_M_W_M, CRISV32F_INSN_MOVU_M_W_M, CRISV32F_SFMT_MOVS_M_W_M },
92 1.1 christos { CRIS_INSN_MOVE_R_SPRV32, CRISV32F_INSN_MOVE_R_SPRV32, CRISV32F_SFMT_MOVE_R_SPRV32 },
93 1.1 christos { CRIS_INSN_MOVE_SPR_RV32, CRISV32F_INSN_MOVE_SPR_RV32, CRISV32F_SFMT_MOVE_SPR_RV32 },
94 1.1 christos { CRIS_INSN_MOVE_M_SPRV32, CRISV32F_INSN_MOVE_M_SPRV32, CRISV32F_SFMT_MOVE_M_SPRV32 },
95 1.1 christos { CRIS_INSN_MOVE_C_SPRV32_P2, CRISV32F_INSN_MOVE_C_SPRV32_P2, CRISV32F_SFMT_MOVE_C_SPRV32_P2 },
96 1.1 christos { CRIS_INSN_MOVE_C_SPRV32_P3, CRISV32F_INSN_MOVE_C_SPRV32_P3, CRISV32F_SFMT_MOVE_C_SPRV32_P2 },
97 1.1 christos { CRIS_INSN_MOVE_C_SPRV32_P5, CRISV32F_INSN_MOVE_C_SPRV32_P5, CRISV32F_SFMT_MOVE_C_SPRV32_P2 },
98 1.1 christos { CRIS_INSN_MOVE_C_SPRV32_P6, CRISV32F_INSN_MOVE_C_SPRV32_P6, CRISV32F_SFMT_MOVE_C_SPRV32_P2 },
99 1.1 christos { CRIS_INSN_MOVE_C_SPRV32_P7, CRISV32F_INSN_MOVE_C_SPRV32_P7, CRISV32F_SFMT_MOVE_C_SPRV32_P2 },
100 1.1 christos { CRIS_INSN_MOVE_C_SPRV32_P9, CRISV32F_INSN_MOVE_C_SPRV32_P9, CRISV32F_SFMT_MOVE_C_SPRV32_P2 },
101 1.1 christos { CRIS_INSN_MOVE_C_SPRV32_P10, CRISV32F_INSN_MOVE_C_SPRV32_P10, CRISV32F_SFMT_MOVE_C_SPRV32_P2 },
102 1.1 christos { CRIS_INSN_MOVE_C_SPRV32_P11, CRISV32F_INSN_MOVE_C_SPRV32_P11, CRISV32F_SFMT_MOVE_C_SPRV32_P2 },
103 1.1 christos { CRIS_INSN_MOVE_C_SPRV32_P12, CRISV32F_INSN_MOVE_C_SPRV32_P12, CRISV32F_SFMT_MOVE_C_SPRV32_P2 },
104 1.1 christos { CRIS_INSN_MOVE_C_SPRV32_P13, CRISV32F_INSN_MOVE_C_SPRV32_P13, CRISV32F_SFMT_MOVE_C_SPRV32_P2 },
105 1.1 christos { CRIS_INSN_MOVE_C_SPRV32_P14, CRISV32F_INSN_MOVE_C_SPRV32_P14, CRISV32F_SFMT_MOVE_C_SPRV32_P2 },
106 1.1 christos { CRIS_INSN_MOVE_C_SPRV32_P15, CRISV32F_INSN_MOVE_C_SPRV32_P15, CRISV32F_SFMT_MOVE_C_SPRV32_P2 },
107 1.1 christos { CRIS_INSN_MOVE_SPR_MV32, CRISV32F_INSN_MOVE_SPR_MV32, CRISV32F_SFMT_MOVE_SPR_MV32 },
108 1.1 christos { CRIS_INSN_MOVE_SS_R, CRISV32F_INSN_MOVE_SS_R, CRISV32F_SFMT_MOVE_SS_R },
109 1.1 christos { CRIS_INSN_MOVE_R_SS, CRISV32F_INSN_MOVE_R_SS, CRISV32F_SFMT_MOVE_R_SS },
110 1.1 christos { CRIS_INSN_MOVEM_R_M_V32, CRISV32F_INSN_MOVEM_R_M_V32, CRISV32F_SFMT_MOVEM_R_M_V32 },
111 1.1 christos { CRIS_INSN_MOVEM_M_R_V32, CRISV32F_INSN_MOVEM_M_R_V32, CRISV32F_SFMT_MOVEM_M_R_V32 },
112 1.1 christos { CRIS_INSN_ADD_B_R, CRISV32F_INSN_ADD_B_R, CRISV32F_SFMT_ADD_B_R },
113 1.1 christos { CRIS_INSN_ADD_W_R, CRISV32F_INSN_ADD_W_R, CRISV32F_SFMT_ADD_B_R },
114 1.1 christos { CRIS_INSN_ADD_D_R, CRISV32F_INSN_ADD_D_R, CRISV32F_SFMT_ADD_D_R },
115 1.1 christos { CRIS_INSN_ADD_M_B_M, CRISV32F_INSN_ADD_M_B_M, CRISV32F_SFMT_ADD_M_B_M },
116 1.1 christos { CRIS_INSN_ADD_M_W_M, CRISV32F_INSN_ADD_M_W_M, CRISV32F_SFMT_ADD_M_W_M },
117 1.1 christos { CRIS_INSN_ADD_M_D_M, CRISV32F_INSN_ADD_M_D_M, CRISV32F_SFMT_ADD_M_D_M },
118 1.1 christos { CRIS_INSN_ADDCBR, CRISV32F_INSN_ADDCBR, CRISV32F_SFMT_ADDCBR },
119 1.1 christos { CRIS_INSN_ADDCWR, CRISV32F_INSN_ADDCWR, CRISV32F_SFMT_ADDCWR },
120 1.1 christos { CRIS_INSN_ADDCDR, CRISV32F_INSN_ADDCDR, CRISV32F_SFMT_ADDCDR },
121 1.1 christos { CRIS_INSN_ADDS_B_R, CRISV32F_INSN_ADDS_B_R, CRISV32F_SFMT_ADD_D_R },
122 1.1 christos { CRIS_INSN_ADDS_W_R, CRISV32F_INSN_ADDS_W_R, CRISV32F_SFMT_ADD_D_R },
123 1.1 christos { CRIS_INSN_ADDS_M_B_M, CRISV32F_INSN_ADDS_M_B_M, CRISV32F_SFMT_ADDS_M_B_M },
124 1.1 christos { CRIS_INSN_ADDS_M_W_M, CRISV32F_INSN_ADDS_M_W_M, CRISV32F_SFMT_ADDS_M_W_M },
125 1.1 christos { CRIS_INSN_ADDSCBR, CRISV32F_INSN_ADDSCBR, CRISV32F_SFMT_ADDSCBR },
126 1.1 christos { CRIS_INSN_ADDSCWR, CRISV32F_INSN_ADDSCWR, CRISV32F_SFMT_ADDSCWR },
127 1.1 christos { CRIS_INSN_ADDU_B_R, CRISV32F_INSN_ADDU_B_R, CRISV32F_SFMT_ADD_D_R },
128 1.1 christos { CRIS_INSN_ADDU_W_R, CRISV32F_INSN_ADDU_W_R, CRISV32F_SFMT_ADD_D_R },
129 1.1 christos { CRIS_INSN_ADDU_M_B_M, CRISV32F_INSN_ADDU_M_B_M, CRISV32F_SFMT_ADDS_M_B_M },
130 1.1 christos { CRIS_INSN_ADDU_M_W_M, CRISV32F_INSN_ADDU_M_W_M, CRISV32F_SFMT_ADDS_M_W_M },
131 1.1 christos { CRIS_INSN_ADDUCBR, CRISV32F_INSN_ADDUCBR, CRISV32F_SFMT_ADDSCBR },
132 1.1 christos { CRIS_INSN_ADDUCWR, CRISV32F_INSN_ADDUCWR, CRISV32F_SFMT_ADDSCWR },
133 1.1 christos { CRIS_INSN_SUB_B_R, CRISV32F_INSN_SUB_B_R, CRISV32F_SFMT_ADD_B_R },
134 1.1 christos { CRIS_INSN_SUB_W_R, CRISV32F_INSN_SUB_W_R, CRISV32F_SFMT_ADD_B_R },
135 1.1 christos { CRIS_INSN_SUB_D_R, CRISV32F_INSN_SUB_D_R, CRISV32F_SFMT_ADD_D_R },
136 1.1 christos { CRIS_INSN_SUB_M_B_M, CRISV32F_INSN_SUB_M_B_M, CRISV32F_SFMT_ADD_M_B_M },
137 1.1 christos { CRIS_INSN_SUB_M_W_M, CRISV32F_INSN_SUB_M_W_M, CRISV32F_SFMT_ADD_M_W_M },
138 1.1 christos { CRIS_INSN_SUB_M_D_M, CRISV32F_INSN_SUB_M_D_M, CRISV32F_SFMT_ADD_M_D_M },
139 1.1 christos { CRIS_INSN_SUBCBR, CRISV32F_INSN_SUBCBR, CRISV32F_SFMT_ADDCBR },
140 1.1 christos { CRIS_INSN_SUBCWR, CRISV32F_INSN_SUBCWR, CRISV32F_SFMT_ADDCWR },
141 1.1 christos { CRIS_INSN_SUBCDR, CRISV32F_INSN_SUBCDR, CRISV32F_SFMT_ADDCDR },
142 1.1 christos { CRIS_INSN_SUBS_B_R, CRISV32F_INSN_SUBS_B_R, CRISV32F_SFMT_ADD_D_R },
143 1.1 christos { CRIS_INSN_SUBS_W_R, CRISV32F_INSN_SUBS_W_R, CRISV32F_SFMT_ADD_D_R },
144 1.1 christos { CRIS_INSN_SUBS_M_B_M, CRISV32F_INSN_SUBS_M_B_M, CRISV32F_SFMT_ADDS_M_B_M },
145 1.1 christos { CRIS_INSN_SUBS_M_W_M, CRISV32F_INSN_SUBS_M_W_M, CRISV32F_SFMT_ADDS_M_W_M },
146 1.1 christos { CRIS_INSN_SUBSCBR, CRISV32F_INSN_SUBSCBR, CRISV32F_SFMT_ADDSCBR },
147 1.1 christos { CRIS_INSN_SUBSCWR, CRISV32F_INSN_SUBSCWR, CRISV32F_SFMT_ADDSCWR },
148 1.1 christos { CRIS_INSN_SUBU_B_R, CRISV32F_INSN_SUBU_B_R, CRISV32F_SFMT_ADD_D_R },
149 1.1 christos { CRIS_INSN_SUBU_W_R, CRISV32F_INSN_SUBU_W_R, CRISV32F_SFMT_ADD_D_R },
150 1.1 christos { CRIS_INSN_SUBU_M_B_M, CRISV32F_INSN_SUBU_M_B_M, CRISV32F_SFMT_ADDS_M_B_M },
151 1.1 christos { CRIS_INSN_SUBU_M_W_M, CRISV32F_INSN_SUBU_M_W_M, CRISV32F_SFMT_ADDS_M_W_M },
152 1.1 christos { CRIS_INSN_SUBUCBR, CRISV32F_INSN_SUBUCBR, CRISV32F_SFMT_ADDSCBR },
153 1.1 christos { CRIS_INSN_SUBUCWR, CRISV32F_INSN_SUBUCWR, CRISV32F_SFMT_ADDSCWR },
154 1.1 christos { CRIS_INSN_ADDC_R, CRISV32F_INSN_ADDC_R, CRISV32F_SFMT_ADD_D_R },
155 1.1 christos { CRIS_INSN_ADDC_M, CRISV32F_INSN_ADDC_M, CRISV32F_SFMT_ADDC_M },
156 1.1 christos { CRIS_INSN_ADDC_C, CRISV32F_INSN_ADDC_C, CRISV32F_SFMT_ADDCDR },
157 1.1 christos { CRIS_INSN_LAPC_D, CRISV32F_INSN_LAPC_D, CRISV32F_SFMT_LAPC_D },
158 1.1 christos { CRIS_INSN_LAPCQ, CRISV32F_INSN_LAPCQ, CRISV32F_SFMT_LAPCQ },
159 1.1 christos { CRIS_INSN_ADDI_B_R, CRISV32F_INSN_ADDI_B_R, CRISV32F_SFMT_ADDI_B_R },
160 1.1 christos { CRIS_INSN_ADDI_W_R, CRISV32F_INSN_ADDI_W_R, CRISV32F_SFMT_ADDI_B_R },
161 1.1 christos { CRIS_INSN_ADDI_D_R, CRISV32F_INSN_ADDI_D_R, CRISV32F_SFMT_ADDI_B_R },
162 1.1 christos { CRIS_INSN_NEG_B_R, CRISV32F_INSN_NEG_B_R, CRISV32F_SFMT_NEG_B_R },
163 1.1 christos { CRIS_INSN_NEG_W_R, CRISV32F_INSN_NEG_W_R, CRISV32F_SFMT_NEG_B_R },
164 1.1 christos { CRIS_INSN_NEG_D_R, CRISV32F_INSN_NEG_D_R, CRISV32F_SFMT_NEG_D_R },
165 1.1 christos { CRIS_INSN_TEST_M_B_M, CRISV32F_INSN_TEST_M_B_M, CRISV32F_SFMT_TEST_M_B_M },
166 1.1 christos { CRIS_INSN_TEST_M_W_M, CRISV32F_INSN_TEST_M_W_M, CRISV32F_SFMT_TEST_M_W_M },
167 1.1 christos { CRIS_INSN_TEST_M_D_M, CRISV32F_INSN_TEST_M_D_M, CRISV32F_SFMT_TEST_M_D_M },
168 1.1 christos { CRIS_INSN_MOVE_R_M_B_M, CRISV32F_INSN_MOVE_R_M_B_M, CRISV32F_SFMT_MOVE_R_M_B_M },
169 1.1 christos { CRIS_INSN_MOVE_R_M_W_M, CRISV32F_INSN_MOVE_R_M_W_M, CRISV32F_SFMT_MOVE_R_M_W_M },
170 1.1 christos { CRIS_INSN_MOVE_R_M_D_M, CRISV32F_INSN_MOVE_R_M_D_M, CRISV32F_SFMT_MOVE_R_M_D_M },
171 1.1 christos { CRIS_INSN_MULS_B, CRISV32F_INSN_MULS_B, CRISV32F_SFMT_MULS_B },
172 1.1 christos { CRIS_INSN_MULS_W, CRISV32F_INSN_MULS_W, CRISV32F_SFMT_MULS_B },
173 1.1 christos { CRIS_INSN_MULS_D, CRISV32F_INSN_MULS_D, CRISV32F_SFMT_MULS_B },
174 1.1 christos { CRIS_INSN_MULU_B, CRISV32F_INSN_MULU_B, CRISV32F_SFMT_MULS_B },
175 1.1 christos { CRIS_INSN_MULU_W, CRISV32F_INSN_MULU_W, CRISV32F_SFMT_MULS_B },
176 1.1 christos { CRIS_INSN_MULU_D, CRISV32F_INSN_MULU_D, CRISV32F_SFMT_MULS_B },
177 1.1 christos { CRIS_INSN_MCP, CRISV32F_INSN_MCP, CRISV32F_SFMT_MCP },
178 1.1 christos { CRIS_INSN_DSTEP, CRISV32F_INSN_DSTEP, CRISV32F_SFMT_DSTEP },
179 1.1 christos { CRIS_INSN_ABS, CRISV32F_INSN_ABS, CRISV32F_SFMT_MOVS_B_R },
180 1.1 christos { CRIS_INSN_AND_B_R, CRISV32F_INSN_AND_B_R, CRISV32F_SFMT_AND_B_R },
181 1.1 christos { CRIS_INSN_AND_W_R, CRISV32F_INSN_AND_W_R, CRISV32F_SFMT_AND_B_R },
182 1.1 christos { CRIS_INSN_AND_D_R, CRISV32F_INSN_AND_D_R, CRISV32F_SFMT_AND_D_R },
183 1.1 christos { CRIS_INSN_AND_M_B_M, CRISV32F_INSN_AND_M_B_M, CRISV32F_SFMT_AND_M_B_M },
184 1.1 christos { CRIS_INSN_AND_M_W_M, CRISV32F_INSN_AND_M_W_M, CRISV32F_SFMT_AND_M_W_M },
185 1.1 christos { CRIS_INSN_AND_M_D_M, CRISV32F_INSN_AND_M_D_M, CRISV32F_SFMT_AND_M_D_M },
186 1.1 christos { CRIS_INSN_ANDCBR, CRISV32F_INSN_ANDCBR, CRISV32F_SFMT_ANDCBR },
187 1.1 christos { CRIS_INSN_ANDCWR, CRISV32F_INSN_ANDCWR, CRISV32F_SFMT_ANDCWR },
188 1.1 christos { CRIS_INSN_ANDCDR, CRISV32F_INSN_ANDCDR, CRISV32F_SFMT_ANDCDR },
189 1.1 christos { CRIS_INSN_ANDQ, CRISV32F_INSN_ANDQ, CRISV32F_SFMT_ANDQ },
190 1.1 christos { CRIS_INSN_ORR_B_R, CRISV32F_INSN_ORR_B_R, CRISV32F_SFMT_AND_B_R },
191 1.1 christos { CRIS_INSN_ORR_W_R, CRISV32F_INSN_ORR_W_R, CRISV32F_SFMT_AND_B_R },
192 1.1 christos { CRIS_INSN_ORR_D_R, CRISV32F_INSN_ORR_D_R, CRISV32F_SFMT_AND_D_R },
193 1.1 christos { CRIS_INSN_OR_M_B_M, CRISV32F_INSN_OR_M_B_M, CRISV32F_SFMT_AND_M_B_M },
194 1.1 christos { CRIS_INSN_OR_M_W_M, CRISV32F_INSN_OR_M_W_M, CRISV32F_SFMT_AND_M_W_M },
195 1.1 christos { CRIS_INSN_OR_M_D_M, CRISV32F_INSN_OR_M_D_M, CRISV32F_SFMT_AND_M_D_M },
196 1.1 christos { CRIS_INSN_ORCBR, CRISV32F_INSN_ORCBR, CRISV32F_SFMT_ANDCBR },
197 1.1 christos { CRIS_INSN_ORCWR, CRISV32F_INSN_ORCWR, CRISV32F_SFMT_ANDCWR },
198 1.1 christos { CRIS_INSN_ORCDR, CRISV32F_INSN_ORCDR, CRISV32F_SFMT_ANDCDR },
199 1.1 christos { CRIS_INSN_ORQ, CRISV32F_INSN_ORQ, CRISV32F_SFMT_ANDQ },
200 1.1 christos { CRIS_INSN_XOR, CRISV32F_INSN_XOR, CRISV32F_SFMT_DSTEP },
201 1.1 christos { CRIS_INSN_SWAP, CRISV32F_INSN_SWAP, CRISV32F_SFMT_SWAP },
202 1.1 christos { CRIS_INSN_ASRR_B_R, CRISV32F_INSN_ASRR_B_R, CRISV32F_SFMT_AND_B_R },
203 1.1 christos { CRIS_INSN_ASRR_W_R, CRISV32F_INSN_ASRR_W_R, CRISV32F_SFMT_AND_B_R },
204 1.1 christos { CRIS_INSN_ASRR_D_R, CRISV32F_INSN_ASRR_D_R, CRISV32F_SFMT_AND_D_R },
205 1.1 christos { CRIS_INSN_ASRQ, CRISV32F_INSN_ASRQ, CRISV32F_SFMT_ASRQ },
206 1.1 christos { CRIS_INSN_LSRR_B_R, CRISV32F_INSN_LSRR_B_R, CRISV32F_SFMT_LSRR_B_R },
207 1.1 christos { CRIS_INSN_LSRR_W_R, CRISV32F_INSN_LSRR_W_R, CRISV32F_SFMT_LSRR_B_R },
208 1.1 christos { CRIS_INSN_LSRR_D_R, CRISV32F_INSN_LSRR_D_R, CRISV32F_SFMT_LSRR_D_R },
209 1.1 christos { CRIS_INSN_LSRQ, CRISV32F_INSN_LSRQ, CRISV32F_SFMT_ASRQ },
210 1.1 christos { CRIS_INSN_LSLR_B_R, CRISV32F_INSN_LSLR_B_R, CRISV32F_SFMT_LSRR_B_R },
211 1.1 christos { CRIS_INSN_LSLR_W_R, CRISV32F_INSN_LSLR_W_R, CRISV32F_SFMT_LSRR_B_R },
212 1.1 christos { CRIS_INSN_LSLR_D_R, CRISV32F_INSN_LSLR_D_R, CRISV32F_SFMT_LSRR_D_R },
213 1.1 christos { CRIS_INSN_LSLQ, CRISV32F_INSN_LSLQ, CRISV32F_SFMT_ASRQ },
214 1.1 christos { CRIS_INSN_BTST, CRISV32F_INSN_BTST, CRISV32F_SFMT_BTST },
215 1.1 christos { CRIS_INSN_BTSTQ, CRISV32F_INSN_BTSTQ, CRISV32F_SFMT_BTSTQ },
216 1.1 christos { CRIS_INSN_SETF, CRISV32F_INSN_SETF, CRISV32F_SFMT_SETF },
217 1.1 christos { CRIS_INSN_CLEARF, CRISV32F_INSN_CLEARF, CRISV32F_SFMT_SETF },
218 1.1 christos { CRIS_INSN_RFE, CRISV32F_INSN_RFE, CRISV32F_SFMT_RFE },
219 1.1 christos { CRIS_INSN_SFE, CRISV32F_INSN_SFE, CRISV32F_SFMT_SFE },
220 1.1 christos { CRIS_INSN_RFG, CRISV32F_INSN_RFG, CRISV32F_SFMT_RFG },
221 1.1 christos { CRIS_INSN_RFN, CRISV32F_INSN_RFN, CRISV32F_SFMT_RFN },
222 1.1 christos { CRIS_INSN_HALT, CRISV32F_INSN_HALT, CRISV32F_SFMT_HALT },
223 1.1 christos { CRIS_INSN_BCC_B, CRISV32F_INSN_BCC_B, CRISV32F_SFMT_BCC_B },
224 1.1 christos { CRIS_INSN_BA_B, CRISV32F_INSN_BA_B, CRISV32F_SFMT_BA_B },
225 1.1 christos { CRIS_INSN_BCC_W, CRISV32F_INSN_BCC_W, CRISV32F_SFMT_BCC_W },
226 1.1 christos { CRIS_INSN_BA_W, CRISV32F_INSN_BA_W, CRISV32F_SFMT_BA_W },
227 1.1 christos { CRIS_INSN_JAS_R, CRISV32F_INSN_JAS_R, CRISV32F_SFMT_JAS_R },
228 1.1 christos { CRIS_INSN_JAS_C, CRISV32F_INSN_JAS_C, CRISV32F_SFMT_JAS_C },
229 1.1 christos { CRIS_INSN_JUMP_P, CRISV32F_INSN_JUMP_P, CRISV32F_SFMT_JUMP_P },
230 1.1 christos { CRIS_INSN_BAS_C, CRISV32F_INSN_BAS_C, CRISV32F_SFMT_BAS_C },
231 1.1 christos { CRIS_INSN_JASC_R, CRISV32F_INSN_JASC_R, CRISV32F_SFMT_JASC_R },
232 1.1 christos { CRIS_INSN_JASC_C, CRISV32F_INSN_JASC_C, CRISV32F_SFMT_JAS_C },
233 1.1 christos { CRIS_INSN_BASC_C, CRISV32F_INSN_BASC_C, CRISV32F_SFMT_BAS_C },
234 1.1 christos { CRIS_INSN_BREAK, CRISV32F_INSN_BREAK, CRISV32F_SFMT_BREAK },
235 1.1 christos { CRIS_INSN_BOUND_R_B_R, CRISV32F_INSN_BOUND_R_B_R, CRISV32F_SFMT_DSTEP },
236 1.1 christos { CRIS_INSN_BOUND_R_W_R, CRISV32F_INSN_BOUND_R_W_R, CRISV32F_SFMT_DSTEP },
237 1.1 christos { CRIS_INSN_BOUND_R_D_R, CRISV32F_INSN_BOUND_R_D_R, CRISV32F_SFMT_DSTEP },
238 1.1 christos { CRIS_INSN_BOUND_CB, CRISV32F_INSN_BOUND_CB, CRISV32F_SFMT_BOUND_CB },
239 1.1 christos { CRIS_INSN_BOUND_CW, CRISV32F_INSN_BOUND_CW, CRISV32F_SFMT_BOUND_CW },
240 1.1 christos { CRIS_INSN_BOUND_CD, CRISV32F_INSN_BOUND_CD, CRISV32F_SFMT_BOUND_CD },
241 1.1 christos { CRIS_INSN_SCC, CRISV32F_INSN_SCC, CRISV32F_SFMT_SCC },
242 1.1 christos { CRIS_INSN_LZ, CRISV32F_INSN_LZ, CRISV32F_SFMT_MOVS_B_R },
243 1.1 christos { CRIS_INSN_ADDOQ, CRISV32F_INSN_ADDOQ, CRISV32F_SFMT_ADDOQ },
244 1.1 christos { CRIS_INSN_ADDO_M_B_M, CRISV32F_INSN_ADDO_M_B_M, CRISV32F_SFMT_ADDO_M_B_M },
245 1.1 christos { CRIS_INSN_ADDO_M_W_M, CRISV32F_INSN_ADDO_M_W_M, CRISV32F_SFMT_ADDO_M_W_M },
246 1.1 christos { CRIS_INSN_ADDO_M_D_M, CRISV32F_INSN_ADDO_M_D_M, CRISV32F_SFMT_ADDO_M_D_M },
247 1.1 christos { CRIS_INSN_ADDO_CB, CRISV32F_INSN_ADDO_CB, CRISV32F_SFMT_ADDO_CB },
248 1.1 christos { CRIS_INSN_ADDO_CW, CRISV32F_INSN_ADDO_CW, CRISV32F_SFMT_ADDO_CW },
249 1.1 christos { CRIS_INSN_ADDO_CD, CRISV32F_INSN_ADDO_CD, CRISV32F_SFMT_ADDO_CD },
250 1.1 christos { CRIS_INSN_ADDI_ACR_B_R, CRISV32F_INSN_ADDI_ACR_B_R, CRISV32F_SFMT_ADDI_ACR_B_R },
251 1.1 christos { CRIS_INSN_ADDI_ACR_W_R, CRISV32F_INSN_ADDI_ACR_W_R, CRISV32F_SFMT_ADDI_ACR_B_R },
252 1.1 christos { CRIS_INSN_ADDI_ACR_D_R, CRISV32F_INSN_ADDI_ACR_D_R, CRISV32F_SFMT_ADDI_ACR_B_R },
253 1.1 christos { CRIS_INSN_FIDXI, CRISV32F_INSN_FIDXI, CRISV32F_SFMT_FIDXI },
254 1.1 christos { CRIS_INSN_FTAGI, CRISV32F_INSN_FTAGI, CRISV32F_SFMT_FIDXI },
255 1.1 christos { CRIS_INSN_FIDXD, CRISV32F_INSN_FIDXD, CRISV32F_SFMT_FIDXI },
256 1.1 christos { CRIS_INSN_FTAGD, CRISV32F_INSN_FTAGD, CRISV32F_SFMT_FIDXI },
257 1.1 christos };
258 1.1 christos
259 1.1 christos static const struct insn_sem crisv32f_insn_sem_invalid =
260 1.1 christos {
261 1.1 christos VIRTUAL_INSN_X_INVALID, CRISV32F_INSN_X_INVALID, CRISV32F_SFMT_EMPTY
262 1.1 christos };
263 1.1 christos
264 1.1 christos /* Initialize an IDESC from the compile-time computable parts. */
265 1.1 christos
266 1.1 christos static INLINE void
267 1.1 christos init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t)
268 1.1 christos {
269 1.1 christos const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries;
270 1.1 christos
271 1.1 christos id->num = t->index;
272 1.1 christos id->sfmt = t->sfmt;
273 1.1 christos if ((int) t->type <= 0)
274 1.1 christos id->idata = & cgen_virtual_insn_table[- (int) t->type];
275 1.1 christos else
276 1.1 christos id->idata = & insn_table[t->type];
277 1.1 christos id->attrs = CGEN_INSN_ATTRS (id->idata);
278 1.1 christos /* Oh my god, a magic number. */
279 1.1 christos id->length = CGEN_INSN_BITSIZE (id->idata) / 8;
280 1.1 christos
281 1.1 christos #if WITH_PROFILE_MODEL_P
282 1.1 christos id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index];
283 1.1 christos {
284 1.1 christos SIM_DESC sd = CPU_STATE (cpu);
285 1.1 christos SIM_ASSERT (t->index == id->timing->num);
286 1.1 christos }
287 1.1 christos #endif
288 1.1 christos
289 1.1 christos /* Semantic pointers are initialized elsewhere. */
290 1.1 christos }
291 1.1 christos
292 1.1 christos /* Initialize the instruction descriptor table. */
293 1.1 christos
294 1.1 christos void
295 1.1 christos crisv32f_init_idesc_table (SIM_CPU *cpu)
296 1.1 christos {
297 1.1 christos IDESC *id,*tabend;
298 1.1 christos const struct insn_sem *t,*tend;
299 1.1 christos int tabsize = CRISV32F_INSN__MAX;
300 1.1 christos IDESC *table = crisv32f_insn_data;
301 1.1 christos
302 1.1 christos memset (table, 0, tabsize * sizeof (IDESC));
303 1.1 christos
304 1.1 christos /* First set all entries to the `invalid insn'. */
305 1.1 christos t = & crisv32f_insn_sem_invalid;
306 1.1 christos for (id = table, tabend = table + tabsize; id < tabend; ++id)
307 1.1 christos init_idesc (cpu, id, t);
308 1.1 christos
309 1.1 christos /* Now fill in the values for the chosen cpu. */
310 1.7 christos for (t = crisv32f_insn_sem, tend = t + ARRAY_SIZE (crisv32f_insn_sem);
311 1.1 christos t != tend; ++t)
312 1.1 christos {
313 1.1 christos init_idesc (cpu, & table[t->index], t);
314 1.1 christos }
315 1.1 christos
316 1.1 christos /* Link the IDESC table into the cpu. */
317 1.1 christos CPU_IDESC (cpu) = table;
318 1.1 christos }
319 1.1 christos
320 1.1 christos /* Given an instruction, return a pointer to its IDESC entry. */
321 1.1 christos
322 1.1 christos const IDESC *
323 1.1 christos crisv32f_decode (SIM_CPU *current_cpu, IADDR pc,
324 1.1 christos CGEN_INSN_WORD base_insn,
325 1.1 christos ARGBUF *abuf)
326 1.1 christos {
327 1.1 christos /* Result of decoder. */
328 1.1 christos CRISV32F_INSN_TYPE itype;
329 1.1 christos
330 1.1 christos {
331 1.1 christos CGEN_INSN_WORD insn = base_insn;
332 1.1 christos
333 1.1 christos {
334 1.1 christos unsigned int val = (((insn >> 4) & (255 << 0)));
335 1.1 christos switch (val)
336 1.1 christos {
337 1.1 christos case 0 : /* fall through */
338 1.1 christos case 1 : /* fall through */
339 1.1 christos case 2 : /* fall through */
340 1.1 christos case 3 : /* fall through */
341 1.1 christos case 4 : /* fall through */
342 1.1 christos case 5 : /* fall through */
343 1.1 christos case 6 : /* fall through */
344 1.1 christos case 7 : /* fall through */
345 1.1 christos case 8 : /* fall through */
346 1.1 christos case 9 : /* fall through */
347 1.1 christos case 10 : /* fall through */
348 1.1 christos case 11 : /* fall through */
349 1.1 christos case 12 : /* fall through */
350 1.1 christos case 13 : /* fall through */
351 1.1 christos case 14 : /* fall through */
352 1.1 christos case 15 :
353 1.1 christos {
354 1.1 christos unsigned int val = (((insn >> 12) & (15 << 0)));
355 1.1 christos switch (val)
356 1.1 christos {
357 1.1 christos case 0 : /* fall through */
358 1.1 christos case 1 : /* fall through */
359 1.1 christos case 2 : /* fall through */
360 1.1 christos case 3 : /* fall through */
361 1.1 christos case 4 : /* fall through */
362 1.1 christos case 5 : /* fall through */
363 1.1 christos case 6 : /* fall through */
364 1.1 christos case 7 : /* fall through */
365 1.1 christos case 8 : /* fall through */
366 1.1 christos case 9 : /* fall through */
367 1.1 christos case 10 : /* fall through */
368 1.1 christos case 11 : /* fall through */
369 1.1 christos case 12 : /* fall through */
370 1.1 christos case 13 : /* fall through */
371 1.1 christos case 15 : itype = CRISV32F_INSN_BCC_B; goto extract_sfmt_bcc_b;
372 1.1 christos case 14 : itype = CRISV32F_INSN_BA_B; goto extract_sfmt_ba_b;
373 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
374 1.1 christos }
375 1.1 christos }
376 1.1 christos case 16 : /* fall through */
377 1.1 christos case 17 : /* fall through */
378 1.1 christos case 18 : /* fall through */
379 1.1 christos case 19 : /* fall through */
380 1.1 christos case 20 : /* fall through */
381 1.1 christos case 21 : /* fall through */
382 1.1 christos case 22 : /* fall through */
383 1.1 christos case 23 : /* fall through */
384 1.1 christos case 24 : /* fall through */
385 1.1 christos case 25 : /* fall through */
386 1.1 christos case 26 : /* fall through */
387 1.1 christos case 27 : /* fall through */
388 1.1 christos case 28 : /* fall through */
389 1.1 christos case 29 : /* fall through */
390 1.1 christos case 30 : /* fall through */
391 1.1 christos case 31 : itype = CRISV32F_INSN_ADDOQ; goto extract_sfmt_addoq;
392 1.1 christos case 32 : /* fall through */
393 1.1 christos case 33 : /* fall through */
394 1.1 christos case 34 : /* fall through */
395 1.1 christos case 35 : itype = CRISV32F_INSN_ADDQ; goto extract_sfmt_addq;
396 1.1 christos case 36 : /* fall through */
397 1.1 christos case 37 : /* fall through */
398 1.1 christos case 38 : /* fall through */
399 1.1 christos case 39 : itype = CRISV32F_INSN_MOVEQ; goto extract_sfmt_moveq;
400 1.1 christos case 40 : /* fall through */
401 1.1 christos case 41 : /* fall through */
402 1.1 christos case 42 : /* fall through */
403 1.1 christos case 43 : itype = CRISV32F_INSN_SUBQ; goto extract_sfmt_addq;
404 1.1 christos case 44 : /* fall through */
405 1.1 christos case 45 : /* fall through */
406 1.1 christos case 46 : /* fall through */
407 1.1 christos case 47 : itype = CRISV32F_INSN_CMPQ; goto extract_sfmt_cmpq;
408 1.1 christos case 48 : /* fall through */
409 1.1 christos case 49 : /* fall through */
410 1.1 christos case 50 : /* fall through */
411 1.1 christos case 51 : itype = CRISV32F_INSN_ANDQ; goto extract_sfmt_andq;
412 1.1 christos case 52 : /* fall through */
413 1.1 christos case 53 : /* fall through */
414 1.1 christos case 54 : /* fall through */
415 1.1 christos case 55 : itype = CRISV32F_INSN_ORQ; goto extract_sfmt_andq;
416 1.1 christos case 56 : /* fall through */
417 1.1 christos case 57 : itype = CRISV32F_INSN_BTSTQ; goto extract_sfmt_btstq;
418 1.1 christos case 58 : /* fall through */
419 1.1 christos case 59 : itype = CRISV32F_INSN_ASRQ; goto extract_sfmt_asrq;
420 1.1 christos case 60 : /* fall through */
421 1.1 christos case 61 : itype = CRISV32F_INSN_LSLQ; goto extract_sfmt_asrq;
422 1.1 christos case 62 : /* fall through */
423 1.1 christos case 63 : itype = CRISV32F_INSN_LSRQ; goto extract_sfmt_asrq;
424 1.1 christos case 64 : itype = CRISV32F_INSN_ADDU_B_R; goto extract_sfmt_add_d_r;
425 1.1 christos case 65 : itype = CRISV32F_INSN_ADDU_W_R; goto extract_sfmt_add_d_r;
426 1.1 christos case 66 : itype = CRISV32F_INSN_ADDS_B_R; goto extract_sfmt_add_d_r;
427 1.1 christos case 67 : itype = CRISV32F_INSN_ADDS_W_R; goto extract_sfmt_add_d_r;
428 1.1 christos case 68 : itype = CRISV32F_INSN_MOVU_B_R; goto extract_sfmt_movs_b_r;
429 1.1 christos case 69 : itype = CRISV32F_INSN_MOVU_W_R; goto extract_sfmt_movs_b_r;
430 1.1 christos case 70 : itype = CRISV32F_INSN_MOVS_B_R; goto extract_sfmt_movs_b_r;
431 1.1 christos case 71 : itype = CRISV32F_INSN_MOVS_W_R; goto extract_sfmt_movs_b_r;
432 1.1 christos case 72 : itype = CRISV32F_INSN_SUBU_B_R; goto extract_sfmt_add_d_r;
433 1.1 christos case 73 : itype = CRISV32F_INSN_SUBU_W_R; goto extract_sfmt_add_d_r;
434 1.1 christos case 74 : itype = CRISV32F_INSN_SUBS_B_R; goto extract_sfmt_add_d_r;
435 1.1 christos case 75 : itype = CRISV32F_INSN_SUBS_W_R; goto extract_sfmt_add_d_r;
436 1.1 christos case 76 : itype = CRISV32F_INSN_LSLR_B_R; goto extract_sfmt_lsrr_b_r;
437 1.1 christos case 77 : itype = CRISV32F_INSN_LSLR_W_R; goto extract_sfmt_lsrr_b_r;
438 1.1 christos case 78 : itype = CRISV32F_INSN_LSLR_D_R; goto extract_sfmt_lsrr_d_r;
439 1.1 christos case 79 : itype = CRISV32F_INSN_BTST; goto extract_sfmt_btst;
440 1.1 christos case 80 : itype = CRISV32F_INSN_ADDI_B_R; goto extract_sfmt_addi_b_r;
441 1.1 christos case 81 : itype = CRISV32F_INSN_ADDI_W_R; goto extract_sfmt_addi_b_r;
442 1.1 christos case 82 : itype = CRISV32F_INSN_ADDI_D_R; goto extract_sfmt_addi_b_r;
443 1.1 christos case 83 : itype = CRISV32F_INSN_SCC; goto extract_sfmt_scc;
444 1.1 christos case 84 : itype = CRISV32F_INSN_ADDI_ACR_B_R; goto extract_sfmt_addi_acr_b_r;
445 1.1 christos case 85 : itype = CRISV32F_INSN_ADDI_ACR_W_R; goto extract_sfmt_addi_acr_b_r;
446 1.1 christos case 86 : itype = CRISV32F_INSN_ADDI_ACR_D_R; goto extract_sfmt_addi_acr_b_r;
447 1.1 christos case 87 : itype = CRISV32F_INSN_ADDC_R; goto extract_sfmt_add_d_r;
448 1.1 christos case 88 : itype = CRISV32F_INSN_NEG_B_R; goto extract_sfmt_neg_b_r;
449 1.1 christos case 89 : itype = CRISV32F_INSN_NEG_W_R; goto extract_sfmt_neg_b_r;
450 1.1 christos case 90 : itype = CRISV32F_INSN_NEG_D_R; goto extract_sfmt_neg_d_r;
451 1.1 christos case 91 : itype = CRISV32F_INSN_SETF; goto extract_sfmt_setf;
452 1.1 christos case 92 : itype = CRISV32F_INSN_BOUND_R_B_R; goto extract_sfmt_dstep;
453 1.1 christos case 93 : itype = CRISV32F_INSN_BOUND_R_W_R; goto extract_sfmt_dstep;
454 1.1 christos case 94 : itype = CRISV32F_INSN_BOUND_R_D_R; goto extract_sfmt_dstep;
455 1.1 christos case 95 : itype = CRISV32F_INSN_CLEARF; goto extract_sfmt_setf;
456 1.1 christos case 96 : itype = CRISV32F_INSN_ADD_B_R; goto extract_sfmt_add_b_r;
457 1.1 christos case 97 : itype = CRISV32F_INSN_ADD_W_R; goto extract_sfmt_add_b_r;
458 1.1 christos case 98 : itype = CRISV32F_INSN_ADD_D_R; goto extract_sfmt_add_d_r;
459 1.1 christos case 99 : itype = CRISV32F_INSN_MOVE_R_SPRV32; goto extract_sfmt_move_r_sprv32;
460 1.1 christos case 100 : itype = CRISV32F_INSN_MOVE_B_R; goto extract_sfmt_move_b_r;
461 1.1 christos case 101 : itype = CRISV32F_INSN_MOVE_W_R; goto extract_sfmt_move_b_r;
462 1.1 christos case 102 : itype = CRISV32F_INSN_MOVE_D_R; goto extract_sfmt_move_d_r;
463 1.1 christos case 103 : itype = CRISV32F_INSN_MOVE_SPR_RV32; goto extract_sfmt_move_spr_rv32;
464 1.1 christos case 104 : itype = CRISV32F_INSN_SUB_B_R; goto extract_sfmt_add_b_r;
465 1.1 christos case 105 : itype = CRISV32F_INSN_SUB_W_R; goto extract_sfmt_add_b_r;
466 1.1 christos case 106 : itype = CRISV32F_INSN_SUB_D_R; goto extract_sfmt_add_d_r;
467 1.1 christos case 107 : itype = CRISV32F_INSN_ABS; goto extract_sfmt_movs_b_r;
468 1.1 christos case 108 : itype = CRISV32F_INSN_CMP_R_B_R; goto extract_sfmt_cmp_r_b_r;
469 1.1 christos case 109 : itype = CRISV32F_INSN_CMP_R_W_R; goto extract_sfmt_cmp_r_b_r;
470 1.1 christos case 110 : itype = CRISV32F_INSN_CMP_R_D_R; goto extract_sfmt_cmp_r_b_r;
471 1.1 christos case 111 : itype = CRISV32F_INSN_DSTEP; goto extract_sfmt_dstep;
472 1.1 christos case 112 : itype = CRISV32F_INSN_AND_B_R; goto extract_sfmt_and_b_r;
473 1.1 christos case 113 : itype = CRISV32F_INSN_AND_W_R; goto extract_sfmt_and_b_r;
474 1.1 christos case 114 : itype = CRISV32F_INSN_AND_D_R; goto extract_sfmt_and_d_r;
475 1.1 christos case 115 : itype = CRISV32F_INSN_LZ; goto extract_sfmt_movs_b_r;
476 1.1 christos case 116 : itype = CRISV32F_INSN_ORR_B_R; goto extract_sfmt_and_b_r;
477 1.1 christos case 117 : itype = CRISV32F_INSN_ORR_W_R; goto extract_sfmt_and_b_r;
478 1.1 christos case 118 : itype = CRISV32F_INSN_ORR_D_R; goto extract_sfmt_and_d_r;
479 1.1 christos case 119 : itype = CRISV32F_INSN_SWAP; goto extract_sfmt_swap;
480 1.1 christos case 120 : itype = CRISV32F_INSN_ASRR_B_R; goto extract_sfmt_and_b_r;
481 1.1 christos case 121 : itype = CRISV32F_INSN_ASRR_W_R; goto extract_sfmt_and_b_r;
482 1.1 christos case 122 : itype = CRISV32F_INSN_ASRR_D_R; goto extract_sfmt_and_d_r;
483 1.1 christos case 123 : itype = CRISV32F_INSN_XOR; goto extract_sfmt_dstep;
484 1.1 christos case 124 : itype = CRISV32F_INSN_LSRR_B_R; goto extract_sfmt_lsrr_b_r;
485 1.1 christos case 125 : itype = CRISV32F_INSN_LSRR_W_R; goto extract_sfmt_lsrr_b_r;
486 1.1 christos case 126 : itype = CRISV32F_INSN_LSRR_D_R; goto extract_sfmt_lsrr_d_r;
487 1.1 christos case 127 : itype = CRISV32F_INSN_MCP; goto extract_sfmt_mcp;
488 1.1 christos case 128 : itype = CRISV32F_INSN_ADDU_M_B_M; goto extract_sfmt_adds_m_b_m;
489 1.1 christos case 129 : itype = CRISV32F_INSN_ADDU_M_W_M; goto extract_sfmt_adds_m_w_m;
490 1.1 christos case 130 : itype = CRISV32F_INSN_ADDS_M_B_M; goto extract_sfmt_adds_m_b_m;
491 1.1 christos case 131 : itype = CRISV32F_INSN_ADDS_M_W_M; goto extract_sfmt_adds_m_w_m;
492 1.1 christos case 132 : itype = CRISV32F_INSN_MOVU_M_B_M; goto extract_sfmt_movs_m_b_m;
493 1.1 christos case 133 : itype = CRISV32F_INSN_MOVU_M_W_M; goto extract_sfmt_movs_m_w_m;
494 1.1 christos case 134 : itype = CRISV32F_INSN_MOVS_M_B_M; goto extract_sfmt_movs_m_b_m;
495 1.1 christos case 135 : itype = CRISV32F_INSN_MOVS_M_W_M; goto extract_sfmt_movs_m_w_m;
496 1.1 christos case 136 : itype = CRISV32F_INSN_SUBU_M_B_M; goto extract_sfmt_adds_m_b_m;
497 1.1 christos case 137 : itype = CRISV32F_INSN_SUBU_M_W_M; goto extract_sfmt_adds_m_w_m;
498 1.1 christos case 138 : itype = CRISV32F_INSN_SUBS_M_B_M; goto extract_sfmt_adds_m_b_m;
499 1.1 christos case 139 : itype = CRISV32F_INSN_SUBS_M_W_M; goto extract_sfmt_adds_m_w_m;
500 1.1 christos case 140 : itype = CRISV32F_INSN_CMPU_M_B_M; goto extract_sfmt_cmp_m_b_m;
501 1.1 christos case 141 : itype = CRISV32F_INSN_CMPU_M_W_M; goto extract_sfmt_cmp_m_w_m;
502 1.1 christos case 142 : itype = CRISV32F_INSN_CMPS_M_B_M; goto extract_sfmt_cmp_m_b_m;
503 1.1 christos case 143 : itype = CRISV32F_INSN_CMPS_M_W_M; goto extract_sfmt_cmp_m_w_m;
504 1.1 christos case 144 : itype = CRISV32F_INSN_MULU_B; goto extract_sfmt_muls_b;
505 1.1 christos case 145 : itype = CRISV32F_INSN_MULU_W; goto extract_sfmt_muls_b;
506 1.1 christos case 146 : itype = CRISV32F_INSN_MULU_D; goto extract_sfmt_muls_b;
507 1.1 christos case 147 :
508 1.1 christos {
509 1.1 christos unsigned int val = (((insn >> 12) & (15 << 0)));
510 1.1 christos switch (val)
511 1.1 christos {
512 1.1 christos case 2 :
513 1.1 christos if ((base_insn & 0xffff) == 0x2930)
514 1.1 christos { itype = CRISV32F_INSN_RFE; goto extract_sfmt_rfe; }
515 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
516 1.1 christos case 3 :
517 1.1 christos if ((base_insn & 0xffff) == 0x3930)
518 1.1 christos { itype = CRISV32F_INSN_SFE; goto extract_sfmt_sfe; }
519 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
520 1.1 christos case 4 :
521 1.1 christos if ((base_insn & 0xffff) == 0x4930)
522 1.1 christos { itype = CRISV32F_INSN_RFG; goto extract_sfmt_rfg; }
523 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
524 1.1 christos case 5 :
525 1.1 christos if ((base_insn & 0xffff) == 0x5930)
526 1.1 christos { itype = CRISV32F_INSN_RFN; goto extract_sfmt_rfn; }
527 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
528 1.1 christos case 14 : itype = CRISV32F_INSN_BREAK; goto extract_sfmt_break;
529 1.1 christos case 15 :
530 1.1 christos if ((base_insn & 0xffff) == 0xf930)
531 1.1 christos { itype = CRISV32F_INSN_HALT; goto extract_sfmt_halt; }
532 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
533 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
534 1.1 christos }
535 1.1 christos }
536 1.1 christos case 148 : itype = CRISV32F_INSN_ADDO_M_B_M; goto extract_sfmt_addo_m_b_m;
537 1.1 christos case 149 : itype = CRISV32F_INSN_ADDO_M_W_M; goto extract_sfmt_addo_m_w_m;
538 1.1 christos case 150 : itype = CRISV32F_INSN_ADDO_M_D_M; goto extract_sfmt_addo_m_d_m;
539 1.1 christos case 151 : itype = CRISV32F_INSN_LAPCQ; goto extract_sfmt_lapcq;
540 1.1 christos case 154 : itype = CRISV32F_INSN_ADDC_M; goto extract_sfmt_addc_m;
541 1.1 christos case 155 : itype = CRISV32F_INSN_JAS_R; goto extract_sfmt_jas_r;
542 1.1 christos case 159 :
543 1.1 christos if ((base_insn & 0xfff) == 0x9f0)
544 1.1 christos { itype = CRISV32F_INSN_JUMP_P; goto extract_sfmt_jump_p; }
545 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
546 1.1 christos case 160 : itype = CRISV32F_INSN_ADD_M_B_M; goto extract_sfmt_add_m_b_m;
547 1.1 christos case 161 : itype = CRISV32F_INSN_ADD_M_W_M; goto extract_sfmt_add_m_w_m;
548 1.1 christos case 162 : itype = CRISV32F_INSN_ADD_M_D_M; goto extract_sfmt_add_m_d_m;
549 1.1 christos case 163 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
550 1.1 christos case 164 : itype = CRISV32F_INSN_MOVE_M_B_M; goto extract_sfmt_move_m_b_m;
551 1.1 christos case 165 : itype = CRISV32F_INSN_MOVE_M_W_M; goto extract_sfmt_move_m_w_m;
552 1.1 christos case 166 : itype = CRISV32F_INSN_MOVE_M_D_M; goto extract_sfmt_move_m_d_m;
553 1.1 christos case 167 : /* fall through */
554 1.1 christos case 231 : itype = CRISV32F_INSN_MOVE_SPR_MV32; goto extract_sfmt_move_spr_mv32;
555 1.1 christos case 168 : itype = CRISV32F_INSN_SUB_M_B_M; goto extract_sfmt_add_m_b_m;
556 1.1 christos case 169 : itype = CRISV32F_INSN_SUB_M_W_M; goto extract_sfmt_add_m_w_m;
557 1.1 christos case 170 : itype = CRISV32F_INSN_SUB_M_D_M; goto extract_sfmt_add_m_d_m;
558 1.1 christos case 171 :
559 1.1 christos {
560 1.1 christos unsigned int val = (((insn >> 12) & (1 << 0)));
561 1.1 christos switch (val)
562 1.1 christos {
563 1.1 christos case 0 :
564 1.1 christos if ((base_insn & 0xfff0) == 0xab0)
565 1.1 christos { itype = CRISV32F_INSN_FIDXD; goto extract_sfmt_fidxi; }
566 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
567 1.1 christos case 1 :
568 1.1 christos if ((base_insn & 0xfff0) == 0x1ab0)
569 1.1 christos { itype = CRISV32F_INSN_FTAGD; goto extract_sfmt_fidxi; }
570 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
571 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
572 1.1 christos }
573 1.1 christos }
574 1.1 christos case 172 : itype = CRISV32F_INSN_CMP_M_B_M; goto extract_sfmt_cmp_m_b_m;
575 1.1 christos case 173 : itype = CRISV32F_INSN_CMP_M_W_M; goto extract_sfmt_cmp_m_w_m;
576 1.1 christos case 174 : itype = CRISV32F_INSN_CMP_M_D_M; goto extract_sfmt_cmp_m_d_m;
577 1.1 christos case 176 : itype = CRISV32F_INSN_AND_M_B_M; goto extract_sfmt_and_m_b_m;
578 1.1 christos case 177 : itype = CRISV32F_INSN_AND_M_W_M; goto extract_sfmt_and_m_w_m;
579 1.1 christos case 178 : itype = CRISV32F_INSN_AND_M_D_M; goto extract_sfmt_and_m_d_m;
580 1.1 christos case 179 : itype = CRISV32F_INSN_JASC_R; goto extract_sfmt_jasc_r;
581 1.1 christos case 180 : itype = CRISV32F_INSN_OR_M_B_M; goto extract_sfmt_and_m_b_m;
582 1.1 christos case 181 : itype = CRISV32F_INSN_OR_M_W_M; goto extract_sfmt_and_m_w_m;
583 1.1 christos case 182 : itype = CRISV32F_INSN_OR_M_D_M; goto extract_sfmt_and_m_d_m;
584 1.1 christos case 183 : itype = CRISV32F_INSN_MOVE_R_SS; goto extract_sfmt_move_r_ss;
585 1.1 christos case 184 : /* fall through */
586 1.1 christos case 248 :
587 1.1 christos if ((base_insn & 0xfbf0) == 0xb80)
588 1.1 christos { itype = CRISV32F_INSN_TEST_M_B_M; goto extract_sfmt_test_m_b_m; }
589 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
590 1.1 christos case 185 : /* fall through */
591 1.1 christos case 249 :
592 1.1 christos if ((base_insn & 0xfbf0) == 0xb90)
593 1.1 christos { itype = CRISV32F_INSN_TEST_M_W_M; goto extract_sfmt_test_m_w_m; }
594 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
595 1.1 christos case 186 : /* fall through */
596 1.1 christos case 250 :
597 1.1 christos if ((base_insn & 0xfbf0) == 0xba0)
598 1.1 christos { itype = CRISV32F_INSN_TEST_M_D_M; goto extract_sfmt_test_m_d_m; }
599 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
600 1.1 christos case 187 : /* fall through */
601 1.1 christos case 251 : itype = CRISV32F_INSN_MOVEM_M_R_V32; goto extract_sfmt_movem_m_r_v32;
602 1.1 christos case 188 : /* fall through */
603 1.1 christos case 252 : itype = CRISV32F_INSN_MOVE_R_M_B_M; goto extract_sfmt_move_r_m_b_m;
604 1.1 christos case 189 : /* fall through */
605 1.1 christos case 253 : itype = CRISV32F_INSN_MOVE_R_M_W_M; goto extract_sfmt_move_r_m_w_m;
606 1.1 christos case 190 : /* fall through */
607 1.1 christos case 254 : itype = CRISV32F_INSN_MOVE_R_M_D_M; goto extract_sfmt_move_r_m_d_m;
608 1.1 christos case 191 : /* fall through */
609 1.1 christos case 255 : itype = CRISV32F_INSN_MOVEM_R_M_V32; goto extract_sfmt_movem_r_m_v32;
610 1.1 christos case 192 :
611 1.1 christos {
612 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
613 1.1 christos switch (val)
614 1.1 christos {
615 1.1 christos case 0 : /* fall through */
616 1.1 christos case 1 : /* fall through */
617 1.1 christos case 2 : /* fall through */
618 1.1 christos case 3 : /* fall through */
619 1.1 christos case 4 : /* fall through */
620 1.1 christos case 5 : /* fall through */
621 1.1 christos case 6 : /* fall through */
622 1.1 christos case 7 : /* fall through */
623 1.1 christos case 8 : /* fall through */
624 1.1 christos case 9 : /* fall through */
625 1.1 christos case 10 : /* fall through */
626 1.1 christos case 11 : /* fall through */
627 1.1 christos case 12 : /* fall through */
628 1.1 christos case 13 : /* fall through */
629 1.1 christos case 14 : itype = CRISV32F_INSN_ADDU_M_B_M; goto extract_sfmt_adds_m_b_m;
630 1.1 christos case 15 : itype = CRISV32F_INSN_ADDUCBR; goto extract_sfmt_addscbr;
631 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
632 1.1 christos }
633 1.1 christos }
634 1.1 christos case 193 :
635 1.1 christos {
636 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
637 1.1 christos switch (val)
638 1.1 christos {
639 1.1 christos case 0 : /* fall through */
640 1.1 christos case 1 : /* fall through */
641 1.1 christos case 2 : /* fall through */
642 1.1 christos case 3 : /* fall through */
643 1.1 christos case 4 : /* fall through */
644 1.1 christos case 5 : /* fall through */
645 1.1 christos case 6 : /* fall through */
646 1.1 christos case 7 : /* fall through */
647 1.1 christos case 8 : /* fall through */
648 1.1 christos case 9 : /* fall through */
649 1.1 christos case 10 : /* fall through */
650 1.1 christos case 11 : /* fall through */
651 1.1 christos case 12 : /* fall through */
652 1.1 christos case 13 : /* fall through */
653 1.1 christos case 14 : itype = CRISV32F_INSN_ADDU_M_W_M; goto extract_sfmt_adds_m_w_m;
654 1.1 christos case 15 : itype = CRISV32F_INSN_ADDUCWR; goto extract_sfmt_addscwr;
655 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
656 1.1 christos }
657 1.1 christos }
658 1.1 christos case 194 :
659 1.1 christos {
660 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
661 1.1 christos switch (val)
662 1.1 christos {
663 1.1 christos case 0 : /* fall through */
664 1.1 christos case 1 : /* fall through */
665 1.1 christos case 2 : /* fall through */
666 1.1 christos case 3 : /* fall through */
667 1.1 christos case 4 : /* fall through */
668 1.1 christos case 5 : /* fall through */
669 1.1 christos case 6 : /* fall through */
670 1.1 christos case 7 : /* fall through */
671 1.1 christos case 8 : /* fall through */
672 1.1 christos case 9 : /* fall through */
673 1.1 christos case 10 : /* fall through */
674 1.1 christos case 11 : /* fall through */
675 1.1 christos case 12 : /* fall through */
676 1.1 christos case 13 : /* fall through */
677 1.1 christos case 14 : itype = CRISV32F_INSN_ADDS_M_B_M; goto extract_sfmt_adds_m_b_m;
678 1.1 christos case 15 : itype = CRISV32F_INSN_ADDSCBR; goto extract_sfmt_addscbr;
679 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
680 1.1 christos }
681 1.1 christos }
682 1.1 christos case 195 :
683 1.1 christos {
684 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
685 1.1 christos switch (val)
686 1.1 christos {
687 1.1 christos case 0 : /* fall through */
688 1.1 christos case 1 : /* fall through */
689 1.1 christos case 2 : /* fall through */
690 1.1 christos case 3 : /* fall through */
691 1.1 christos case 4 : /* fall through */
692 1.1 christos case 5 : /* fall through */
693 1.1 christos case 6 : /* fall through */
694 1.1 christos case 7 : /* fall through */
695 1.1 christos case 8 : /* fall through */
696 1.1 christos case 9 : /* fall through */
697 1.1 christos case 10 : /* fall through */
698 1.1 christos case 11 : /* fall through */
699 1.1 christos case 12 : /* fall through */
700 1.1 christos case 13 : /* fall through */
701 1.1 christos case 14 : itype = CRISV32F_INSN_ADDS_M_W_M; goto extract_sfmt_adds_m_w_m;
702 1.1 christos case 15 : itype = CRISV32F_INSN_ADDSCWR; goto extract_sfmt_addscwr;
703 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
704 1.1 christos }
705 1.1 christos }
706 1.1 christos case 196 :
707 1.1 christos {
708 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
709 1.1 christos switch (val)
710 1.1 christos {
711 1.1 christos case 0 : /* fall through */
712 1.1 christos case 1 : /* fall through */
713 1.1 christos case 2 : /* fall through */
714 1.1 christos case 3 : /* fall through */
715 1.1 christos case 4 : /* fall through */
716 1.1 christos case 5 : /* fall through */
717 1.1 christos case 6 : /* fall through */
718 1.1 christos case 7 : /* fall through */
719 1.1 christos case 8 : /* fall through */
720 1.1 christos case 9 : /* fall through */
721 1.1 christos case 10 : /* fall through */
722 1.1 christos case 11 : /* fall through */
723 1.1 christos case 12 : /* fall through */
724 1.1 christos case 13 : /* fall through */
725 1.1 christos case 14 : itype = CRISV32F_INSN_MOVU_M_B_M; goto extract_sfmt_movs_m_b_m;
726 1.1 christos case 15 : itype = CRISV32F_INSN_MOVUCBR; goto extract_sfmt_movucbr;
727 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
728 1.1 christos }
729 1.1 christos }
730 1.1 christos case 197 :
731 1.1 christos {
732 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
733 1.1 christos switch (val)
734 1.1 christos {
735 1.1 christos case 0 : /* fall through */
736 1.1 christos case 1 : /* fall through */
737 1.1 christos case 2 : /* fall through */
738 1.1 christos case 3 : /* fall through */
739 1.1 christos case 4 : /* fall through */
740 1.1 christos case 5 : /* fall through */
741 1.1 christos case 6 : /* fall through */
742 1.1 christos case 7 : /* fall through */
743 1.1 christos case 8 : /* fall through */
744 1.1 christos case 9 : /* fall through */
745 1.1 christos case 10 : /* fall through */
746 1.1 christos case 11 : /* fall through */
747 1.1 christos case 12 : /* fall through */
748 1.1 christos case 13 : /* fall through */
749 1.1 christos case 14 : itype = CRISV32F_INSN_MOVU_M_W_M; goto extract_sfmt_movs_m_w_m;
750 1.1 christos case 15 : itype = CRISV32F_INSN_MOVUCWR; goto extract_sfmt_movucwr;
751 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
752 1.1 christos }
753 1.1 christos }
754 1.1 christos case 198 :
755 1.1 christos {
756 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
757 1.1 christos switch (val)
758 1.1 christos {
759 1.1 christos case 0 : /* fall through */
760 1.1 christos case 1 : /* fall through */
761 1.1 christos case 2 : /* fall through */
762 1.1 christos case 3 : /* fall through */
763 1.1 christos case 4 : /* fall through */
764 1.1 christos case 5 : /* fall through */
765 1.1 christos case 6 : /* fall through */
766 1.1 christos case 7 : /* fall through */
767 1.1 christos case 8 : /* fall through */
768 1.1 christos case 9 : /* fall through */
769 1.1 christos case 10 : /* fall through */
770 1.1 christos case 11 : /* fall through */
771 1.1 christos case 12 : /* fall through */
772 1.1 christos case 13 : /* fall through */
773 1.1 christos case 14 : itype = CRISV32F_INSN_MOVS_M_B_M; goto extract_sfmt_movs_m_b_m;
774 1.1 christos case 15 : itype = CRISV32F_INSN_MOVSCBR; goto extract_sfmt_movscbr;
775 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
776 1.1 christos }
777 1.1 christos }
778 1.1 christos case 199 :
779 1.1 christos {
780 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
781 1.1 christos switch (val)
782 1.1 christos {
783 1.1 christos case 0 : /* fall through */
784 1.1 christos case 1 : /* fall through */
785 1.1 christos case 2 : /* fall through */
786 1.1 christos case 3 : /* fall through */
787 1.1 christos case 4 : /* fall through */
788 1.1 christos case 5 : /* fall through */
789 1.1 christos case 6 : /* fall through */
790 1.1 christos case 7 : /* fall through */
791 1.1 christos case 8 : /* fall through */
792 1.1 christos case 9 : /* fall through */
793 1.1 christos case 10 : /* fall through */
794 1.1 christos case 11 : /* fall through */
795 1.1 christos case 12 : /* fall through */
796 1.1 christos case 13 : /* fall through */
797 1.1 christos case 14 : itype = CRISV32F_INSN_MOVS_M_W_M; goto extract_sfmt_movs_m_w_m;
798 1.1 christos case 15 : itype = CRISV32F_INSN_MOVSCWR; goto extract_sfmt_movscwr;
799 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
800 1.1 christos }
801 1.1 christos }
802 1.1 christos case 200 :
803 1.1 christos {
804 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
805 1.1 christos switch (val)
806 1.1 christos {
807 1.1 christos case 0 : /* fall through */
808 1.1 christos case 1 : /* fall through */
809 1.1 christos case 2 : /* fall through */
810 1.1 christos case 3 : /* fall through */
811 1.1 christos case 4 : /* fall through */
812 1.1 christos case 5 : /* fall through */
813 1.1 christos case 6 : /* fall through */
814 1.1 christos case 7 : /* fall through */
815 1.1 christos case 8 : /* fall through */
816 1.1 christos case 9 : /* fall through */
817 1.1 christos case 10 : /* fall through */
818 1.1 christos case 11 : /* fall through */
819 1.1 christos case 12 : /* fall through */
820 1.1 christos case 13 : /* fall through */
821 1.1 christos case 14 : itype = CRISV32F_INSN_SUBU_M_B_M; goto extract_sfmt_adds_m_b_m;
822 1.1 christos case 15 : itype = CRISV32F_INSN_SUBUCBR; goto extract_sfmt_addscbr;
823 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
824 1.1 christos }
825 1.1 christos }
826 1.1 christos case 201 :
827 1.1 christos {
828 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
829 1.1 christos switch (val)
830 1.1 christos {
831 1.1 christos case 0 : /* fall through */
832 1.1 christos case 1 : /* fall through */
833 1.1 christos case 2 : /* fall through */
834 1.1 christos case 3 : /* fall through */
835 1.1 christos case 4 : /* fall through */
836 1.1 christos case 5 : /* fall through */
837 1.1 christos case 6 : /* fall through */
838 1.1 christos case 7 : /* fall through */
839 1.1 christos case 8 : /* fall through */
840 1.1 christos case 9 : /* fall through */
841 1.1 christos case 10 : /* fall through */
842 1.1 christos case 11 : /* fall through */
843 1.1 christos case 12 : /* fall through */
844 1.1 christos case 13 : /* fall through */
845 1.1 christos case 14 : itype = CRISV32F_INSN_SUBU_M_W_M; goto extract_sfmt_adds_m_w_m;
846 1.1 christos case 15 : itype = CRISV32F_INSN_SUBUCWR; goto extract_sfmt_addscwr;
847 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
848 1.1 christos }
849 1.1 christos }
850 1.1 christos case 202 :
851 1.1 christos {
852 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
853 1.1 christos switch (val)
854 1.1 christos {
855 1.1 christos case 0 : /* fall through */
856 1.1 christos case 1 : /* fall through */
857 1.1 christos case 2 : /* fall through */
858 1.1 christos case 3 : /* fall through */
859 1.1 christos case 4 : /* fall through */
860 1.1 christos case 5 : /* fall through */
861 1.1 christos case 6 : /* fall through */
862 1.1 christos case 7 : /* fall through */
863 1.1 christos case 8 : /* fall through */
864 1.1 christos case 9 : /* fall through */
865 1.1 christos case 10 : /* fall through */
866 1.1 christos case 11 : /* fall through */
867 1.1 christos case 12 : /* fall through */
868 1.1 christos case 13 : /* fall through */
869 1.1 christos case 14 : itype = CRISV32F_INSN_SUBS_M_B_M; goto extract_sfmt_adds_m_b_m;
870 1.1 christos case 15 : itype = CRISV32F_INSN_SUBSCBR; goto extract_sfmt_addscbr;
871 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
872 1.1 christos }
873 1.1 christos }
874 1.1 christos case 203 :
875 1.1 christos {
876 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
877 1.1 christos switch (val)
878 1.1 christos {
879 1.1 christos case 0 : /* fall through */
880 1.1 christos case 1 : /* fall through */
881 1.1 christos case 2 : /* fall through */
882 1.1 christos case 3 : /* fall through */
883 1.1 christos case 4 : /* fall through */
884 1.1 christos case 5 : /* fall through */
885 1.1 christos case 6 : /* fall through */
886 1.1 christos case 7 : /* fall through */
887 1.1 christos case 8 : /* fall through */
888 1.1 christos case 9 : /* fall through */
889 1.1 christos case 10 : /* fall through */
890 1.1 christos case 11 : /* fall through */
891 1.1 christos case 12 : /* fall through */
892 1.1 christos case 13 : /* fall through */
893 1.1 christos case 14 : itype = CRISV32F_INSN_SUBS_M_W_M; goto extract_sfmt_adds_m_w_m;
894 1.1 christos case 15 : itype = CRISV32F_INSN_SUBSCWR; goto extract_sfmt_addscwr;
895 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
896 1.1 christos }
897 1.1 christos }
898 1.1 christos case 204 :
899 1.1 christos {
900 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
901 1.1 christos switch (val)
902 1.1 christos {
903 1.1 christos case 0 : /* fall through */
904 1.1 christos case 1 : /* fall through */
905 1.1 christos case 2 : /* fall through */
906 1.1 christos case 3 : /* fall through */
907 1.1 christos case 4 : /* fall through */
908 1.1 christos case 5 : /* fall through */
909 1.1 christos case 6 : /* fall through */
910 1.1 christos case 7 : /* fall through */
911 1.1 christos case 8 : /* fall through */
912 1.1 christos case 9 : /* fall through */
913 1.1 christos case 10 : /* fall through */
914 1.1 christos case 11 : /* fall through */
915 1.1 christos case 12 : /* fall through */
916 1.1 christos case 13 : /* fall through */
917 1.1 christos case 14 : itype = CRISV32F_INSN_CMPU_M_B_M; goto extract_sfmt_cmp_m_b_m;
918 1.1 christos case 15 : itype = CRISV32F_INSN_CMPUCBR; goto extract_sfmt_cmpucbr;
919 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
920 1.1 christos }
921 1.1 christos }
922 1.1 christos case 205 :
923 1.1 christos {
924 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
925 1.1 christos switch (val)
926 1.1 christos {
927 1.1 christos case 0 : /* fall through */
928 1.1 christos case 1 : /* fall through */
929 1.1 christos case 2 : /* fall through */
930 1.1 christos case 3 : /* fall through */
931 1.1 christos case 4 : /* fall through */
932 1.1 christos case 5 : /* fall through */
933 1.1 christos case 6 : /* fall through */
934 1.1 christos case 7 : /* fall through */
935 1.1 christos case 8 : /* fall through */
936 1.1 christos case 9 : /* fall through */
937 1.1 christos case 10 : /* fall through */
938 1.1 christos case 11 : /* fall through */
939 1.1 christos case 12 : /* fall through */
940 1.1 christos case 13 : /* fall through */
941 1.1 christos case 14 : itype = CRISV32F_INSN_CMPU_M_W_M; goto extract_sfmt_cmp_m_w_m;
942 1.1 christos case 15 : itype = CRISV32F_INSN_CMPUCWR; goto extract_sfmt_cmpucwr;
943 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
944 1.1 christos }
945 1.1 christos }
946 1.1 christos case 206 :
947 1.1 christos {
948 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
949 1.1 christos switch (val)
950 1.1 christos {
951 1.1 christos case 0 : /* fall through */
952 1.1 christos case 1 : /* fall through */
953 1.1 christos case 2 : /* fall through */
954 1.1 christos case 3 : /* fall through */
955 1.1 christos case 4 : /* fall through */
956 1.1 christos case 5 : /* fall through */
957 1.1 christos case 6 : /* fall through */
958 1.1 christos case 7 : /* fall through */
959 1.1 christos case 8 : /* fall through */
960 1.1 christos case 9 : /* fall through */
961 1.1 christos case 10 : /* fall through */
962 1.1 christos case 11 : /* fall through */
963 1.1 christos case 12 : /* fall through */
964 1.1 christos case 13 : /* fall through */
965 1.1 christos case 14 : itype = CRISV32F_INSN_CMPS_M_B_M; goto extract_sfmt_cmp_m_b_m;
966 1.1 christos case 15 : itype = CRISV32F_INSN_CMPSCBR; goto extract_sfmt_cmpcbr;
967 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
968 1.1 christos }
969 1.1 christos }
970 1.1 christos case 207 :
971 1.1 christos {
972 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
973 1.1 christos switch (val)
974 1.1 christos {
975 1.1 christos case 0 : /* fall through */
976 1.1 christos case 1 : /* fall through */
977 1.1 christos case 2 : /* fall through */
978 1.1 christos case 3 : /* fall through */
979 1.1 christos case 4 : /* fall through */
980 1.1 christos case 5 : /* fall through */
981 1.1 christos case 6 : /* fall through */
982 1.1 christos case 7 : /* fall through */
983 1.1 christos case 8 : /* fall through */
984 1.1 christos case 9 : /* fall through */
985 1.1 christos case 10 : /* fall through */
986 1.1 christos case 11 : /* fall through */
987 1.1 christos case 12 : /* fall through */
988 1.1 christos case 13 : /* fall through */
989 1.1 christos case 14 : itype = CRISV32F_INSN_CMPS_M_W_M; goto extract_sfmt_cmp_m_w_m;
990 1.1 christos case 15 : itype = CRISV32F_INSN_CMPSCWR; goto extract_sfmt_cmpcwr;
991 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
992 1.1 christos }
993 1.1 christos }
994 1.1 christos case 208 : itype = CRISV32F_INSN_MULS_B; goto extract_sfmt_muls_b;
995 1.1 christos case 209 : itype = CRISV32F_INSN_MULS_W; goto extract_sfmt_muls_b;
996 1.1 christos case 210 : itype = CRISV32F_INSN_MULS_D; goto extract_sfmt_muls_b;
997 1.1 christos case 211 :
998 1.1 christos {
999 1.1 christos unsigned int val = (((insn >> 12) & (1 << 0)));
1000 1.1 christos switch (val)
1001 1.1 christos {
1002 1.1 christos case 0 :
1003 1.1 christos if ((base_insn & 0xfff0) == 0xd30)
1004 1.1 christos { itype = CRISV32F_INSN_FIDXI; goto extract_sfmt_fidxi; }
1005 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1006 1.1 christos case 1 :
1007 1.1 christos if ((base_insn & 0xfff0) == 0x1d30)
1008 1.1 christos { itype = CRISV32F_INSN_FTAGI; goto extract_sfmt_fidxi; }
1009 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1010 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1011 1.1 christos }
1012 1.1 christos }
1013 1.1 christos case 212 :
1014 1.1 christos {
1015 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1016 1.1 christos switch (val)
1017 1.1 christos {
1018 1.1 christos case 0 : /* fall through */
1019 1.1 christos case 1 : /* fall through */
1020 1.1 christos case 2 : /* fall through */
1021 1.1 christos case 3 : /* fall through */
1022 1.1 christos case 4 : /* fall through */
1023 1.1 christos case 5 : /* fall through */
1024 1.1 christos case 6 : /* fall through */
1025 1.1 christos case 7 : /* fall through */
1026 1.1 christos case 8 : /* fall through */
1027 1.1 christos case 9 : /* fall through */
1028 1.1 christos case 10 : /* fall through */
1029 1.1 christos case 11 : /* fall through */
1030 1.1 christos case 12 : /* fall through */
1031 1.1 christos case 13 : /* fall through */
1032 1.1 christos case 14 : itype = CRISV32F_INSN_ADDO_M_B_M; goto extract_sfmt_addo_m_b_m;
1033 1.1 christos case 15 : itype = CRISV32F_INSN_ADDO_CB; goto extract_sfmt_addo_cb;
1034 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1035 1.1 christos }
1036 1.1 christos }
1037 1.1 christos case 213 :
1038 1.1 christos {
1039 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1040 1.1 christos switch (val)
1041 1.1 christos {
1042 1.1 christos case 0 : /* fall through */
1043 1.1 christos case 1 : /* fall through */
1044 1.1 christos case 2 : /* fall through */
1045 1.1 christos case 3 : /* fall through */
1046 1.1 christos case 4 : /* fall through */
1047 1.1 christos case 5 : /* fall through */
1048 1.1 christos case 6 : /* fall through */
1049 1.1 christos case 7 : /* fall through */
1050 1.1 christos case 8 : /* fall through */
1051 1.1 christos case 9 : /* fall through */
1052 1.1 christos case 10 : /* fall through */
1053 1.1 christos case 11 : /* fall through */
1054 1.1 christos case 12 : /* fall through */
1055 1.1 christos case 13 : /* fall through */
1056 1.1 christos case 14 : itype = CRISV32F_INSN_ADDO_M_W_M; goto extract_sfmt_addo_m_w_m;
1057 1.1 christos case 15 : itype = CRISV32F_INSN_ADDO_CW; goto extract_sfmt_addo_cw;
1058 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1059 1.1 christos }
1060 1.1 christos }
1061 1.1 christos case 214 :
1062 1.1 christos {
1063 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1064 1.1 christos switch (val)
1065 1.1 christos {
1066 1.1 christos case 0 : /* fall through */
1067 1.1 christos case 1 : /* fall through */
1068 1.1 christos case 2 : /* fall through */
1069 1.1 christos case 3 : /* fall through */
1070 1.1 christos case 4 : /* fall through */
1071 1.1 christos case 5 : /* fall through */
1072 1.1 christos case 6 : /* fall through */
1073 1.1 christos case 7 : /* fall through */
1074 1.1 christos case 8 : /* fall through */
1075 1.1 christos case 9 : /* fall through */
1076 1.1 christos case 10 : /* fall through */
1077 1.1 christos case 11 : /* fall through */
1078 1.1 christos case 12 : /* fall through */
1079 1.1 christos case 13 : /* fall through */
1080 1.1 christos case 14 : itype = CRISV32F_INSN_ADDO_M_D_M; goto extract_sfmt_addo_m_d_m;
1081 1.1 christos case 15 : itype = CRISV32F_INSN_ADDO_CD; goto extract_sfmt_addo_cd;
1082 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1083 1.1 christos }
1084 1.1 christos }
1085 1.1 christos case 215 :
1086 1.1 christos if ((base_insn & 0xfff) == 0xd7f)
1087 1.1 christos { itype = CRISV32F_INSN_LAPC_D; goto extract_sfmt_lapc_d; }
1088 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1089 1.1 christos case 218 :
1090 1.1 christos {
1091 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1092 1.1 christos switch (val)
1093 1.1 christos {
1094 1.1 christos case 0 : /* fall through */
1095 1.1 christos case 1 : /* fall through */
1096 1.1 christos case 2 : /* fall through */
1097 1.1 christos case 3 : /* fall through */
1098 1.1 christos case 4 : /* fall through */
1099 1.1 christos case 5 : /* fall through */
1100 1.1 christos case 6 : /* fall through */
1101 1.1 christos case 7 : /* fall through */
1102 1.1 christos case 8 : /* fall through */
1103 1.1 christos case 9 : /* fall through */
1104 1.1 christos case 10 : /* fall through */
1105 1.1 christos case 11 : /* fall through */
1106 1.1 christos case 12 : /* fall through */
1107 1.1 christos case 13 : /* fall through */
1108 1.1 christos case 14 : itype = CRISV32F_INSN_ADDC_M; goto extract_sfmt_addc_m;
1109 1.1 christos case 15 : itype = CRISV32F_INSN_ADDC_C; goto extract_sfmt_addcdr;
1110 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1111 1.1 christos }
1112 1.1 christos }
1113 1.1 christos case 219 :
1114 1.1 christos if ((base_insn & 0xfff) == 0xdbf)
1115 1.1 christos { itype = CRISV32F_INSN_JAS_C; goto extract_sfmt_jas_c; }
1116 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1117 1.1 christos case 220 :
1118 1.1 christos if ((base_insn & 0xfff) == 0xdcf)
1119 1.1 christos { itype = CRISV32F_INSN_BOUND_CB; goto extract_sfmt_bound_cb; }
1120 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1121 1.1 christos case 221 :
1122 1.1 christos if ((base_insn & 0xfff) == 0xddf)
1123 1.1 christos { itype = CRISV32F_INSN_BOUND_CW; goto extract_sfmt_bound_cw; }
1124 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1125 1.1 christos case 222 :
1126 1.1 christos if ((base_insn & 0xfff) == 0xdef)
1127 1.1 christos { itype = CRISV32F_INSN_BOUND_CD; goto extract_sfmt_bound_cd; }
1128 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1129 1.1 christos case 223 :
1130 1.1 christos {
1131 1.1 christos unsigned int val = (((insn >> 12) & (15 << 0)));
1132 1.1 christos switch (val)
1133 1.1 christos {
1134 1.1 christos case 0 : /* fall through */
1135 1.1 christos case 1 : /* fall through */
1136 1.1 christos case 2 : /* fall through */
1137 1.1 christos case 3 : /* fall through */
1138 1.1 christos case 4 : /* fall through */
1139 1.1 christos case 5 : /* fall through */
1140 1.1 christos case 6 : /* fall through */
1141 1.1 christos case 7 : /* fall through */
1142 1.1 christos case 8 : /* fall through */
1143 1.1 christos case 9 : /* fall through */
1144 1.1 christos case 10 : /* fall through */
1145 1.1 christos case 11 : /* fall through */
1146 1.1 christos case 12 : /* fall through */
1147 1.1 christos case 13 : /* fall through */
1148 1.1 christos case 15 :
1149 1.1 christos if ((base_insn & 0xfff) == 0xdff)
1150 1.1 christos { itype = CRISV32F_INSN_BCC_W; goto extract_sfmt_bcc_w; }
1151 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1152 1.1 christos case 14 :
1153 1.1 christos if ((base_insn & 0xffff) == 0xedff)
1154 1.1 christos { itype = CRISV32F_INSN_BA_W; goto extract_sfmt_ba_w; }
1155 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1156 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1157 1.1 christos }
1158 1.1 christos }
1159 1.1 christos case 224 :
1160 1.1 christos {
1161 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1162 1.1 christos switch (val)
1163 1.1 christos {
1164 1.1 christos case 0 : /* fall through */
1165 1.1 christos case 1 : /* fall through */
1166 1.1 christos case 2 : /* fall through */
1167 1.1 christos case 3 : /* fall through */
1168 1.1 christos case 4 : /* fall through */
1169 1.1 christos case 5 : /* fall through */
1170 1.1 christos case 6 : /* fall through */
1171 1.1 christos case 7 : /* fall through */
1172 1.1 christos case 8 : /* fall through */
1173 1.1 christos case 9 : /* fall through */
1174 1.1 christos case 10 : /* fall through */
1175 1.1 christos case 11 : /* fall through */
1176 1.1 christos case 12 : /* fall through */
1177 1.1 christos case 13 : /* fall through */
1178 1.1 christos case 14 : itype = CRISV32F_INSN_ADD_M_B_M; goto extract_sfmt_add_m_b_m;
1179 1.1 christos case 15 : itype = CRISV32F_INSN_ADDCBR; goto extract_sfmt_addcbr;
1180 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1181 1.1 christos }
1182 1.1 christos }
1183 1.1 christos case 225 :
1184 1.1 christos {
1185 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1186 1.1 christos switch (val)
1187 1.1 christos {
1188 1.1 christos case 0 : /* fall through */
1189 1.1 christos case 1 : /* fall through */
1190 1.1 christos case 2 : /* fall through */
1191 1.1 christos case 3 : /* fall through */
1192 1.1 christos case 4 : /* fall through */
1193 1.1 christos case 5 : /* fall through */
1194 1.1 christos case 6 : /* fall through */
1195 1.1 christos case 7 : /* fall through */
1196 1.1 christos case 8 : /* fall through */
1197 1.1 christos case 9 : /* fall through */
1198 1.1 christos case 10 : /* fall through */
1199 1.1 christos case 11 : /* fall through */
1200 1.1 christos case 12 : /* fall through */
1201 1.1 christos case 13 : /* fall through */
1202 1.1 christos case 14 : itype = CRISV32F_INSN_ADD_M_W_M; goto extract_sfmt_add_m_w_m;
1203 1.1 christos case 15 : itype = CRISV32F_INSN_ADDCWR; goto extract_sfmt_addcwr;
1204 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1205 1.1 christos }
1206 1.1 christos }
1207 1.1 christos case 226 :
1208 1.1 christos {
1209 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1210 1.1 christos switch (val)
1211 1.1 christos {
1212 1.1 christos case 0 : /* fall through */
1213 1.1 christos case 1 : /* fall through */
1214 1.1 christos case 2 : /* fall through */
1215 1.1 christos case 3 : /* fall through */
1216 1.1 christos case 4 : /* fall through */
1217 1.1 christos case 5 : /* fall through */
1218 1.1 christos case 6 : /* fall through */
1219 1.1 christos case 7 : /* fall through */
1220 1.1 christos case 8 : /* fall through */
1221 1.1 christos case 9 : /* fall through */
1222 1.1 christos case 10 : /* fall through */
1223 1.1 christos case 11 : /* fall through */
1224 1.1 christos case 12 : /* fall through */
1225 1.1 christos case 13 : /* fall through */
1226 1.1 christos case 14 : itype = CRISV32F_INSN_ADD_M_D_M; goto extract_sfmt_add_m_d_m;
1227 1.1 christos case 15 : itype = CRISV32F_INSN_ADDCDR; goto extract_sfmt_addcdr;
1228 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1229 1.1 christos }
1230 1.1 christos }
1231 1.1 christos case 227 :
1232 1.1 christos {
1233 1.1 christos unsigned int val = (((insn >> 12) & (15 << 0)));
1234 1.1 christos switch (val)
1235 1.1 christos {
1236 1.1 christos case 0 : /* fall through */
1237 1.1 christos case 1 : /* fall through */
1238 1.1 christos case 4 : /* fall through */
1239 1.1 christos case 8 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1240 1.1 christos case 2 :
1241 1.1 christos {
1242 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1243 1.1 christos switch (val)
1244 1.1 christos {
1245 1.1 christos case 0 : /* fall through */
1246 1.1 christos case 1 : /* fall through */
1247 1.1 christos case 2 : /* fall through */
1248 1.1 christos case 3 : /* fall through */
1249 1.1 christos case 4 : /* fall through */
1250 1.1 christos case 5 : /* fall through */
1251 1.1 christos case 6 : /* fall through */
1252 1.1 christos case 7 : /* fall through */
1253 1.1 christos case 8 : /* fall through */
1254 1.1 christos case 9 : /* fall through */
1255 1.1 christos case 10 : /* fall through */
1256 1.1 christos case 11 : /* fall through */
1257 1.1 christos case 12 : /* fall through */
1258 1.1 christos case 13 : /* fall through */
1259 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1260 1.1 christos case 15 : itype = CRISV32F_INSN_MOVE_C_SPRV32_P2; goto extract_sfmt_move_c_sprv32_p2;
1261 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1262 1.1 christos }
1263 1.1 christos }
1264 1.1 christos case 3 :
1265 1.1 christos {
1266 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1267 1.1 christos switch (val)
1268 1.1 christos {
1269 1.1 christos case 0 : /* fall through */
1270 1.1 christos case 1 : /* fall through */
1271 1.1 christos case 2 : /* fall through */
1272 1.1 christos case 3 : /* fall through */
1273 1.1 christos case 4 : /* fall through */
1274 1.1 christos case 5 : /* fall through */
1275 1.1 christos case 6 : /* fall through */
1276 1.1 christos case 7 : /* fall through */
1277 1.1 christos case 8 : /* fall through */
1278 1.1 christos case 9 : /* fall through */
1279 1.1 christos case 10 : /* fall through */
1280 1.1 christos case 11 : /* fall through */
1281 1.1 christos case 12 : /* fall through */
1282 1.1 christos case 13 : /* fall through */
1283 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1284 1.1 christos case 15 : itype = CRISV32F_INSN_MOVE_C_SPRV32_P3; goto extract_sfmt_move_c_sprv32_p2;
1285 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1286 1.1 christos }
1287 1.1 christos }
1288 1.1 christos case 5 :
1289 1.1 christos {
1290 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1291 1.1 christos switch (val)
1292 1.1 christos {
1293 1.1 christos case 0 : /* fall through */
1294 1.1 christos case 1 : /* fall through */
1295 1.1 christos case 2 : /* fall through */
1296 1.1 christos case 3 : /* fall through */
1297 1.1 christos case 4 : /* fall through */
1298 1.1 christos case 5 : /* fall through */
1299 1.1 christos case 6 : /* fall through */
1300 1.1 christos case 7 : /* fall through */
1301 1.1 christos case 8 : /* fall through */
1302 1.1 christos case 9 : /* fall through */
1303 1.1 christos case 10 : /* fall through */
1304 1.1 christos case 11 : /* fall through */
1305 1.1 christos case 12 : /* fall through */
1306 1.1 christos case 13 : /* fall through */
1307 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1308 1.1 christos case 15 : itype = CRISV32F_INSN_MOVE_C_SPRV32_P5; goto extract_sfmt_move_c_sprv32_p2;
1309 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1310 1.1 christos }
1311 1.1 christos }
1312 1.1 christos case 6 :
1313 1.1 christos {
1314 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1315 1.1 christos switch (val)
1316 1.1 christos {
1317 1.1 christos case 0 : /* fall through */
1318 1.1 christos case 1 : /* fall through */
1319 1.1 christos case 2 : /* fall through */
1320 1.1 christos case 3 : /* fall through */
1321 1.1 christos case 4 : /* fall through */
1322 1.1 christos case 5 : /* fall through */
1323 1.1 christos case 6 : /* fall through */
1324 1.1 christos case 7 : /* fall through */
1325 1.1 christos case 8 : /* fall through */
1326 1.1 christos case 9 : /* fall through */
1327 1.1 christos case 10 : /* fall through */
1328 1.1 christos case 11 : /* fall through */
1329 1.1 christos case 12 : /* fall through */
1330 1.1 christos case 13 : /* fall through */
1331 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1332 1.1 christos case 15 : itype = CRISV32F_INSN_MOVE_C_SPRV32_P6; goto extract_sfmt_move_c_sprv32_p2;
1333 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1334 1.1 christos }
1335 1.1 christos }
1336 1.1 christos case 7 :
1337 1.1 christos {
1338 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1339 1.1 christos switch (val)
1340 1.1 christos {
1341 1.1 christos case 0 : /* fall through */
1342 1.1 christos case 1 : /* fall through */
1343 1.1 christos case 2 : /* fall through */
1344 1.1 christos case 3 : /* fall through */
1345 1.1 christos case 4 : /* fall through */
1346 1.1 christos case 5 : /* fall through */
1347 1.1 christos case 6 : /* fall through */
1348 1.1 christos case 7 : /* fall through */
1349 1.1 christos case 8 : /* fall through */
1350 1.1 christos case 9 : /* fall through */
1351 1.1 christos case 10 : /* fall through */
1352 1.1 christos case 11 : /* fall through */
1353 1.1 christos case 12 : /* fall through */
1354 1.1 christos case 13 : /* fall through */
1355 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1356 1.1 christos case 15 : itype = CRISV32F_INSN_MOVE_C_SPRV32_P7; goto extract_sfmt_move_c_sprv32_p2;
1357 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1358 1.1 christos }
1359 1.1 christos }
1360 1.1 christos case 9 :
1361 1.1 christos {
1362 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1363 1.1 christos switch (val)
1364 1.1 christos {
1365 1.1 christos case 0 : /* fall through */
1366 1.1 christos case 1 : /* fall through */
1367 1.1 christos case 2 : /* fall through */
1368 1.1 christos case 3 : /* fall through */
1369 1.1 christos case 4 : /* fall through */
1370 1.1 christos case 5 : /* fall through */
1371 1.1 christos case 6 : /* fall through */
1372 1.1 christos case 7 : /* fall through */
1373 1.1 christos case 8 : /* fall through */
1374 1.1 christos case 9 : /* fall through */
1375 1.1 christos case 10 : /* fall through */
1376 1.1 christos case 11 : /* fall through */
1377 1.1 christos case 12 : /* fall through */
1378 1.1 christos case 13 : /* fall through */
1379 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1380 1.1 christos case 15 : itype = CRISV32F_INSN_MOVE_C_SPRV32_P9; goto extract_sfmt_move_c_sprv32_p2;
1381 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1382 1.1 christos }
1383 1.1 christos }
1384 1.1 christos case 10 :
1385 1.1 christos {
1386 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1387 1.1 christos switch (val)
1388 1.1 christos {
1389 1.1 christos case 0 : /* fall through */
1390 1.1 christos case 1 : /* fall through */
1391 1.1 christos case 2 : /* fall through */
1392 1.1 christos case 3 : /* fall through */
1393 1.1 christos case 4 : /* fall through */
1394 1.1 christos case 5 : /* fall through */
1395 1.1 christos case 6 : /* fall through */
1396 1.1 christos case 7 : /* fall through */
1397 1.1 christos case 8 : /* fall through */
1398 1.1 christos case 9 : /* fall through */
1399 1.1 christos case 10 : /* fall through */
1400 1.1 christos case 11 : /* fall through */
1401 1.1 christos case 12 : /* fall through */
1402 1.1 christos case 13 : /* fall through */
1403 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1404 1.1 christos case 15 : itype = CRISV32F_INSN_MOVE_C_SPRV32_P10; goto extract_sfmt_move_c_sprv32_p2;
1405 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1406 1.1 christos }
1407 1.1 christos }
1408 1.1 christos case 11 :
1409 1.1 christos {
1410 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1411 1.1 christos switch (val)
1412 1.1 christos {
1413 1.1 christos case 0 : /* fall through */
1414 1.1 christos case 1 : /* fall through */
1415 1.1 christos case 2 : /* fall through */
1416 1.1 christos case 3 : /* fall through */
1417 1.1 christos case 4 : /* fall through */
1418 1.1 christos case 5 : /* fall through */
1419 1.1 christos case 6 : /* fall through */
1420 1.1 christos case 7 : /* fall through */
1421 1.1 christos case 8 : /* fall through */
1422 1.1 christos case 9 : /* fall through */
1423 1.1 christos case 10 : /* fall through */
1424 1.1 christos case 11 : /* fall through */
1425 1.1 christos case 12 : /* fall through */
1426 1.1 christos case 13 : /* fall through */
1427 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1428 1.1 christos case 15 : itype = CRISV32F_INSN_MOVE_C_SPRV32_P11; goto extract_sfmt_move_c_sprv32_p2;
1429 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1430 1.1 christos }
1431 1.1 christos }
1432 1.1 christos case 12 :
1433 1.1 christos {
1434 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1435 1.1 christos switch (val)
1436 1.1 christos {
1437 1.1 christos case 0 : /* fall through */
1438 1.1 christos case 1 : /* fall through */
1439 1.1 christos case 2 : /* fall through */
1440 1.1 christos case 3 : /* fall through */
1441 1.1 christos case 4 : /* fall through */
1442 1.1 christos case 5 : /* fall through */
1443 1.1 christos case 6 : /* fall through */
1444 1.1 christos case 7 : /* fall through */
1445 1.1 christos case 8 : /* fall through */
1446 1.1 christos case 9 : /* fall through */
1447 1.1 christos case 10 : /* fall through */
1448 1.1 christos case 11 : /* fall through */
1449 1.1 christos case 12 : /* fall through */
1450 1.1 christos case 13 : /* fall through */
1451 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1452 1.1 christos case 15 : itype = CRISV32F_INSN_MOVE_C_SPRV32_P12; goto extract_sfmt_move_c_sprv32_p2;
1453 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1454 1.1 christos }
1455 1.1 christos }
1456 1.1 christos case 13 :
1457 1.1 christos {
1458 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1459 1.1 christos switch (val)
1460 1.1 christos {
1461 1.1 christos case 0 : /* fall through */
1462 1.1 christos case 1 : /* fall through */
1463 1.1 christos case 2 : /* fall through */
1464 1.1 christos case 3 : /* fall through */
1465 1.1 christos case 4 : /* fall through */
1466 1.1 christos case 5 : /* fall through */
1467 1.1 christos case 6 : /* fall through */
1468 1.1 christos case 7 : /* fall through */
1469 1.1 christos case 8 : /* fall through */
1470 1.1 christos case 9 : /* fall through */
1471 1.1 christos case 10 : /* fall through */
1472 1.1 christos case 11 : /* fall through */
1473 1.1 christos case 12 : /* fall through */
1474 1.1 christos case 13 : /* fall through */
1475 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1476 1.1 christos case 15 : itype = CRISV32F_INSN_MOVE_C_SPRV32_P13; goto extract_sfmt_move_c_sprv32_p2;
1477 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1478 1.1 christos }
1479 1.1 christos }
1480 1.1 christos case 14 :
1481 1.1 christos {
1482 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1483 1.1 christos switch (val)
1484 1.1 christos {
1485 1.1 christos case 0 : /* fall through */
1486 1.1 christos case 1 : /* fall through */
1487 1.1 christos case 2 : /* fall through */
1488 1.1 christos case 3 : /* fall through */
1489 1.1 christos case 4 : /* fall through */
1490 1.1 christos case 5 : /* fall through */
1491 1.1 christos case 6 : /* fall through */
1492 1.1 christos case 7 : /* fall through */
1493 1.1 christos case 8 : /* fall through */
1494 1.1 christos case 9 : /* fall through */
1495 1.1 christos case 10 : /* fall through */
1496 1.1 christos case 11 : /* fall through */
1497 1.1 christos case 12 : /* fall through */
1498 1.1 christos case 13 : /* fall through */
1499 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1500 1.1 christos case 15 : itype = CRISV32F_INSN_MOVE_C_SPRV32_P14; goto extract_sfmt_move_c_sprv32_p2;
1501 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1502 1.1 christos }
1503 1.1 christos }
1504 1.1 christos case 15 :
1505 1.1 christos {
1506 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1507 1.1 christos switch (val)
1508 1.1 christos {
1509 1.1 christos case 0 : /* fall through */
1510 1.1 christos case 1 : /* fall through */
1511 1.1 christos case 2 : /* fall through */
1512 1.1 christos case 3 : /* fall through */
1513 1.1 christos case 4 : /* fall through */
1514 1.1 christos case 5 : /* fall through */
1515 1.1 christos case 6 : /* fall through */
1516 1.1 christos case 7 : /* fall through */
1517 1.1 christos case 8 : /* fall through */
1518 1.1 christos case 9 : /* fall through */
1519 1.1 christos case 10 : /* fall through */
1520 1.1 christos case 11 : /* fall through */
1521 1.1 christos case 12 : /* fall through */
1522 1.1 christos case 13 : /* fall through */
1523 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_SPRV32; goto extract_sfmt_move_m_sprv32;
1524 1.1 christos case 15 : itype = CRISV32F_INSN_MOVE_C_SPRV32_P15; goto extract_sfmt_move_c_sprv32_p2;
1525 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1526 1.1 christos }
1527 1.1 christos }
1528 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1529 1.1 christos }
1530 1.1 christos }
1531 1.1 christos case 228 :
1532 1.1 christos {
1533 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1534 1.1 christos switch (val)
1535 1.1 christos {
1536 1.1 christos case 0 : /* fall through */
1537 1.1 christos case 1 : /* fall through */
1538 1.1 christos case 2 : /* fall through */
1539 1.1 christos case 3 : /* fall through */
1540 1.1 christos case 4 : /* fall through */
1541 1.1 christos case 5 : /* fall through */
1542 1.1 christos case 6 : /* fall through */
1543 1.1 christos case 7 : /* fall through */
1544 1.1 christos case 8 : /* fall through */
1545 1.1 christos case 9 : /* fall through */
1546 1.1 christos case 10 : /* fall through */
1547 1.1 christos case 11 : /* fall through */
1548 1.1 christos case 12 : /* fall through */
1549 1.1 christos case 13 : /* fall through */
1550 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_B_M; goto extract_sfmt_move_m_b_m;
1551 1.1 christos case 15 : itype = CRISV32F_INSN_MOVECBR; goto extract_sfmt_movecbr;
1552 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1553 1.1 christos }
1554 1.1 christos }
1555 1.1 christos case 229 :
1556 1.1 christos {
1557 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1558 1.1 christos switch (val)
1559 1.1 christos {
1560 1.1 christos case 0 : /* fall through */
1561 1.1 christos case 1 : /* fall through */
1562 1.1 christos case 2 : /* fall through */
1563 1.1 christos case 3 : /* fall through */
1564 1.1 christos case 4 : /* fall through */
1565 1.1 christos case 5 : /* fall through */
1566 1.1 christos case 6 : /* fall through */
1567 1.1 christos case 7 : /* fall through */
1568 1.1 christos case 8 : /* fall through */
1569 1.1 christos case 9 : /* fall through */
1570 1.1 christos case 10 : /* fall through */
1571 1.1 christos case 11 : /* fall through */
1572 1.1 christos case 12 : /* fall through */
1573 1.1 christos case 13 : /* fall through */
1574 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_W_M; goto extract_sfmt_move_m_w_m;
1575 1.1 christos case 15 : itype = CRISV32F_INSN_MOVECWR; goto extract_sfmt_movecwr;
1576 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1577 1.1 christos }
1578 1.1 christos }
1579 1.1 christos case 230 :
1580 1.1 christos {
1581 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1582 1.1 christos switch (val)
1583 1.1 christos {
1584 1.1 christos case 0 : /* fall through */
1585 1.1 christos case 1 : /* fall through */
1586 1.1 christos case 2 : /* fall through */
1587 1.1 christos case 3 : /* fall through */
1588 1.1 christos case 4 : /* fall through */
1589 1.1 christos case 5 : /* fall through */
1590 1.1 christos case 6 : /* fall through */
1591 1.1 christos case 7 : /* fall through */
1592 1.1 christos case 8 : /* fall through */
1593 1.1 christos case 9 : /* fall through */
1594 1.1 christos case 10 : /* fall through */
1595 1.1 christos case 11 : /* fall through */
1596 1.1 christos case 12 : /* fall through */
1597 1.1 christos case 13 : /* fall through */
1598 1.1 christos case 14 : itype = CRISV32F_INSN_MOVE_M_D_M; goto extract_sfmt_move_m_d_m;
1599 1.1 christos case 15 : itype = CRISV32F_INSN_MOVECDR; goto extract_sfmt_movecdr;
1600 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1601 1.1 christos }
1602 1.1 christos }
1603 1.1 christos case 232 :
1604 1.1 christos {
1605 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1606 1.1 christos switch (val)
1607 1.1 christos {
1608 1.1 christos case 0 : /* fall through */
1609 1.1 christos case 1 : /* fall through */
1610 1.1 christos case 2 : /* fall through */
1611 1.1 christos case 3 : /* fall through */
1612 1.1 christos case 4 : /* fall through */
1613 1.1 christos case 5 : /* fall through */
1614 1.1 christos case 6 : /* fall through */
1615 1.1 christos case 7 : /* fall through */
1616 1.1 christos case 8 : /* fall through */
1617 1.1 christos case 9 : /* fall through */
1618 1.1 christos case 10 : /* fall through */
1619 1.1 christos case 11 : /* fall through */
1620 1.1 christos case 12 : /* fall through */
1621 1.1 christos case 13 : /* fall through */
1622 1.1 christos case 14 : itype = CRISV32F_INSN_SUB_M_B_M; goto extract_sfmt_add_m_b_m;
1623 1.1 christos case 15 : itype = CRISV32F_INSN_SUBCBR; goto extract_sfmt_addcbr;
1624 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1625 1.1 christos }
1626 1.1 christos }
1627 1.1 christos case 233 :
1628 1.1 christos {
1629 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1630 1.1 christos switch (val)
1631 1.1 christos {
1632 1.1 christos case 0 : /* fall through */
1633 1.1 christos case 1 : /* fall through */
1634 1.1 christos case 2 : /* fall through */
1635 1.1 christos case 3 : /* fall through */
1636 1.1 christos case 4 : /* fall through */
1637 1.1 christos case 5 : /* fall through */
1638 1.1 christos case 6 : /* fall through */
1639 1.1 christos case 7 : /* fall through */
1640 1.1 christos case 8 : /* fall through */
1641 1.1 christos case 9 : /* fall through */
1642 1.1 christos case 10 : /* fall through */
1643 1.1 christos case 11 : /* fall through */
1644 1.1 christos case 12 : /* fall through */
1645 1.1 christos case 13 : /* fall through */
1646 1.1 christos case 14 : itype = CRISV32F_INSN_SUB_M_W_M; goto extract_sfmt_add_m_w_m;
1647 1.1 christos case 15 : itype = CRISV32F_INSN_SUBCWR; goto extract_sfmt_addcwr;
1648 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1649 1.1 christos }
1650 1.1 christos }
1651 1.1 christos case 234 :
1652 1.1 christos {
1653 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1654 1.1 christos switch (val)
1655 1.1 christos {
1656 1.1 christos case 0 : /* fall through */
1657 1.1 christos case 1 : /* fall through */
1658 1.1 christos case 2 : /* fall through */
1659 1.1 christos case 3 : /* fall through */
1660 1.1 christos case 4 : /* fall through */
1661 1.1 christos case 5 : /* fall through */
1662 1.1 christos case 6 : /* fall through */
1663 1.1 christos case 7 : /* fall through */
1664 1.1 christos case 8 : /* fall through */
1665 1.1 christos case 9 : /* fall through */
1666 1.1 christos case 10 : /* fall through */
1667 1.1 christos case 11 : /* fall through */
1668 1.1 christos case 12 : /* fall through */
1669 1.1 christos case 13 : /* fall through */
1670 1.1 christos case 14 : itype = CRISV32F_INSN_SUB_M_D_M; goto extract_sfmt_add_m_d_m;
1671 1.1 christos case 15 : itype = CRISV32F_INSN_SUBCDR; goto extract_sfmt_addcdr;
1672 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1673 1.1 christos }
1674 1.1 christos }
1675 1.1 christos case 235 :
1676 1.1 christos if ((base_insn & 0xfff) == 0xebf)
1677 1.1 christos { itype = CRISV32F_INSN_BAS_C; goto extract_sfmt_bas_c; }
1678 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1679 1.1 christos case 236 :
1680 1.1 christos {
1681 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1682 1.1 christos switch (val)
1683 1.1 christos {
1684 1.1 christos case 0 : /* fall through */
1685 1.1 christos case 1 : /* fall through */
1686 1.1 christos case 2 : /* fall through */
1687 1.1 christos case 3 : /* fall through */
1688 1.1 christos case 4 : /* fall through */
1689 1.1 christos case 5 : /* fall through */
1690 1.1 christos case 6 : /* fall through */
1691 1.1 christos case 7 : /* fall through */
1692 1.1 christos case 8 : /* fall through */
1693 1.1 christos case 9 : /* fall through */
1694 1.1 christos case 10 : /* fall through */
1695 1.1 christos case 11 : /* fall through */
1696 1.1 christos case 12 : /* fall through */
1697 1.1 christos case 13 : /* fall through */
1698 1.1 christos case 14 : itype = CRISV32F_INSN_CMP_M_B_M; goto extract_sfmt_cmp_m_b_m;
1699 1.1 christos case 15 : itype = CRISV32F_INSN_CMPCBR; goto extract_sfmt_cmpcbr;
1700 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1701 1.1 christos }
1702 1.1 christos }
1703 1.1 christos case 237 :
1704 1.1 christos {
1705 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1706 1.1 christos switch (val)
1707 1.1 christos {
1708 1.1 christos case 0 : /* fall through */
1709 1.1 christos case 1 : /* fall through */
1710 1.1 christos case 2 : /* fall through */
1711 1.1 christos case 3 : /* fall through */
1712 1.1 christos case 4 : /* fall through */
1713 1.1 christos case 5 : /* fall through */
1714 1.1 christos case 6 : /* fall through */
1715 1.1 christos case 7 : /* fall through */
1716 1.1 christos case 8 : /* fall through */
1717 1.1 christos case 9 : /* fall through */
1718 1.1 christos case 10 : /* fall through */
1719 1.1 christos case 11 : /* fall through */
1720 1.1 christos case 12 : /* fall through */
1721 1.1 christos case 13 : /* fall through */
1722 1.1 christos case 14 : itype = CRISV32F_INSN_CMP_M_W_M; goto extract_sfmt_cmp_m_w_m;
1723 1.1 christos case 15 : itype = CRISV32F_INSN_CMPCWR; goto extract_sfmt_cmpcwr;
1724 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1725 1.1 christos }
1726 1.1 christos }
1727 1.1 christos case 238 :
1728 1.1 christos {
1729 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1730 1.1 christos switch (val)
1731 1.1 christos {
1732 1.1 christos case 0 : /* fall through */
1733 1.1 christos case 1 : /* fall through */
1734 1.1 christos case 2 : /* fall through */
1735 1.1 christos case 3 : /* fall through */
1736 1.1 christos case 4 : /* fall through */
1737 1.1 christos case 5 : /* fall through */
1738 1.1 christos case 6 : /* fall through */
1739 1.1 christos case 7 : /* fall through */
1740 1.1 christos case 8 : /* fall through */
1741 1.1 christos case 9 : /* fall through */
1742 1.1 christos case 10 : /* fall through */
1743 1.1 christos case 11 : /* fall through */
1744 1.1 christos case 12 : /* fall through */
1745 1.1 christos case 13 : /* fall through */
1746 1.1 christos case 14 : itype = CRISV32F_INSN_CMP_M_D_M; goto extract_sfmt_cmp_m_d_m;
1747 1.1 christos case 15 : itype = CRISV32F_INSN_CMPCDR; goto extract_sfmt_cmpcdr;
1748 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1749 1.1 christos }
1750 1.1 christos }
1751 1.1 christos case 239 :
1752 1.1 christos if ((base_insn & 0xfff) == 0xeff)
1753 1.1 christos { itype = CRISV32F_INSN_BASC_C; goto extract_sfmt_bas_c; }
1754 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1755 1.1 christos case 240 :
1756 1.1 christos {
1757 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1758 1.1 christos switch (val)
1759 1.1 christos {
1760 1.1 christos case 0 : /* fall through */
1761 1.1 christos case 1 : /* fall through */
1762 1.1 christos case 2 : /* fall through */
1763 1.1 christos case 3 : /* fall through */
1764 1.1 christos case 4 : /* fall through */
1765 1.1 christos case 5 : /* fall through */
1766 1.1 christos case 6 : /* fall through */
1767 1.1 christos case 7 : /* fall through */
1768 1.1 christos case 8 : /* fall through */
1769 1.1 christos case 9 : /* fall through */
1770 1.1 christos case 10 : /* fall through */
1771 1.1 christos case 11 : /* fall through */
1772 1.1 christos case 12 : /* fall through */
1773 1.1 christos case 13 : /* fall through */
1774 1.1 christos case 14 : itype = CRISV32F_INSN_AND_M_B_M; goto extract_sfmt_and_m_b_m;
1775 1.1 christos case 15 : itype = CRISV32F_INSN_ANDCBR; goto extract_sfmt_andcbr;
1776 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1777 1.1 christos }
1778 1.1 christos }
1779 1.1 christos case 241 :
1780 1.1 christos {
1781 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1782 1.1 christos switch (val)
1783 1.1 christos {
1784 1.1 christos case 0 : /* fall through */
1785 1.1 christos case 1 : /* fall through */
1786 1.1 christos case 2 : /* fall through */
1787 1.1 christos case 3 : /* fall through */
1788 1.1 christos case 4 : /* fall through */
1789 1.1 christos case 5 : /* fall through */
1790 1.1 christos case 6 : /* fall through */
1791 1.1 christos case 7 : /* fall through */
1792 1.1 christos case 8 : /* fall through */
1793 1.1 christos case 9 : /* fall through */
1794 1.1 christos case 10 : /* fall through */
1795 1.1 christos case 11 : /* fall through */
1796 1.1 christos case 12 : /* fall through */
1797 1.1 christos case 13 : /* fall through */
1798 1.1 christos case 14 : itype = CRISV32F_INSN_AND_M_W_M; goto extract_sfmt_and_m_w_m;
1799 1.1 christos case 15 : itype = CRISV32F_INSN_ANDCWR; goto extract_sfmt_andcwr;
1800 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1801 1.1 christos }
1802 1.1 christos }
1803 1.1 christos case 242 :
1804 1.1 christos {
1805 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1806 1.1 christos switch (val)
1807 1.1 christos {
1808 1.1 christos case 0 : /* fall through */
1809 1.1 christos case 1 : /* fall through */
1810 1.1 christos case 2 : /* fall through */
1811 1.1 christos case 3 : /* fall through */
1812 1.1 christos case 4 : /* fall through */
1813 1.1 christos case 5 : /* fall through */
1814 1.1 christos case 6 : /* fall through */
1815 1.1 christos case 7 : /* fall through */
1816 1.1 christos case 8 : /* fall through */
1817 1.1 christos case 9 : /* fall through */
1818 1.1 christos case 10 : /* fall through */
1819 1.1 christos case 11 : /* fall through */
1820 1.1 christos case 12 : /* fall through */
1821 1.1 christos case 13 : /* fall through */
1822 1.1 christos case 14 : itype = CRISV32F_INSN_AND_M_D_M; goto extract_sfmt_and_m_d_m;
1823 1.1 christos case 15 : itype = CRISV32F_INSN_ANDCDR; goto extract_sfmt_andcdr;
1824 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1825 1.1 christos }
1826 1.1 christos }
1827 1.1 christos case 243 :
1828 1.1 christos if ((base_insn & 0xfff) == 0xf3f)
1829 1.1 christos { itype = CRISV32F_INSN_JASC_C; goto extract_sfmt_jas_c; }
1830 1.1 christos itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1831 1.1 christos case 244 :
1832 1.1 christos {
1833 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1834 1.1 christos switch (val)
1835 1.1 christos {
1836 1.1 christos case 0 : /* fall through */
1837 1.1 christos case 1 : /* fall through */
1838 1.1 christos case 2 : /* fall through */
1839 1.1 christos case 3 : /* fall through */
1840 1.1 christos case 4 : /* fall through */
1841 1.1 christos case 5 : /* fall through */
1842 1.1 christos case 6 : /* fall through */
1843 1.1 christos case 7 : /* fall through */
1844 1.1 christos case 8 : /* fall through */
1845 1.1 christos case 9 : /* fall through */
1846 1.1 christos case 10 : /* fall through */
1847 1.1 christos case 11 : /* fall through */
1848 1.1 christos case 12 : /* fall through */
1849 1.1 christos case 13 : /* fall through */
1850 1.1 christos case 14 : itype = CRISV32F_INSN_OR_M_B_M; goto extract_sfmt_and_m_b_m;
1851 1.1 christos case 15 : itype = CRISV32F_INSN_ORCBR; goto extract_sfmt_andcbr;
1852 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1853 1.1 christos }
1854 1.1 christos }
1855 1.1 christos case 245 :
1856 1.1 christos {
1857 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1858 1.1 christos switch (val)
1859 1.1 christos {
1860 1.1 christos case 0 : /* fall through */
1861 1.1 christos case 1 : /* fall through */
1862 1.1 christos case 2 : /* fall through */
1863 1.1 christos case 3 : /* fall through */
1864 1.1 christos case 4 : /* fall through */
1865 1.1 christos case 5 : /* fall through */
1866 1.1 christos case 6 : /* fall through */
1867 1.1 christos case 7 : /* fall through */
1868 1.1 christos case 8 : /* fall through */
1869 1.1 christos case 9 : /* fall through */
1870 1.1 christos case 10 : /* fall through */
1871 1.1 christos case 11 : /* fall through */
1872 1.1 christos case 12 : /* fall through */
1873 1.1 christos case 13 : /* fall through */
1874 1.1 christos case 14 : itype = CRISV32F_INSN_OR_M_W_M; goto extract_sfmt_and_m_w_m;
1875 1.1 christos case 15 : itype = CRISV32F_INSN_ORCWR; goto extract_sfmt_andcwr;
1876 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1877 1.1 christos }
1878 1.1 christos }
1879 1.1 christos case 246 :
1880 1.1 christos {
1881 1.1 christos unsigned int val = (((insn >> 0) & (15 << 0)));
1882 1.1 christos switch (val)
1883 1.1 christos {
1884 1.1 christos case 0 : /* fall through */
1885 1.1 christos case 1 : /* fall through */
1886 1.1 christos case 2 : /* fall through */
1887 1.1 christos case 3 : /* fall through */
1888 1.1 christos case 4 : /* fall through */
1889 1.1 christos case 5 : /* fall through */
1890 1.1 christos case 6 : /* fall through */
1891 1.1 christos case 7 : /* fall through */
1892 1.1 christos case 8 : /* fall through */
1893 1.1 christos case 9 : /* fall through */
1894 1.1 christos case 10 : /* fall through */
1895 1.1 christos case 11 : /* fall through */
1896 1.1 christos case 12 : /* fall through */
1897 1.1 christos case 13 : /* fall through */
1898 1.1 christos case 14 : itype = CRISV32F_INSN_OR_M_D_M; goto extract_sfmt_and_m_d_m;
1899 1.1 christos case 15 : itype = CRISV32F_INSN_ORCDR; goto extract_sfmt_andcdr;
1900 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1901 1.1 christos }
1902 1.1 christos }
1903 1.1 christos case 247 : itype = CRISV32F_INSN_MOVE_SS_R; goto extract_sfmt_move_ss_r;
1904 1.1 christos default : itype = CRISV32F_INSN_X_INVALID; goto extract_sfmt_empty;
1905 1.1 christos }
1906 1.1 christos }
1907 1.1 christos }
1908 1.1 christos
1909 1.1 christos /* The instruction has been decoded, now extract the fields. */
1910 1.1 christos
1911 1.1 christos extract_sfmt_empty:
1912 1.1 christos {
1913 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
1914 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f
1915 1.1 christos
1916 1.1 christos
1917 1.1 christos /* Record the fields for the semantic handler. */
1918 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0));
1919 1.1 christos
1920 1.1 christos #undef FLD
1921 1.1 christos return idesc;
1922 1.1 christos }
1923 1.1 christos
1924 1.1 christos extract_sfmt_move_b_r:
1925 1.1 christos {
1926 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
1927 1.1 christos CGEN_INSN_WORD insn = base_insn;
1928 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
1929 1.1 christos UINT f_operand2;
1930 1.1 christos UINT f_operand1;
1931 1.1 christos
1932 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
1933 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
1934 1.1 christos
1935 1.1 christos /* Record the fields for the semantic handler. */
1936 1.1 christos FLD (f_operand1) = f_operand1;
1937 1.1 christos FLD (f_operand2) = f_operand2;
1938 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_b_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
1939 1.1 christos
1940 1.1 christos #if WITH_PROFILE_MODEL_P
1941 1.1 christos /* Record the fields for profiling. */
1942 1.1 christos if (PROFILE_MODEL_P (current_cpu))
1943 1.1 christos {
1944 1.1 christos FLD (in_Rs) = f_operand1;
1945 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
1946 1.1 christos }
1947 1.1 christos #endif
1948 1.1 christos #undef FLD
1949 1.1 christos return idesc;
1950 1.1 christos }
1951 1.1 christos
1952 1.1 christos extract_sfmt_move_d_r:
1953 1.1 christos {
1954 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
1955 1.1 christos CGEN_INSN_WORD insn = base_insn;
1956 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
1957 1.1 christos UINT f_operand2;
1958 1.1 christos UINT f_operand1;
1959 1.1 christos
1960 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
1961 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
1962 1.1 christos
1963 1.1 christos /* Record the fields for the semantic handler. */
1964 1.1 christos FLD (f_operand1) = f_operand1;
1965 1.1 christos FLD (f_operand2) = f_operand2;
1966 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_d_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
1967 1.1 christos
1968 1.1 christos #if WITH_PROFILE_MODEL_P
1969 1.1 christos /* Record the fields for profiling. */
1970 1.1 christos if (PROFILE_MODEL_P (current_cpu))
1971 1.1 christos {
1972 1.1 christos FLD (in_Rs) = f_operand1;
1973 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
1974 1.1 christos }
1975 1.1 christos #endif
1976 1.1 christos #undef FLD
1977 1.1 christos return idesc;
1978 1.1 christos }
1979 1.1 christos
1980 1.1 christos extract_sfmt_moveq:
1981 1.1 christos {
1982 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
1983 1.1 christos CGEN_INSN_WORD insn = base_insn;
1984 1.1 christos #define FLD(f) abuf->fields.sfmt_moveq.f
1985 1.1 christos UINT f_operand2;
1986 1.1 christos INT f_s6;
1987 1.1 christos
1988 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
1989 1.1 christos f_s6 = EXTRACT_LSB0_SINT (insn, 16, 5, 6);
1990 1.1 christos
1991 1.1 christos /* Record the fields for the semantic handler. */
1992 1.1 christos FLD (f_s6) = f_s6;
1993 1.1 christos FLD (f_operand2) = f_operand2;
1994 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_moveq", "f_s6 0x%x", 'x', f_s6, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
1995 1.1 christos
1996 1.1 christos #if WITH_PROFILE_MODEL_P
1997 1.1 christos /* Record the fields for profiling. */
1998 1.1 christos if (PROFILE_MODEL_P (current_cpu))
1999 1.1 christos {
2000 1.1 christos FLD (out_Rd) = f_operand2;
2001 1.1 christos }
2002 1.1 christos #endif
2003 1.1 christos #undef FLD
2004 1.1 christos return idesc;
2005 1.1 christos }
2006 1.1 christos
2007 1.1 christos extract_sfmt_movs_b_r:
2008 1.1 christos {
2009 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2010 1.1 christos CGEN_INSN_WORD insn = base_insn;
2011 1.1 christos #define FLD(f) abuf->fields.sfmt_muls_b.f
2012 1.1 christos UINT f_operand2;
2013 1.1 christos UINT f_operand1;
2014 1.1 christos
2015 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2016 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2017 1.1 christos
2018 1.1 christos /* Record the fields for the semantic handler. */
2019 1.1 christos FLD (f_operand1) = f_operand1;
2020 1.1 christos FLD (f_operand2) = f_operand2;
2021 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movs_b_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
2022 1.1 christos
2023 1.1 christos #if WITH_PROFILE_MODEL_P
2024 1.1 christos /* Record the fields for profiling. */
2025 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2026 1.1 christos {
2027 1.1 christos FLD (in_Rs) = f_operand1;
2028 1.1 christos FLD (out_Rd) = f_operand2;
2029 1.1 christos }
2030 1.1 christos #endif
2031 1.1 christos #undef FLD
2032 1.1 christos return idesc;
2033 1.1 christos }
2034 1.1 christos
2035 1.1 christos extract_sfmt_movecbr:
2036 1.1 christos {
2037 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2038 1.1 christos CGEN_INSN_WORD insn = base_insn;
2039 1.1 christos #define FLD(f) abuf->fields.sfmt_addcbr.f
2040 1.1 christos INT f_indir_pc__byte;
2041 1.1 christos UINT f_operand2;
2042 1.1 christos /* Contents of trailing part of insn. */
2043 1.1 christos UINT word_1;
2044 1.1 christos
2045 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2046 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
2047 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2048 1.1 christos
2049 1.1 christos /* Record the fields for the semantic handler. */
2050 1.1 christos FLD (f_operand2) = f_operand2;
2051 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte;
2052 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movecbr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0));
2053 1.1 christos
2054 1.1 christos #if WITH_PROFILE_MODEL_P
2055 1.1 christos /* Record the fields for profiling. */
2056 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2057 1.1 christos {
2058 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
2059 1.1 christos }
2060 1.1 christos #endif
2061 1.1 christos #undef FLD
2062 1.1 christos return idesc;
2063 1.1 christos }
2064 1.1 christos
2065 1.1 christos extract_sfmt_movecwr:
2066 1.1 christos {
2067 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2068 1.1 christos CGEN_INSN_WORD insn = base_insn;
2069 1.1 christos #define FLD(f) abuf->fields.sfmt_addcwr.f
2070 1.1 christos INT f_indir_pc__word;
2071 1.1 christos UINT f_operand2;
2072 1.1 christos /* Contents of trailing part of insn. */
2073 1.1 christos UINT word_1;
2074 1.1 christos
2075 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2076 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
2077 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2078 1.1 christos
2079 1.1 christos /* Record the fields for the semantic handler. */
2080 1.1 christos FLD (f_operand2) = f_operand2;
2081 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word;
2082 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movecwr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0));
2083 1.1 christos
2084 1.1 christos #if WITH_PROFILE_MODEL_P
2085 1.1 christos /* Record the fields for profiling. */
2086 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2087 1.1 christos {
2088 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
2089 1.1 christos }
2090 1.1 christos #endif
2091 1.1 christos #undef FLD
2092 1.1 christos return idesc;
2093 1.1 christos }
2094 1.1 christos
2095 1.1 christos extract_sfmt_movecdr:
2096 1.1 christos {
2097 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2098 1.1 christos CGEN_INSN_WORD insn = base_insn;
2099 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cd.f
2100 1.1 christos INT f_indir_pc__dword;
2101 1.1 christos UINT f_operand2;
2102 1.1 christos /* Contents of trailing part of insn. */
2103 1.1 christos UINT word_1;
2104 1.1 christos
2105 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2106 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0));
2107 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2108 1.1 christos
2109 1.1 christos /* Record the fields for the semantic handler. */
2110 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword;
2111 1.1 christos FLD (f_operand2) = f_operand2;
2112 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movecdr", "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
2113 1.1 christos
2114 1.1 christos #if WITH_PROFILE_MODEL_P
2115 1.1 christos /* Record the fields for profiling. */
2116 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2117 1.1 christos {
2118 1.1 christos FLD (out_Rd) = f_operand2;
2119 1.1 christos }
2120 1.1 christos #endif
2121 1.1 christos #undef FLD
2122 1.1 christos return idesc;
2123 1.1 christos }
2124 1.1 christos
2125 1.1 christos extract_sfmt_movscbr:
2126 1.1 christos {
2127 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2128 1.1 christos CGEN_INSN_WORD insn = base_insn;
2129 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cb.f
2130 1.1 christos UINT f_operand2;
2131 1.1 christos INT f_indir_pc__byte;
2132 1.1 christos /* Contents of trailing part of insn. */
2133 1.1 christos UINT word_1;
2134 1.1 christos
2135 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2136 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2137 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
2138 1.1 christos
2139 1.1 christos /* Record the fields for the semantic handler. */
2140 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte;
2141 1.1 christos FLD (f_operand2) = f_operand2;
2142 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movscbr", "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
2143 1.1 christos
2144 1.1 christos #if WITH_PROFILE_MODEL_P
2145 1.1 christos /* Record the fields for profiling. */
2146 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2147 1.1 christos {
2148 1.1 christos FLD (out_Rd) = f_operand2;
2149 1.1 christos }
2150 1.1 christos #endif
2151 1.1 christos #undef FLD
2152 1.1 christos return idesc;
2153 1.1 christos }
2154 1.1 christos
2155 1.1 christos extract_sfmt_movscwr:
2156 1.1 christos {
2157 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2158 1.1 christos CGEN_INSN_WORD insn = base_insn;
2159 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cw.f
2160 1.1 christos UINT f_operand2;
2161 1.1 christos INT f_indir_pc__word;
2162 1.1 christos /* Contents of trailing part of insn. */
2163 1.1 christos UINT word_1;
2164 1.1 christos
2165 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2166 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2167 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
2168 1.1 christos
2169 1.1 christos /* Record the fields for the semantic handler. */
2170 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word;
2171 1.1 christos FLD (f_operand2) = f_operand2;
2172 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movscwr", "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
2173 1.1 christos
2174 1.1 christos #if WITH_PROFILE_MODEL_P
2175 1.1 christos /* Record the fields for profiling. */
2176 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2177 1.1 christos {
2178 1.1 christos FLD (out_Rd) = f_operand2;
2179 1.1 christos }
2180 1.1 christos #endif
2181 1.1 christos #undef FLD
2182 1.1 christos return idesc;
2183 1.1 christos }
2184 1.1 christos
2185 1.1 christos extract_sfmt_movucbr:
2186 1.1 christos {
2187 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2188 1.1 christos CGEN_INSN_WORD insn = base_insn;
2189 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cb.f
2190 1.1 christos UINT f_operand2;
2191 1.1 christos INT f_indir_pc__byte;
2192 1.1 christos /* Contents of trailing part of insn. */
2193 1.1 christos UINT word_1;
2194 1.1 christos
2195 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2196 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2197 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
2198 1.1 christos
2199 1.1 christos /* Record the fields for the semantic handler. */
2200 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte;
2201 1.1 christos FLD (f_operand2) = f_operand2;
2202 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movucbr", "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
2203 1.1 christos
2204 1.1 christos #if WITH_PROFILE_MODEL_P
2205 1.1 christos /* Record the fields for profiling. */
2206 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2207 1.1 christos {
2208 1.1 christos FLD (out_Rd) = f_operand2;
2209 1.1 christos }
2210 1.1 christos #endif
2211 1.1 christos #undef FLD
2212 1.1 christos return idesc;
2213 1.1 christos }
2214 1.1 christos
2215 1.1 christos extract_sfmt_movucwr:
2216 1.1 christos {
2217 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2218 1.1 christos CGEN_INSN_WORD insn = base_insn;
2219 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cw.f
2220 1.1 christos UINT f_operand2;
2221 1.1 christos INT f_indir_pc__word;
2222 1.1 christos /* Contents of trailing part of insn. */
2223 1.1 christos UINT word_1;
2224 1.1 christos
2225 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2226 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2227 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
2228 1.1 christos
2229 1.1 christos /* Record the fields for the semantic handler. */
2230 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word;
2231 1.1 christos FLD (f_operand2) = f_operand2;
2232 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movucwr", "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
2233 1.1 christos
2234 1.1 christos #if WITH_PROFILE_MODEL_P
2235 1.1 christos /* Record the fields for profiling. */
2236 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2237 1.1 christos {
2238 1.1 christos FLD (out_Rd) = f_operand2;
2239 1.1 christos }
2240 1.1 christos #endif
2241 1.1 christos #undef FLD
2242 1.1 christos return idesc;
2243 1.1 christos }
2244 1.1 christos
2245 1.1 christos extract_sfmt_addq:
2246 1.1 christos {
2247 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2248 1.1 christos CGEN_INSN_WORD insn = base_insn;
2249 1.1 christos #define FLD(f) abuf->fields.sfmt_addq.f
2250 1.1 christos UINT f_operand2;
2251 1.1 christos UINT f_u6;
2252 1.1 christos
2253 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2254 1.1 christos f_u6 = EXTRACT_LSB0_UINT (insn, 16, 5, 6);
2255 1.1 christos
2256 1.1 christos /* Record the fields for the semantic handler. */
2257 1.1 christos FLD (f_operand2) = f_operand2;
2258 1.1 christos FLD (f_u6) = f_u6;
2259 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addq", "f_operand2 0x%x", 'x', f_operand2, "f_u6 0x%x", 'x', f_u6, (char *) 0));
2260 1.1 christos
2261 1.1 christos #if WITH_PROFILE_MODEL_P
2262 1.1 christos /* Record the fields for profiling. */
2263 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2264 1.1 christos {
2265 1.1 christos FLD (in_Rd) = f_operand2;
2266 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
2267 1.1 christos }
2268 1.1 christos #endif
2269 1.1 christos #undef FLD
2270 1.1 christos return idesc;
2271 1.1 christos }
2272 1.1 christos
2273 1.1 christos extract_sfmt_cmp_r_b_r:
2274 1.1 christos {
2275 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2276 1.1 christos CGEN_INSN_WORD insn = base_insn;
2277 1.1 christos #define FLD(f) abuf->fields.sfmt_muls_b.f
2278 1.1 christos UINT f_operand2;
2279 1.1 christos UINT f_operand1;
2280 1.1 christos
2281 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2282 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2283 1.1 christos
2284 1.1 christos /* Record the fields for the semantic handler. */
2285 1.1 christos FLD (f_operand2) = f_operand2;
2286 1.1 christos FLD (f_operand1) = f_operand1;
2287 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp_r_b_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
2288 1.1 christos
2289 1.1 christos #if WITH_PROFILE_MODEL_P
2290 1.1 christos /* Record the fields for profiling. */
2291 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2292 1.1 christos {
2293 1.1 christos FLD (in_Rd) = f_operand2;
2294 1.1 christos FLD (in_Rs) = f_operand1;
2295 1.1 christos }
2296 1.1 christos #endif
2297 1.1 christos #undef FLD
2298 1.1 christos return idesc;
2299 1.1 christos }
2300 1.1 christos
2301 1.1 christos extract_sfmt_cmp_m_b_m:
2302 1.1 christos {
2303 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2304 1.1 christos CGEN_INSN_WORD insn = base_insn;
2305 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
2306 1.1 christos UINT f_operand2;
2307 1.1 christos UINT f_memmode;
2308 1.1 christos UINT f_operand1;
2309 1.1 christos
2310 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2311 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
2312 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2313 1.1 christos
2314 1.1 christos /* Record the fields for the semantic handler. */
2315 1.1 christos FLD (f_operand2) = f_operand2;
2316 1.1 christos FLD (f_operand1) = f_operand1;
2317 1.1 christos FLD (f_memmode) = f_memmode;
2318 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
2319 1.1 christos
2320 1.1 christos #if WITH_PROFILE_MODEL_P
2321 1.1 christos /* Record the fields for profiling. */
2322 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2323 1.1 christos {
2324 1.1 christos FLD (in_Rd) = f_operand2;
2325 1.1 christos FLD (in_Rs) = f_operand1;
2326 1.1 christos FLD (out_Rs) = f_operand1;
2327 1.1 christos }
2328 1.1 christos #endif
2329 1.1 christos #undef FLD
2330 1.1 christos return idesc;
2331 1.1 christos }
2332 1.1 christos
2333 1.1 christos extract_sfmt_cmp_m_w_m:
2334 1.1 christos {
2335 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2336 1.1 christos CGEN_INSN_WORD insn = base_insn;
2337 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
2338 1.1 christos UINT f_operand2;
2339 1.1 christos UINT f_memmode;
2340 1.1 christos UINT f_operand1;
2341 1.1 christos
2342 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2343 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
2344 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2345 1.1 christos
2346 1.1 christos /* Record the fields for the semantic handler. */
2347 1.1 christos FLD (f_operand2) = f_operand2;
2348 1.1 christos FLD (f_operand1) = f_operand1;
2349 1.1 christos FLD (f_memmode) = f_memmode;
2350 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
2351 1.1 christos
2352 1.1 christos #if WITH_PROFILE_MODEL_P
2353 1.1 christos /* Record the fields for profiling. */
2354 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2355 1.1 christos {
2356 1.1 christos FLD (in_Rd) = f_operand2;
2357 1.1 christos FLD (in_Rs) = f_operand1;
2358 1.1 christos FLD (out_Rs) = f_operand1;
2359 1.1 christos }
2360 1.1 christos #endif
2361 1.1 christos #undef FLD
2362 1.1 christos return idesc;
2363 1.1 christos }
2364 1.1 christos
2365 1.1 christos extract_sfmt_cmp_m_d_m:
2366 1.1 christos {
2367 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2368 1.1 christos CGEN_INSN_WORD insn = base_insn;
2369 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
2370 1.1 christos UINT f_operand2;
2371 1.1 christos UINT f_memmode;
2372 1.1 christos UINT f_operand1;
2373 1.1 christos
2374 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2375 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
2376 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2377 1.1 christos
2378 1.1 christos /* Record the fields for the semantic handler. */
2379 1.1 christos FLD (f_operand2) = f_operand2;
2380 1.1 christos FLD (f_operand1) = f_operand1;
2381 1.1 christos FLD (f_memmode) = f_memmode;
2382 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp_m_d_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
2383 1.1 christos
2384 1.1 christos #if WITH_PROFILE_MODEL_P
2385 1.1 christos /* Record the fields for profiling. */
2386 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2387 1.1 christos {
2388 1.1 christos FLD (in_Rd) = f_operand2;
2389 1.1 christos FLD (in_Rs) = f_operand1;
2390 1.1 christos FLD (out_Rs) = f_operand1;
2391 1.1 christos }
2392 1.1 christos #endif
2393 1.1 christos #undef FLD
2394 1.1 christos return idesc;
2395 1.1 christos }
2396 1.1 christos
2397 1.1 christos extract_sfmt_cmpcbr:
2398 1.1 christos {
2399 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2400 1.1 christos CGEN_INSN_WORD insn = base_insn;
2401 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cb.f
2402 1.1 christos INT f_indir_pc__byte;
2403 1.1 christos UINT f_operand2;
2404 1.1 christos /* Contents of trailing part of insn. */
2405 1.1 christos UINT word_1;
2406 1.1 christos
2407 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2408 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
2409 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2410 1.1 christos
2411 1.1 christos /* Record the fields for the semantic handler. */
2412 1.1 christos FLD (f_operand2) = f_operand2;
2413 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte;
2414 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpcbr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0));
2415 1.1 christos
2416 1.1 christos #if WITH_PROFILE_MODEL_P
2417 1.1 christos /* Record the fields for profiling. */
2418 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2419 1.1 christos {
2420 1.1 christos FLD (in_Rd) = f_operand2;
2421 1.1 christos }
2422 1.1 christos #endif
2423 1.1 christos #undef FLD
2424 1.1 christos return idesc;
2425 1.1 christos }
2426 1.1 christos
2427 1.1 christos extract_sfmt_cmpcwr:
2428 1.1 christos {
2429 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2430 1.1 christos CGEN_INSN_WORD insn = base_insn;
2431 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cw.f
2432 1.1 christos INT f_indir_pc__word;
2433 1.1 christos UINT f_operand2;
2434 1.1 christos /* Contents of trailing part of insn. */
2435 1.1 christos UINT word_1;
2436 1.1 christos
2437 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2438 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
2439 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2440 1.1 christos
2441 1.1 christos /* Record the fields for the semantic handler. */
2442 1.1 christos FLD (f_operand2) = f_operand2;
2443 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word;
2444 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpcwr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0));
2445 1.1 christos
2446 1.1 christos #if WITH_PROFILE_MODEL_P
2447 1.1 christos /* Record the fields for profiling. */
2448 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2449 1.1 christos {
2450 1.1 christos FLD (in_Rd) = f_operand2;
2451 1.1 christos }
2452 1.1 christos #endif
2453 1.1 christos #undef FLD
2454 1.1 christos return idesc;
2455 1.1 christos }
2456 1.1 christos
2457 1.1 christos extract_sfmt_cmpcdr:
2458 1.1 christos {
2459 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2460 1.1 christos CGEN_INSN_WORD insn = base_insn;
2461 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cd.f
2462 1.1 christos INT f_indir_pc__dword;
2463 1.1 christos UINT f_operand2;
2464 1.1 christos /* Contents of trailing part of insn. */
2465 1.1 christos UINT word_1;
2466 1.1 christos
2467 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2468 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0));
2469 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2470 1.1 christos
2471 1.1 christos /* Record the fields for the semantic handler. */
2472 1.1 christos FLD (f_operand2) = f_operand2;
2473 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword;
2474 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpcdr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0));
2475 1.1 christos
2476 1.1 christos #if WITH_PROFILE_MODEL_P
2477 1.1 christos /* Record the fields for profiling. */
2478 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2479 1.1 christos {
2480 1.1 christos FLD (in_Rd) = f_operand2;
2481 1.1 christos }
2482 1.1 christos #endif
2483 1.1 christos #undef FLD
2484 1.1 christos return idesc;
2485 1.1 christos }
2486 1.1 christos
2487 1.1 christos extract_sfmt_cmpq:
2488 1.1 christos {
2489 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2490 1.1 christos CGEN_INSN_WORD insn = base_insn;
2491 1.1 christos #define FLD(f) abuf->fields.sfmt_andq.f
2492 1.1 christos UINT f_operand2;
2493 1.1 christos INT f_s6;
2494 1.1 christos
2495 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2496 1.1 christos f_s6 = EXTRACT_LSB0_SINT (insn, 16, 5, 6);
2497 1.1 christos
2498 1.1 christos /* Record the fields for the semantic handler. */
2499 1.1 christos FLD (f_operand2) = f_operand2;
2500 1.1 christos FLD (f_s6) = f_s6;
2501 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpq", "f_operand2 0x%x", 'x', f_operand2, "f_s6 0x%x", 'x', f_s6, (char *) 0));
2502 1.1 christos
2503 1.1 christos #if WITH_PROFILE_MODEL_P
2504 1.1 christos /* Record the fields for profiling. */
2505 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2506 1.1 christos {
2507 1.1 christos FLD (in_Rd) = f_operand2;
2508 1.1 christos }
2509 1.1 christos #endif
2510 1.1 christos #undef FLD
2511 1.1 christos return idesc;
2512 1.1 christos }
2513 1.1 christos
2514 1.1 christos extract_sfmt_cmpucbr:
2515 1.1 christos {
2516 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2517 1.1 christos CGEN_INSN_WORD insn = base_insn;
2518 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cb.f
2519 1.1 christos INT f_indir_pc__byte;
2520 1.1 christos UINT f_operand2;
2521 1.1 christos /* Contents of trailing part of insn. */
2522 1.1 christos UINT word_1;
2523 1.1 christos
2524 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2525 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
2526 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2527 1.1 christos
2528 1.1 christos /* Record the fields for the semantic handler. */
2529 1.1 christos FLD (f_operand2) = f_operand2;
2530 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte;
2531 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpucbr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0));
2532 1.1 christos
2533 1.1 christos #if WITH_PROFILE_MODEL_P
2534 1.1 christos /* Record the fields for profiling. */
2535 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2536 1.1 christos {
2537 1.1 christos FLD (in_Rd) = f_operand2;
2538 1.1 christos }
2539 1.1 christos #endif
2540 1.1 christos #undef FLD
2541 1.1 christos return idesc;
2542 1.1 christos }
2543 1.1 christos
2544 1.1 christos extract_sfmt_cmpucwr:
2545 1.1 christos {
2546 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2547 1.1 christos CGEN_INSN_WORD insn = base_insn;
2548 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cw.f
2549 1.1 christos INT f_indir_pc__word;
2550 1.1 christos UINT f_operand2;
2551 1.1 christos /* Contents of trailing part of insn. */
2552 1.1 christos UINT word_1;
2553 1.1 christos
2554 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2555 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
2556 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2557 1.1 christos
2558 1.1 christos /* Record the fields for the semantic handler. */
2559 1.1 christos FLD (f_operand2) = f_operand2;
2560 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word;
2561 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpucwr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0));
2562 1.1 christos
2563 1.1 christos #if WITH_PROFILE_MODEL_P
2564 1.1 christos /* Record the fields for profiling. */
2565 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2566 1.1 christos {
2567 1.1 christos FLD (in_Rd) = f_operand2;
2568 1.1 christos }
2569 1.1 christos #endif
2570 1.1 christos #undef FLD
2571 1.1 christos return idesc;
2572 1.1 christos }
2573 1.1 christos
2574 1.1 christos extract_sfmt_move_m_b_m:
2575 1.1 christos {
2576 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2577 1.1 christos CGEN_INSN_WORD insn = base_insn;
2578 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2579 1.1 christos UINT f_operand2;
2580 1.1 christos UINT f_memmode;
2581 1.1 christos UINT f_operand1;
2582 1.1 christos
2583 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2584 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
2585 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2586 1.1 christos
2587 1.1 christos /* Record the fields for the semantic handler. */
2588 1.1 christos FLD (f_operand1) = f_operand1;
2589 1.1 christos FLD (f_operand2) = f_operand2;
2590 1.1 christos FLD (f_memmode) = f_memmode;
2591 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_m_b_m", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
2592 1.1 christos
2593 1.1 christos #if WITH_PROFILE_MODEL_P
2594 1.1 christos /* Record the fields for profiling. */
2595 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2596 1.1 christos {
2597 1.1 christos FLD (in_Rs) = f_operand1;
2598 1.1 christos FLD (out_Rs) = f_operand1;
2599 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2)));
2600 1.1 christos }
2601 1.1 christos #endif
2602 1.1 christos #undef FLD
2603 1.1 christos return idesc;
2604 1.1 christos }
2605 1.1 christos
2606 1.1 christos extract_sfmt_move_m_w_m:
2607 1.1 christos {
2608 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2609 1.1 christos CGEN_INSN_WORD insn = base_insn;
2610 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2611 1.1 christos UINT f_operand2;
2612 1.1 christos UINT f_memmode;
2613 1.1 christos UINT f_operand1;
2614 1.1 christos
2615 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2616 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
2617 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2618 1.1 christos
2619 1.1 christos /* Record the fields for the semantic handler. */
2620 1.1 christos FLD (f_operand1) = f_operand1;
2621 1.1 christos FLD (f_operand2) = f_operand2;
2622 1.1 christos FLD (f_memmode) = f_memmode;
2623 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_m_w_m", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
2624 1.1 christos
2625 1.1 christos #if WITH_PROFILE_MODEL_P
2626 1.1 christos /* Record the fields for profiling. */
2627 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2628 1.1 christos {
2629 1.1 christos FLD (in_Rs) = f_operand1;
2630 1.1 christos FLD (out_Rs) = f_operand1;
2631 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2)));
2632 1.1 christos }
2633 1.1 christos #endif
2634 1.1 christos #undef FLD
2635 1.1 christos return idesc;
2636 1.1 christos }
2637 1.1 christos
2638 1.1 christos extract_sfmt_move_m_d_m:
2639 1.1 christos {
2640 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2641 1.1 christos CGEN_INSN_WORD insn = base_insn;
2642 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2643 1.1 christos UINT f_operand2;
2644 1.1 christos UINT f_memmode;
2645 1.1 christos UINT f_operand1;
2646 1.1 christos
2647 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2648 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
2649 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2650 1.1 christos
2651 1.1 christos /* Record the fields for the semantic handler. */
2652 1.1 christos FLD (f_operand1) = f_operand1;
2653 1.1 christos FLD (f_operand2) = f_operand2;
2654 1.1 christos FLD (f_memmode) = f_memmode;
2655 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_m_d_m", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
2656 1.1 christos
2657 1.1 christos #if WITH_PROFILE_MODEL_P
2658 1.1 christos /* Record the fields for profiling. */
2659 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2660 1.1 christos {
2661 1.1 christos FLD (in_Rs) = f_operand1;
2662 1.1 christos FLD (out_Rs) = f_operand1;
2663 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2)));
2664 1.1 christos }
2665 1.1 christos #endif
2666 1.1 christos #undef FLD
2667 1.1 christos return idesc;
2668 1.1 christos }
2669 1.1 christos
2670 1.1 christos extract_sfmt_movs_m_b_m:
2671 1.1 christos {
2672 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2673 1.1 christos CGEN_INSN_WORD insn = base_insn;
2674 1.1 christos #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f
2675 1.1 christos UINT f_operand2;
2676 1.1 christos UINT f_memmode;
2677 1.1 christos UINT f_operand1;
2678 1.1 christos
2679 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2680 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
2681 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2682 1.1 christos
2683 1.1 christos /* Record the fields for the semantic handler. */
2684 1.1 christos FLD (f_operand1) = f_operand1;
2685 1.1 christos FLD (f_memmode) = f_memmode;
2686 1.1 christos FLD (f_operand2) = f_operand2;
2687 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movs_m_b_m", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
2688 1.1 christos
2689 1.1 christos #if WITH_PROFILE_MODEL_P
2690 1.1 christos /* Record the fields for profiling. */
2691 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2692 1.1 christos {
2693 1.1 christos FLD (in_Rs) = f_operand1;
2694 1.1 christos FLD (out_Rd) = f_operand2;
2695 1.1 christos FLD (out_Rs) = f_operand1;
2696 1.1 christos }
2697 1.1 christos #endif
2698 1.1 christos #undef FLD
2699 1.1 christos return idesc;
2700 1.1 christos }
2701 1.1 christos
2702 1.1 christos extract_sfmt_movs_m_w_m:
2703 1.1 christos {
2704 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2705 1.1 christos CGEN_INSN_WORD insn = base_insn;
2706 1.1 christos #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f
2707 1.1 christos UINT f_operand2;
2708 1.1 christos UINT f_memmode;
2709 1.1 christos UINT f_operand1;
2710 1.1 christos
2711 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2712 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
2713 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2714 1.1 christos
2715 1.1 christos /* Record the fields for the semantic handler. */
2716 1.1 christos FLD (f_operand1) = f_operand1;
2717 1.1 christos FLD (f_memmode) = f_memmode;
2718 1.1 christos FLD (f_operand2) = f_operand2;
2719 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movs_m_w_m", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
2720 1.1 christos
2721 1.1 christos #if WITH_PROFILE_MODEL_P
2722 1.1 christos /* Record the fields for profiling. */
2723 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2724 1.1 christos {
2725 1.1 christos FLD (in_Rs) = f_operand1;
2726 1.1 christos FLD (out_Rd) = f_operand2;
2727 1.1 christos FLD (out_Rs) = f_operand1;
2728 1.1 christos }
2729 1.1 christos #endif
2730 1.1 christos #undef FLD
2731 1.1 christos return idesc;
2732 1.1 christos }
2733 1.1 christos
2734 1.1 christos extract_sfmt_move_r_sprv32:
2735 1.1 christos {
2736 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2737 1.1 christos CGEN_INSN_WORD insn = base_insn;
2738 1.1 christos #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f
2739 1.1 christos UINT f_operand2;
2740 1.1 christos UINT f_operand1;
2741 1.1 christos
2742 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2743 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2744 1.1 christos
2745 1.1 christos /* Record the fields for the semantic handler. */
2746 1.1 christos FLD (f_operand1) = f_operand1;
2747 1.1 christos FLD (f_operand2) = f_operand2;
2748 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_r_sprv32", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
2749 1.1 christos
2750 1.1 christos #if WITH_PROFILE_MODEL_P
2751 1.1 christos /* Record the fields for profiling. */
2752 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2753 1.1 christos {
2754 1.1 christos FLD (in_Rs) = f_operand1;
2755 1.1 christos FLD (out_Pd) = f_operand2;
2756 1.1 christos }
2757 1.1 christos #endif
2758 1.1 christos #undef FLD
2759 1.1 christos return idesc;
2760 1.1 christos }
2761 1.1 christos
2762 1.1 christos extract_sfmt_move_spr_rv32:
2763 1.1 christos {
2764 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2765 1.1 christos CGEN_INSN_WORD insn = base_insn;
2766 1.1 christos #define FLD(f) abuf->fields.sfmt_mcp.f
2767 1.1 christos UINT f_operand2;
2768 1.1 christos UINT f_operand1;
2769 1.1 christos
2770 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2771 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2772 1.1 christos
2773 1.1 christos /* Record the fields for the semantic handler. */
2774 1.1 christos FLD (f_operand2) = f_operand2;
2775 1.1 christos FLD (f_operand1) = f_operand1;
2776 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_spr_rv32", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
2777 1.1 christos
2778 1.1 christos #if WITH_PROFILE_MODEL_P
2779 1.1 christos /* Record the fields for profiling. */
2780 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2781 1.1 christos {
2782 1.1 christos FLD (in_Ps) = f_operand2;
2783 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rs) = FLD (f_operand1);
2784 1.1 christos }
2785 1.1 christos #endif
2786 1.1 christos #undef FLD
2787 1.1 christos return idesc;
2788 1.1 christos }
2789 1.1 christos
2790 1.1 christos extract_sfmt_move_m_sprv32:
2791 1.1 christos {
2792 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2793 1.1 christos CGEN_INSN_WORD insn = base_insn;
2794 1.1 christos #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f
2795 1.1 christos UINT f_operand2;
2796 1.1 christos UINT f_memmode;
2797 1.1 christos UINT f_operand1;
2798 1.1 christos
2799 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2800 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
2801 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2802 1.1 christos
2803 1.1 christos /* Record the fields for the semantic handler. */
2804 1.1 christos FLD (f_operand1) = f_operand1;
2805 1.1 christos FLD (f_operand2) = f_operand2;
2806 1.1 christos FLD (f_memmode) = f_memmode;
2807 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_m_sprv32", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
2808 1.1 christos
2809 1.1 christos #if WITH_PROFILE_MODEL_P
2810 1.1 christos /* Record the fields for profiling. */
2811 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2812 1.1 christos {
2813 1.1 christos FLD (in_Rs) = f_operand1;
2814 1.1 christos FLD (out_Pd) = f_operand2;
2815 1.1 christos FLD (out_Rs) = f_operand1;
2816 1.1 christos }
2817 1.1 christos #endif
2818 1.1 christos #undef FLD
2819 1.1 christos return idesc;
2820 1.1 christos }
2821 1.1 christos
2822 1.1 christos extract_sfmt_move_c_sprv32_p2:
2823 1.1 christos {
2824 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2825 1.1 christos CGEN_INSN_WORD insn = base_insn;
2826 1.1 christos #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
2827 1.1 christos INT f_indir_pc__dword;
2828 1.1 christos UINT f_operand2;
2829 1.1 christos /* Contents of trailing part of insn. */
2830 1.1 christos UINT word_1;
2831 1.1 christos
2832 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
2833 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0));
2834 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2835 1.1 christos
2836 1.1 christos /* Record the fields for the semantic handler. */
2837 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword;
2838 1.1 christos FLD (f_operand2) = f_operand2;
2839 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_c_sprv32_p2", "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
2840 1.1 christos
2841 1.1 christos #if WITH_PROFILE_MODEL_P
2842 1.1 christos /* Record the fields for profiling. */
2843 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2844 1.1 christos {
2845 1.1 christos FLD (out_Pd) = f_operand2;
2846 1.1 christos }
2847 1.1 christos #endif
2848 1.1 christos #undef FLD
2849 1.1 christos return idesc;
2850 1.1 christos }
2851 1.1 christos
2852 1.1 christos extract_sfmt_move_spr_mv32:
2853 1.1 christos {
2854 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2855 1.1 christos CGEN_INSN_WORD insn = base_insn;
2856 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
2857 1.1 christos UINT f_operand2;
2858 1.1 christos UINT f_memmode;
2859 1.1 christos UINT f_operand1;
2860 1.1 christos
2861 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2862 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
2863 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2864 1.1 christos
2865 1.1 christos /* Record the fields for the semantic handler. */
2866 1.1 christos FLD (f_operand2) = f_operand2;
2867 1.1 christos FLD (f_operand1) = f_operand1;
2868 1.1 christos FLD (f_memmode) = f_memmode;
2869 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_spr_mv32", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
2870 1.1 christos
2871 1.1 christos #if WITH_PROFILE_MODEL_P
2872 1.1 christos /* Record the fields for profiling. */
2873 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2874 1.1 christos {
2875 1.1 christos FLD (in_Ps) = f_operand2;
2876 1.1 christos FLD (in_Rs) = f_operand1;
2877 1.1 christos FLD (out_Rs) = f_operand1;
2878 1.1 christos }
2879 1.1 christos #endif
2880 1.1 christos #undef FLD
2881 1.1 christos return idesc;
2882 1.1 christos }
2883 1.1 christos
2884 1.1 christos extract_sfmt_move_ss_r:
2885 1.1 christos {
2886 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2887 1.1 christos CGEN_INSN_WORD insn = base_insn;
2888 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
2889 1.1 christos UINT f_operand2;
2890 1.1 christos UINT f_operand1;
2891 1.1 christos
2892 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2893 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2894 1.1 christos
2895 1.1 christos /* Record the fields for the semantic handler. */
2896 1.1 christos FLD (f_operand2) = f_operand2;
2897 1.1 christos FLD (f_operand1) = f_operand1;
2898 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_ss_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
2899 1.1 christos
2900 1.1 christos #if WITH_PROFILE_MODEL_P
2901 1.1 christos /* Record the fields for profiling. */
2902 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2903 1.1 christos {
2904 1.1 christos FLD (out_Rs) = f_operand1;
2905 1.1 christos }
2906 1.1 christos #endif
2907 1.1 christos #undef FLD
2908 1.1 christos return idesc;
2909 1.1 christos }
2910 1.1 christos
2911 1.1 christos extract_sfmt_move_r_ss:
2912 1.1 christos {
2913 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2914 1.1 christos CGEN_INSN_WORD insn = base_insn;
2915 1.1 christos #define FLD(f) abuf->fields.sfmt_mcp.f
2916 1.1 christos UINT f_operand2;
2917 1.1 christos UINT f_operand1;
2918 1.1 christos
2919 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2920 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2921 1.1 christos
2922 1.1 christos /* Record the fields for the semantic handler. */
2923 1.1 christos FLD (f_operand1) = f_operand1;
2924 1.1 christos FLD (f_operand2) = f_operand2;
2925 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_r_ss", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
2926 1.1 christos
2927 1.1 christos #if WITH_PROFILE_MODEL_P
2928 1.1 christos /* Record the fields for profiling. */
2929 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2930 1.1 christos {
2931 1.1 christos FLD (in_Rs) = f_operand1;
2932 1.1 christos }
2933 1.1 christos #endif
2934 1.1 christos #undef FLD
2935 1.1 christos return idesc;
2936 1.1 christos }
2937 1.1 christos
2938 1.1 christos extract_sfmt_movem_r_m_v32:
2939 1.1 christos {
2940 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2941 1.1 christos CGEN_INSN_WORD insn = base_insn;
2942 1.1 christos #define FLD(f) abuf->fields.sfmt_movem_r_m_v32.f
2943 1.1 christos UINT f_operand2;
2944 1.1 christos UINT f_memmode;
2945 1.1 christos UINT f_operand1;
2946 1.1 christos
2947 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2948 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
2949 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2950 1.1 christos
2951 1.1 christos /* Record the fields for the semantic handler. */
2952 1.1 christos FLD (f_operand2) = f_operand2;
2953 1.1 christos FLD (f_operand1) = f_operand1;
2954 1.1 christos FLD (f_memmode) = f_memmode;
2955 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movem_r_m_v32", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
2956 1.1 christos
2957 1.1 christos #if WITH_PROFILE_MODEL_P
2958 1.1 christos /* Record the fields for profiling. */
2959 1.1 christos if (PROFILE_MODEL_P (current_cpu))
2960 1.1 christos {
2961 1.1 christos FLD (in_Rd) = f_operand2;
2962 1.1 christos FLD (in_Rs) = f_operand1;
2963 1.1 christos FLD (in_h_gr_SI_0) = 0;
2964 1.1 christos FLD (in_h_gr_SI_1) = 1;
2965 1.1 christos FLD (in_h_gr_SI_10) = 10;
2966 1.1 christos FLD (in_h_gr_SI_11) = 11;
2967 1.1 christos FLD (in_h_gr_SI_12) = 12;
2968 1.1 christos FLD (in_h_gr_SI_13) = 13;
2969 1.1 christos FLD (in_h_gr_SI_14) = 14;
2970 1.1 christos FLD (in_h_gr_SI_15) = 15;
2971 1.1 christos FLD (in_h_gr_SI_2) = 2;
2972 1.1 christos FLD (in_h_gr_SI_3) = 3;
2973 1.1 christos FLD (in_h_gr_SI_4) = 4;
2974 1.1 christos FLD (in_h_gr_SI_5) = 5;
2975 1.1 christos FLD (in_h_gr_SI_6) = 6;
2976 1.1 christos FLD (in_h_gr_SI_7) = 7;
2977 1.1 christos FLD (in_h_gr_SI_8) = 8;
2978 1.1 christos FLD (in_h_gr_SI_9) = 9;
2979 1.1 christos FLD (out_Rs) = f_operand1;
2980 1.1 christos }
2981 1.1 christos #endif
2982 1.1 christos #undef FLD
2983 1.1 christos return idesc;
2984 1.1 christos }
2985 1.1 christos
2986 1.1 christos extract_sfmt_movem_m_r_v32:
2987 1.1 christos {
2988 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
2989 1.1 christos CGEN_INSN_WORD insn = base_insn;
2990 1.1 christos #define FLD(f) abuf->fields.sfmt_movem_m_r_v32.f
2991 1.1 christos UINT f_operand2;
2992 1.1 christos UINT f_memmode;
2993 1.1 christos UINT f_operand1;
2994 1.1 christos
2995 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
2996 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
2997 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
2998 1.1 christos
2999 1.1 christos /* Record the fields for the semantic handler. */
3000 1.1 christos FLD (f_operand2) = f_operand2;
3001 1.1 christos FLD (f_operand1) = f_operand1;
3002 1.1 christos FLD (f_memmode) = f_memmode;
3003 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movem_m_r_v32", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3004 1.1 christos
3005 1.1 christos #if WITH_PROFILE_MODEL_P
3006 1.1 christos /* Record the fields for profiling. */
3007 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3008 1.1 christos {
3009 1.1 christos FLD (in_Rd) = f_operand2;
3010 1.1 christos FLD (in_Rs) = f_operand1;
3011 1.1 christos FLD (out_Rs) = f_operand1;
3012 1.1 christos FLD (out_h_gr_SI_0) = 0;
3013 1.1 christos FLD (out_h_gr_SI_1) = 1;
3014 1.1 christos FLD (out_h_gr_SI_10) = 10;
3015 1.1 christos FLD (out_h_gr_SI_11) = 11;
3016 1.1 christos FLD (out_h_gr_SI_12) = 12;
3017 1.1 christos FLD (out_h_gr_SI_13) = 13;
3018 1.1 christos FLD (out_h_gr_SI_14) = 14;
3019 1.1 christos FLD (out_h_gr_SI_15) = 15;
3020 1.1 christos FLD (out_h_gr_SI_2) = 2;
3021 1.1 christos FLD (out_h_gr_SI_3) = 3;
3022 1.1 christos FLD (out_h_gr_SI_4) = 4;
3023 1.1 christos FLD (out_h_gr_SI_5) = 5;
3024 1.1 christos FLD (out_h_gr_SI_6) = 6;
3025 1.1 christos FLD (out_h_gr_SI_7) = 7;
3026 1.1 christos FLD (out_h_gr_SI_8) = 8;
3027 1.1 christos FLD (out_h_gr_SI_9) = 9;
3028 1.1 christos }
3029 1.1 christos #endif
3030 1.1 christos #undef FLD
3031 1.1 christos return idesc;
3032 1.1 christos }
3033 1.1 christos
3034 1.1 christos extract_sfmt_add_b_r:
3035 1.1 christos {
3036 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3037 1.1 christos CGEN_INSN_WORD insn = base_insn;
3038 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
3039 1.1 christos UINT f_operand2;
3040 1.1 christos UINT f_operand1;
3041 1.1 christos
3042 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3043 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3044 1.1 christos
3045 1.1 christos /* Record the fields for the semantic handler. */
3046 1.1 christos FLD (f_operand2) = f_operand2;
3047 1.1 christos FLD (f_operand1) = f_operand1;
3048 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add_b_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
3049 1.1 christos
3050 1.1 christos #if WITH_PROFILE_MODEL_P
3051 1.1 christos /* Record the fields for profiling. */
3052 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3053 1.1 christos {
3054 1.1 christos FLD (in_Rd) = f_operand2;
3055 1.1 christos FLD (in_Rs) = f_operand1;
3056 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
3057 1.1 christos }
3058 1.1 christos #endif
3059 1.1 christos #undef FLD
3060 1.1 christos return idesc;
3061 1.1 christos }
3062 1.1 christos
3063 1.1 christos extract_sfmt_add_d_r:
3064 1.1 christos {
3065 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3066 1.1 christos CGEN_INSN_WORD insn = base_insn;
3067 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
3068 1.1 christos UINT f_operand2;
3069 1.1 christos UINT f_operand1;
3070 1.1 christos
3071 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3072 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3073 1.1 christos
3074 1.1 christos /* Record the fields for the semantic handler. */
3075 1.1 christos FLD (f_operand2) = f_operand2;
3076 1.1 christos FLD (f_operand1) = f_operand1;
3077 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add_d_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
3078 1.1 christos
3079 1.1 christos #if WITH_PROFILE_MODEL_P
3080 1.1 christos /* Record the fields for profiling. */
3081 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3082 1.1 christos {
3083 1.1 christos FLD (in_Rd) = f_operand2;
3084 1.1 christos FLD (in_Rs) = f_operand1;
3085 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
3086 1.1 christos }
3087 1.1 christos #endif
3088 1.1 christos #undef FLD
3089 1.1 christos return idesc;
3090 1.1 christos }
3091 1.1 christos
3092 1.1 christos extract_sfmt_add_m_b_m:
3093 1.1 christos {
3094 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3095 1.1 christos CGEN_INSN_WORD insn = base_insn;
3096 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
3097 1.1 christos UINT f_operand2;
3098 1.1 christos UINT f_memmode;
3099 1.1 christos UINT f_operand1;
3100 1.1 christos
3101 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3102 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3103 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3104 1.1 christos
3105 1.1 christos /* Record the fields for the semantic handler. */
3106 1.1 christos FLD (f_operand2) = f_operand2;
3107 1.1 christos FLD (f_operand1) = f_operand1;
3108 1.1 christos FLD (f_memmode) = f_memmode;
3109 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3110 1.1 christos
3111 1.1 christos #if WITH_PROFILE_MODEL_P
3112 1.1 christos /* Record the fields for profiling. */
3113 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3114 1.1 christos {
3115 1.1 christos FLD (in_Rd) = f_operand2;
3116 1.1 christos FLD (in_Rs) = f_operand1;
3117 1.1 christos FLD (out_Rs) = f_operand1;
3118 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2)));
3119 1.1 christos }
3120 1.1 christos #endif
3121 1.1 christos #undef FLD
3122 1.1 christos return idesc;
3123 1.1 christos }
3124 1.1 christos
3125 1.1 christos extract_sfmt_add_m_w_m:
3126 1.1 christos {
3127 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3128 1.1 christos CGEN_INSN_WORD insn = base_insn;
3129 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
3130 1.1 christos UINT f_operand2;
3131 1.1 christos UINT f_memmode;
3132 1.1 christos UINT f_operand1;
3133 1.1 christos
3134 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3135 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3136 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3137 1.1 christos
3138 1.1 christos /* Record the fields for the semantic handler. */
3139 1.1 christos FLD (f_operand2) = f_operand2;
3140 1.1 christos FLD (f_operand1) = f_operand1;
3141 1.1 christos FLD (f_memmode) = f_memmode;
3142 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3143 1.1 christos
3144 1.1 christos #if WITH_PROFILE_MODEL_P
3145 1.1 christos /* Record the fields for profiling. */
3146 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3147 1.1 christos {
3148 1.1 christos FLD (in_Rd) = f_operand2;
3149 1.1 christos FLD (in_Rs) = f_operand1;
3150 1.1 christos FLD (out_Rs) = f_operand1;
3151 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2)));
3152 1.1 christos }
3153 1.1 christos #endif
3154 1.1 christos #undef FLD
3155 1.1 christos return idesc;
3156 1.1 christos }
3157 1.1 christos
3158 1.1 christos extract_sfmt_add_m_d_m:
3159 1.1 christos {
3160 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3161 1.1 christos CGEN_INSN_WORD insn = base_insn;
3162 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
3163 1.1 christos UINT f_operand2;
3164 1.1 christos UINT f_memmode;
3165 1.1 christos UINT f_operand1;
3166 1.1 christos
3167 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3168 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3169 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3170 1.1 christos
3171 1.1 christos /* Record the fields for the semantic handler. */
3172 1.1 christos FLD (f_operand2) = f_operand2;
3173 1.1 christos FLD (f_operand1) = f_operand1;
3174 1.1 christos FLD (f_memmode) = f_memmode;
3175 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add_m_d_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3176 1.1 christos
3177 1.1 christos #if WITH_PROFILE_MODEL_P
3178 1.1 christos /* Record the fields for profiling. */
3179 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3180 1.1 christos {
3181 1.1 christos FLD (in_Rd) = f_operand2;
3182 1.1 christos FLD (in_Rs) = f_operand1;
3183 1.1 christos FLD (out_Rs) = f_operand1;
3184 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2)));
3185 1.1 christos }
3186 1.1 christos #endif
3187 1.1 christos #undef FLD
3188 1.1 christos return idesc;
3189 1.1 christos }
3190 1.1 christos
3191 1.1 christos extract_sfmt_addcbr:
3192 1.1 christos {
3193 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3194 1.1 christos CGEN_INSN_WORD insn = base_insn;
3195 1.1 christos #define FLD(f) abuf->fields.sfmt_addcbr.f
3196 1.1 christos INT f_indir_pc__byte;
3197 1.1 christos UINT f_operand2;
3198 1.1 christos /* Contents of trailing part of insn. */
3199 1.1 christos UINT word_1;
3200 1.1 christos
3201 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
3202 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
3203 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3204 1.1 christos
3205 1.1 christos /* Record the fields for the semantic handler. */
3206 1.1 christos FLD (f_operand2) = f_operand2;
3207 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte;
3208 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addcbr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0));
3209 1.1 christos
3210 1.1 christos #if WITH_PROFILE_MODEL_P
3211 1.1 christos /* Record the fields for profiling. */
3212 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3213 1.1 christos {
3214 1.1 christos FLD (in_Rd) = f_operand2;
3215 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
3216 1.1 christos }
3217 1.1 christos #endif
3218 1.1 christos #undef FLD
3219 1.1 christos return idesc;
3220 1.1 christos }
3221 1.1 christos
3222 1.1 christos extract_sfmt_addcwr:
3223 1.1 christos {
3224 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3225 1.1 christos CGEN_INSN_WORD insn = base_insn;
3226 1.1 christos #define FLD(f) abuf->fields.sfmt_addcwr.f
3227 1.1 christos INT f_indir_pc__word;
3228 1.1 christos UINT f_operand2;
3229 1.1 christos /* Contents of trailing part of insn. */
3230 1.1 christos UINT word_1;
3231 1.1 christos
3232 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
3233 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
3234 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3235 1.1 christos
3236 1.1 christos /* Record the fields for the semantic handler. */
3237 1.1 christos FLD (f_operand2) = f_operand2;
3238 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word;
3239 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addcwr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0));
3240 1.1 christos
3241 1.1 christos #if WITH_PROFILE_MODEL_P
3242 1.1 christos /* Record the fields for profiling. */
3243 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3244 1.1 christos {
3245 1.1 christos FLD (in_Rd) = f_operand2;
3246 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
3247 1.1 christos }
3248 1.1 christos #endif
3249 1.1 christos #undef FLD
3250 1.1 christos return idesc;
3251 1.1 christos }
3252 1.1 christos
3253 1.1 christos extract_sfmt_addcdr:
3254 1.1 christos {
3255 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3256 1.1 christos CGEN_INSN_WORD insn = base_insn;
3257 1.1 christos #define FLD(f) abuf->fields.sfmt_addcdr.f
3258 1.1 christos INT f_indir_pc__dword;
3259 1.1 christos UINT f_operand2;
3260 1.1 christos /* Contents of trailing part of insn. */
3261 1.1 christos UINT word_1;
3262 1.1 christos
3263 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
3264 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0));
3265 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3266 1.1 christos
3267 1.1 christos /* Record the fields for the semantic handler. */
3268 1.1 christos FLD (f_operand2) = f_operand2;
3269 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword;
3270 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addcdr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0));
3271 1.1 christos
3272 1.1 christos #if WITH_PROFILE_MODEL_P
3273 1.1 christos /* Record the fields for profiling. */
3274 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3275 1.1 christos {
3276 1.1 christos FLD (in_Rd) = f_operand2;
3277 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
3278 1.1 christos }
3279 1.1 christos #endif
3280 1.1 christos #undef FLD
3281 1.1 christos return idesc;
3282 1.1 christos }
3283 1.1 christos
3284 1.1 christos extract_sfmt_adds_m_b_m:
3285 1.1 christos {
3286 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3287 1.1 christos CGEN_INSN_WORD insn = base_insn;
3288 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
3289 1.1 christos UINT f_operand2;
3290 1.1 christos UINT f_memmode;
3291 1.1 christos UINT f_operand1;
3292 1.1 christos
3293 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3294 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3295 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3296 1.1 christos
3297 1.1 christos /* Record the fields for the semantic handler. */
3298 1.1 christos FLD (f_operand2) = f_operand2;
3299 1.1 christos FLD (f_operand1) = f_operand1;
3300 1.1 christos FLD (f_memmode) = f_memmode;
3301 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_adds_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3302 1.1 christos
3303 1.1 christos #if WITH_PROFILE_MODEL_P
3304 1.1 christos /* Record the fields for profiling. */
3305 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3306 1.1 christos {
3307 1.1 christos FLD (in_Rd) = f_operand2;
3308 1.1 christos FLD (in_Rs) = f_operand1;
3309 1.1 christos FLD (out_Rs) = f_operand1;
3310 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2)));
3311 1.1 christos }
3312 1.1 christos #endif
3313 1.1 christos #undef FLD
3314 1.1 christos return idesc;
3315 1.1 christos }
3316 1.1 christos
3317 1.1 christos extract_sfmt_adds_m_w_m:
3318 1.1 christos {
3319 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3320 1.1 christos CGEN_INSN_WORD insn = base_insn;
3321 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
3322 1.1 christos UINT f_operand2;
3323 1.1 christos UINT f_memmode;
3324 1.1 christos UINT f_operand1;
3325 1.1 christos
3326 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3327 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3328 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3329 1.1 christos
3330 1.1 christos /* Record the fields for the semantic handler. */
3331 1.1 christos FLD (f_operand2) = f_operand2;
3332 1.1 christos FLD (f_operand1) = f_operand1;
3333 1.1 christos FLD (f_memmode) = f_memmode;
3334 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_adds_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3335 1.1 christos
3336 1.1 christos #if WITH_PROFILE_MODEL_P
3337 1.1 christos /* Record the fields for profiling. */
3338 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3339 1.1 christos {
3340 1.1 christos FLD (in_Rd) = f_operand2;
3341 1.1 christos FLD (in_Rs) = f_operand1;
3342 1.1 christos FLD (out_Rs) = f_operand1;
3343 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2)));
3344 1.1 christos }
3345 1.1 christos #endif
3346 1.1 christos #undef FLD
3347 1.1 christos return idesc;
3348 1.1 christos }
3349 1.1 christos
3350 1.1 christos extract_sfmt_addscbr:
3351 1.1 christos {
3352 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3353 1.1 christos CGEN_INSN_WORD insn = base_insn;
3354 1.1 christos #define FLD(f) abuf->fields.sfmt_addcbr.f
3355 1.1 christos INT f_indir_pc__byte;
3356 1.1 christos UINT f_operand2;
3357 1.1 christos /* Contents of trailing part of insn. */
3358 1.1 christos UINT word_1;
3359 1.1 christos
3360 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
3361 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
3362 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3363 1.1 christos
3364 1.1 christos /* Record the fields for the semantic handler. */
3365 1.1 christos FLD (f_operand2) = f_operand2;
3366 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte;
3367 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addscbr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0));
3368 1.1 christos
3369 1.1 christos #if WITH_PROFILE_MODEL_P
3370 1.1 christos /* Record the fields for profiling. */
3371 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3372 1.1 christos {
3373 1.1 christos FLD (in_Rd) = f_operand2;
3374 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
3375 1.1 christos }
3376 1.1 christos #endif
3377 1.1 christos #undef FLD
3378 1.1 christos return idesc;
3379 1.1 christos }
3380 1.1 christos
3381 1.1 christos extract_sfmt_addscwr:
3382 1.1 christos {
3383 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3384 1.1 christos CGEN_INSN_WORD insn = base_insn;
3385 1.1 christos #define FLD(f) abuf->fields.sfmt_addcwr.f
3386 1.1 christos INT f_indir_pc__word;
3387 1.1 christos UINT f_operand2;
3388 1.1 christos /* Contents of trailing part of insn. */
3389 1.1 christos UINT word_1;
3390 1.1 christos
3391 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
3392 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
3393 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3394 1.1 christos
3395 1.1 christos /* Record the fields for the semantic handler. */
3396 1.1 christos FLD (f_operand2) = f_operand2;
3397 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word;
3398 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addscwr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0));
3399 1.1 christos
3400 1.1 christos #if WITH_PROFILE_MODEL_P
3401 1.1 christos /* Record the fields for profiling. */
3402 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3403 1.1 christos {
3404 1.1 christos FLD (in_Rd) = f_operand2;
3405 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
3406 1.1 christos }
3407 1.1 christos #endif
3408 1.1 christos #undef FLD
3409 1.1 christos return idesc;
3410 1.1 christos }
3411 1.1 christos
3412 1.1 christos extract_sfmt_addc_m:
3413 1.1 christos {
3414 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3415 1.1 christos CGEN_INSN_WORD insn = base_insn;
3416 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
3417 1.1 christos UINT f_operand2;
3418 1.1 christos UINT f_memmode;
3419 1.1 christos UINT f_operand1;
3420 1.1 christos
3421 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3422 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3423 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3424 1.1 christos
3425 1.1 christos /* Record the fields for the semantic handler. */
3426 1.1 christos FLD (f_operand2) = f_operand2;
3427 1.1 christos FLD (f_operand1) = f_operand1;
3428 1.1 christos FLD (f_memmode) = f_memmode;
3429 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addc_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3430 1.1 christos
3431 1.1 christos #if WITH_PROFILE_MODEL_P
3432 1.1 christos /* Record the fields for profiling. */
3433 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3434 1.1 christos {
3435 1.1 christos FLD (in_Rd) = f_operand2;
3436 1.1 christos FLD (in_Rs) = f_operand1;
3437 1.1 christos FLD (out_Rs) = f_operand1;
3438 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
3439 1.1 christos }
3440 1.1 christos #endif
3441 1.1 christos #undef FLD
3442 1.1 christos return idesc;
3443 1.1 christos }
3444 1.1 christos
3445 1.1 christos extract_sfmt_lapc_d:
3446 1.1 christos {
3447 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3448 1.1 christos CGEN_INSN_WORD insn = base_insn;
3449 1.1 christos #define FLD(f) abuf->fields.sfmt_lapc_d.f
3450 1.1 christos SI f_indir_pc__dword_pcrel;
3451 1.1 christos UINT f_operand2;
3452 1.1 christos /* Contents of trailing part of insn. */
3453 1.1 christos UINT word_1;
3454 1.1 christos
3455 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
3456 1.1 christos f_indir_pc__dword_pcrel = ((pc) + ((0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0))));
3457 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3458 1.1 christos
3459 1.1 christos /* Record the fields for the semantic handler. */
3460 1.1 christos FLD (f_operand2) = f_operand2;
3461 1.1 christos FLD (i_const32_pcrel) = f_indir_pc__dword_pcrel;
3462 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lapc_d", "f_operand2 0x%x", 'x', f_operand2, "const32_pcrel 0x%x", 'x', f_indir_pc__dword_pcrel, (char *) 0));
3463 1.1 christos
3464 1.1 christos #if WITH_PROFILE_MODEL_P
3465 1.1 christos /* Record the fields for profiling. */
3466 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3467 1.1 christos {
3468 1.1 christos FLD (out_Rd) = f_operand2;
3469 1.1 christos }
3470 1.1 christos #endif
3471 1.1 christos #undef FLD
3472 1.1 christos return idesc;
3473 1.1 christos }
3474 1.1 christos
3475 1.1 christos extract_sfmt_lapcq:
3476 1.1 christos {
3477 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3478 1.1 christos CGEN_INSN_WORD insn = base_insn;
3479 1.1 christos #define FLD(f) abuf->fields.sfmt_lapcq.f
3480 1.1 christos UINT f_operand2;
3481 1.1 christos SI f_qo;
3482 1.1 christos
3483 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3484 1.1 christos f_qo = ((pc) + (((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (1))));
3485 1.1 christos
3486 1.1 christos /* Record the fields for the semantic handler. */
3487 1.1 christos FLD (f_operand2) = f_operand2;
3488 1.1 christos FLD (i_qo) = f_qo;
3489 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lapcq", "f_operand2 0x%x", 'x', f_operand2, "qo 0x%x", 'x', f_qo, (char *) 0));
3490 1.1 christos
3491 1.1 christos #if WITH_PROFILE_MODEL_P
3492 1.1 christos /* Record the fields for profiling. */
3493 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3494 1.1 christos {
3495 1.1 christos FLD (out_Rd) = f_operand2;
3496 1.1 christos }
3497 1.1 christos #endif
3498 1.1 christos #undef FLD
3499 1.1 christos return idesc;
3500 1.1 christos }
3501 1.1 christos
3502 1.1 christos extract_sfmt_addi_b_r:
3503 1.1 christos {
3504 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3505 1.1 christos CGEN_INSN_WORD insn = base_insn;
3506 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
3507 1.1 christos UINT f_operand2;
3508 1.1 christos UINT f_operand1;
3509 1.1 christos
3510 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3511 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3512 1.1 christos
3513 1.1 christos /* Record the fields for the semantic handler. */
3514 1.1 christos FLD (f_operand2) = f_operand2;
3515 1.1 christos FLD (f_operand1) = f_operand1;
3516 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi_b_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
3517 1.1 christos
3518 1.1 christos #if WITH_PROFILE_MODEL_P
3519 1.1 christos /* Record the fields for profiling. */
3520 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3521 1.1 christos {
3522 1.1 christos FLD (in_Rd) = f_operand2;
3523 1.1 christos FLD (in_Rs) = f_operand1;
3524 1.1 christos FLD (out_Rs) = f_operand1;
3525 1.1 christos }
3526 1.1 christos #endif
3527 1.1 christos #undef FLD
3528 1.1 christos return idesc;
3529 1.1 christos }
3530 1.1 christos
3531 1.1 christos extract_sfmt_neg_b_r:
3532 1.1 christos {
3533 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3534 1.1 christos CGEN_INSN_WORD insn = base_insn;
3535 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
3536 1.1 christos UINT f_operand2;
3537 1.1 christos UINT f_operand1;
3538 1.1 christos
3539 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3540 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3541 1.1 christos
3542 1.1 christos /* Record the fields for the semantic handler. */
3543 1.1 christos FLD (f_operand1) = f_operand1;
3544 1.1 christos FLD (f_operand2) = f_operand2;
3545 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_neg_b_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
3546 1.1 christos
3547 1.1 christos #if WITH_PROFILE_MODEL_P
3548 1.1 christos /* Record the fields for profiling. */
3549 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3550 1.1 christos {
3551 1.1 christos FLD (in_Rs) = f_operand1;
3552 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
3553 1.1 christos }
3554 1.1 christos #endif
3555 1.1 christos #undef FLD
3556 1.1 christos return idesc;
3557 1.1 christos }
3558 1.1 christos
3559 1.1 christos extract_sfmt_neg_d_r:
3560 1.1 christos {
3561 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3562 1.1 christos CGEN_INSN_WORD insn = base_insn;
3563 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
3564 1.1 christos UINT f_operand2;
3565 1.1 christos UINT f_operand1;
3566 1.1 christos
3567 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3568 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3569 1.1 christos
3570 1.1 christos /* Record the fields for the semantic handler. */
3571 1.1 christos FLD (f_operand1) = f_operand1;
3572 1.1 christos FLD (f_operand2) = f_operand2;
3573 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_neg_d_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
3574 1.1 christos
3575 1.1 christos #if WITH_PROFILE_MODEL_P
3576 1.1 christos /* Record the fields for profiling. */
3577 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3578 1.1 christos {
3579 1.1 christos FLD (in_Rs) = f_operand1;
3580 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
3581 1.1 christos }
3582 1.1 christos #endif
3583 1.1 christos #undef FLD
3584 1.1 christos return idesc;
3585 1.1 christos }
3586 1.1 christos
3587 1.1 christos extract_sfmt_test_m_b_m:
3588 1.1 christos {
3589 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3590 1.1 christos CGEN_INSN_WORD insn = base_insn;
3591 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
3592 1.1 christos UINT f_memmode;
3593 1.1 christos UINT f_operand1;
3594 1.1 christos
3595 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3596 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3597 1.1 christos
3598 1.1 christos /* Record the fields for the semantic handler. */
3599 1.1 christos FLD (f_operand1) = f_operand1;
3600 1.1 christos FLD (f_memmode) = f_memmode;
3601 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_test_m_b_m", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3602 1.1 christos
3603 1.1 christos #if WITH_PROFILE_MODEL_P
3604 1.1 christos /* Record the fields for profiling. */
3605 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3606 1.1 christos {
3607 1.1 christos FLD (in_Rs) = f_operand1;
3608 1.1 christos FLD (out_Rs) = f_operand1;
3609 1.1 christos }
3610 1.1 christos #endif
3611 1.1 christos #undef FLD
3612 1.1 christos return idesc;
3613 1.1 christos }
3614 1.1 christos
3615 1.1 christos extract_sfmt_test_m_w_m:
3616 1.1 christos {
3617 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3618 1.1 christos CGEN_INSN_WORD insn = base_insn;
3619 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
3620 1.1 christos UINT f_memmode;
3621 1.1 christos UINT f_operand1;
3622 1.1 christos
3623 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3624 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3625 1.1 christos
3626 1.1 christos /* Record the fields for the semantic handler. */
3627 1.1 christos FLD (f_operand1) = f_operand1;
3628 1.1 christos FLD (f_memmode) = f_memmode;
3629 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_test_m_w_m", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3630 1.1 christos
3631 1.1 christos #if WITH_PROFILE_MODEL_P
3632 1.1 christos /* Record the fields for profiling. */
3633 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3634 1.1 christos {
3635 1.1 christos FLD (in_Rs) = f_operand1;
3636 1.1 christos FLD (out_Rs) = f_operand1;
3637 1.1 christos }
3638 1.1 christos #endif
3639 1.1 christos #undef FLD
3640 1.1 christos return idesc;
3641 1.1 christos }
3642 1.1 christos
3643 1.1 christos extract_sfmt_test_m_d_m:
3644 1.1 christos {
3645 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3646 1.1 christos CGEN_INSN_WORD insn = base_insn;
3647 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
3648 1.1 christos UINT f_memmode;
3649 1.1 christos UINT f_operand1;
3650 1.1 christos
3651 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3652 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3653 1.1 christos
3654 1.1 christos /* Record the fields for the semantic handler. */
3655 1.1 christos FLD (f_operand1) = f_operand1;
3656 1.1 christos FLD (f_memmode) = f_memmode;
3657 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_test_m_d_m", "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3658 1.1 christos
3659 1.1 christos #if WITH_PROFILE_MODEL_P
3660 1.1 christos /* Record the fields for profiling. */
3661 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3662 1.1 christos {
3663 1.1 christos FLD (in_Rs) = f_operand1;
3664 1.1 christos FLD (out_Rs) = f_operand1;
3665 1.1 christos }
3666 1.1 christos #endif
3667 1.1 christos #undef FLD
3668 1.1 christos return idesc;
3669 1.1 christos }
3670 1.1 christos
3671 1.1 christos extract_sfmt_move_r_m_b_m:
3672 1.1 christos {
3673 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3674 1.1 christos CGEN_INSN_WORD insn = base_insn;
3675 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
3676 1.1 christos UINT f_operand2;
3677 1.1 christos UINT f_memmode;
3678 1.1 christos UINT f_operand1;
3679 1.1 christos
3680 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3681 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3682 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3683 1.1 christos
3684 1.1 christos /* Record the fields for the semantic handler. */
3685 1.1 christos FLD (f_operand2) = f_operand2;
3686 1.1 christos FLD (f_operand1) = f_operand1;
3687 1.1 christos FLD (f_memmode) = f_memmode;
3688 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_r_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3689 1.1 christos
3690 1.1 christos #if WITH_PROFILE_MODEL_P
3691 1.1 christos /* Record the fields for profiling. */
3692 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3693 1.1 christos {
3694 1.1 christos FLD (in_Rd) = f_operand2;
3695 1.1 christos FLD (in_Rs) = f_operand1;
3696 1.1 christos FLD (out_Rs) = f_operand1;
3697 1.1 christos }
3698 1.1 christos #endif
3699 1.1 christos #undef FLD
3700 1.1 christos return idesc;
3701 1.1 christos }
3702 1.1 christos
3703 1.1 christos extract_sfmt_move_r_m_w_m:
3704 1.1 christos {
3705 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3706 1.1 christos CGEN_INSN_WORD insn = base_insn;
3707 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
3708 1.1 christos UINT f_operand2;
3709 1.1 christos UINT f_memmode;
3710 1.1 christos UINT f_operand1;
3711 1.1 christos
3712 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3713 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3714 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3715 1.1 christos
3716 1.1 christos /* Record the fields for the semantic handler. */
3717 1.1 christos FLD (f_operand2) = f_operand2;
3718 1.1 christos FLD (f_operand1) = f_operand1;
3719 1.1 christos FLD (f_memmode) = f_memmode;
3720 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_r_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3721 1.1 christos
3722 1.1 christos #if WITH_PROFILE_MODEL_P
3723 1.1 christos /* Record the fields for profiling. */
3724 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3725 1.1 christos {
3726 1.1 christos FLD (in_Rd) = f_operand2;
3727 1.1 christos FLD (in_Rs) = f_operand1;
3728 1.1 christos FLD (out_Rs) = f_operand1;
3729 1.1 christos }
3730 1.1 christos #endif
3731 1.1 christos #undef FLD
3732 1.1 christos return idesc;
3733 1.1 christos }
3734 1.1 christos
3735 1.1 christos extract_sfmt_move_r_m_d_m:
3736 1.1 christos {
3737 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3738 1.1 christos CGEN_INSN_WORD insn = base_insn;
3739 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
3740 1.1 christos UINT f_operand2;
3741 1.1 christos UINT f_memmode;
3742 1.1 christos UINT f_operand1;
3743 1.1 christos
3744 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3745 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3746 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3747 1.1 christos
3748 1.1 christos /* Record the fields for the semantic handler. */
3749 1.1 christos FLD (f_operand2) = f_operand2;
3750 1.1 christos FLD (f_operand1) = f_operand1;
3751 1.1 christos FLD (f_memmode) = f_memmode;
3752 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_move_r_m_d_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3753 1.1 christos
3754 1.1 christos #if WITH_PROFILE_MODEL_P
3755 1.1 christos /* Record the fields for profiling. */
3756 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3757 1.1 christos {
3758 1.1 christos FLD (in_Rd) = f_operand2;
3759 1.1 christos FLD (in_Rs) = f_operand1;
3760 1.1 christos FLD (out_Rs) = f_operand1;
3761 1.1 christos }
3762 1.1 christos #endif
3763 1.1 christos #undef FLD
3764 1.1 christos return idesc;
3765 1.1 christos }
3766 1.1 christos
3767 1.1 christos extract_sfmt_muls_b:
3768 1.1 christos {
3769 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3770 1.1 christos CGEN_INSN_WORD insn = base_insn;
3771 1.1 christos #define FLD(f) abuf->fields.sfmt_muls_b.f
3772 1.1 christos UINT f_operand2;
3773 1.1 christos UINT f_operand1;
3774 1.1 christos
3775 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3776 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3777 1.1 christos
3778 1.1 christos /* Record the fields for the semantic handler. */
3779 1.1 christos FLD (f_operand2) = f_operand2;
3780 1.1 christos FLD (f_operand1) = f_operand1;
3781 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_muls_b", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
3782 1.1 christos
3783 1.1 christos #if WITH_PROFILE_MODEL_P
3784 1.1 christos /* Record the fields for profiling. */
3785 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3786 1.1 christos {
3787 1.1 christos FLD (in_Rd) = f_operand2;
3788 1.1 christos FLD (in_Rs) = f_operand1;
3789 1.1 christos FLD (out_Rd) = f_operand2;
3790 1.1 christos FLD (out_h_sr_SI_7) = 7;
3791 1.1 christos }
3792 1.1 christos #endif
3793 1.1 christos #undef FLD
3794 1.1 christos return idesc;
3795 1.1 christos }
3796 1.1 christos
3797 1.1 christos extract_sfmt_mcp:
3798 1.1 christos {
3799 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3800 1.1 christos CGEN_INSN_WORD insn = base_insn;
3801 1.1 christos #define FLD(f) abuf->fields.sfmt_mcp.f
3802 1.1 christos UINT f_operand2;
3803 1.1 christos UINT f_operand1;
3804 1.1 christos
3805 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3806 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3807 1.1 christos
3808 1.1 christos /* Record the fields for the semantic handler. */
3809 1.1 christos FLD (f_operand2) = f_operand2;
3810 1.1 christos FLD (f_operand1) = f_operand1;
3811 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mcp", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
3812 1.1 christos
3813 1.1 christos #if WITH_PROFILE_MODEL_P
3814 1.1 christos /* Record the fields for profiling. */
3815 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3816 1.1 christos {
3817 1.1 christos FLD (in_Ps) = f_operand2;
3818 1.1 christos FLD (in_Rs) = f_operand1;
3819 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rs) = FLD (f_operand1);
3820 1.1 christos }
3821 1.1 christos #endif
3822 1.1 christos #undef FLD
3823 1.1 christos return idesc;
3824 1.1 christos }
3825 1.1 christos
3826 1.1 christos extract_sfmt_dstep:
3827 1.1 christos {
3828 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3829 1.1 christos CGEN_INSN_WORD insn = base_insn;
3830 1.1 christos #define FLD(f) abuf->fields.sfmt_muls_b.f
3831 1.1 christos UINT f_operand2;
3832 1.1 christos UINT f_operand1;
3833 1.1 christos
3834 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3835 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3836 1.1 christos
3837 1.1 christos /* Record the fields for the semantic handler. */
3838 1.1 christos FLD (f_operand2) = f_operand2;
3839 1.1 christos FLD (f_operand1) = f_operand1;
3840 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dstep", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
3841 1.1 christos
3842 1.1 christos #if WITH_PROFILE_MODEL_P
3843 1.1 christos /* Record the fields for profiling. */
3844 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3845 1.1 christos {
3846 1.1 christos FLD (in_Rd) = f_operand2;
3847 1.1 christos FLD (in_Rs) = f_operand1;
3848 1.1 christos FLD (out_Rd) = f_operand2;
3849 1.1 christos }
3850 1.1 christos #endif
3851 1.1 christos #undef FLD
3852 1.1 christos return idesc;
3853 1.1 christos }
3854 1.1 christos
3855 1.1 christos extract_sfmt_and_b_r:
3856 1.1 christos {
3857 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3858 1.1 christos CGEN_INSN_WORD insn = base_insn;
3859 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
3860 1.1 christos UINT f_operand2;
3861 1.1 christos UINT f_operand1;
3862 1.1 christos
3863 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3864 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3865 1.1 christos
3866 1.1 christos /* Record the fields for the semantic handler. */
3867 1.1 christos FLD (f_operand2) = f_operand2;
3868 1.1 christos FLD (f_operand1) = f_operand1;
3869 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and_b_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
3870 1.1 christos
3871 1.1 christos #if WITH_PROFILE_MODEL_P
3872 1.1 christos /* Record the fields for profiling. */
3873 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3874 1.1 christos {
3875 1.1 christos FLD (in_Rd) = f_operand2;
3876 1.1 christos FLD (in_Rs) = f_operand1;
3877 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
3878 1.1 christos }
3879 1.1 christos #endif
3880 1.1 christos #undef FLD
3881 1.1 christos return idesc;
3882 1.1 christos }
3883 1.1 christos
3884 1.1 christos extract_sfmt_and_d_r:
3885 1.1 christos {
3886 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3887 1.1 christos CGEN_INSN_WORD insn = base_insn;
3888 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
3889 1.1 christos UINT f_operand2;
3890 1.1 christos UINT f_operand1;
3891 1.1 christos
3892 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3893 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3894 1.1 christos
3895 1.1 christos /* Record the fields for the semantic handler. */
3896 1.1 christos FLD (f_operand2) = f_operand2;
3897 1.1 christos FLD (f_operand1) = f_operand1;
3898 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and_d_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
3899 1.1 christos
3900 1.1 christos #if WITH_PROFILE_MODEL_P
3901 1.1 christos /* Record the fields for profiling. */
3902 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3903 1.1 christos {
3904 1.1 christos FLD (in_Rd) = f_operand2;
3905 1.1 christos FLD (in_Rs) = f_operand1;
3906 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
3907 1.1 christos }
3908 1.1 christos #endif
3909 1.1 christos #undef FLD
3910 1.1 christos return idesc;
3911 1.1 christos }
3912 1.1 christos
3913 1.1 christos extract_sfmt_and_m_b_m:
3914 1.1 christos {
3915 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3916 1.1 christos CGEN_INSN_WORD insn = base_insn;
3917 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
3918 1.1 christos UINT f_operand2;
3919 1.1 christos UINT f_memmode;
3920 1.1 christos UINT f_operand1;
3921 1.1 christos
3922 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3923 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3924 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3925 1.1 christos
3926 1.1 christos /* Record the fields for the semantic handler. */
3927 1.1 christos FLD (f_operand2) = f_operand2;
3928 1.1 christos FLD (f_operand1) = f_operand1;
3929 1.1 christos FLD (f_memmode) = f_memmode;
3930 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3931 1.1 christos
3932 1.1 christos #if WITH_PROFILE_MODEL_P
3933 1.1 christos /* Record the fields for profiling. */
3934 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3935 1.1 christos {
3936 1.1 christos FLD (in_Rd) = f_operand2;
3937 1.1 christos FLD (in_Rs) = f_operand1;
3938 1.1 christos FLD (out_Rs) = f_operand1;
3939 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2)));
3940 1.1 christos }
3941 1.1 christos #endif
3942 1.1 christos #undef FLD
3943 1.1 christos return idesc;
3944 1.1 christos }
3945 1.1 christos
3946 1.1 christos extract_sfmt_and_m_w_m:
3947 1.1 christos {
3948 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3949 1.1 christos CGEN_INSN_WORD insn = base_insn;
3950 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
3951 1.1 christos UINT f_operand2;
3952 1.1 christos UINT f_memmode;
3953 1.1 christos UINT f_operand1;
3954 1.1 christos
3955 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3956 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3957 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3958 1.1 christos
3959 1.1 christos /* Record the fields for the semantic handler. */
3960 1.1 christos FLD (f_operand2) = f_operand2;
3961 1.1 christos FLD (f_operand1) = f_operand1;
3962 1.1 christos FLD (f_memmode) = f_memmode;
3963 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3964 1.1 christos
3965 1.1 christos #if WITH_PROFILE_MODEL_P
3966 1.1 christos /* Record the fields for profiling. */
3967 1.1 christos if (PROFILE_MODEL_P (current_cpu))
3968 1.1 christos {
3969 1.1 christos FLD (in_Rd) = f_operand2;
3970 1.1 christos FLD (in_Rs) = f_operand1;
3971 1.1 christos FLD (out_Rs) = f_operand1;
3972 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2)));
3973 1.1 christos }
3974 1.1 christos #endif
3975 1.1 christos #undef FLD
3976 1.1 christos return idesc;
3977 1.1 christos }
3978 1.1 christos
3979 1.1 christos extract_sfmt_and_m_d_m:
3980 1.1 christos {
3981 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
3982 1.1 christos CGEN_INSN_WORD insn = base_insn;
3983 1.1 christos #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
3984 1.1 christos UINT f_operand2;
3985 1.1 christos UINT f_memmode;
3986 1.1 christos UINT f_operand1;
3987 1.1 christos
3988 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
3989 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
3990 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
3991 1.1 christos
3992 1.1 christos /* Record the fields for the semantic handler. */
3993 1.1 christos FLD (f_operand2) = f_operand2;
3994 1.1 christos FLD (f_operand1) = f_operand1;
3995 1.1 christos FLD (f_memmode) = f_memmode;
3996 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and_m_d_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
3997 1.1 christos
3998 1.1 christos #if WITH_PROFILE_MODEL_P
3999 1.1 christos /* Record the fields for profiling. */
4000 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4001 1.1 christos {
4002 1.1 christos FLD (in_Rd) = f_operand2;
4003 1.1 christos FLD (in_Rs) = f_operand1;
4004 1.1 christos FLD (out_Rs) = f_operand1;
4005 1.1 christos FLD (out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd) = ((ANDIF (GET_H_INSN_PREFIXED_P (), (! (FLD (f_memmode))))) ? (FLD (f_operand1)) : (FLD (f_operand2)));
4006 1.1 christos }
4007 1.1 christos #endif
4008 1.1 christos #undef FLD
4009 1.1 christos return idesc;
4010 1.1 christos }
4011 1.1 christos
4012 1.1 christos extract_sfmt_andcbr:
4013 1.1 christos {
4014 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4015 1.1 christos CGEN_INSN_WORD insn = base_insn;
4016 1.1 christos #define FLD(f) abuf->fields.sfmt_addcbr.f
4017 1.1 christos INT f_indir_pc__byte;
4018 1.1 christos UINT f_operand2;
4019 1.1 christos /* Contents of trailing part of insn. */
4020 1.1 christos UINT word_1;
4021 1.1 christos
4022 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
4023 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
4024 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4025 1.1 christos
4026 1.1 christos /* Record the fields for the semantic handler. */
4027 1.1 christos FLD (f_operand2) = f_operand2;
4028 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte;
4029 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andcbr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0));
4030 1.1 christos
4031 1.1 christos #if WITH_PROFILE_MODEL_P
4032 1.1 christos /* Record the fields for profiling. */
4033 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4034 1.1 christos {
4035 1.1 christos FLD (in_Rd) = f_operand2;
4036 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
4037 1.1 christos }
4038 1.1 christos #endif
4039 1.1 christos #undef FLD
4040 1.1 christos return idesc;
4041 1.1 christos }
4042 1.1 christos
4043 1.1 christos extract_sfmt_andcwr:
4044 1.1 christos {
4045 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4046 1.1 christos CGEN_INSN_WORD insn = base_insn;
4047 1.1 christos #define FLD(f) abuf->fields.sfmt_addcwr.f
4048 1.1 christos INT f_indir_pc__word;
4049 1.1 christos UINT f_operand2;
4050 1.1 christos /* Contents of trailing part of insn. */
4051 1.1 christos UINT word_1;
4052 1.1 christos
4053 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
4054 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
4055 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4056 1.1 christos
4057 1.1 christos /* Record the fields for the semantic handler. */
4058 1.1 christos FLD (f_operand2) = f_operand2;
4059 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word;
4060 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andcwr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0));
4061 1.1 christos
4062 1.1 christos #if WITH_PROFILE_MODEL_P
4063 1.1 christos /* Record the fields for profiling. */
4064 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4065 1.1 christos {
4066 1.1 christos FLD (in_Rd) = f_operand2;
4067 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
4068 1.1 christos }
4069 1.1 christos #endif
4070 1.1 christos #undef FLD
4071 1.1 christos return idesc;
4072 1.1 christos }
4073 1.1 christos
4074 1.1 christos extract_sfmt_andcdr:
4075 1.1 christos {
4076 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4077 1.1 christos CGEN_INSN_WORD insn = base_insn;
4078 1.1 christos #define FLD(f) abuf->fields.sfmt_addcdr.f
4079 1.1 christos INT f_indir_pc__dword;
4080 1.1 christos UINT f_operand2;
4081 1.1 christos /* Contents of trailing part of insn. */
4082 1.1 christos UINT word_1;
4083 1.1 christos
4084 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
4085 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0));
4086 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4087 1.1 christos
4088 1.1 christos /* Record the fields for the semantic handler. */
4089 1.1 christos FLD (f_operand2) = f_operand2;
4090 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword;
4091 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andcdr", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0));
4092 1.1 christos
4093 1.1 christos #if WITH_PROFILE_MODEL_P
4094 1.1 christos /* Record the fields for profiling. */
4095 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4096 1.1 christos {
4097 1.1 christos FLD (in_Rd) = f_operand2;
4098 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
4099 1.1 christos }
4100 1.1 christos #endif
4101 1.1 christos #undef FLD
4102 1.1 christos return idesc;
4103 1.1 christos }
4104 1.1 christos
4105 1.1 christos extract_sfmt_andq:
4106 1.1 christos {
4107 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4108 1.1 christos CGEN_INSN_WORD insn = base_insn;
4109 1.1 christos #define FLD(f) abuf->fields.sfmt_andq.f
4110 1.1 christos UINT f_operand2;
4111 1.1 christos INT f_s6;
4112 1.1 christos
4113 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4114 1.1 christos f_s6 = EXTRACT_LSB0_SINT (insn, 16, 5, 6);
4115 1.1 christos
4116 1.1 christos /* Record the fields for the semantic handler. */
4117 1.1 christos FLD (f_operand2) = f_operand2;
4118 1.1 christos FLD (f_s6) = f_s6;
4119 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andq", "f_operand2 0x%x", 'x', f_operand2, "f_s6 0x%x", 'x', f_s6, (char *) 0));
4120 1.1 christos
4121 1.1 christos #if WITH_PROFILE_MODEL_P
4122 1.1 christos /* Record the fields for profiling. */
4123 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4124 1.1 christos {
4125 1.1 christos FLD (in_Rd) = f_operand2;
4126 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
4127 1.1 christos }
4128 1.1 christos #endif
4129 1.1 christos #undef FLD
4130 1.1 christos return idesc;
4131 1.1 christos }
4132 1.1 christos
4133 1.1 christos extract_sfmt_swap:
4134 1.1 christos {
4135 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4136 1.1 christos CGEN_INSN_WORD insn = base_insn;
4137 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
4138 1.1 christos UINT f_operand2;
4139 1.1 christos UINT f_operand1;
4140 1.1 christos
4141 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4142 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
4143 1.1 christos
4144 1.1 christos /* Record the fields for the semantic handler. */
4145 1.1 christos FLD (f_operand1) = f_operand1;
4146 1.1 christos FLD (f_operand2) = f_operand2;
4147 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_swap", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
4148 1.1 christos
4149 1.1 christos #if WITH_PROFILE_MODEL_P
4150 1.1 christos /* Record the fields for profiling. */
4151 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4152 1.1 christos {
4153 1.1 christos FLD (in_Rs) = f_operand1;
4154 1.1 christos FLD (out_Rs) = f_operand1;
4155 1.1 christos }
4156 1.1 christos #endif
4157 1.1 christos #undef FLD
4158 1.1 christos return idesc;
4159 1.1 christos }
4160 1.1 christos
4161 1.1 christos extract_sfmt_asrq:
4162 1.1 christos {
4163 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4164 1.1 christos CGEN_INSN_WORD insn = base_insn;
4165 1.1 christos #define FLD(f) abuf->fields.sfmt_asrq.f
4166 1.1 christos UINT f_operand2;
4167 1.1 christos UINT f_u5;
4168 1.1 christos
4169 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4170 1.1 christos f_u5 = EXTRACT_LSB0_UINT (insn, 16, 4, 5);
4171 1.1 christos
4172 1.1 christos /* Record the fields for the semantic handler. */
4173 1.1 christos FLD (f_operand2) = f_operand2;
4174 1.1 christos FLD (f_u5) = f_u5;
4175 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_asrq", "f_operand2 0x%x", 'x', f_operand2, "f_u5 0x%x", 'x', f_u5, (char *) 0));
4176 1.1 christos
4177 1.1 christos #if WITH_PROFILE_MODEL_P
4178 1.1 christos /* Record the fields for profiling. */
4179 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4180 1.1 christos {
4181 1.1 christos FLD (in_Rd) = f_operand2;
4182 1.1 christos FLD (out_Rd) = f_operand2;
4183 1.1 christos }
4184 1.1 christos #endif
4185 1.1 christos #undef FLD
4186 1.1 christos return idesc;
4187 1.1 christos }
4188 1.1 christos
4189 1.1 christos extract_sfmt_lsrr_b_r:
4190 1.1 christos {
4191 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4192 1.1 christos CGEN_INSN_WORD insn = base_insn;
4193 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
4194 1.1 christos UINT f_operand2;
4195 1.1 christos UINT f_operand1;
4196 1.1 christos
4197 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4198 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
4199 1.1 christos
4200 1.1 christos /* Record the fields for the semantic handler. */
4201 1.1 christos FLD (f_operand2) = f_operand2;
4202 1.1 christos FLD (f_operand1) = f_operand1;
4203 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lsrr_b_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
4204 1.1 christos
4205 1.1 christos #if WITH_PROFILE_MODEL_P
4206 1.1 christos /* Record the fields for profiling. */
4207 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4208 1.1 christos {
4209 1.1 christos FLD (in_Rd) = f_operand2;
4210 1.1 christos FLD (in_Rs) = f_operand1;
4211 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
4212 1.1 christos }
4213 1.1 christos #endif
4214 1.1 christos #undef FLD
4215 1.1 christos return idesc;
4216 1.1 christos }
4217 1.1 christos
4218 1.1 christos extract_sfmt_lsrr_d_r:
4219 1.1 christos {
4220 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4221 1.1 christos CGEN_INSN_WORD insn = base_insn;
4222 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
4223 1.1 christos UINT f_operand2;
4224 1.1 christos UINT f_operand1;
4225 1.1 christos
4226 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4227 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
4228 1.1 christos
4229 1.1 christos /* Record the fields for the semantic handler. */
4230 1.1 christos FLD (f_operand2) = f_operand2;
4231 1.1 christos FLD (f_operand1) = f_operand1;
4232 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lsrr_d_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
4233 1.1 christos
4234 1.1 christos #if WITH_PROFILE_MODEL_P
4235 1.1 christos /* Record the fields for profiling. */
4236 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4237 1.1 christos {
4238 1.1 christos FLD (in_Rd) = f_operand2;
4239 1.1 christos FLD (in_Rs) = f_operand1;
4240 1.1 christos FLD (out_h_gr_SI_index_of__INT_Rd) = FLD (f_operand2);
4241 1.1 christos }
4242 1.1 christos #endif
4243 1.1 christos #undef FLD
4244 1.1 christos return idesc;
4245 1.1 christos }
4246 1.1 christos
4247 1.1 christos extract_sfmt_btst:
4248 1.1 christos {
4249 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4250 1.1 christos CGEN_INSN_WORD insn = base_insn;
4251 1.1 christos #define FLD(f) abuf->fields.sfmt_muls_b.f
4252 1.1 christos UINT f_operand2;
4253 1.1 christos UINT f_operand1;
4254 1.1 christos
4255 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4256 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
4257 1.1 christos
4258 1.1 christos /* Record the fields for the semantic handler. */
4259 1.1 christos FLD (f_operand2) = f_operand2;
4260 1.1 christos FLD (f_operand1) = f_operand1;
4261 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_btst", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
4262 1.1 christos
4263 1.1 christos #if WITH_PROFILE_MODEL_P
4264 1.1 christos /* Record the fields for profiling. */
4265 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4266 1.1 christos {
4267 1.1 christos FLD (in_Rd) = f_operand2;
4268 1.1 christos FLD (in_Rs) = f_operand1;
4269 1.1 christos }
4270 1.1 christos #endif
4271 1.1 christos #undef FLD
4272 1.1 christos return idesc;
4273 1.1 christos }
4274 1.1 christos
4275 1.1 christos extract_sfmt_btstq:
4276 1.1 christos {
4277 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4278 1.1 christos CGEN_INSN_WORD insn = base_insn;
4279 1.1 christos #define FLD(f) abuf->fields.sfmt_asrq.f
4280 1.1 christos UINT f_operand2;
4281 1.1 christos UINT f_u5;
4282 1.1 christos
4283 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4284 1.1 christos f_u5 = EXTRACT_LSB0_UINT (insn, 16, 4, 5);
4285 1.1 christos
4286 1.1 christos /* Record the fields for the semantic handler. */
4287 1.1 christos FLD (f_operand2) = f_operand2;
4288 1.1 christos FLD (f_u5) = f_u5;
4289 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_btstq", "f_operand2 0x%x", 'x', f_operand2, "f_u5 0x%x", 'x', f_u5, (char *) 0));
4290 1.1 christos
4291 1.1 christos #if WITH_PROFILE_MODEL_P
4292 1.1 christos /* Record the fields for profiling. */
4293 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4294 1.1 christos {
4295 1.1 christos FLD (in_Rd) = f_operand2;
4296 1.1 christos }
4297 1.1 christos #endif
4298 1.1 christos #undef FLD
4299 1.1 christos return idesc;
4300 1.1 christos }
4301 1.1 christos
4302 1.1 christos extract_sfmt_setf:
4303 1.1 christos {
4304 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4305 1.1 christos CGEN_INSN_WORD insn = base_insn;
4306 1.1 christos #define FLD(f) abuf->fields.sfmt_setf.f
4307 1.1 christos UINT f_operand2;
4308 1.1 christos UINT f_operand1;
4309 1.1 christos UINT f_dstsrc;
4310 1.1 christos
4311 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4312 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
4313 1.1 christos f_dstsrc = ((((f_operand1) | (((f_operand2) << (4))))) & (255));
4314 1.1 christos
4315 1.1 christos /* Record the fields for the semantic handler. */
4316 1.1 christos FLD (f_dstsrc) = f_dstsrc;
4317 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_setf", "f_dstsrc 0x%x", 'x', f_dstsrc, (char *) 0));
4318 1.1 christos
4319 1.1 christos #undef FLD
4320 1.1 christos return idesc;
4321 1.1 christos }
4322 1.1 christos
4323 1.1 christos extract_sfmt_rfe:
4324 1.1 christos {
4325 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4326 1.1 christos #define FLD(f) abuf->fields.sfmt_rfe.f
4327 1.1 christos
4328 1.1 christos
4329 1.1 christos /* Record the fields for the semantic handler. */
4330 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_rfe", (char *) 0));
4331 1.1 christos
4332 1.1 christos #if WITH_PROFILE_MODEL_P
4333 1.1 christos /* Record the fields for profiling. */
4334 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4335 1.1 christos {
4336 1.1 christos FLD (in_h_sr_SI_13) = 13;
4337 1.1 christos FLD (out_h_sr_SI_13) = 13;
4338 1.1 christos }
4339 1.1 christos #endif
4340 1.1 christos #undef FLD
4341 1.1 christos return idesc;
4342 1.1 christos }
4343 1.1 christos
4344 1.1 christos extract_sfmt_sfe:
4345 1.1 christos {
4346 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4347 1.1 christos #define FLD(f) abuf->fields.sfmt_rfe.f
4348 1.1 christos
4349 1.1 christos
4350 1.1 christos /* Record the fields for the semantic handler. */
4351 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sfe", (char *) 0));
4352 1.1 christos
4353 1.1 christos #if WITH_PROFILE_MODEL_P
4354 1.1 christos /* Record the fields for profiling. */
4355 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4356 1.1 christos {
4357 1.1 christos FLD (in_h_sr_SI_13) = 13;
4358 1.1 christos FLD (out_h_sr_SI_13) = 13;
4359 1.1 christos }
4360 1.1 christos #endif
4361 1.1 christos #undef FLD
4362 1.1 christos return idesc;
4363 1.1 christos }
4364 1.1 christos
4365 1.1 christos extract_sfmt_rfg:
4366 1.1 christos {
4367 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4368 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f
4369 1.1 christos
4370 1.1 christos
4371 1.1 christos /* Record the fields for the semantic handler. */
4372 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_rfg", (char *) 0));
4373 1.1 christos
4374 1.1 christos #if WITH_PROFILE_MODEL_P
4375 1.1 christos /* Record the fields for profiling. */
4376 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4377 1.1 christos {
4378 1.1 christos }
4379 1.1 christos #endif
4380 1.1 christos #undef FLD
4381 1.1 christos return idesc;
4382 1.1 christos }
4383 1.1 christos
4384 1.1 christos extract_sfmt_rfn:
4385 1.1 christos {
4386 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4387 1.1 christos #define FLD(f) abuf->fields.sfmt_rfe.f
4388 1.1 christos
4389 1.1 christos
4390 1.1 christos /* Record the fields for the semantic handler. */
4391 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_rfn", (char *) 0));
4392 1.1 christos
4393 1.1 christos #if WITH_PROFILE_MODEL_P
4394 1.1 christos /* Record the fields for profiling. */
4395 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4396 1.1 christos {
4397 1.1 christos FLD (in_h_sr_SI_13) = 13;
4398 1.1 christos FLD (out_h_sr_SI_13) = 13;
4399 1.1 christos }
4400 1.1 christos #endif
4401 1.1 christos #undef FLD
4402 1.1 christos return idesc;
4403 1.1 christos }
4404 1.1 christos
4405 1.1 christos extract_sfmt_halt:
4406 1.1 christos {
4407 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4408 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f
4409 1.1 christos
4410 1.1 christos
4411 1.1 christos /* Record the fields for the semantic handler. */
4412 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_halt", (char *) 0));
4413 1.1 christos
4414 1.1 christos #if WITH_PROFILE_MODEL_P
4415 1.1 christos /* Record the fields for profiling. */
4416 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4417 1.1 christos {
4418 1.1 christos }
4419 1.1 christos #endif
4420 1.1 christos #undef FLD
4421 1.1 christos return idesc;
4422 1.1 christos }
4423 1.1 christos
4424 1.1 christos extract_sfmt_bcc_b:
4425 1.1 christos {
4426 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4427 1.1 christos CGEN_INSN_WORD insn = base_insn;
4428 1.1 christos #define FLD(f) abuf->fields.sfmt_bcc_b.f
4429 1.1 christos UINT f_operand2;
4430 1.1 christos UINT f_disp9_lo;
4431 1.1 christos INT f_disp9_hi;
4432 1.1 christos INT f_disp9;
4433 1.1 christos
4434 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4435 1.1 christos f_disp9_lo = EXTRACT_LSB0_UINT (insn, 16, 7, 7);
4436 1.1 christos f_disp9_hi = EXTRACT_LSB0_SINT (insn, 16, 0, 1);
4437 1.1 christos {
4438 1.1 christos SI tmp_abslo;
4439 1.1 christos SI tmp_absval;
4440 1.1 christos tmp_abslo = ((f_disp9_lo) << (1));
4441 1.1 christos tmp_absval = ((((((f_disp9_hi) != (0))) ? ((~ (255))) : (0))) | (tmp_abslo));
4442 1.1 christos f_disp9 = ((((pc) + (tmp_absval))) + (((GET_H_V32_V32 ()) ? (0) : (2))));
4443 1.1 christos }
4444 1.1 christos
4445 1.1 christos /* Record the fields for the semantic handler. */
4446 1.1 christos FLD (f_operand2) = f_operand2;
4447 1.1 christos FLD (i_o_pcrel) = f_disp9;
4448 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcc_b", "f_operand2 0x%x", 'x', f_operand2, "o_pcrel 0x%x", 'x', f_disp9, (char *) 0));
4449 1.1 christos
4450 1.1 christos #if WITH_PROFILE_MODEL_P
4451 1.1 christos /* Record the fields for profiling. */
4452 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4453 1.1 christos {
4454 1.1 christos }
4455 1.1 christos #endif
4456 1.1 christos #undef FLD
4457 1.1 christos return idesc;
4458 1.1 christos }
4459 1.1 christos
4460 1.1 christos extract_sfmt_ba_b:
4461 1.1 christos {
4462 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4463 1.1 christos CGEN_INSN_WORD insn = base_insn;
4464 1.1 christos #define FLD(f) abuf->fields.sfmt_bcc_b.f
4465 1.1 christos UINT f_disp9_lo;
4466 1.1 christos INT f_disp9_hi;
4467 1.1 christos INT f_disp9;
4468 1.1 christos
4469 1.1 christos f_disp9_lo = EXTRACT_LSB0_UINT (insn, 16, 7, 7);
4470 1.1 christos f_disp9_hi = EXTRACT_LSB0_SINT (insn, 16, 0, 1);
4471 1.1 christos {
4472 1.1 christos SI tmp_abslo;
4473 1.1 christos SI tmp_absval;
4474 1.1 christos tmp_abslo = ((f_disp9_lo) << (1));
4475 1.1 christos tmp_absval = ((((((f_disp9_hi) != (0))) ? ((~ (255))) : (0))) | (tmp_abslo));
4476 1.1 christos f_disp9 = ((((pc) + (tmp_absval))) + (((GET_H_V32_V32 ()) ? (0) : (2))));
4477 1.1 christos }
4478 1.1 christos
4479 1.1 christos /* Record the fields for the semantic handler. */
4480 1.1 christos FLD (i_o_pcrel) = f_disp9;
4481 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ba_b", "o_pcrel 0x%x", 'x', f_disp9, (char *) 0));
4482 1.1 christos
4483 1.1 christos #if WITH_PROFILE_MODEL_P
4484 1.1 christos /* Record the fields for profiling. */
4485 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4486 1.1 christos {
4487 1.1 christos }
4488 1.1 christos #endif
4489 1.1 christos #undef FLD
4490 1.1 christos return idesc;
4491 1.1 christos }
4492 1.1 christos
4493 1.1 christos extract_sfmt_bcc_w:
4494 1.1 christos {
4495 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4496 1.1 christos CGEN_INSN_WORD insn = base_insn;
4497 1.1 christos #define FLD(f) abuf->fields.sfmt_bcc_w.f
4498 1.1 christos SI f_indir_pc__word_pcrel;
4499 1.1 christos UINT f_operand2;
4500 1.1 christos /* Contents of trailing part of insn. */
4501 1.1 christos UINT word_1;
4502 1.1 christos
4503 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
4504 1.1 christos f_indir_pc__word_pcrel = ((EXTHISI (((HI) (UINT) ((0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)))))) + (((pc) + (((GET_H_V32_V32 ()) ? (0) : (4))))));
4505 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4506 1.1 christos
4507 1.1 christos /* Record the fields for the semantic handler. */
4508 1.1 christos FLD (f_operand2) = f_operand2;
4509 1.1 christos FLD (i_o_word_pcrel) = f_indir_pc__word_pcrel;
4510 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcc_w", "f_operand2 0x%x", 'x', f_operand2, "o_word_pcrel 0x%x", 'x', f_indir_pc__word_pcrel, (char *) 0));
4511 1.1 christos
4512 1.1 christos #if WITH_PROFILE_MODEL_P
4513 1.1 christos /* Record the fields for profiling. */
4514 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4515 1.1 christos {
4516 1.1 christos }
4517 1.1 christos #endif
4518 1.1 christos #undef FLD
4519 1.1 christos return idesc;
4520 1.1 christos }
4521 1.1 christos
4522 1.1 christos extract_sfmt_ba_w:
4523 1.1 christos {
4524 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4525 1.1 christos CGEN_INSN_WORD insn = base_insn;
4526 1.1 christos #define FLD(f) abuf->fields.sfmt_bcc_w.f
4527 1.1 christos SI f_indir_pc__word_pcrel;
4528 1.1 christos /* Contents of trailing part of insn. */
4529 1.1 christos UINT word_1;
4530 1.1 christos
4531 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
4532 1.1 christos f_indir_pc__word_pcrel = ((EXTHISI (((HI) (UINT) ((0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)))))) + (((pc) + (((GET_H_V32_V32 ()) ? (0) : (4))))));
4533 1.1 christos
4534 1.1 christos /* Record the fields for the semantic handler. */
4535 1.1 christos FLD (i_o_word_pcrel) = f_indir_pc__word_pcrel;
4536 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ba_w", "o_word_pcrel 0x%x", 'x', f_indir_pc__word_pcrel, (char *) 0));
4537 1.1 christos
4538 1.1 christos #if WITH_PROFILE_MODEL_P
4539 1.1 christos /* Record the fields for profiling. */
4540 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4541 1.1 christos {
4542 1.1 christos }
4543 1.1 christos #endif
4544 1.1 christos #undef FLD
4545 1.1 christos return idesc;
4546 1.1 christos }
4547 1.1 christos
4548 1.1 christos extract_sfmt_jas_r:
4549 1.1 christos {
4550 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4551 1.1 christos CGEN_INSN_WORD insn = base_insn;
4552 1.1 christos #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f
4553 1.1 christos UINT f_operand2;
4554 1.1 christos UINT f_operand1;
4555 1.1 christos
4556 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4557 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
4558 1.1 christos
4559 1.1 christos /* Record the fields for the semantic handler. */
4560 1.1 christos FLD (f_operand1) = f_operand1;
4561 1.1 christos FLD (f_operand2) = f_operand2;
4562 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jas_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
4563 1.1 christos
4564 1.1 christos #if WITH_PROFILE_MODEL_P
4565 1.1 christos /* Record the fields for profiling. */
4566 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4567 1.1 christos {
4568 1.1 christos FLD (in_Rs) = f_operand1;
4569 1.1 christos FLD (out_Pd) = f_operand2;
4570 1.1 christos }
4571 1.1 christos #endif
4572 1.1 christos #undef FLD
4573 1.1 christos return idesc;
4574 1.1 christos }
4575 1.1 christos
4576 1.1 christos extract_sfmt_jas_c:
4577 1.1 christos {
4578 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4579 1.1 christos CGEN_INSN_WORD insn = base_insn;
4580 1.1 christos #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p2.f
4581 1.1 christos INT f_indir_pc__dword;
4582 1.1 christos UINT f_operand2;
4583 1.1 christos /* Contents of trailing part of insn. */
4584 1.1 christos UINT word_1;
4585 1.1 christos
4586 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
4587 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0));
4588 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4589 1.1 christos
4590 1.1 christos /* Record the fields for the semantic handler. */
4591 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword;
4592 1.1 christos FLD (f_operand2) = f_operand2;
4593 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jas_c", "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
4594 1.1 christos
4595 1.1 christos #if WITH_PROFILE_MODEL_P
4596 1.1 christos /* Record the fields for profiling. */
4597 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4598 1.1 christos {
4599 1.1 christos FLD (out_Pd) = f_operand2;
4600 1.1 christos }
4601 1.1 christos #endif
4602 1.1 christos #undef FLD
4603 1.1 christos return idesc;
4604 1.1 christos }
4605 1.1 christos
4606 1.1 christos extract_sfmt_jump_p:
4607 1.1 christos {
4608 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4609 1.1 christos CGEN_INSN_WORD insn = base_insn;
4610 1.1 christos #define FLD(f) abuf->fields.sfmt_mcp.f
4611 1.1 christos UINT f_operand2;
4612 1.1 christos
4613 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4614 1.1 christos
4615 1.1 christos /* Record the fields for the semantic handler. */
4616 1.1 christos FLD (f_operand2) = f_operand2;
4617 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jump_p", "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
4618 1.1 christos
4619 1.1 christos #if WITH_PROFILE_MODEL_P
4620 1.1 christos /* Record the fields for profiling. */
4621 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4622 1.1 christos {
4623 1.1 christos FLD (in_Ps) = f_operand2;
4624 1.1 christos }
4625 1.1 christos #endif
4626 1.1 christos #undef FLD
4627 1.1 christos return idesc;
4628 1.1 christos }
4629 1.1 christos
4630 1.1 christos extract_sfmt_bas_c:
4631 1.1 christos {
4632 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4633 1.1 christos CGEN_INSN_WORD insn = base_insn;
4634 1.1 christos #define FLD(f) abuf->fields.sfmt_bas_c.f
4635 1.1 christos SI f_indir_pc__dword_pcrel;
4636 1.1 christos UINT f_operand2;
4637 1.1 christos /* Contents of trailing part of insn. */
4638 1.1 christos UINT word_1;
4639 1.1 christos
4640 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
4641 1.1 christos f_indir_pc__dword_pcrel = ((pc) + ((0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0))));
4642 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4643 1.1 christos
4644 1.1 christos /* Record the fields for the semantic handler. */
4645 1.1 christos FLD (f_operand2) = f_operand2;
4646 1.1 christos FLD (i_const32_pcrel) = f_indir_pc__dword_pcrel;
4647 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bas_c", "f_operand2 0x%x", 'x', f_operand2, "const32_pcrel 0x%x", 'x', f_indir_pc__dword_pcrel, (char *) 0));
4648 1.1 christos
4649 1.1 christos #if WITH_PROFILE_MODEL_P
4650 1.1 christos /* Record the fields for profiling. */
4651 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4652 1.1 christos {
4653 1.1 christos FLD (out_Pd) = f_operand2;
4654 1.1 christos }
4655 1.1 christos #endif
4656 1.1 christos #undef FLD
4657 1.1 christos return idesc;
4658 1.1 christos }
4659 1.1 christos
4660 1.1 christos extract_sfmt_jasc_r:
4661 1.1 christos {
4662 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4663 1.1 christos CGEN_INSN_WORD insn = base_insn;
4664 1.1 christos #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f
4665 1.1 christos UINT f_operand2;
4666 1.1 christos UINT f_operand1;
4667 1.1 christos
4668 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4669 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
4670 1.1 christos
4671 1.1 christos /* Record the fields for the semantic handler. */
4672 1.1 christos FLD (f_operand1) = f_operand1;
4673 1.1 christos FLD (f_operand2) = f_operand2;
4674 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jasc_r", "f_operand1 0x%x", 'x', f_operand1, "f_operand2 0x%x", 'x', f_operand2, (char *) 0));
4675 1.1 christos
4676 1.1 christos #if WITH_PROFILE_MODEL_P
4677 1.1 christos /* Record the fields for profiling. */
4678 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4679 1.1 christos {
4680 1.1 christos FLD (in_Rs) = f_operand1;
4681 1.1 christos FLD (out_Pd) = f_operand2;
4682 1.1 christos }
4683 1.1 christos #endif
4684 1.1 christos #undef FLD
4685 1.1 christos return idesc;
4686 1.1 christos }
4687 1.1 christos
4688 1.1 christos extract_sfmt_break:
4689 1.1 christos {
4690 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4691 1.1 christos CGEN_INSN_WORD insn = base_insn;
4692 1.1 christos #define FLD(f) abuf->fields.sfmt_break.f
4693 1.1 christos UINT f_u4;
4694 1.1 christos
4695 1.1 christos f_u4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
4696 1.1 christos
4697 1.1 christos /* Record the fields for the semantic handler. */
4698 1.1 christos FLD (f_u4) = f_u4;
4699 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_break", "f_u4 0x%x", 'x', f_u4, (char *) 0));
4700 1.1 christos
4701 1.1 christos #if WITH_PROFILE_MODEL_P
4702 1.1 christos /* Record the fields for profiling. */
4703 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4704 1.1 christos {
4705 1.1 christos }
4706 1.1 christos #endif
4707 1.1 christos #undef FLD
4708 1.1 christos return idesc;
4709 1.1 christos }
4710 1.1 christos
4711 1.1 christos extract_sfmt_bound_cb:
4712 1.1 christos {
4713 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4714 1.1 christos CGEN_INSN_WORD insn = base_insn;
4715 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cb.f
4716 1.1 christos INT f_indir_pc__byte;
4717 1.1 christos UINT f_operand2;
4718 1.1 christos /* Contents of trailing part of insn. */
4719 1.1 christos UINT word_1;
4720 1.1 christos
4721 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
4722 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
4723 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4724 1.1 christos
4725 1.1 christos /* Record the fields for the semantic handler. */
4726 1.1 christos FLD (f_operand2) = f_operand2;
4727 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte;
4728 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bound_cb", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0));
4729 1.1 christos
4730 1.1 christos #if WITH_PROFILE_MODEL_P
4731 1.1 christos /* Record the fields for profiling. */
4732 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4733 1.1 christos {
4734 1.1 christos FLD (in_Rd) = f_operand2;
4735 1.1 christos FLD (out_Rd) = f_operand2;
4736 1.1 christos }
4737 1.1 christos #endif
4738 1.1 christos #undef FLD
4739 1.1 christos return idesc;
4740 1.1 christos }
4741 1.1 christos
4742 1.1 christos extract_sfmt_bound_cw:
4743 1.1 christos {
4744 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4745 1.1 christos CGEN_INSN_WORD insn = base_insn;
4746 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cw.f
4747 1.1 christos INT f_indir_pc__word;
4748 1.1 christos UINT f_operand2;
4749 1.1 christos /* Contents of trailing part of insn. */
4750 1.1 christos UINT word_1;
4751 1.1 christos
4752 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
4753 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
4754 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4755 1.1 christos
4756 1.1 christos /* Record the fields for the semantic handler. */
4757 1.1 christos FLD (f_operand2) = f_operand2;
4758 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word;
4759 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bound_cw", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0));
4760 1.1 christos
4761 1.1 christos #if WITH_PROFILE_MODEL_P
4762 1.1 christos /* Record the fields for profiling. */
4763 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4764 1.1 christos {
4765 1.1 christos FLD (in_Rd) = f_operand2;
4766 1.1 christos FLD (out_Rd) = f_operand2;
4767 1.1 christos }
4768 1.1 christos #endif
4769 1.1 christos #undef FLD
4770 1.1 christos return idesc;
4771 1.1 christos }
4772 1.1 christos
4773 1.1 christos extract_sfmt_bound_cd:
4774 1.1 christos {
4775 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4776 1.1 christos CGEN_INSN_WORD insn = base_insn;
4777 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cd.f
4778 1.1 christos INT f_indir_pc__dword;
4779 1.1 christos UINT f_operand2;
4780 1.1 christos /* Contents of trailing part of insn. */
4781 1.1 christos UINT word_1;
4782 1.1 christos
4783 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
4784 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0));
4785 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4786 1.1 christos
4787 1.1 christos /* Record the fields for the semantic handler. */
4788 1.1 christos FLD (f_operand2) = f_operand2;
4789 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword;
4790 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bound_cd", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0));
4791 1.1 christos
4792 1.1 christos #if WITH_PROFILE_MODEL_P
4793 1.1 christos /* Record the fields for profiling. */
4794 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4795 1.1 christos {
4796 1.1 christos FLD (in_Rd) = f_operand2;
4797 1.1 christos FLD (out_Rd) = f_operand2;
4798 1.1 christos }
4799 1.1 christos #endif
4800 1.1 christos #undef FLD
4801 1.1 christos return idesc;
4802 1.1 christos }
4803 1.1 christos
4804 1.1 christos extract_sfmt_scc:
4805 1.1 christos {
4806 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4807 1.1 christos CGEN_INSN_WORD insn = base_insn;
4808 1.1 christos #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f
4809 1.1 christos UINT f_operand2;
4810 1.1 christos UINT f_operand1;
4811 1.1 christos
4812 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4813 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
4814 1.1 christos
4815 1.1 christos /* Record the fields for the semantic handler. */
4816 1.1 christos FLD (f_operand2) = f_operand2;
4817 1.1 christos FLD (f_operand1) = f_operand1;
4818 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_scc", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
4819 1.1 christos
4820 1.1 christos #if WITH_PROFILE_MODEL_P
4821 1.1 christos /* Record the fields for profiling. */
4822 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4823 1.1 christos {
4824 1.1 christos FLD (out_Rs) = f_operand1;
4825 1.1 christos }
4826 1.1 christos #endif
4827 1.1 christos #undef FLD
4828 1.1 christos return idesc;
4829 1.1 christos }
4830 1.1 christos
4831 1.1 christos extract_sfmt_addoq:
4832 1.1 christos {
4833 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4834 1.1 christos CGEN_INSN_WORD insn = base_insn;
4835 1.1 christos #define FLD(f) abuf->fields.sfmt_addoq.f
4836 1.1 christos UINT f_operand2;
4837 1.1 christos INT f_s8;
4838 1.1 christos
4839 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4840 1.1 christos f_s8 = EXTRACT_LSB0_SINT (insn, 16, 7, 8);
4841 1.1 christos
4842 1.1 christos /* Record the fields for the semantic handler. */
4843 1.1 christos FLD (f_operand2) = f_operand2;
4844 1.1 christos FLD (f_s8) = f_s8;
4845 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addoq", "f_operand2 0x%x", 'x', f_operand2, "f_s8 0x%x", 'x', f_s8, (char *) 0));
4846 1.1 christos
4847 1.1 christos #if WITH_PROFILE_MODEL_P
4848 1.1 christos /* Record the fields for profiling. */
4849 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4850 1.1 christos {
4851 1.1 christos FLD (in_Rd) = f_operand2;
4852 1.1 christos }
4853 1.1 christos #endif
4854 1.1 christos #undef FLD
4855 1.1 christos return idesc;
4856 1.1 christos }
4857 1.1 christos
4858 1.1 christos extract_sfmt_addo_m_b_m:
4859 1.1 christos {
4860 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4861 1.1 christos CGEN_INSN_WORD insn = base_insn;
4862 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
4863 1.1 christos UINT f_operand2;
4864 1.1 christos UINT f_memmode;
4865 1.1 christos UINT f_operand1;
4866 1.1 christos
4867 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4868 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
4869 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
4870 1.1 christos
4871 1.1 christos /* Record the fields for the semantic handler. */
4872 1.1 christos FLD (f_operand2) = f_operand2;
4873 1.1 christos FLD (f_operand1) = f_operand1;
4874 1.1 christos FLD (f_memmode) = f_memmode;
4875 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addo_m_b_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
4876 1.1 christos
4877 1.1 christos #if WITH_PROFILE_MODEL_P
4878 1.1 christos /* Record the fields for profiling. */
4879 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4880 1.1 christos {
4881 1.1 christos FLD (in_Rd) = f_operand2;
4882 1.1 christos FLD (in_Rs) = f_operand1;
4883 1.1 christos FLD (out_Rs) = f_operand1;
4884 1.1 christos }
4885 1.1 christos #endif
4886 1.1 christos #undef FLD
4887 1.1 christos return idesc;
4888 1.1 christos }
4889 1.1 christos
4890 1.1 christos extract_sfmt_addo_m_w_m:
4891 1.1 christos {
4892 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4893 1.1 christos CGEN_INSN_WORD insn = base_insn;
4894 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
4895 1.1 christos UINT f_operand2;
4896 1.1 christos UINT f_memmode;
4897 1.1 christos UINT f_operand1;
4898 1.1 christos
4899 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4900 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
4901 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
4902 1.1 christos
4903 1.1 christos /* Record the fields for the semantic handler. */
4904 1.1 christos FLD (f_operand2) = f_operand2;
4905 1.1 christos FLD (f_operand1) = f_operand1;
4906 1.1 christos FLD (f_memmode) = f_memmode;
4907 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addo_m_w_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
4908 1.1 christos
4909 1.1 christos #if WITH_PROFILE_MODEL_P
4910 1.1 christos /* Record the fields for profiling. */
4911 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4912 1.1 christos {
4913 1.1 christos FLD (in_Rd) = f_operand2;
4914 1.1 christos FLD (in_Rs) = f_operand1;
4915 1.1 christos FLD (out_Rs) = f_operand1;
4916 1.1 christos }
4917 1.1 christos #endif
4918 1.1 christos #undef FLD
4919 1.1 christos return idesc;
4920 1.1 christos }
4921 1.1 christos
4922 1.1 christos extract_sfmt_addo_m_d_m:
4923 1.1 christos {
4924 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4925 1.1 christos CGEN_INSN_WORD insn = base_insn;
4926 1.1 christos #define FLD(f) abuf->fields.sfmt_addc_m.f
4927 1.1 christos UINT f_operand2;
4928 1.1 christos UINT f_memmode;
4929 1.1 christos UINT f_operand1;
4930 1.1 christos
4931 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4932 1.1 christos f_memmode = EXTRACT_LSB0_UINT (insn, 16, 10, 1);
4933 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
4934 1.1 christos
4935 1.1 christos /* Record the fields for the semantic handler. */
4936 1.1 christos FLD (f_operand2) = f_operand2;
4937 1.1 christos FLD (f_operand1) = f_operand1;
4938 1.1 christos FLD (f_memmode) = f_memmode;
4939 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addo_m_d_m", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, "f_memmode 0x%x", 'x', f_memmode, (char *) 0));
4940 1.1 christos
4941 1.1 christos #if WITH_PROFILE_MODEL_P
4942 1.1 christos /* Record the fields for profiling. */
4943 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4944 1.1 christos {
4945 1.1 christos FLD (in_Rd) = f_operand2;
4946 1.1 christos FLD (in_Rs) = f_operand1;
4947 1.1 christos FLD (out_Rs) = f_operand1;
4948 1.1 christos }
4949 1.1 christos #endif
4950 1.1 christos #undef FLD
4951 1.1 christos return idesc;
4952 1.1 christos }
4953 1.1 christos
4954 1.1 christos extract_sfmt_addo_cb:
4955 1.1 christos {
4956 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4957 1.1 christos CGEN_INSN_WORD insn = base_insn;
4958 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cb.f
4959 1.1 christos INT f_indir_pc__byte;
4960 1.1 christos UINT f_operand2;
4961 1.1 christos /* Contents of trailing part of insn. */
4962 1.1 christos UINT word_1;
4963 1.1 christos
4964 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
4965 1.1 christos f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
4966 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4967 1.1 christos
4968 1.1 christos /* Record the fields for the semantic handler. */
4969 1.1 christos FLD (f_operand2) = f_operand2;
4970 1.1 christos FLD (f_indir_pc__byte) = f_indir_pc__byte;
4971 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addo_cb", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__byte 0x%x", 'x', f_indir_pc__byte, (char *) 0));
4972 1.1 christos
4973 1.1 christos #if WITH_PROFILE_MODEL_P
4974 1.1 christos /* Record the fields for profiling. */
4975 1.1 christos if (PROFILE_MODEL_P (current_cpu))
4976 1.1 christos {
4977 1.1 christos FLD (in_Rd) = f_operand2;
4978 1.1 christos }
4979 1.1 christos #endif
4980 1.1 christos #undef FLD
4981 1.1 christos return idesc;
4982 1.1 christos }
4983 1.1 christos
4984 1.1 christos extract_sfmt_addo_cw:
4985 1.1 christos {
4986 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
4987 1.1 christos CGEN_INSN_WORD insn = base_insn;
4988 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cw.f
4989 1.1 christos INT f_indir_pc__word;
4990 1.1 christos UINT f_operand2;
4991 1.1 christos /* Contents of trailing part of insn. */
4992 1.1 christos UINT word_1;
4993 1.1 christos
4994 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
4995 1.1 christos f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0));
4996 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
4997 1.1 christos
4998 1.1 christos /* Record the fields for the semantic handler. */
4999 1.1 christos FLD (f_operand2) = f_operand2;
5000 1.1 christos FLD (f_indir_pc__word) = f_indir_pc__word;
5001 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addo_cw", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__word 0x%x", 'x', f_indir_pc__word, (char *) 0));
5002 1.1 christos
5003 1.1 christos #if WITH_PROFILE_MODEL_P
5004 1.1 christos /* Record the fields for profiling. */
5005 1.1 christos if (PROFILE_MODEL_P (current_cpu))
5006 1.1 christos {
5007 1.1 christos FLD (in_Rd) = f_operand2;
5008 1.1 christos }
5009 1.1 christos #endif
5010 1.1 christos #undef FLD
5011 1.1 christos return idesc;
5012 1.1 christos }
5013 1.1 christos
5014 1.1 christos extract_sfmt_addo_cd:
5015 1.1 christos {
5016 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
5017 1.1 christos CGEN_INSN_WORD insn = base_insn;
5018 1.1 christos #define FLD(f) abuf->fields.sfmt_bound_cd.f
5019 1.1 christos INT f_indir_pc__dword;
5020 1.1 christos UINT f_operand2;
5021 1.1 christos /* Contents of trailing part of insn. */
5022 1.1 christos UINT word_1;
5023 1.1 christos
5024 1.1 christos word_1 = GETIMEMUSI (current_cpu, pc + 2);
5025 1.1 christos f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0));
5026 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
5027 1.1 christos
5028 1.1 christos /* Record the fields for the semantic handler. */
5029 1.1 christos FLD (f_operand2) = f_operand2;
5030 1.1 christos FLD (f_indir_pc__dword) = f_indir_pc__dword;
5031 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addo_cd", "f_operand2 0x%x", 'x', f_operand2, "f_indir_pc__dword 0x%x", 'x', f_indir_pc__dword, (char *) 0));
5032 1.1 christos
5033 1.1 christos #if WITH_PROFILE_MODEL_P
5034 1.1 christos /* Record the fields for profiling. */
5035 1.1 christos if (PROFILE_MODEL_P (current_cpu))
5036 1.1 christos {
5037 1.1 christos FLD (in_Rd) = f_operand2;
5038 1.1 christos }
5039 1.1 christos #endif
5040 1.1 christos #undef FLD
5041 1.1 christos return idesc;
5042 1.1 christos }
5043 1.1 christos
5044 1.1 christos extract_sfmt_addi_acr_b_r:
5045 1.1 christos {
5046 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
5047 1.1 christos CGEN_INSN_WORD insn = base_insn;
5048 1.1 christos #define FLD(f) abuf->fields.sfmt_muls_b.f
5049 1.1 christos UINT f_operand2;
5050 1.1 christos UINT f_operand1;
5051 1.1 christos
5052 1.1 christos f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4);
5053 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
5054 1.1 christos
5055 1.1 christos /* Record the fields for the semantic handler. */
5056 1.1 christos FLD (f_operand2) = f_operand2;
5057 1.1 christos FLD (f_operand1) = f_operand1;
5058 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi_acr_b_r", "f_operand2 0x%x", 'x', f_operand2, "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
5059 1.1 christos
5060 1.1 christos #if WITH_PROFILE_MODEL_P
5061 1.1 christos /* Record the fields for profiling. */
5062 1.1 christos if (PROFILE_MODEL_P (current_cpu))
5063 1.1 christos {
5064 1.1 christos FLD (in_Rd) = f_operand2;
5065 1.1 christos FLD (in_Rs) = f_operand1;
5066 1.1 christos }
5067 1.1 christos #endif
5068 1.1 christos #undef FLD
5069 1.1 christos return idesc;
5070 1.1 christos }
5071 1.1 christos
5072 1.1 christos extract_sfmt_fidxi:
5073 1.1 christos {
5074 1.1 christos const IDESC *idesc = &crisv32f_insn_data[itype];
5075 1.1 christos CGEN_INSN_WORD insn = base_insn;
5076 1.1 christos #define FLD(f) abuf->fields.sfmt_mcp.f
5077 1.1 christos UINT f_operand1;
5078 1.1 christos
5079 1.1 christos f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4);
5080 1.1 christos
5081 1.1 christos /* Record the fields for the semantic handler. */
5082 1.1 christos FLD (f_operand1) = f_operand1;
5083 1.5 christos CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_fidxi", "f_operand1 0x%x", 'x', f_operand1, (char *) 0));
5084 1.1 christos
5085 1.1 christos #if WITH_PROFILE_MODEL_P
5086 1.1 christos /* Record the fields for profiling. */
5087 1.1 christos if (PROFILE_MODEL_P (current_cpu))
5088 1.1 christos {
5089 1.1 christos FLD (in_Rs) = f_operand1;
5090 1.1 christos }
5091 1.1 christos #endif
5092 1.1 christos #undef FLD
5093 1.1 christos return idesc;
5094 1.1 christos }
5095 1.1 christos
5096 1.1 christos }
5097