1 /* Simulator instruction decoder for bpfbf_ebpfle.
2
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
4
5 Copyright (C) 1996-2020 Free Software Foundation, Inc.
6
7 This file is part of the GNU simulators.
8
9 This file is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
12 any later version.
13
14 It is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
18
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
22
23 */
24
25 #define WANT_CPU bpfbf
26 #define WANT_CPU_BPFBF
27
28 #include "sim-main.h"
29 #include "sim-assert.h"
30
31 /* The instruction descriptor array.
32 This is computed at runtime. Space for it is not malloc'd to save a
33 teensy bit of cpu in the decoder. Moving it to malloc space is trivial
34 but won't be done until necessary (we don't currently support the runtime
35 addition of instructions nor an SMP machine with different cpus). */
36 static IDESC bpfbf_ebpfle_insn_data[BPFBF_EBPFLE_INSN__MAX];
37
38 /* Commas between elements are contained in the macros.
39 Some of these are conditionally compiled out. */
40
41 static const struct insn_sem bpfbf_ebpfle_insn_sem[] =
42 {
43 { VIRTUAL_INSN_X_INVALID, BPFBF_EBPFLE_INSN_X_INVALID, BPFBF_EBPFLE_SFMT_EMPTY },
44 { VIRTUAL_INSN_X_AFTER, BPFBF_EBPFLE_INSN_X_AFTER, BPFBF_EBPFLE_SFMT_EMPTY },
45 { VIRTUAL_INSN_X_BEFORE, BPFBF_EBPFLE_INSN_X_BEFORE, BPFBF_EBPFLE_SFMT_EMPTY },
46 { VIRTUAL_INSN_X_CTI_CHAIN, BPFBF_EBPFLE_INSN_X_CTI_CHAIN, BPFBF_EBPFLE_SFMT_EMPTY },
47 { VIRTUAL_INSN_X_CHAIN, BPFBF_EBPFLE_INSN_X_CHAIN, BPFBF_EBPFLE_SFMT_EMPTY },
48 { VIRTUAL_INSN_X_BEGIN, BPFBF_EBPFLE_INSN_X_BEGIN, BPFBF_EBPFLE_SFMT_EMPTY },
49 { BPF_INSN_ADDILE, BPFBF_EBPFLE_INSN_ADDILE, BPFBF_EBPFLE_SFMT_ADDILE },
50 { BPF_INSN_ADDRLE, BPFBF_EBPFLE_INSN_ADDRLE, BPFBF_EBPFLE_SFMT_ADDRLE },
51 { BPF_INSN_ADD32ILE, BPFBF_EBPFLE_INSN_ADD32ILE, BPFBF_EBPFLE_SFMT_ADDILE },
52 { BPF_INSN_ADD32RLE, BPFBF_EBPFLE_INSN_ADD32RLE, BPFBF_EBPFLE_SFMT_ADDRLE },
53 { BPF_INSN_SUBILE, BPFBF_EBPFLE_INSN_SUBILE, BPFBF_EBPFLE_SFMT_ADDILE },
54 { BPF_INSN_SUBRLE, BPFBF_EBPFLE_INSN_SUBRLE, BPFBF_EBPFLE_SFMT_ADDRLE },
55 { BPF_INSN_SUB32ILE, BPFBF_EBPFLE_INSN_SUB32ILE, BPFBF_EBPFLE_SFMT_ADDILE },
56 { BPF_INSN_SUB32RLE, BPFBF_EBPFLE_INSN_SUB32RLE, BPFBF_EBPFLE_SFMT_ADDRLE },
57 { BPF_INSN_MULILE, BPFBF_EBPFLE_INSN_MULILE, BPFBF_EBPFLE_SFMT_ADDILE },
58 { BPF_INSN_MULRLE, BPFBF_EBPFLE_INSN_MULRLE, BPFBF_EBPFLE_SFMT_ADDRLE },
59 { BPF_INSN_MUL32ILE, BPFBF_EBPFLE_INSN_MUL32ILE, BPFBF_EBPFLE_SFMT_ADDILE },
60 { BPF_INSN_MUL32RLE, BPFBF_EBPFLE_INSN_MUL32RLE, BPFBF_EBPFLE_SFMT_ADDRLE },
61 { BPF_INSN_DIVILE, BPFBF_EBPFLE_INSN_DIVILE, BPFBF_EBPFLE_SFMT_ADDILE },
62 { BPF_INSN_DIVRLE, BPFBF_EBPFLE_INSN_DIVRLE, BPFBF_EBPFLE_SFMT_ADDRLE },
63 { BPF_INSN_DIV32ILE, BPFBF_EBPFLE_INSN_DIV32ILE, BPFBF_EBPFLE_SFMT_ADDILE },
64 { BPF_INSN_DIV32RLE, BPFBF_EBPFLE_INSN_DIV32RLE, BPFBF_EBPFLE_SFMT_ADDRLE },
65 { BPF_INSN_ORILE, BPFBF_EBPFLE_INSN_ORILE, BPFBF_EBPFLE_SFMT_ADDILE },
66 { BPF_INSN_ORRLE, BPFBF_EBPFLE_INSN_ORRLE, BPFBF_EBPFLE_SFMT_ADDRLE },
67 { BPF_INSN_OR32ILE, BPFBF_EBPFLE_INSN_OR32ILE, BPFBF_EBPFLE_SFMT_ADDILE },
68 { BPF_INSN_OR32RLE, BPFBF_EBPFLE_INSN_OR32RLE, BPFBF_EBPFLE_SFMT_ADDRLE },
69 { BPF_INSN_ANDILE, BPFBF_EBPFLE_INSN_ANDILE, BPFBF_EBPFLE_SFMT_ADDILE },
70 { BPF_INSN_ANDRLE, BPFBF_EBPFLE_INSN_ANDRLE, BPFBF_EBPFLE_SFMT_ADDRLE },
71 { BPF_INSN_AND32ILE, BPFBF_EBPFLE_INSN_AND32ILE, BPFBF_EBPFLE_SFMT_ADDILE },
72 { BPF_INSN_AND32RLE, BPFBF_EBPFLE_INSN_AND32RLE, BPFBF_EBPFLE_SFMT_ADDRLE },
73 { BPF_INSN_LSHILE, BPFBF_EBPFLE_INSN_LSHILE, BPFBF_EBPFLE_SFMT_ADDILE },
74 { BPF_INSN_LSHRLE, BPFBF_EBPFLE_INSN_LSHRLE, BPFBF_EBPFLE_SFMT_ADDRLE },
75 { BPF_INSN_LSH32ILE, BPFBF_EBPFLE_INSN_LSH32ILE, BPFBF_EBPFLE_SFMT_ADDILE },
76 { BPF_INSN_LSH32RLE, BPFBF_EBPFLE_INSN_LSH32RLE, BPFBF_EBPFLE_SFMT_ADDRLE },
77 { BPF_INSN_RSHILE, BPFBF_EBPFLE_INSN_RSHILE, BPFBF_EBPFLE_SFMT_ADDILE },
78 { BPF_INSN_RSHRLE, BPFBF_EBPFLE_INSN_RSHRLE, BPFBF_EBPFLE_SFMT_ADDRLE },
79 { BPF_INSN_RSH32ILE, BPFBF_EBPFLE_INSN_RSH32ILE, BPFBF_EBPFLE_SFMT_ADDILE },
80 { BPF_INSN_RSH32RLE, BPFBF_EBPFLE_INSN_RSH32RLE, BPFBF_EBPFLE_SFMT_ADDRLE },
81 { BPF_INSN_MODILE, BPFBF_EBPFLE_INSN_MODILE, BPFBF_EBPFLE_SFMT_ADDILE },
82 { BPF_INSN_MODRLE, BPFBF_EBPFLE_INSN_MODRLE, BPFBF_EBPFLE_SFMT_ADDRLE },
83 { BPF_INSN_MOD32ILE, BPFBF_EBPFLE_INSN_MOD32ILE, BPFBF_EBPFLE_SFMT_ADDILE },
84 { BPF_INSN_MOD32RLE, BPFBF_EBPFLE_INSN_MOD32RLE, BPFBF_EBPFLE_SFMT_ADDRLE },
85 { BPF_INSN_XORILE, BPFBF_EBPFLE_INSN_XORILE, BPFBF_EBPFLE_SFMT_ADDILE },
86 { BPF_INSN_XORRLE, BPFBF_EBPFLE_INSN_XORRLE, BPFBF_EBPFLE_SFMT_ADDRLE },
87 { BPF_INSN_XOR32ILE, BPFBF_EBPFLE_INSN_XOR32ILE, BPFBF_EBPFLE_SFMT_ADDILE },
88 { BPF_INSN_XOR32RLE, BPFBF_EBPFLE_INSN_XOR32RLE, BPFBF_EBPFLE_SFMT_ADDRLE },
89 { BPF_INSN_ARSHILE, BPFBF_EBPFLE_INSN_ARSHILE, BPFBF_EBPFLE_SFMT_ADDILE },
90 { BPF_INSN_ARSHRLE, BPFBF_EBPFLE_INSN_ARSHRLE, BPFBF_EBPFLE_SFMT_ADDRLE },
91 { BPF_INSN_ARSH32ILE, BPFBF_EBPFLE_INSN_ARSH32ILE, BPFBF_EBPFLE_SFMT_ADDILE },
92 { BPF_INSN_ARSH32RLE, BPFBF_EBPFLE_INSN_ARSH32RLE, BPFBF_EBPFLE_SFMT_ADDRLE },
93 { BPF_INSN_NEGLE, BPFBF_EBPFLE_INSN_NEGLE, BPFBF_EBPFLE_SFMT_NEGLE },
94 { BPF_INSN_NEG32LE, BPFBF_EBPFLE_INSN_NEG32LE, BPFBF_EBPFLE_SFMT_NEGLE },
95 { BPF_INSN_MOVILE, BPFBF_EBPFLE_INSN_MOVILE, BPFBF_EBPFLE_SFMT_MOVILE },
96 { BPF_INSN_MOVRLE, BPFBF_EBPFLE_INSN_MOVRLE, BPFBF_EBPFLE_SFMT_MOVRLE },
97 { BPF_INSN_MOV32ILE, BPFBF_EBPFLE_INSN_MOV32ILE, BPFBF_EBPFLE_SFMT_MOVILE },
98 { BPF_INSN_MOV32RLE, BPFBF_EBPFLE_INSN_MOV32RLE, BPFBF_EBPFLE_SFMT_MOVRLE },
99 { BPF_INSN_ENDLELE, BPFBF_EBPFLE_INSN_ENDLELE, BPFBF_EBPFLE_SFMT_ENDLELE },
100 { BPF_INSN_ENDBELE, BPFBF_EBPFLE_INSN_ENDBELE, BPFBF_EBPFLE_SFMT_ENDLELE },
101 { BPF_INSN_LDDWLE, BPFBF_EBPFLE_INSN_LDDWLE, BPFBF_EBPFLE_SFMT_LDDWLE },
102 { BPF_INSN_LDABSW, BPFBF_EBPFLE_INSN_LDABSW, BPFBF_EBPFLE_SFMT_LDABSW },
103 { BPF_INSN_LDABSH, BPFBF_EBPFLE_INSN_LDABSH, BPFBF_EBPFLE_SFMT_LDABSH },
104 { BPF_INSN_LDABSB, BPFBF_EBPFLE_INSN_LDABSB, BPFBF_EBPFLE_SFMT_LDABSB },
105 { BPF_INSN_LDABSDW, BPFBF_EBPFLE_INSN_LDABSDW, BPFBF_EBPFLE_SFMT_LDABSDW },
106 { BPF_INSN_LDINDWLE, BPFBF_EBPFLE_INSN_LDINDWLE, BPFBF_EBPFLE_SFMT_LDINDWLE },
107 { BPF_INSN_LDINDHLE, BPFBF_EBPFLE_INSN_LDINDHLE, BPFBF_EBPFLE_SFMT_LDINDHLE },
108 { BPF_INSN_LDINDBLE, BPFBF_EBPFLE_INSN_LDINDBLE, BPFBF_EBPFLE_SFMT_LDINDBLE },
109 { BPF_INSN_LDINDDWLE, BPFBF_EBPFLE_INSN_LDINDDWLE, BPFBF_EBPFLE_SFMT_LDINDDWLE },
110 { BPF_INSN_LDXWLE, BPFBF_EBPFLE_INSN_LDXWLE, BPFBF_EBPFLE_SFMT_LDXWLE },
111 { BPF_INSN_LDXHLE, BPFBF_EBPFLE_INSN_LDXHLE, BPFBF_EBPFLE_SFMT_LDXHLE },
112 { BPF_INSN_LDXBLE, BPFBF_EBPFLE_INSN_LDXBLE, BPFBF_EBPFLE_SFMT_LDXBLE },
113 { BPF_INSN_LDXDWLE, BPFBF_EBPFLE_INSN_LDXDWLE, BPFBF_EBPFLE_SFMT_LDXDWLE },
114 { BPF_INSN_STXWLE, BPFBF_EBPFLE_INSN_STXWLE, BPFBF_EBPFLE_SFMT_STXWLE },
115 { BPF_INSN_STXHLE, BPFBF_EBPFLE_INSN_STXHLE, BPFBF_EBPFLE_SFMT_STXHLE },
116 { BPF_INSN_STXBLE, BPFBF_EBPFLE_INSN_STXBLE, BPFBF_EBPFLE_SFMT_STXBLE },
117 { BPF_INSN_STXDWLE, BPFBF_EBPFLE_INSN_STXDWLE, BPFBF_EBPFLE_SFMT_STXDWLE },
118 { BPF_INSN_STBLE, BPFBF_EBPFLE_INSN_STBLE, BPFBF_EBPFLE_SFMT_STBLE },
119 { BPF_INSN_STHLE, BPFBF_EBPFLE_INSN_STHLE, BPFBF_EBPFLE_SFMT_STHLE },
120 { BPF_INSN_STWLE, BPFBF_EBPFLE_INSN_STWLE, BPFBF_EBPFLE_SFMT_STWLE },
121 { BPF_INSN_STDWLE, BPFBF_EBPFLE_INSN_STDWLE, BPFBF_EBPFLE_SFMT_STDWLE },
122 { BPF_INSN_JEQILE, BPFBF_EBPFLE_INSN_JEQILE, BPFBF_EBPFLE_SFMT_JEQILE },
123 { BPF_INSN_JEQRLE, BPFBF_EBPFLE_INSN_JEQRLE, BPFBF_EBPFLE_SFMT_JEQRLE },
124 { BPF_INSN_JEQ32ILE, BPFBF_EBPFLE_INSN_JEQ32ILE, BPFBF_EBPFLE_SFMT_JEQILE },
125 { BPF_INSN_JEQ32RLE, BPFBF_EBPFLE_INSN_JEQ32RLE, BPFBF_EBPFLE_SFMT_JEQRLE },
126 { BPF_INSN_JGTILE, BPFBF_EBPFLE_INSN_JGTILE, BPFBF_EBPFLE_SFMT_JEQILE },
127 { BPF_INSN_JGTRLE, BPFBF_EBPFLE_INSN_JGTRLE, BPFBF_EBPFLE_SFMT_JEQRLE },
128 { BPF_INSN_JGT32ILE, BPFBF_EBPFLE_INSN_JGT32ILE, BPFBF_EBPFLE_SFMT_JEQILE },
129 { BPF_INSN_JGT32RLE, BPFBF_EBPFLE_INSN_JGT32RLE, BPFBF_EBPFLE_SFMT_JEQRLE },
130 { BPF_INSN_JGEILE, BPFBF_EBPFLE_INSN_JGEILE, BPFBF_EBPFLE_SFMT_JEQILE },
131 { BPF_INSN_JGERLE, BPFBF_EBPFLE_INSN_JGERLE, BPFBF_EBPFLE_SFMT_JEQRLE },
132 { BPF_INSN_JGE32ILE, BPFBF_EBPFLE_INSN_JGE32ILE, BPFBF_EBPFLE_SFMT_JEQILE },
133 { BPF_INSN_JGE32RLE, BPFBF_EBPFLE_INSN_JGE32RLE, BPFBF_EBPFLE_SFMT_JEQRLE },
134 { BPF_INSN_JLTILE, BPFBF_EBPFLE_INSN_JLTILE, BPFBF_EBPFLE_SFMT_JEQILE },
135 { BPF_INSN_JLTRLE, BPFBF_EBPFLE_INSN_JLTRLE, BPFBF_EBPFLE_SFMT_JEQRLE },
136 { BPF_INSN_JLT32ILE, BPFBF_EBPFLE_INSN_JLT32ILE, BPFBF_EBPFLE_SFMT_JEQILE },
137 { BPF_INSN_JLT32RLE, BPFBF_EBPFLE_INSN_JLT32RLE, BPFBF_EBPFLE_SFMT_JEQRLE },
138 { BPF_INSN_JLEILE, BPFBF_EBPFLE_INSN_JLEILE, BPFBF_EBPFLE_SFMT_JEQILE },
139 { BPF_INSN_JLERLE, BPFBF_EBPFLE_INSN_JLERLE, BPFBF_EBPFLE_SFMT_JEQRLE },
140 { BPF_INSN_JLE32ILE, BPFBF_EBPFLE_INSN_JLE32ILE, BPFBF_EBPFLE_SFMT_JEQILE },
141 { BPF_INSN_JLE32RLE, BPFBF_EBPFLE_INSN_JLE32RLE, BPFBF_EBPFLE_SFMT_JEQRLE },
142 { BPF_INSN_JSETILE, BPFBF_EBPFLE_INSN_JSETILE, BPFBF_EBPFLE_SFMT_JEQILE },
143 { BPF_INSN_JSETRLE, BPFBF_EBPFLE_INSN_JSETRLE, BPFBF_EBPFLE_SFMT_JEQRLE },
144 { BPF_INSN_JSET32ILE, BPFBF_EBPFLE_INSN_JSET32ILE, BPFBF_EBPFLE_SFMT_JEQILE },
145 { BPF_INSN_JSET32RLE, BPFBF_EBPFLE_INSN_JSET32RLE, BPFBF_EBPFLE_SFMT_JEQRLE },
146 { BPF_INSN_JNEILE, BPFBF_EBPFLE_INSN_JNEILE, BPFBF_EBPFLE_SFMT_JEQILE },
147 { BPF_INSN_JNERLE, BPFBF_EBPFLE_INSN_JNERLE, BPFBF_EBPFLE_SFMT_JEQRLE },
148 { BPF_INSN_JNE32ILE, BPFBF_EBPFLE_INSN_JNE32ILE, BPFBF_EBPFLE_SFMT_JEQILE },
149 { BPF_INSN_JNE32RLE, BPFBF_EBPFLE_INSN_JNE32RLE, BPFBF_EBPFLE_SFMT_JEQRLE },
150 { BPF_INSN_JSGTILE, BPFBF_EBPFLE_INSN_JSGTILE, BPFBF_EBPFLE_SFMT_JEQILE },
151 { BPF_INSN_JSGTRLE, BPFBF_EBPFLE_INSN_JSGTRLE, BPFBF_EBPFLE_SFMT_JEQRLE },
152 { BPF_INSN_JSGT32ILE, BPFBF_EBPFLE_INSN_JSGT32ILE, BPFBF_EBPFLE_SFMT_JEQILE },
153 { BPF_INSN_JSGT32RLE, BPFBF_EBPFLE_INSN_JSGT32RLE, BPFBF_EBPFLE_SFMT_JEQRLE },
154 { BPF_INSN_JSGEILE, BPFBF_EBPFLE_INSN_JSGEILE, BPFBF_EBPFLE_SFMT_JEQILE },
155 { BPF_INSN_JSGERLE, BPFBF_EBPFLE_INSN_JSGERLE, BPFBF_EBPFLE_SFMT_JEQRLE },
156 { BPF_INSN_JSGE32ILE, BPFBF_EBPFLE_INSN_JSGE32ILE, BPFBF_EBPFLE_SFMT_JEQILE },
157 { BPF_INSN_JSGE32RLE, BPFBF_EBPFLE_INSN_JSGE32RLE, BPFBF_EBPFLE_SFMT_JEQRLE },
158 { BPF_INSN_JSLTILE, BPFBF_EBPFLE_INSN_JSLTILE, BPFBF_EBPFLE_SFMT_JEQILE },
159 { BPF_INSN_JSLTRLE, BPFBF_EBPFLE_INSN_JSLTRLE, BPFBF_EBPFLE_SFMT_JEQRLE },
160 { BPF_INSN_JSLT32ILE, BPFBF_EBPFLE_INSN_JSLT32ILE, BPFBF_EBPFLE_SFMT_JEQILE },
161 { BPF_INSN_JSLT32RLE, BPFBF_EBPFLE_INSN_JSLT32RLE, BPFBF_EBPFLE_SFMT_JEQRLE },
162 { BPF_INSN_JSLEILE, BPFBF_EBPFLE_INSN_JSLEILE, BPFBF_EBPFLE_SFMT_JEQILE },
163 { BPF_INSN_JSLERLE, BPFBF_EBPFLE_INSN_JSLERLE, BPFBF_EBPFLE_SFMT_JEQRLE },
164 { BPF_INSN_JSLE32ILE, BPFBF_EBPFLE_INSN_JSLE32ILE, BPFBF_EBPFLE_SFMT_JEQILE },
165 { BPF_INSN_JSLE32RLE, BPFBF_EBPFLE_INSN_JSLE32RLE, BPFBF_EBPFLE_SFMT_JEQRLE },
166 { BPF_INSN_CALLLE, BPFBF_EBPFLE_INSN_CALLLE, BPFBF_EBPFLE_SFMT_CALLLE },
167 { BPF_INSN_JA, BPFBF_EBPFLE_INSN_JA, BPFBF_EBPFLE_SFMT_JA },
168 { BPF_INSN_EXIT, BPFBF_EBPFLE_INSN_EXIT, BPFBF_EBPFLE_SFMT_EXIT },
169 { BPF_INSN_XADDDWLE, BPFBF_EBPFLE_INSN_XADDDWLE, BPFBF_EBPFLE_SFMT_XADDDWLE },
170 { BPF_INSN_XADDWLE, BPFBF_EBPFLE_INSN_XADDWLE, BPFBF_EBPFLE_SFMT_XADDWLE },
171 { BPF_INSN_BRKPT, BPFBF_EBPFLE_INSN_BRKPT, BPFBF_EBPFLE_SFMT_EXIT },
172 };
173
174 static const struct insn_sem bpfbf_ebpfle_insn_sem_invalid =
175 {
176 VIRTUAL_INSN_X_INVALID, BPFBF_EBPFLE_INSN_X_INVALID, BPFBF_EBPFLE_SFMT_EMPTY
177 };
178
179 /* Initialize an IDESC from the compile-time computable parts. */
180
181 static INLINE void
init_idesc(SIM_CPU * cpu,IDESC * id,const struct insn_sem * t)182 init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t)
183 {
184 const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries;
185
186 id->num = t->index;
187 id->sfmt = t->sfmt;
188 if ((int) t->type <= 0)
189 id->idata = & cgen_virtual_insn_table[- (int) t->type];
190 else
191 id->idata = & insn_table[t->type];
192 id->attrs = CGEN_INSN_ATTRS (id->idata);
193 /* Oh my god, a magic number. */
194 id->length = CGEN_INSN_BITSIZE (id->idata) / 8;
195
196 #if WITH_PROFILE_MODEL_P
197 id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index];
198 {
199 SIM_DESC sd = CPU_STATE (cpu);
200 SIM_ASSERT (t->index == id->timing->num);
201 }
202 #endif
203
204 /* Semantic pointers are initialized elsewhere. */
205 }
206
207 /* Initialize the instruction descriptor table. */
208
209 void
bpfbf_ebpfle_init_idesc_table(SIM_CPU * cpu)210 bpfbf_ebpfle_init_idesc_table (SIM_CPU *cpu)
211 {
212 IDESC *id,*tabend;
213 const struct insn_sem *t,*tend;
214 int tabsize = BPFBF_EBPFLE_INSN__MAX;
215 IDESC *table = bpfbf_ebpfle_insn_data;
216
217 memset (table, 0, tabsize * sizeof (IDESC));
218
219 /* First set all entries to the `invalid insn'. */
220 t = & bpfbf_ebpfle_insn_sem_invalid;
221 for (id = table, tabend = table + tabsize; id < tabend; ++id)
222 init_idesc (cpu, id, t);
223
224 /* Now fill in the values for the chosen cpu. */
225 for (t = bpfbf_ebpfle_insn_sem, tend = t + sizeof (bpfbf_ebpfle_insn_sem) / sizeof (*t);
226 t != tend; ++t)
227 {
228 init_idesc (cpu, & table[t->index], t);
229 }
230
231 /* Link the IDESC table into the cpu. */
232 CPU_IDESC (cpu) = table;
233 }
234
235 /* Given an instruction, return a pointer to its IDESC entry. */
236
237 const IDESC *
bpfbf_ebpfle_decode(SIM_CPU * current_cpu,IADDR pc,CGEN_INSN_WORD base_insn,ARGBUF * abuf)238 bpfbf_ebpfle_decode (SIM_CPU *current_cpu, IADDR pc,
239 CGEN_INSN_WORD base_insn,
240 ARGBUF *abuf)
241 {
242 /* Result of decoder. */
243 BPFBF_EBPFLE_INSN_TYPE itype;
244
245 {
246 CGEN_INSN_WORD insn = base_insn;
247
248 {
249 unsigned int val = (((insn >> 0) & (255 << 0)));
250 switch (val)
251 {
252 case 4 : itype = BPFBF_EBPFLE_INSN_ADD32ILE; goto extract_sfmt_addile;
253 case 5 : itype = BPFBF_EBPFLE_INSN_JA; goto extract_sfmt_ja;
254 case 7 : itype = BPFBF_EBPFLE_INSN_ADDILE; goto extract_sfmt_addile;
255 case 12 : itype = BPFBF_EBPFLE_INSN_ADD32RLE; goto extract_sfmt_addrle;
256 case 15 : itype = BPFBF_EBPFLE_INSN_ADDRLE; goto extract_sfmt_addrle;
257 case 20 : itype = BPFBF_EBPFLE_INSN_SUB32ILE; goto extract_sfmt_addile;
258 case 21 : itype = BPFBF_EBPFLE_INSN_JEQILE; goto extract_sfmt_jeqile;
259 case 22 : itype = BPFBF_EBPFLE_INSN_JEQ32ILE; goto extract_sfmt_jeqile;
260 case 23 : itype = BPFBF_EBPFLE_INSN_SUBILE; goto extract_sfmt_addile;
261 case 24 : itype = BPFBF_EBPFLE_INSN_LDDWLE; goto extract_sfmt_lddwle;
262 case 28 : itype = BPFBF_EBPFLE_INSN_SUB32RLE; goto extract_sfmt_addrle;
263 case 29 : itype = BPFBF_EBPFLE_INSN_JEQRLE; goto extract_sfmt_jeqrle;
264 case 30 : itype = BPFBF_EBPFLE_INSN_JEQ32RLE; goto extract_sfmt_jeqrle;
265 case 31 : itype = BPFBF_EBPFLE_INSN_SUBRLE; goto extract_sfmt_addrle;
266 case 32 : itype = BPFBF_EBPFLE_INSN_LDABSW; goto extract_sfmt_ldabsw;
267 case 36 : itype = BPFBF_EBPFLE_INSN_MUL32ILE; goto extract_sfmt_addile;
268 case 37 : itype = BPFBF_EBPFLE_INSN_JGTILE; goto extract_sfmt_jeqile;
269 case 38 : itype = BPFBF_EBPFLE_INSN_JGT32ILE; goto extract_sfmt_jeqile;
270 case 39 : itype = BPFBF_EBPFLE_INSN_MULILE; goto extract_sfmt_addile;
271 case 40 : itype = BPFBF_EBPFLE_INSN_LDABSH; goto extract_sfmt_ldabsh;
272 case 44 : itype = BPFBF_EBPFLE_INSN_MUL32RLE; goto extract_sfmt_addrle;
273 case 45 : itype = BPFBF_EBPFLE_INSN_JGTRLE; goto extract_sfmt_jeqrle;
274 case 46 : itype = BPFBF_EBPFLE_INSN_JGT32RLE; goto extract_sfmt_jeqrle;
275 case 47 : itype = BPFBF_EBPFLE_INSN_MULRLE; goto extract_sfmt_addrle;
276 case 48 : itype = BPFBF_EBPFLE_INSN_LDABSB; goto extract_sfmt_ldabsb;
277 case 52 : itype = BPFBF_EBPFLE_INSN_DIV32ILE; goto extract_sfmt_addile;
278 case 53 : itype = BPFBF_EBPFLE_INSN_JGEILE; goto extract_sfmt_jeqile;
279 case 54 : itype = BPFBF_EBPFLE_INSN_JGE32ILE; goto extract_sfmt_jeqile;
280 case 55 : itype = BPFBF_EBPFLE_INSN_DIVILE; goto extract_sfmt_addile;
281 case 56 : itype = BPFBF_EBPFLE_INSN_LDABSDW; goto extract_sfmt_ldabsdw;
282 case 60 : itype = BPFBF_EBPFLE_INSN_DIV32RLE; goto extract_sfmt_addrle;
283 case 61 : itype = BPFBF_EBPFLE_INSN_JGERLE; goto extract_sfmt_jeqrle;
284 case 62 : itype = BPFBF_EBPFLE_INSN_JGE32RLE; goto extract_sfmt_jeqrle;
285 case 63 : itype = BPFBF_EBPFLE_INSN_DIVRLE; goto extract_sfmt_addrle;
286 case 64 : itype = BPFBF_EBPFLE_INSN_LDINDWLE; goto extract_sfmt_ldindwle;
287 case 68 : itype = BPFBF_EBPFLE_INSN_OR32ILE; goto extract_sfmt_addile;
288 case 69 : itype = BPFBF_EBPFLE_INSN_JSETILE; goto extract_sfmt_jeqile;
289 case 70 : itype = BPFBF_EBPFLE_INSN_JSET32ILE; goto extract_sfmt_jeqile;
290 case 71 : itype = BPFBF_EBPFLE_INSN_ORILE; goto extract_sfmt_addile;
291 case 72 : itype = BPFBF_EBPFLE_INSN_LDINDHLE; goto extract_sfmt_ldindhle;
292 case 76 : itype = BPFBF_EBPFLE_INSN_OR32RLE; goto extract_sfmt_addrle;
293 case 77 : itype = BPFBF_EBPFLE_INSN_JSETRLE; goto extract_sfmt_jeqrle;
294 case 78 : itype = BPFBF_EBPFLE_INSN_JSET32RLE; goto extract_sfmt_jeqrle;
295 case 79 : itype = BPFBF_EBPFLE_INSN_ORRLE; goto extract_sfmt_addrle;
296 case 80 : itype = BPFBF_EBPFLE_INSN_LDINDBLE; goto extract_sfmt_ldindble;
297 case 84 : itype = BPFBF_EBPFLE_INSN_AND32ILE; goto extract_sfmt_addile;
298 case 85 : itype = BPFBF_EBPFLE_INSN_JNEILE; goto extract_sfmt_jeqile;
299 case 86 : itype = BPFBF_EBPFLE_INSN_JNE32ILE; goto extract_sfmt_jeqile;
300 case 87 : itype = BPFBF_EBPFLE_INSN_ANDILE; goto extract_sfmt_addile;
301 case 88 : itype = BPFBF_EBPFLE_INSN_LDINDDWLE; goto extract_sfmt_ldinddwle;
302 case 92 : itype = BPFBF_EBPFLE_INSN_AND32RLE; goto extract_sfmt_addrle;
303 case 93 : itype = BPFBF_EBPFLE_INSN_JNERLE; goto extract_sfmt_jeqrle;
304 case 94 : itype = BPFBF_EBPFLE_INSN_JNE32RLE; goto extract_sfmt_jeqrle;
305 case 95 : itype = BPFBF_EBPFLE_INSN_ANDRLE; goto extract_sfmt_addrle;
306 case 97 : itype = BPFBF_EBPFLE_INSN_LDXWLE; goto extract_sfmt_ldxwle;
307 case 98 : itype = BPFBF_EBPFLE_INSN_STWLE; goto extract_sfmt_stwle;
308 case 99 : itype = BPFBF_EBPFLE_INSN_STXWLE; goto extract_sfmt_stxwle;
309 case 100 : itype = BPFBF_EBPFLE_INSN_LSH32ILE; goto extract_sfmt_addile;
310 case 101 : itype = BPFBF_EBPFLE_INSN_JSGTILE; goto extract_sfmt_jeqile;
311 case 102 : itype = BPFBF_EBPFLE_INSN_JSGT32ILE; goto extract_sfmt_jeqile;
312 case 103 : itype = BPFBF_EBPFLE_INSN_LSHILE; goto extract_sfmt_addile;
313 case 105 : itype = BPFBF_EBPFLE_INSN_LDXHLE; goto extract_sfmt_ldxhle;
314 case 106 : itype = BPFBF_EBPFLE_INSN_STHLE; goto extract_sfmt_sthle;
315 case 107 : itype = BPFBF_EBPFLE_INSN_STXHLE; goto extract_sfmt_stxhle;
316 case 108 : itype = BPFBF_EBPFLE_INSN_LSH32RLE; goto extract_sfmt_addrle;
317 case 109 : itype = BPFBF_EBPFLE_INSN_JSGTRLE; goto extract_sfmt_jeqrle;
318 case 110 : itype = BPFBF_EBPFLE_INSN_JSGT32RLE; goto extract_sfmt_jeqrle;
319 case 111 : itype = BPFBF_EBPFLE_INSN_LSHRLE; goto extract_sfmt_addrle;
320 case 113 : itype = BPFBF_EBPFLE_INSN_LDXBLE; goto extract_sfmt_ldxble;
321 case 114 : itype = BPFBF_EBPFLE_INSN_STBLE; goto extract_sfmt_stble;
322 case 115 : itype = BPFBF_EBPFLE_INSN_STXBLE; goto extract_sfmt_stxble;
323 case 116 : itype = BPFBF_EBPFLE_INSN_RSH32ILE; goto extract_sfmt_addile;
324 case 117 : itype = BPFBF_EBPFLE_INSN_JSGEILE; goto extract_sfmt_jeqile;
325 case 118 : itype = BPFBF_EBPFLE_INSN_JSGE32ILE; goto extract_sfmt_jeqile;
326 case 119 : itype = BPFBF_EBPFLE_INSN_RSHILE; goto extract_sfmt_addile;
327 case 121 : itype = BPFBF_EBPFLE_INSN_LDXDWLE; goto extract_sfmt_ldxdwle;
328 case 122 : itype = BPFBF_EBPFLE_INSN_STDWLE; goto extract_sfmt_stdwle;
329 case 123 : itype = BPFBF_EBPFLE_INSN_STXDWLE; goto extract_sfmt_stxdwle;
330 case 124 : itype = BPFBF_EBPFLE_INSN_RSH32RLE; goto extract_sfmt_addrle;
331 case 125 : itype = BPFBF_EBPFLE_INSN_JSGERLE; goto extract_sfmt_jeqrle;
332 case 126 : itype = BPFBF_EBPFLE_INSN_JSGE32RLE; goto extract_sfmt_jeqrle;
333 case 127 : itype = BPFBF_EBPFLE_INSN_RSHRLE; goto extract_sfmt_addrle;
334 case 132 : itype = BPFBF_EBPFLE_INSN_NEG32LE; goto extract_sfmt_negle;
335 case 133 : itype = BPFBF_EBPFLE_INSN_CALLLE; goto extract_sfmt_callle;
336 case 135 : itype = BPFBF_EBPFLE_INSN_NEGLE; goto extract_sfmt_negle;
337 case 140 : itype = BPFBF_EBPFLE_INSN_BRKPT; goto extract_sfmt_exit;
338 case 148 : itype = BPFBF_EBPFLE_INSN_MOD32ILE; goto extract_sfmt_addile;
339 case 149 : itype = BPFBF_EBPFLE_INSN_EXIT; goto extract_sfmt_exit;
340 case 151 : itype = BPFBF_EBPFLE_INSN_MODILE; goto extract_sfmt_addile;
341 case 156 : itype = BPFBF_EBPFLE_INSN_MOD32RLE; goto extract_sfmt_addrle;
342 case 159 : itype = BPFBF_EBPFLE_INSN_MODRLE; goto extract_sfmt_addrle;
343 case 164 : itype = BPFBF_EBPFLE_INSN_XOR32ILE; goto extract_sfmt_addile;
344 case 165 : itype = BPFBF_EBPFLE_INSN_JLTILE; goto extract_sfmt_jeqile;
345 case 166 : itype = BPFBF_EBPFLE_INSN_JLT32ILE; goto extract_sfmt_jeqile;
346 case 167 : itype = BPFBF_EBPFLE_INSN_XORILE; goto extract_sfmt_addile;
347 case 172 : itype = BPFBF_EBPFLE_INSN_XOR32RLE; goto extract_sfmt_addrle;
348 case 173 : itype = BPFBF_EBPFLE_INSN_JLTRLE; goto extract_sfmt_jeqrle;
349 case 174 : itype = BPFBF_EBPFLE_INSN_JLT32RLE; goto extract_sfmt_jeqrle;
350 case 175 : itype = BPFBF_EBPFLE_INSN_XORRLE; goto extract_sfmt_addrle;
351 case 180 : itype = BPFBF_EBPFLE_INSN_MOV32ILE; goto extract_sfmt_movile;
352 case 181 : itype = BPFBF_EBPFLE_INSN_JLEILE; goto extract_sfmt_jeqile;
353 case 182 : itype = BPFBF_EBPFLE_INSN_JLE32ILE; goto extract_sfmt_jeqile;
354 case 183 : itype = BPFBF_EBPFLE_INSN_MOVILE; goto extract_sfmt_movile;
355 case 188 : itype = BPFBF_EBPFLE_INSN_MOV32RLE; goto extract_sfmt_movrle;
356 case 189 : itype = BPFBF_EBPFLE_INSN_JLERLE; goto extract_sfmt_jeqrle;
357 case 190 : itype = BPFBF_EBPFLE_INSN_JLE32RLE; goto extract_sfmt_jeqrle;
358 case 191 : itype = BPFBF_EBPFLE_INSN_MOVRLE; goto extract_sfmt_movrle;
359 case 195 : itype = BPFBF_EBPFLE_INSN_XADDWLE; goto extract_sfmt_xaddwle;
360 case 196 : itype = BPFBF_EBPFLE_INSN_ARSH32ILE; goto extract_sfmt_addile;
361 case 197 : itype = BPFBF_EBPFLE_INSN_JSLTILE; goto extract_sfmt_jeqile;
362 case 198 : itype = BPFBF_EBPFLE_INSN_JSLT32ILE; goto extract_sfmt_jeqile;
363 case 199 : itype = BPFBF_EBPFLE_INSN_ARSHILE; goto extract_sfmt_addile;
364 case 204 : itype = BPFBF_EBPFLE_INSN_ARSH32RLE; goto extract_sfmt_addrle;
365 case 205 : itype = BPFBF_EBPFLE_INSN_JSLTRLE; goto extract_sfmt_jeqrle;
366 case 206 : itype = BPFBF_EBPFLE_INSN_JSLT32RLE; goto extract_sfmt_jeqrle;
367 case 207 : itype = BPFBF_EBPFLE_INSN_ARSHRLE; goto extract_sfmt_addrle;
368 case 212 : itype = BPFBF_EBPFLE_INSN_ENDLELE; goto extract_sfmt_endlele;
369 case 213 : itype = BPFBF_EBPFLE_INSN_JSLEILE; goto extract_sfmt_jeqile;
370 case 214 : itype = BPFBF_EBPFLE_INSN_JSLE32ILE; goto extract_sfmt_jeqile;
371 case 219 : itype = BPFBF_EBPFLE_INSN_XADDDWLE; goto extract_sfmt_xadddwle;
372 case 220 : itype = BPFBF_EBPFLE_INSN_ENDBELE; goto extract_sfmt_endlele;
373 case 221 : itype = BPFBF_EBPFLE_INSN_JSLERLE; goto extract_sfmt_jeqrle;
374 case 222 : itype = BPFBF_EBPFLE_INSN_JSLE32RLE; goto extract_sfmt_jeqrle;
375 default : itype = BPFBF_EBPFLE_INSN_X_INVALID; goto extract_sfmt_empty;
376 }
377 }
378 }
379
380 /* The instruction has been decoded, now extract the fields. */
381
382 extract_sfmt_empty:
383 {
384 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
385 #define FLD(f) abuf->fields.sfmt_empty.f
386
387
388 /* Record the fields for the semantic handler. */
389 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0));
390
391 #undef FLD
392 return idesc;
393 }
394
395 extract_sfmt_addile:
396 {
397 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
398 CGEN_INSN_WORD insn = base_insn;
399 #define FLD(f) abuf->fields.sfmt_stble.f
400 INT f_imm32;
401 UINT f_dstle;
402
403 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
404 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
405
406 /* Record the fields for the semantic handler. */
407 FLD (f_dstle) = f_dstle;
408 FLD (f_imm32) = f_imm32;
409 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addile", "f_dstle 0x%x", 'x', f_dstle, "f_imm32 0x%x", 'x', f_imm32, (char *) 0));
410
411 #undef FLD
412 return idesc;
413 }
414
415 extract_sfmt_addrle:
416 {
417 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
418 CGEN_INSN_WORD insn = base_insn;
419 #define FLD(f) abuf->fields.sfmt_ldxwle.f
420 UINT f_srcle;
421 UINT f_dstle;
422
423 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
424 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
425
426 /* Record the fields for the semantic handler. */
427 FLD (f_dstle) = f_dstle;
428 FLD (f_srcle) = f_srcle;
429 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addrle", "f_dstle 0x%x", 'x', f_dstle, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
430
431 #undef FLD
432 return idesc;
433 }
434
435 extract_sfmt_negle:
436 {
437 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
438 CGEN_INSN_WORD insn = base_insn;
439 #define FLD(f) abuf->fields.sfmt_lddwle.f
440 UINT f_dstle;
441
442 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
443
444 /* Record the fields for the semantic handler. */
445 FLD (f_dstle) = f_dstle;
446 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_negle", "f_dstle 0x%x", 'x', f_dstle, (char *) 0));
447
448 #undef FLD
449 return idesc;
450 }
451
452 extract_sfmt_movile:
453 {
454 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
455 CGEN_INSN_WORD insn = base_insn;
456 #define FLD(f) abuf->fields.sfmt_stble.f
457 INT f_imm32;
458 UINT f_dstle;
459
460 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
461 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
462
463 /* Record the fields for the semantic handler. */
464 FLD (f_imm32) = f_imm32;
465 FLD (f_dstle) = f_dstle;
466 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movile", "f_imm32 0x%x", 'x', f_imm32, "f_dstle 0x%x", 'x', f_dstle, (char *) 0));
467
468 #undef FLD
469 return idesc;
470 }
471
472 extract_sfmt_movrle:
473 {
474 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
475 CGEN_INSN_WORD insn = base_insn;
476 #define FLD(f) abuf->fields.sfmt_ldxwle.f
477 UINT f_srcle;
478 UINT f_dstle;
479
480 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
481 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
482
483 /* Record the fields for the semantic handler. */
484 FLD (f_srcle) = f_srcle;
485 FLD (f_dstle) = f_dstle;
486 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movrle", "f_srcle 0x%x", 'x', f_srcle, "f_dstle 0x%x", 'x', f_dstle, (char *) 0));
487
488 #undef FLD
489 return idesc;
490 }
491
492 extract_sfmt_endlele:
493 {
494 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
495 CGEN_INSN_WORD insn = base_insn;
496 #define FLD(f) abuf->fields.sfmt_stble.f
497 INT f_imm32;
498 UINT f_dstle;
499
500 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
501 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
502
503 /* Record the fields for the semantic handler. */
504 FLD (f_dstle) = f_dstle;
505 FLD (f_imm32) = f_imm32;
506 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_endlele", "f_dstle 0x%x", 'x', f_dstle, "f_imm32 0x%x", 'x', f_imm32, (char *) 0));
507
508 #undef FLD
509 return idesc;
510 }
511
512 extract_sfmt_lddwle:
513 {
514 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
515 CGEN_INSN_WORD insn = base_insn;
516 #define FLD(f) abuf->fields.sfmt_lddwle.f
517 UINT f_imm64_c;
518 UINT f_imm64_b;
519 UINT f_imm64_a;
520 UINT f_dstle;
521 DI f_imm64;
522 /* Contents of trailing part of insn. */
523 UINT word_1;
524 UINT word_2;
525
526 word_1 = GETIMEMUSI (current_cpu, pc + 8);
527 word_2 = GETIMEMUSI (current_cpu, pc + 12);
528 f_imm64_c = (0|(EXTRACT_LSB0_UINT (word_2, 32, 31, 32) << 0));
529 f_imm64_b = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0));
530 f_imm64_a = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
531 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
532 {
533 f_imm64 = ((((((UDI) (UINT) (f_imm64_c))) << (32))) | (((UDI) (UINT) (f_imm64_a))));
534 }
535
536 /* Record the fields for the semantic handler. */
537 FLD (f_imm64) = f_imm64;
538 FLD (f_dstle) = f_dstle;
539 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lddwle", "f_imm64 0x%x", 'x', f_imm64, "f_dstle 0x%x", 'x', f_dstle, (char *) 0));
540
541 #undef FLD
542 return idesc;
543 }
544
545 extract_sfmt_ldabsw:
546 {
547 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
548 CGEN_INSN_WORD insn = base_insn;
549 #define FLD(f) abuf->fields.sfmt_ldindwle.f
550 INT f_imm32;
551
552 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
553
554 /* Record the fields for the semantic handler. */
555 FLD (f_imm32) = f_imm32;
556 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldabsw", "f_imm32 0x%x", 'x', f_imm32, (char *) 0));
557
558 #undef FLD
559 return idesc;
560 }
561
562 extract_sfmt_ldabsh:
563 {
564 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
565 CGEN_INSN_WORD insn = base_insn;
566 #define FLD(f) abuf->fields.sfmt_ldindwle.f
567 INT f_imm32;
568
569 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
570
571 /* Record the fields for the semantic handler. */
572 FLD (f_imm32) = f_imm32;
573 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldabsh", "f_imm32 0x%x", 'x', f_imm32, (char *) 0));
574
575 #undef FLD
576 return idesc;
577 }
578
579 extract_sfmt_ldabsb:
580 {
581 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
582 CGEN_INSN_WORD insn = base_insn;
583 #define FLD(f) abuf->fields.sfmt_ldindwle.f
584 INT f_imm32;
585
586 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
587
588 /* Record the fields for the semantic handler. */
589 FLD (f_imm32) = f_imm32;
590 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldabsb", "f_imm32 0x%x", 'x', f_imm32, (char *) 0));
591
592 #undef FLD
593 return idesc;
594 }
595
596 extract_sfmt_ldabsdw:
597 {
598 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
599 CGEN_INSN_WORD insn = base_insn;
600 #define FLD(f) abuf->fields.sfmt_ldindwle.f
601 INT f_imm32;
602
603 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
604
605 /* Record the fields for the semantic handler. */
606 FLD (f_imm32) = f_imm32;
607 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldabsdw", "f_imm32 0x%x", 'x', f_imm32, (char *) 0));
608
609 #undef FLD
610 return idesc;
611 }
612
613 extract_sfmt_ldindwle:
614 {
615 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
616 CGEN_INSN_WORD insn = base_insn;
617 #define FLD(f) abuf->fields.sfmt_ldindwle.f
618 INT f_imm32;
619 UINT f_srcle;
620
621 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
622 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
623
624 /* Record the fields for the semantic handler. */
625 FLD (f_imm32) = f_imm32;
626 FLD (f_srcle) = f_srcle;
627 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldindwle", "f_imm32 0x%x", 'x', f_imm32, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
628
629 #undef FLD
630 return idesc;
631 }
632
633 extract_sfmt_ldindhle:
634 {
635 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
636 CGEN_INSN_WORD insn = base_insn;
637 #define FLD(f) abuf->fields.sfmt_ldindwle.f
638 INT f_imm32;
639 UINT f_srcle;
640
641 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
642 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
643
644 /* Record the fields for the semantic handler. */
645 FLD (f_imm32) = f_imm32;
646 FLD (f_srcle) = f_srcle;
647 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldindhle", "f_imm32 0x%x", 'x', f_imm32, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
648
649 #undef FLD
650 return idesc;
651 }
652
653 extract_sfmt_ldindble:
654 {
655 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
656 CGEN_INSN_WORD insn = base_insn;
657 #define FLD(f) abuf->fields.sfmt_ldindwle.f
658 INT f_imm32;
659 UINT f_srcle;
660
661 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
662 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
663
664 /* Record the fields for the semantic handler. */
665 FLD (f_imm32) = f_imm32;
666 FLD (f_srcle) = f_srcle;
667 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldindble", "f_imm32 0x%x", 'x', f_imm32, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
668
669 #undef FLD
670 return idesc;
671 }
672
673 extract_sfmt_ldinddwle:
674 {
675 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
676 CGEN_INSN_WORD insn = base_insn;
677 #define FLD(f) abuf->fields.sfmt_ldindwle.f
678 INT f_imm32;
679 UINT f_srcle;
680
681 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
682 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
683
684 /* Record the fields for the semantic handler. */
685 FLD (f_imm32) = f_imm32;
686 FLD (f_srcle) = f_srcle;
687 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldinddwle", "f_imm32 0x%x", 'x', f_imm32, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
688
689 #undef FLD
690 return idesc;
691 }
692
693 extract_sfmt_ldxwle:
694 {
695 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
696 CGEN_INSN_WORD insn = base_insn;
697 #define FLD(f) abuf->fields.sfmt_ldxwle.f
698 HI f_offset16;
699 UINT f_srcle;
700 UINT f_dstle;
701
702 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
703 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
704 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
705
706 /* Record the fields for the semantic handler. */
707 FLD (f_offset16) = f_offset16;
708 FLD (f_srcle) = f_srcle;
709 FLD (f_dstle) = f_dstle;
710 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldxwle", "f_offset16 0x%x", 'x', f_offset16, "f_srcle 0x%x", 'x', f_srcle, "f_dstle 0x%x", 'x', f_dstle, (char *) 0));
711
712 #undef FLD
713 return idesc;
714 }
715
716 extract_sfmt_ldxhle:
717 {
718 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
719 CGEN_INSN_WORD insn = base_insn;
720 #define FLD(f) abuf->fields.sfmt_ldxwle.f
721 HI f_offset16;
722 UINT f_srcle;
723 UINT f_dstle;
724
725 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
726 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
727 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
728
729 /* Record the fields for the semantic handler. */
730 FLD (f_offset16) = f_offset16;
731 FLD (f_srcle) = f_srcle;
732 FLD (f_dstle) = f_dstle;
733 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldxhle", "f_offset16 0x%x", 'x', f_offset16, "f_srcle 0x%x", 'x', f_srcle, "f_dstle 0x%x", 'x', f_dstle, (char *) 0));
734
735 #undef FLD
736 return idesc;
737 }
738
739 extract_sfmt_ldxble:
740 {
741 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
742 CGEN_INSN_WORD insn = base_insn;
743 #define FLD(f) abuf->fields.sfmt_ldxwle.f
744 HI f_offset16;
745 UINT f_srcle;
746 UINT f_dstle;
747
748 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
749 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
750 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
751
752 /* Record the fields for the semantic handler. */
753 FLD (f_offset16) = f_offset16;
754 FLD (f_srcle) = f_srcle;
755 FLD (f_dstle) = f_dstle;
756 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldxble", "f_offset16 0x%x", 'x', f_offset16, "f_srcle 0x%x", 'x', f_srcle, "f_dstle 0x%x", 'x', f_dstle, (char *) 0));
757
758 #undef FLD
759 return idesc;
760 }
761
762 extract_sfmt_ldxdwle:
763 {
764 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
765 CGEN_INSN_WORD insn = base_insn;
766 #define FLD(f) abuf->fields.sfmt_ldxwle.f
767 HI f_offset16;
768 UINT f_srcle;
769 UINT f_dstle;
770
771 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
772 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
773 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
774
775 /* Record the fields for the semantic handler. */
776 FLD (f_offset16) = f_offset16;
777 FLD (f_srcle) = f_srcle;
778 FLD (f_dstle) = f_dstle;
779 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldxdwle", "f_offset16 0x%x", 'x', f_offset16, "f_srcle 0x%x", 'x', f_srcle, "f_dstle 0x%x", 'x', f_dstle, (char *) 0));
780
781 #undef FLD
782 return idesc;
783 }
784
785 extract_sfmt_stxwle:
786 {
787 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
788 CGEN_INSN_WORD insn = base_insn;
789 #define FLD(f) abuf->fields.sfmt_ldxwle.f
790 HI f_offset16;
791 UINT f_srcle;
792 UINT f_dstle;
793
794 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
795 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
796 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
797
798 /* Record the fields for the semantic handler. */
799 FLD (f_dstle) = f_dstle;
800 FLD (f_offset16) = f_offset16;
801 FLD (f_srcle) = f_srcle;
802 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stxwle", "f_dstle 0x%x", 'x', f_dstle, "f_offset16 0x%x", 'x', f_offset16, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
803
804 #undef FLD
805 return idesc;
806 }
807
808 extract_sfmt_stxhle:
809 {
810 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
811 CGEN_INSN_WORD insn = base_insn;
812 #define FLD(f) abuf->fields.sfmt_ldxwle.f
813 HI f_offset16;
814 UINT f_srcle;
815 UINT f_dstle;
816
817 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
818 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
819 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
820
821 /* Record the fields for the semantic handler. */
822 FLD (f_dstle) = f_dstle;
823 FLD (f_offset16) = f_offset16;
824 FLD (f_srcle) = f_srcle;
825 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stxhle", "f_dstle 0x%x", 'x', f_dstle, "f_offset16 0x%x", 'x', f_offset16, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
826
827 #undef FLD
828 return idesc;
829 }
830
831 extract_sfmt_stxble:
832 {
833 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
834 CGEN_INSN_WORD insn = base_insn;
835 #define FLD(f) abuf->fields.sfmt_ldxwle.f
836 HI f_offset16;
837 UINT f_srcle;
838 UINT f_dstle;
839
840 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
841 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
842 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
843
844 /* Record the fields for the semantic handler. */
845 FLD (f_dstle) = f_dstle;
846 FLD (f_offset16) = f_offset16;
847 FLD (f_srcle) = f_srcle;
848 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stxble", "f_dstle 0x%x", 'x', f_dstle, "f_offset16 0x%x", 'x', f_offset16, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
849
850 #undef FLD
851 return idesc;
852 }
853
854 extract_sfmt_stxdwle:
855 {
856 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
857 CGEN_INSN_WORD insn = base_insn;
858 #define FLD(f) abuf->fields.sfmt_ldxwle.f
859 HI f_offset16;
860 UINT f_srcle;
861 UINT f_dstle;
862
863 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
864 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
865 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
866
867 /* Record the fields for the semantic handler. */
868 FLD (f_dstle) = f_dstle;
869 FLD (f_offset16) = f_offset16;
870 FLD (f_srcle) = f_srcle;
871 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stxdwle", "f_dstle 0x%x", 'x', f_dstle, "f_offset16 0x%x", 'x', f_offset16, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
872
873 #undef FLD
874 return idesc;
875 }
876
877 extract_sfmt_stble:
878 {
879 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
880 CGEN_INSN_WORD insn = base_insn;
881 #define FLD(f) abuf->fields.sfmt_stble.f
882 INT f_imm32;
883 HI f_offset16;
884 UINT f_dstle;
885
886 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
887 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
888 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
889
890 /* Record the fields for the semantic handler. */
891 FLD (f_dstle) = f_dstle;
892 FLD (f_imm32) = f_imm32;
893 FLD (f_offset16) = f_offset16;
894 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stble", "f_dstle 0x%x", 'x', f_dstle, "f_imm32 0x%x", 'x', f_imm32, "f_offset16 0x%x", 'x', f_offset16, (char *) 0));
895
896 #undef FLD
897 return idesc;
898 }
899
900 extract_sfmt_sthle:
901 {
902 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
903 CGEN_INSN_WORD insn = base_insn;
904 #define FLD(f) abuf->fields.sfmt_stble.f
905 INT f_imm32;
906 HI f_offset16;
907 UINT f_dstle;
908
909 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
910 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
911 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
912
913 /* Record the fields for the semantic handler. */
914 FLD (f_dstle) = f_dstle;
915 FLD (f_imm32) = f_imm32;
916 FLD (f_offset16) = f_offset16;
917 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sthle", "f_dstle 0x%x", 'x', f_dstle, "f_imm32 0x%x", 'x', f_imm32, "f_offset16 0x%x", 'x', f_offset16, (char *) 0));
918
919 #undef FLD
920 return idesc;
921 }
922
923 extract_sfmt_stwle:
924 {
925 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
926 CGEN_INSN_WORD insn = base_insn;
927 #define FLD(f) abuf->fields.sfmt_stble.f
928 INT f_imm32;
929 HI f_offset16;
930 UINT f_dstle;
931
932 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
933 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
934 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
935
936 /* Record the fields for the semantic handler. */
937 FLD (f_dstle) = f_dstle;
938 FLD (f_imm32) = f_imm32;
939 FLD (f_offset16) = f_offset16;
940 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stwle", "f_dstle 0x%x", 'x', f_dstle, "f_imm32 0x%x", 'x', f_imm32, "f_offset16 0x%x", 'x', f_offset16, (char *) 0));
941
942 #undef FLD
943 return idesc;
944 }
945
946 extract_sfmt_stdwle:
947 {
948 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
949 CGEN_INSN_WORD insn = base_insn;
950 #define FLD(f) abuf->fields.sfmt_stble.f
951 INT f_imm32;
952 HI f_offset16;
953 UINT f_dstle;
954
955 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
956 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
957 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
958
959 /* Record the fields for the semantic handler. */
960 FLD (f_dstle) = f_dstle;
961 FLD (f_imm32) = f_imm32;
962 FLD (f_offset16) = f_offset16;
963 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stdwle", "f_dstle 0x%x", 'x', f_dstle, "f_imm32 0x%x", 'x', f_imm32, "f_offset16 0x%x", 'x', f_offset16, (char *) 0));
964
965 #undef FLD
966 return idesc;
967 }
968
969 extract_sfmt_jeqile:
970 {
971 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
972 CGEN_INSN_WORD insn = base_insn;
973 #define FLD(f) abuf->fields.sfmt_stble.f
974 INT f_imm32;
975 HI f_offset16;
976 UINT f_dstle;
977
978 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
979 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
980 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
981
982 /* Record the fields for the semantic handler. */
983 FLD (f_offset16) = f_offset16;
984 FLD (f_dstle) = f_dstle;
985 FLD (f_imm32) = f_imm32;
986 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jeqile", "f_offset16 0x%x", 'x', f_offset16, "f_dstle 0x%x", 'x', f_dstle, "f_imm32 0x%x", 'x', f_imm32, (char *) 0));
987
988 #if WITH_PROFILE_MODEL_P
989 /* Record the fields for profiling. */
990 if (PROFILE_MODEL_P (current_cpu))
991 {
992 }
993 #endif
994 #undef FLD
995 return idesc;
996 }
997
998 extract_sfmt_jeqrle:
999 {
1000 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
1001 CGEN_INSN_WORD insn = base_insn;
1002 #define FLD(f) abuf->fields.sfmt_ldxwle.f
1003 HI f_offset16;
1004 UINT f_srcle;
1005 UINT f_dstle;
1006
1007 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
1008 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
1009 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
1010
1011 /* Record the fields for the semantic handler. */
1012 FLD (f_offset16) = f_offset16;
1013 FLD (f_dstle) = f_dstle;
1014 FLD (f_srcle) = f_srcle;
1015 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jeqrle", "f_offset16 0x%x", 'x', f_offset16, "f_dstle 0x%x", 'x', f_dstle, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
1016
1017 #if WITH_PROFILE_MODEL_P
1018 /* Record the fields for profiling. */
1019 if (PROFILE_MODEL_P (current_cpu))
1020 {
1021 }
1022 #endif
1023 #undef FLD
1024 return idesc;
1025 }
1026
1027 extract_sfmt_callle:
1028 {
1029 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
1030 CGEN_INSN_WORD insn = base_insn;
1031 #define FLD(f) abuf->fields.sfmt_ldindwle.f
1032 INT f_imm32;
1033 UINT f_srcle;
1034
1035 f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0));
1036 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
1037
1038 /* Record the fields for the semantic handler. */
1039 FLD (f_imm32) = f_imm32;
1040 FLD (f_srcle) = f_srcle;
1041 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_callle", "f_imm32 0x%x", 'x', f_imm32, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
1042
1043 #undef FLD
1044 return idesc;
1045 }
1046
1047 extract_sfmt_ja:
1048 {
1049 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
1050 CGEN_INSN_WORD insn = base_insn;
1051 #define FLD(f) abuf->fields.sfmt_stble.f
1052 HI f_offset16;
1053
1054 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
1055
1056 /* Record the fields for the semantic handler. */
1057 FLD (f_offset16) = f_offset16;
1058 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ja", "f_offset16 0x%x", 'x', f_offset16, (char *) 0));
1059
1060 #if WITH_PROFILE_MODEL_P
1061 /* Record the fields for profiling. */
1062 if (PROFILE_MODEL_P (current_cpu))
1063 {
1064 }
1065 #endif
1066 #undef FLD
1067 return idesc;
1068 }
1069
1070 extract_sfmt_exit:
1071 {
1072 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
1073 #define FLD(f) abuf->fields.sfmt_empty.f
1074
1075
1076 /* Record the fields for the semantic handler. */
1077 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_exit", (char *) 0));
1078
1079 #undef FLD
1080 return idesc;
1081 }
1082
1083 extract_sfmt_xadddwle:
1084 {
1085 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
1086 CGEN_INSN_WORD insn = base_insn;
1087 #define FLD(f) abuf->fields.sfmt_ldxwle.f
1088 HI f_offset16;
1089 UINT f_srcle;
1090 UINT f_dstle;
1091
1092 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
1093 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
1094 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
1095
1096 /* Record the fields for the semantic handler. */
1097 FLD (f_dstle) = f_dstle;
1098 FLD (f_offset16) = f_offset16;
1099 FLD (f_srcle) = f_srcle;
1100 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_xadddwle", "f_dstle 0x%x", 'x', f_dstle, "f_offset16 0x%x", 'x', f_offset16, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
1101
1102 #undef FLD
1103 return idesc;
1104 }
1105
1106 extract_sfmt_xaddwle:
1107 {
1108 const IDESC *idesc = &bpfbf_ebpfle_insn_data[itype];
1109 CGEN_INSN_WORD insn = base_insn;
1110 #define FLD(f) abuf->fields.sfmt_ldxwle.f
1111 HI f_offset16;
1112 UINT f_srcle;
1113 UINT f_dstle;
1114
1115 f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0));
1116 f_srcle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0));
1117 f_dstle = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0));
1118
1119 /* Record the fields for the semantic handler. */
1120 FLD (f_dstle) = f_dstle;
1121 FLD (f_offset16) = f_offset16;
1122 FLD (f_srcle) = f_srcle;
1123 TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_xaddwle", "f_dstle 0x%x", 'x', f_dstle, "f_offset16 0x%x", 'x', f_offset16, "f_srcle 0x%x", 'x', f_srcle, (char *) 0));
1124
1125 #undef FLD
1126 return idesc;
1127 }
1128
1129 }
1130