Commit | Line | Data |
---|---|---|
8c4c1818 JM |
1 | /* Simulator instruction decoder for bpfbf_ebpfbe. |
2 | ||
3 | THIS FILE IS MACHINE GENERATED WITH CGEN. | |
4 | ||
88b9d363 | 5 | Copyright (C) 1996-2022 Free Software Foundation, Inc. |
8c4c1818 JM |
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" | |
e0fd25e4 MF |
30 | #include "cgen-mem.h" |
31 | #include "cgen-ops.h" | |
8c4c1818 JM |
32 | |
33 | /* The instruction descriptor array. | |
34 | This is computed at runtime. Space for it is not malloc'd to save a | |
35 | teensy bit of cpu in the decoder. Moving it to malloc space is trivial | |
36 | but won't be done until necessary (we don't currently support the runtime | |
37 | addition of instructions nor an SMP machine with different cpus). */ | |
38 | static IDESC bpfbf_ebpfbe_insn_data[BPFBF_EBPFBE_INSN__MAX]; | |
39 | ||
40 | /* Commas between elements are contained in the macros. | |
41 | Some of these are conditionally compiled out. */ | |
42 | ||
43 | static const struct insn_sem bpfbf_ebpfbe_insn_sem[] = | |
44 | { | |
45 | { VIRTUAL_INSN_X_INVALID, BPFBF_EBPFBE_INSN_X_INVALID, BPFBF_EBPFBE_SFMT_EMPTY }, | |
46 | { VIRTUAL_INSN_X_AFTER, BPFBF_EBPFBE_INSN_X_AFTER, BPFBF_EBPFBE_SFMT_EMPTY }, | |
47 | { VIRTUAL_INSN_X_BEFORE, BPFBF_EBPFBE_INSN_X_BEFORE, BPFBF_EBPFBE_SFMT_EMPTY }, | |
48 | { VIRTUAL_INSN_X_CTI_CHAIN, BPFBF_EBPFBE_INSN_X_CTI_CHAIN, BPFBF_EBPFBE_SFMT_EMPTY }, | |
49 | { VIRTUAL_INSN_X_CHAIN, BPFBF_EBPFBE_INSN_X_CHAIN, BPFBF_EBPFBE_SFMT_EMPTY }, | |
50 | { VIRTUAL_INSN_X_BEGIN, BPFBF_EBPFBE_INSN_X_BEGIN, BPFBF_EBPFBE_SFMT_EMPTY }, | |
51 | { BPF_INSN_ADDIBE, BPFBF_EBPFBE_INSN_ADDIBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
52 | { BPF_INSN_ADDRBE, BPFBF_EBPFBE_INSN_ADDRBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
53 | { BPF_INSN_ADD32IBE, BPFBF_EBPFBE_INSN_ADD32IBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
54 | { BPF_INSN_ADD32RBE, BPFBF_EBPFBE_INSN_ADD32RBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
55 | { BPF_INSN_SUBIBE, BPFBF_EBPFBE_INSN_SUBIBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
56 | { BPF_INSN_SUBRBE, BPFBF_EBPFBE_INSN_SUBRBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
57 | { BPF_INSN_SUB32IBE, BPFBF_EBPFBE_INSN_SUB32IBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
58 | { BPF_INSN_SUB32RBE, BPFBF_EBPFBE_INSN_SUB32RBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
59 | { BPF_INSN_MULIBE, BPFBF_EBPFBE_INSN_MULIBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
60 | { BPF_INSN_MULRBE, BPFBF_EBPFBE_INSN_MULRBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
61 | { BPF_INSN_MUL32IBE, BPFBF_EBPFBE_INSN_MUL32IBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
62 | { BPF_INSN_MUL32RBE, BPFBF_EBPFBE_INSN_MUL32RBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
63 | { BPF_INSN_DIVIBE, BPFBF_EBPFBE_INSN_DIVIBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
64 | { BPF_INSN_DIVRBE, BPFBF_EBPFBE_INSN_DIVRBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
65 | { BPF_INSN_DIV32IBE, BPFBF_EBPFBE_INSN_DIV32IBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
66 | { BPF_INSN_DIV32RBE, BPFBF_EBPFBE_INSN_DIV32RBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
67 | { BPF_INSN_ORIBE, BPFBF_EBPFBE_INSN_ORIBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
68 | { BPF_INSN_ORRBE, BPFBF_EBPFBE_INSN_ORRBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
69 | { BPF_INSN_OR32IBE, BPFBF_EBPFBE_INSN_OR32IBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
70 | { BPF_INSN_OR32RBE, BPFBF_EBPFBE_INSN_OR32RBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
71 | { BPF_INSN_ANDIBE, BPFBF_EBPFBE_INSN_ANDIBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
72 | { BPF_INSN_ANDRBE, BPFBF_EBPFBE_INSN_ANDRBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
73 | { BPF_INSN_AND32IBE, BPFBF_EBPFBE_INSN_AND32IBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
74 | { BPF_INSN_AND32RBE, BPFBF_EBPFBE_INSN_AND32RBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
75 | { BPF_INSN_LSHIBE, BPFBF_EBPFBE_INSN_LSHIBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
76 | { BPF_INSN_LSHRBE, BPFBF_EBPFBE_INSN_LSHRBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
77 | { BPF_INSN_LSH32IBE, BPFBF_EBPFBE_INSN_LSH32IBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
78 | { BPF_INSN_LSH32RBE, BPFBF_EBPFBE_INSN_LSH32RBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
79 | { BPF_INSN_RSHIBE, BPFBF_EBPFBE_INSN_RSHIBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
80 | { BPF_INSN_RSHRBE, BPFBF_EBPFBE_INSN_RSHRBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
81 | { BPF_INSN_RSH32IBE, BPFBF_EBPFBE_INSN_RSH32IBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
82 | { BPF_INSN_RSH32RBE, BPFBF_EBPFBE_INSN_RSH32RBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
83 | { BPF_INSN_MODIBE, BPFBF_EBPFBE_INSN_MODIBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
84 | { BPF_INSN_MODRBE, BPFBF_EBPFBE_INSN_MODRBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
85 | { BPF_INSN_MOD32IBE, BPFBF_EBPFBE_INSN_MOD32IBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
86 | { BPF_INSN_MOD32RBE, BPFBF_EBPFBE_INSN_MOD32RBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
87 | { BPF_INSN_XORIBE, BPFBF_EBPFBE_INSN_XORIBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
88 | { BPF_INSN_XORRBE, BPFBF_EBPFBE_INSN_XORRBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
89 | { BPF_INSN_XOR32IBE, BPFBF_EBPFBE_INSN_XOR32IBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
90 | { BPF_INSN_XOR32RBE, BPFBF_EBPFBE_INSN_XOR32RBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
91 | { BPF_INSN_ARSHIBE, BPFBF_EBPFBE_INSN_ARSHIBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
92 | { BPF_INSN_ARSHRBE, BPFBF_EBPFBE_INSN_ARSHRBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
93 | { BPF_INSN_ARSH32IBE, BPFBF_EBPFBE_INSN_ARSH32IBE, BPFBF_EBPFBE_SFMT_ADDIBE }, | |
94 | { BPF_INSN_ARSH32RBE, BPFBF_EBPFBE_INSN_ARSH32RBE, BPFBF_EBPFBE_SFMT_ADDRBE }, | |
95 | { BPF_INSN_NEGBE, BPFBF_EBPFBE_INSN_NEGBE, BPFBF_EBPFBE_SFMT_NEGBE }, | |
96 | { BPF_INSN_NEG32BE, BPFBF_EBPFBE_INSN_NEG32BE, BPFBF_EBPFBE_SFMT_NEGBE }, | |
97 | { BPF_INSN_MOVIBE, BPFBF_EBPFBE_INSN_MOVIBE, BPFBF_EBPFBE_SFMT_MOVIBE }, | |
98 | { BPF_INSN_MOVRBE, BPFBF_EBPFBE_INSN_MOVRBE, BPFBF_EBPFBE_SFMT_MOVRBE }, | |
99 | { BPF_INSN_MOV32IBE, BPFBF_EBPFBE_INSN_MOV32IBE, BPFBF_EBPFBE_SFMT_MOVIBE }, | |
100 | { BPF_INSN_MOV32RBE, BPFBF_EBPFBE_INSN_MOV32RBE, BPFBF_EBPFBE_SFMT_MOVRBE }, | |
101 | { BPF_INSN_ENDLEBE, BPFBF_EBPFBE_INSN_ENDLEBE, BPFBF_EBPFBE_SFMT_ENDLEBE }, | |
102 | { BPF_INSN_ENDBEBE, BPFBF_EBPFBE_INSN_ENDBEBE, BPFBF_EBPFBE_SFMT_ENDLEBE }, | |
103 | { BPF_INSN_LDDWBE, BPFBF_EBPFBE_INSN_LDDWBE, BPFBF_EBPFBE_SFMT_LDDWBE }, | |
104 | { BPF_INSN_LDABSW, BPFBF_EBPFBE_INSN_LDABSW, BPFBF_EBPFBE_SFMT_LDABSW }, | |
105 | { BPF_INSN_LDABSH, BPFBF_EBPFBE_INSN_LDABSH, BPFBF_EBPFBE_SFMT_LDABSH }, | |
106 | { BPF_INSN_LDABSB, BPFBF_EBPFBE_INSN_LDABSB, BPFBF_EBPFBE_SFMT_LDABSB }, | |
107 | { BPF_INSN_LDABSDW, BPFBF_EBPFBE_INSN_LDABSDW, BPFBF_EBPFBE_SFMT_LDABSDW }, | |
108 | { BPF_INSN_LDINDWBE, BPFBF_EBPFBE_INSN_LDINDWBE, BPFBF_EBPFBE_SFMT_LDINDWBE }, | |
109 | { BPF_INSN_LDINDHBE, BPFBF_EBPFBE_INSN_LDINDHBE, BPFBF_EBPFBE_SFMT_LDINDHBE }, | |
110 | { BPF_INSN_LDINDBBE, BPFBF_EBPFBE_INSN_LDINDBBE, BPFBF_EBPFBE_SFMT_LDINDBBE }, | |
111 | { BPF_INSN_LDINDDWBE, BPFBF_EBPFBE_INSN_LDINDDWBE, BPFBF_EBPFBE_SFMT_LDINDDWBE }, | |
112 | { BPF_INSN_LDXWBE, BPFBF_EBPFBE_INSN_LDXWBE, BPFBF_EBPFBE_SFMT_LDXWBE }, | |
113 | { BPF_INSN_LDXHBE, BPFBF_EBPFBE_INSN_LDXHBE, BPFBF_EBPFBE_SFMT_LDXHBE }, | |
114 | { BPF_INSN_LDXBBE, BPFBF_EBPFBE_INSN_LDXBBE, BPFBF_EBPFBE_SFMT_LDXBBE }, | |
115 | { BPF_INSN_LDXDWBE, BPFBF_EBPFBE_INSN_LDXDWBE, BPFBF_EBPFBE_SFMT_LDXDWBE }, | |
116 | { BPF_INSN_STXWBE, BPFBF_EBPFBE_INSN_STXWBE, BPFBF_EBPFBE_SFMT_STXWBE }, | |
117 | { BPF_INSN_STXHBE, BPFBF_EBPFBE_INSN_STXHBE, BPFBF_EBPFBE_SFMT_STXHBE }, | |
118 | { BPF_INSN_STXBBE, BPFBF_EBPFBE_INSN_STXBBE, BPFBF_EBPFBE_SFMT_STXBBE }, | |
119 | { BPF_INSN_STXDWBE, BPFBF_EBPFBE_INSN_STXDWBE, BPFBF_EBPFBE_SFMT_STXDWBE }, | |
120 | { BPF_INSN_STBBE, BPFBF_EBPFBE_INSN_STBBE, BPFBF_EBPFBE_SFMT_STBBE }, | |
121 | { BPF_INSN_STHBE, BPFBF_EBPFBE_INSN_STHBE, BPFBF_EBPFBE_SFMT_STHBE }, | |
122 | { BPF_INSN_STWBE, BPFBF_EBPFBE_INSN_STWBE, BPFBF_EBPFBE_SFMT_STWBE }, | |
123 | { BPF_INSN_STDWBE, BPFBF_EBPFBE_INSN_STDWBE, BPFBF_EBPFBE_SFMT_STDWBE }, | |
124 | { BPF_INSN_JEQIBE, BPFBF_EBPFBE_INSN_JEQIBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
125 | { BPF_INSN_JEQRBE, BPFBF_EBPFBE_INSN_JEQRBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
126 | { BPF_INSN_JEQ32IBE, BPFBF_EBPFBE_INSN_JEQ32IBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
127 | { BPF_INSN_JEQ32RBE, BPFBF_EBPFBE_INSN_JEQ32RBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
128 | { BPF_INSN_JGTIBE, BPFBF_EBPFBE_INSN_JGTIBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
129 | { BPF_INSN_JGTRBE, BPFBF_EBPFBE_INSN_JGTRBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
130 | { BPF_INSN_JGT32IBE, BPFBF_EBPFBE_INSN_JGT32IBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
131 | { BPF_INSN_JGT32RBE, BPFBF_EBPFBE_INSN_JGT32RBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
132 | { BPF_INSN_JGEIBE, BPFBF_EBPFBE_INSN_JGEIBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
133 | { BPF_INSN_JGERBE, BPFBF_EBPFBE_INSN_JGERBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
134 | { BPF_INSN_JGE32IBE, BPFBF_EBPFBE_INSN_JGE32IBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
135 | { BPF_INSN_JGE32RBE, BPFBF_EBPFBE_INSN_JGE32RBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
136 | { BPF_INSN_JLTIBE, BPFBF_EBPFBE_INSN_JLTIBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
137 | { BPF_INSN_JLTRBE, BPFBF_EBPFBE_INSN_JLTRBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
138 | { BPF_INSN_JLT32IBE, BPFBF_EBPFBE_INSN_JLT32IBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
139 | { BPF_INSN_JLT32RBE, BPFBF_EBPFBE_INSN_JLT32RBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
140 | { BPF_INSN_JLEIBE, BPFBF_EBPFBE_INSN_JLEIBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
141 | { BPF_INSN_JLERBE, BPFBF_EBPFBE_INSN_JLERBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
142 | { BPF_INSN_JLE32IBE, BPFBF_EBPFBE_INSN_JLE32IBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
143 | { BPF_INSN_JLE32RBE, BPFBF_EBPFBE_INSN_JLE32RBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
144 | { BPF_INSN_JSETIBE, BPFBF_EBPFBE_INSN_JSETIBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
145 | { BPF_INSN_JSETRBE, BPFBF_EBPFBE_INSN_JSETRBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
146 | { BPF_INSN_JSET32IBE, BPFBF_EBPFBE_INSN_JSET32IBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
147 | { BPF_INSN_JSET32RBE, BPFBF_EBPFBE_INSN_JSET32RBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
148 | { BPF_INSN_JNEIBE, BPFBF_EBPFBE_INSN_JNEIBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
149 | { BPF_INSN_JNERBE, BPFBF_EBPFBE_INSN_JNERBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
150 | { BPF_INSN_JNE32IBE, BPFBF_EBPFBE_INSN_JNE32IBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
151 | { BPF_INSN_JNE32RBE, BPFBF_EBPFBE_INSN_JNE32RBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
152 | { BPF_INSN_JSGTIBE, BPFBF_EBPFBE_INSN_JSGTIBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
153 | { BPF_INSN_JSGTRBE, BPFBF_EBPFBE_INSN_JSGTRBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
154 | { BPF_INSN_JSGT32IBE, BPFBF_EBPFBE_INSN_JSGT32IBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
155 | { BPF_INSN_JSGT32RBE, BPFBF_EBPFBE_INSN_JSGT32RBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
156 | { BPF_INSN_JSGEIBE, BPFBF_EBPFBE_INSN_JSGEIBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
157 | { BPF_INSN_JSGERBE, BPFBF_EBPFBE_INSN_JSGERBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
158 | { BPF_INSN_JSGE32IBE, BPFBF_EBPFBE_INSN_JSGE32IBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
159 | { BPF_INSN_JSGE32RBE, BPFBF_EBPFBE_INSN_JSGE32RBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
160 | { BPF_INSN_JSLTIBE, BPFBF_EBPFBE_INSN_JSLTIBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
161 | { BPF_INSN_JSLTRBE, BPFBF_EBPFBE_INSN_JSLTRBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
162 | { BPF_INSN_JSLT32IBE, BPFBF_EBPFBE_INSN_JSLT32IBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
163 | { BPF_INSN_JSLT32RBE, BPFBF_EBPFBE_INSN_JSLT32RBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
164 | { BPF_INSN_JSLEIBE, BPFBF_EBPFBE_INSN_JSLEIBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
165 | { BPF_INSN_JSLERBE, BPFBF_EBPFBE_INSN_JSLERBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
166 | { BPF_INSN_JSLE32IBE, BPFBF_EBPFBE_INSN_JSLE32IBE, BPFBF_EBPFBE_SFMT_JEQIBE }, | |
167 | { BPF_INSN_JSLE32RBE, BPFBF_EBPFBE_INSN_JSLE32RBE, BPFBF_EBPFBE_SFMT_JEQRBE }, | |
168 | { BPF_INSN_CALLBE, BPFBF_EBPFBE_INSN_CALLBE, BPFBF_EBPFBE_SFMT_CALLBE }, | |
169 | { BPF_INSN_JA, BPFBF_EBPFBE_INSN_JA, BPFBF_EBPFBE_SFMT_JA }, | |
170 | { BPF_INSN_EXIT, BPFBF_EBPFBE_INSN_EXIT, BPFBF_EBPFBE_SFMT_EXIT }, | |
171 | { BPF_INSN_XADDDWBE, BPFBF_EBPFBE_INSN_XADDDWBE, BPFBF_EBPFBE_SFMT_XADDDWBE }, | |
172 | { BPF_INSN_XADDWBE, BPFBF_EBPFBE_INSN_XADDWBE, BPFBF_EBPFBE_SFMT_XADDWBE }, | |
173 | { BPF_INSN_BRKPT, BPFBF_EBPFBE_INSN_BRKPT, BPFBF_EBPFBE_SFMT_EXIT }, | |
174 | }; | |
175 | ||
176 | static const struct insn_sem bpfbf_ebpfbe_insn_sem_invalid = | |
177 | { | |
178 | VIRTUAL_INSN_X_INVALID, BPFBF_EBPFBE_INSN_X_INVALID, BPFBF_EBPFBE_SFMT_EMPTY | |
179 | }; | |
180 | ||
181 | /* Initialize an IDESC from the compile-time computable parts. */ | |
182 | ||
183 | static INLINE void | |
184 | init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t) | |
185 | { | |
186 | const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries; | |
187 | ||
188 | id->num = t->index; | |
189 | id->sfmt = t->sfmt; | |
190 | if ((int) t->type <= 0) | |
191 | id->idata = & cgen_virtual_insn_table[- (int) t->type]; | |
192 | else | |
193 | id->idata = & insn_table[t->type]; | |
194 | id->attrs = CGEN_INSN_ATTRS (id->idata); | |
195 | /* Oh my god, a magic number. */ | |
196 | id->length = CGEN_INSN_BITSIZE (id->idata) / 8; | |
197 | ||
198 | #if WITH_PROFILE_MODEL_P | |
199 | id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index]; | |
200 | { | |
201 | SIM_DESC sd = CPU_STATE (cpu); | |
202 | SIM_ASSERT (t->index == id->timing->num); | |
203 | } | |
204 | #endif | |
205 | ||
206 | /* Semantic pointers are initialized elsewhere. */ | |
207 | } | |
208 | ||
209 | /* Initialize the instruction descriptor table. */ | |
210 | ||
211 | void | |
212 | bpfbf_ebpfbe_init_idesc_table (SIM_CPU *cpu) | |
213 | { | |
214 | IDESC *id,*tabend; | |
215 | const struct insn_sem *t,*tend; | |
216 | int tabsize = BPFBF_EBPFBE_INSN__MAX; | |
217 | IDESC *table = bpfbf_ebpfbe_insn_data; | |
218 | ||
219 | memset (table, 0, tabsize * sizeof (IDESC)); | |
220 | ||
221 | /* First set all entries to the `invalid insn'. */ | |
222 | t = & bpfbf_ebpfbe_insn_sem_invalid; | |
223 | for (id = table, tabend = table + tabsize; id < tabend; ++id) | |
224 | init_idesc (cpu, id, t); | |
225 | ||
226 | /* Now fill in the values for the chosen cpu. */ | |
227 | for (t = bpfbf_ebpfbe_insn_sem, tend = t + sizeof (bpfbf_ebpfbe_insn_sem) / sizeof (*t); | |
228 | t != tend; ++t) | |
229 | { | |
230 | init_idesc (cpu, & table[t->index], t); | |
231 | } | |
232 | ||
233 | /* Link the IDESC table into the cpu. */ | |
234 | CPU_IDESC (cpu) = table; | |
235 | } | |
236 | ||
237 | /* Given an instruction, return a pointer to its IDESC entry. */ | |
238 | ||
239 | const IDESC * | |
240 | bpfbf_ebpfbe_decode (SIM_CPU *current_cpu, IADDR pc, | |
241 | CGEN_INSN_WORD base_insn, | |
242 | ARGBUF *abuf) | |
243 | { | |
244 | /* Result of decoder. */ | |
245 | BPFBF_EBPFBE_INSN_TYPE itype; | |
246 | ||
247 | { | |
248 | CGEN_INSN_WORD insn = base_insn; | |
249 | ||
250 | { | |
251 | unsigned int val = (((insn >> 0) & (255 << 0))); | |
252 | switch (val) | |
253 | { | |
254 | case 4 : itype = BPFBF_EBPFBE_INSN_ADD32IBE; goto extract_sfmt_addibe; | |
255 | case 5 : itype = BPFBF_EBPFBE_INSN_JA; goto extract_sfmt_ja; | |
256 | case 7 : itype = BPFBF_EBPFBE_INSN_ADDIBE; goto extract_sfmt_addibe; | |
257 | case 12 : itype = BPFBF_EBPFBE_INSN_ADD32RBE; goto extract_sfmt_addrbe; | |
258 | case 15 : itype = BPFBF_EBPFBE_INSN_ADDRBE; goto extract_sfmt_addrbe; | |
259 | case 20 : itype = BPFBF_EBPFBE_INSN_SUB32IBE; goto extract_sfmt_addibe; | |
260 | case 21 : itype = BPFBF_EBPFBE_INSN_JEQIBE; goto extract_sfmt_jeqibe; | |
261 | case 22 : itype = BPFBF_EBPFBE_INSN_JEQ32IBE; goto extract_sfmt_jeqibe; | |
262 | case 23 : itype = BPFBF_EBPFBE_INSN_SUBIBE; goto extract_sfmt_addibe; | |
263 | case 24 : itype = BPFBF_EBPFBE_INSN_LDDWBE; goto extract_sfmt_lddwbe; | |
264 | case 28 : itype = BPFBF_EBPFBE_INSN_SUB32RBE; goto extract_sfmt_addrbe; | |
265 | case 29 : itype = BPFBF_EBPFBE_INSN_JEQRBE; goto extract_sfmt_jeqrbe; | |
266 | case 30 : itype = BPFBF_EBPFBE_INSN_JEQ32RBE; goto extract_sfmt_jeqrbe; | |
267 | case 31 : itype = BPFBF_EBPFBE_INSN_SUBRBE; goto extract_sfmt_addrbe; | |
268 | case 32 : itype = BPFBF_EBPFBE_INSN_LDABSW; goto extract_sfmt_ldabsw; | |
269 | case 36 : itype = BPFBF_EBPFBE_INSN_MUL32IBE; goto extract_sfmt_addibe; | |
270 | case 37 : itype = BPFBF_EBPFBE_INSN_JGTIBE; goto extract_sfmt_jeqibe; | |
271 | case 38 : itype = BPFBF_EBPFBE_INSN_JGT32IBE; goto extract_sfmt_jeqibe; | |
272 | case 39 : itype = BPFBF_EBPFBE_INSN_MULIBE; goto extract_sfmt_addibe; | |
273 | case 40 : itype = BPFBF_EBPFBE_INSN_LDABSH; goto extract_sfmt_ldabsh; | |
274 | case 44 : itype = BPFBF_EBPFBE_INSN_MUL32RBE; goto extract_sfmt_addrbe; | |
275 | case 45 : itype = BPFBF_EBPFBE_INSN_JGTRBE; goto extract_sfmt_jeqrbe; | |
276 | case 46 : itype = BPFBF_EBPFBE_INSN_JGT32RBE; goto extract_sfmt_jeqrbe; | |
277 | case 47 : itype = BPFBF_EBPFBE_INSN_MULRBE; goto extract_sfmt_addrbe; | |
278 | case 48 : itype = BPFBF_EBPFBE_INSN_LDABSB; goto extract_sfmt_ldabsb; | |
279 | case 52 : itype = BPFBF_EBPFBE_INSN_DIV32IBE; goto extract_sfmt_addibe; | |
280 | case 53 : itype = BPFBF_EBPFBE_INSN_JGEIBE; goto extract_sfmt_jeqibe; | |
281 | case 54 : itype = BPFBF_EBPFBE_INSN_JGE32IBE; goto extract_sfmt_jeqibe; | |
282 | case 55 : itype = BPFBF_EBPFBE_INSN_DIVIBE; goto extract_sfmt_addibe; | |
283 | case 56 : itype = BPFBF_EBPFBE_INSN_LDABSDW; goto extract_sfmt_ldabsdw; | |
284 | case 60 : itype = BPFBF_EBPFBE_INSN_DIV32RBE; goto extract_sfmt_addrbe; | |
285 | case 61 : itype = BPFBF_EBPFBE_INSN_JGERBE; goto extract_sfmt_jeqrbe; | |
286 | case 62 : itype = BPFBF_EBPFBE_INSN_JGE32RBE; goto extract_sfmt_jeqrbe; | |
287 | case 63 : itype = BPFBF_EBPFBE_INSN_DIVRBE; goto extract_sfmt_addrbe; | |
288 | case 64 : itype = BPFBF_EBPFBE_INSN_LDINDWBE; goto extract_sfmt_ldindwbe; | |
289 | case 68 : itype = BPFBF_EBPFBE_INSN_OR32IBE; goto extract_sfmt_addibe; | |
290 | case 69 : itype = BPFBF_EBPFBE_INSN_JSETIBE; goto extract_sfmt_jeqibe; | |
291 | case 70 : itype = BPFBF_EBPFBE_INSN_JSET32IBE; goto extract_sfmt_jeqibe; | |
292 | case 71 : itype = BPFBF_EBPFBE_INSN_ORIBE; goto extract_sfmt_addibe; | |
293 | case 72 : itype = BPFBF_EBPFBE_INSN_LDINDHBE; goto extract_sfmt_ldindhbe; | |
294 | case 76 : itype = BPFBF_EBPFBE_INSN_OR32RBE; goto extract_sfmt_addrbe; | |
295 | case 77 : itype = BPFBF_EBPFBE_INSN_JSETRBE; goto extract_sfmt_jeqrbe; | |
296 | case 78 : itype = BPFBF_EBPFBE_INSN_JSET32RBE; goto extract_sfmt_jeqrbe; | |
297 | case 79 : itype = BPFBF_EBPFBE_INSN_ORRBE; goto extract_sfmt_addrbe; | |
298 | case 80 : itype = BPFBF_EBPFBE_INSN_LDINDBBE; goto extract_sfmt_ldindbbe; | |
299 | case 84 : itype = BPFBF_EBPFBE_INSN_AND32IBE; goto extract_sfmt_addibe; | |
300 | case 85 : itype = BPFBF_EBPFBE_INSN_JNEIBE; goto extract_sfmt_jeqibe; | |
301 | case 86 : itype = BPFBF_EBPFBE_INSN_JNE32IBE; goto extract_sfmt_jeqibe; | |
302 | case 87 : itype = BPFBF_EBPFBE_INSN_ANDIBE; goto extract_sfmt_addibe; | |
303 | case 88 : itype = BPFBF_EBPFBE_INSN_LDINDDWBE; goto extract_sfmt_ldinddwbe; | |
304 | case 92 : itype = BPFBF_EBPFBE_INSN_AND32RBE; goto extract_sfmt_addrbe; | |
305 | case 93 : itype = BPFBF_EBPFBE_INSN_JNERBE; goto extract_sfmt_jeqrbe; | |
306 | case 94 : itype = BPFBF_EBPFBE_INSN_JNE32RBE; goto extract_sfmt_jeqrbe; | |
307 | case 95 : itype = BPFBF_EBPFBE_INSN_ANDRBE; goto extract_sfmt_addrbe; | |
308 | case 97 : itype = BPFBF_EBPFBE_INSN_LDXWBE; goto extract_sfmt_ldxwbe; | |
309 | case 98 : itype = BPFBF_EBPFBE_INSN_STWBE; goto extract_sfmt_stwbe; | |
310 | case 99 : itype = BPFBF_EBPFBE_INSN_STXWBE; goto extract_sfmt_stxwbe; | |
311 | case 100 : itype = BPFBF_EBPFBE_INSN_LSH32IBE; goto extract_sfmt_addibe; | |
312 | case 101 : itype = BPFBF_EBPFBE_INSN_JSGTIBE; goto extract_sfmt_jeqibe; | |
313 | case 102 : itype = BPFBF_EBPFBE_INSN_JSGT32IBE; goto extract_sfmt_jeqibe; | |
314 | case 103 : itype = BPFBF_EBPFBE_INSN_LSHIBE; goto extract_sfmt_addibe; | |
315 | case 105 : itype = BPFBF_EBPFBE_INSN_LDXHBE; goto extract_sfmt_ldxhbe; | |
316 | case 106 : itype = BPFBF_EBPFBE_INSN_STHBE; goto extract_sfmt_sthbe; | |
317 | case 107 : itype = BPFBF_EBPFBE_INSN_STXHBE; goto extract_sfmt_stxhbe; | |
318 | case 108 : itype = BPFBF_EBPFBE_INSN_LSH32RBE; goto extract_sfmt_addrbe; | |
319 | case 109 : itype = BPFBF_EBPFBE_INSN_JSGTRBE; goto extract_sfmt_jeqrbe; | |
320 | case 110 : itype = BPFBF_EBPFBE_INSN_JSGT32RBE; goto extract_sfmt_jeqrbe; | |
321 | case 111 : itype = BPFBF_EBPFBE_INSN_LSHRBE; goto extract_sfmt_addrbe; | |
322 | case 113 : itype = BPFBF_EBPFBE_INSN_LDXBBE; goto extract_sfmt_ldxbbe; | |
323 | case 114 : itype = BPFBF_EBPFBE_INSN_STBBE; goto extract_sfmt_stbbe; | |
324 | case 115 : itype = BPFBF_EBPFBE_INSN_STXBBE; goto extract_sfmt_stxbbe; | |
325 | case 116 : itype = BPFBF_EBPFBE_INSN_RSH32IBE; goto extract_sfmt_addibe; | |
326 | case 117 : itype = BPFBF_EBPFBE_INSN_JSGEIBE; goto extract_sfmt_jeqibe; | |
327 | case 118 : itype = BPFBF_EBPFBE_INSN_JSGE32IBE; goto extract_sfmt_jeqibe; | |
328 | case 119 : itype = BPFBF_EBPFBE_INSN_RSHIBE; goto extract_sfmt_addibe; | |
329 | case 121 : itype = BPFBF_EBPFBE_INSN_LDXDWBE; goto extract_sfmt_ldxdwbe; | |
330 | case 122 : itype = BPFBF_EBPFBE_INSN_STDWBE; goto extract_sfmt_stdwbe; | |
331 | case 123 : itype = BPFBF_EBPFBE_INSN_STXDWBE; goto extract_sfmt_stxdwbe; | |
332 | case 124 : itype = BPFBF_EBPFBE_INSN_RSH32RBE; goto extract_sfmt_addrbe; | |
333 | case 125 : itype = BPFBF_EBPFBE_INSN_JSGERBE; goto extract_sfmt_jeqrbe; | |
334 | case 126 : itype = BPFBF_EBPFBE_INSN_JSGE32RBE; goto extract_sfmt_jeqrbe; | |
335 | case 127 : itype = BPFBF_EBPFBE_INSN_RSHRBE; goto extract_sfmt_addrbe; | |
336 | case 132 : itype = BPFBF_EBPFBE_INSN_NEG32BE; goto extract_sfmt_negbe; | |
337 | case 133 : itype = BPFBF_EBPFBE_INSN_CALLBE; goto extract_sfmt_callbe; | |
338 | case 135 : itype = BPFBF_EBPFBE_INSN_NEGBE; goto extract_sfmt_negbe; | |
339 | case 140 : itype = BPFBF_EBPFBE_INSN_BRKPT; goto extract_sfmt_exit; | |
340 | case 148 : itype = BPFBF_EBPFBE_INSN_MOD32IBE; goto extract_sfmt_addibe; | |
341 | case 149 : itype = BPFBF_EBPFBE_INSN_EXIT; goto extract_sfmt_exit; | |
342 | case 151 : itype = BPFBF_EBPFBE_INSN_MODIBE; goto extract_sfmt_addibe; | |
343 | case 156 : itype = BPFBF_EBPFBE_INSN_MOD32RBE; goto extract_sfmt_addrbe; | |
344 | case 159 : itype = BPFBF_EBPFBE_INSN_MODRBE; goto extract_sfmt_addrbe; | |
345 | case 164 : itype = BPFBF_EBPFBE_INSN_XOR32IBE; goto extract_sfmt_addibe; | |
346 | case 165 : itype = BPFBF_EBPFBE_INSN_JLTIBE; goto extract_sfmt_jeqibe; | |
347 | case 166 : itype = BPFBF_EBPFBE_INSN_JLT32IBE; goto extract_sfmt_jeqibe; | |
348 | case 167 : itype = BPFBF_EBPFBE_INSN_XORIBE; goto extract_sfmt_addibe; | |
349 | case 172 : itype = BPFBF_EBPFBE_INSN_XOR32RBE; goto extract_sfmt_addrbe; | |
350 | case 173 : itype = BPFBF_EBPFBE_INSN_JLTRBE; goto extract_sfmt_jeqrbe; | |
351 | case 174 : itype = BPFBF_EBPFBE_INSN_JLT32RBE; goto extract_sfmt_jeqrbe; | |
352 | case 175 : itype = BPFBF_EBPFBE_INSN_XORRBE; goto extract_sfmt_addrbe; | |
353 | case 180 : itype = BPFBF_EBPFBE_INSN_MOV32IBE; goto extract_sfmt_movibe; | |
354 | case 181 : itype = BPFBF_EBPFBE_INSN_JLEIBE; goto extract_sfmt_jeqibe; | |
355 | case 182 : itype = BPFBF_EBPFBE_INSN_JLE32IBE; goto extract_sfmt_jeqibe; | |
356 | case 183 : itype = BPFBF_EBPFBE_INSN_MOVIBE; goto extract_sfmt_movibe; | |
357 | case 188 : itype = BPFBF_EBPFBE_INSN_MOV32RBE; goto extract_sfmt_movrbe; | |
358 | case 189 : itype = BPFBF_EBPFBE_INSN_JLERBE; goto extract_sfmt_jeqrbe; | |
359 | case 190 : itype = BPFBF_EBPFBE_INSN_JLE32RBE; goto extract_sfmt_jeqrbe; | |
360 | case 191 : itype = BPFBF_EBPFBE_INSN_MOVRBE; goto extract_sfmt_movrbe; | |
361 | case 195 : itype = BPFBF_EBPFBE_INSN_XADDWBE; goto extract_sfmt_xaddwbe; | |
362 | case 196 : itype = BPFBF_EBPFBE_INSN_ARSH32IBE; goto extract_sfmt_addibe; | |
363 | case 197 : itype = BPFBF_EBPFBE_INSN_JSLTIBE; goto extract_sfmt_jeqibe; | |
364 | case 198 : itype = BPFBF_EBPFBE_INSN_JSLT32IBE; goto extract_sfmt_jeqibe; | |
365 | case 199 : itype = BPFBF_EBPFBE_INSN_ARSHIBE; goto extract_sfmt_addibe; | |
366 | case 204 : itype = BPFBF_EBPFBE_INSN_ARSH32RBE; goto extract_sfmt_addrbe; | |
367 | case 205 : itype = BPFBF_EBPFBE_INSN_JSLTRBE; goto extract_sfmt_jeqrbe; | |
368 | case 206 : itype = BPFBF_EBPFBE_INSN_JSLT32RBE; goto extract_sfmt_jeqrbe; | |
369 | case 207 : itype = BPFBF_EBPFBE_INSN_ARSHRBE; goto extract_sfmt_addrbe; | |
370 | case 212 : itype = BPFBF_EBPFBE_INSN_ENDLEBE; goto extract_sfmt_endlebe; | |
371 | case 213 : itype = BPFBF_EBPFBE_INSN_JSLEIBE; goto extract_sfmt_jeqibe; | |
372 | case 214 : itype = BPFBF_EBPFBE_INSN_JSLE32IBE; goto extract_sfmt_jeqibe; | |
373 | case 219 : itype = BPFBF_EBPFBE_INSN_XADDDWBE; goto extract_sfmt_xadddwbe; | |
374 | case 220 : itype = BPFBF_EBPFBE_INSN_ENDBEBE; goto extract_sfmt_endlebe; | |
375 | case 221 : itype = BPFBF_EBPFBE_INSN_JSLERBE; goto extract_sfmt_jeqrbe; | |
376 | case 222 : itype = BPFBF_EBPFBE_INSN_JSLE32RBE; goto extract_sfmt_jeqrbe; | |
377 | default : itype = BPFBF_EBPFBE_INSN_X_INVALID; goto extract_sfmt_empty; | |
378 | } | |
379 | } | |
380 | } | |
381 | ||
382 | /* The instruction has been decoded, now extract the fields. */ | |
383 | ||
384 | extract_sfmt_empty: | |
385 | { | |
386 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
387 | #define FLD(f) abuf->fields.sfmt_empty.f | |
388 | ||
389 | ||
390 | /* Record the fields for the semantic handler. */ | |
ba2f0de2 | 391 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0)); |
8c4c1818 JM |
392 | |
393 | #undef FLD | |
394 | return idesc; | |
395 | } | |
396 | ||
397 | extract_sfmt_addibe: | |
398 | { | |
399 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
400 | CGEN_INSN_WORD insn = base_insn; | |
401 | #define FLD(f) abuf->fields.sfmt_stbbe.f | |
402 | INT f_imm32; | |
403 | UINT f_dstbe; | |
404 | ||
405 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
406 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
407 | ||
408 | /* Record the fields for the semantic handler. */ | |
409 | FLD (f_dstbe) = f_dstbe; | |
410 | FLD (f_imm32) = f_imm32; | |
ba2f0de2 | 411 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addibe", "f_dstbe 0x%x", 'x', f_dstbe, "f_imm32 0x%x", 'x', f_imm32, (char *) 0)); |
8c4c1818 JM |
412 | |
413 | #undef FLD | |
414 | return idesc; | |
415 | } | |
416 | ||
417 | extract_sfmt_addrbe: | |
418 | { | |
419 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
420 | CGEN_INSN_WORD insn = base_insn; | |
421 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
422 | UINT f_dstbe; | |
423 | UINT f_srcbe; | |
424 | ||
425 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
426 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
427 | ||
428 | /* Record the fields for the semantic handler. */ | |
429 | FLD (f_dstbe) = f_dstbe; | |
430 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 431 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addrbe", "f_dstbe 0x%x", 'x', f_dstbe, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
432 | |
433 | #undef FLD | |
434 | return idesc; | |
435 | } | |
436 | ||
437 | extract_sfmt_negbe: | |
438 | { | |
439 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
440 | CGEN_INSN_WORD insn = base_insn; | |
441 | #define FLD(f) abuf->fields.sfmt_lddwbe.f | |
442 | UINT f_dstbe; | |
443 | ||
444 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
445 | ||
446 | /* Record the fields for the semantic handler. */ | |
447 | FLD (f_dstbe) = f_dstbe; | |
ba2f0de2 | 448 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_negbe", "f_dstbe 0x%x", 'x', f_dstbe, (char *) 0)); |
8c4c1818 JM |
449 | |
450 | #undef FLD | |
451 | return idesc; | |
452 | } | |
453 | ||
454 | extract_sfmt_movibe: | |
455 | { | |
456 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
457 | CGEN_INSN_WORD insn = base_insn; | |
458 | #define FLD(f) abuf->fields.sfmt_stbbe.f | |
459 | INT f_imm32; | |
460 | UINT f_dstbe; | |
461 | ||
462 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
463 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
464 | ||
465 | /* Record the fields for the semantic handler. */ | |
466 | FLD (f_imm32) = f_imm32; | |
467 | FLD (f_dstbe) = f_dstbe; | |
ba2f0de2 | 468 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movibe", "f_imm32 0x%x", 'x', f_imm32, "f_dstbe 0x%x", 'x', f_dstbe, (char *) 0)); |
8c4c1818 JM |
469 | |
470 | #undef FLD | |
471 | return idesc; | |
472 | } | |
473 | ||
474 | extract_sfmt_movrbe: | |
475 | { | |
476 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
477 | CGEN_INSN_WORD insn = base_insn; | |
478 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
479 | UINT f_dstbe; | |
480 | UINT f_srcbe; | |
481 | ||
482 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
483 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
484 | ||
485 | /* Record the fields for the semantic handler. */ | |
486 | FLD (f_srcbe) = f_srcbe; | |
487 | FLD (f_dstbe) = f_dstbe; | |
ba2f0de2 | 488 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movrbe", "f_srcbe 0x%x", 'x', f_srcbe, "f_dstbe 0x%x", 'x', f_dstbe, (char *) 0)); |
8c4c1818 JM |
489 | |
490 | #undef FLD | |
491 | return idesc; | |
492 | } | |
493 | ||
494 | extract_sfmt_endlebe: | |
495 | { | |
496 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
497 | CGEN_INSN_WORD insn = base_insn; | |
498 | #define FLD(f) abuf->fields.sfmt_stbbe.f | |
499 | INT f_imm32; | |
500 | UINT f_dstbe; | |
501 | ||
502 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
503 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
504 | ||
505 | /* Record the fields for the semantic handler. */ | |
506 | FLD (f_dstbe) = f_dstbe; | |
507 | FLD (f_imm32) = f_imm32; | |
ba2f0de2 | 508 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_endlebe", "f_dstbe 0x%x", 'x', f_dstbe, "f_imm32 0x%x", 'x', f_imm32, (char *) 0)); |
8c4c1818 JM |
509 | |
510 | #undef FLD | |
511 | return idesc; | |
512 | } | |
513 | ||
514 | extract_sfmt_lddwbe: | |
515 | { | |
516 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
517 | CGEN_INSN_WORD insn = base_insn; | |
518 | #define FLD(f) abuf->fields.sfmt_lddwbe.f | |
519 | UINT f_imm64_c; | |
520 | UINT f_imm64_b; | |
521 | UINT f_imm64_a; | |
522 | UINT f_dstbe; | |
523 | DI f_imm64; | |
524 | /* Contents of trailing part of insn. */ | |
525 | UINT word_1; | |
526 | UINT word_2; | |
527 | ||
528 | word_1 = GETIMEMUSI (current_cpu, pc + 8); | |
529 | word_2 = GETIMEMUSI (current_cpu, pc + 12); | |
530 | f_imm64_c = (0|(EXTRACT_LSB0_UINT (word_2, 32, 31, 32) << 0)); | |
531 | f_imm64_b = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); | |
532 | f_imm64_a = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
533 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
534 | { | |
535 | f_imm64 = ((((((UDI) (UINT) (f_imm64_c))) << (32))) | (((UDI) (UINT) (f_imm64_a)))); | |
536 | } | |
537 | ||
538 | /* Record the fields for the semantic handler. */ | |
539 | FLD (f_imm64) = f_imm64; | |
540 | FLD (f_dstbe) = f_dstbe; | |
ba2f0de2 | 541 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lddwbe", "f_imm64 0x%x", 'x', f_imm64, "f_dstbe 0x%x", 'x', f_dstbe, (char *) 0)); |
8c4c1818 JM |
542 | |
543 | #undef FLD | |
544 | return idesc; | |
545 | } | |
546 | ||
547 | extract_sfmt_ldabsw: | |
548 | { | |
549 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
550 | CGEN_INSN_WORD insn = base_insn; | |
551 | #define FLD(f) abuf->fields.sfmt_ldindwbe.f | |
552 | INT f_imm32; | |
553 | ||
554 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
555 | ||
556 | /* Record the fields for the semantic handler. */ | |
557 | FLD (f_imm32) = f_imm32; | |
ba2f0de2 | 558 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldabsw", "f_imm32 0x%x", 'x', f_imm32, (char *) 0)); |
8c4c1818 JM |
559 | |
560 | #undef FLD | |
561 | return idesc; | |
562 | } | |
563 | ||
564 | extract_sfmt_ldabsh: | |
565 | { | |
566 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
567 | CGEN_INSN_WORD insn = base_insn; | |
568 | #define FLD(f) abuf->fields.sfmt_ldindwbe.f | |
569 | INT f_imm32; | |
570 | ||
571 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
572 | ||
573 | /* Record the fields for the semantic handler. */ | |
574 | FLD (f_imm32) = f_imm32; | |
ba2f0de2 | 575 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldabsh", "f_imm32 0x%x", 'x', f_imm32, (char *) 0)); |
8c4c1818 JM |
576 | |
577 | #undef FLD | |
578 | return idesc; | |
579 | } | |
580 | ||
581 | extract_sfmt_ldabsb: | |
582 | { | |
583 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
584 | CGEN_INSN_WORD insn = base_insn; | |
585 | #define FLD(f) abuf->fields.sfmt_ldindwbe.f | |
586 | INT f_imm32; | |
587 | ||
588 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
589 | ||
590 | /* Record the fields for the semantic handler. */ | |
591 | FLD (f_imm32) = f_imm32; | |
ba2f0de2 | 592 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldabsb", "f_imm32 0x%x", 'x', f_imm32, (char *) 0)); |
8c4c1818 JM |
593 | |
594 | #undef FLD | |
595 | return idesc; | |
596 | } | |
597 | ||
598 | extract_sfmt_ldabsdw: | |
599 | { | |
600 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
601 | CGEN_INSN_WORD insn = base_insn; | |
602 | #define FLD(f) abuf->fields.sfmt_ldindwbe.f | |
603 | INT f_imm32; | |
604 | ||
605 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
606 | ||
607 | /* Record the fields for the semantic handler. */ | |
608 | FLD (f_imm32) = f_imm32; | |
ba2f0de2 | 609 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldabsdw", "f_imm32 0x%x", 'x', f_imm32, (char *) 0)); |
8c4c1818 JM |
610 | |
611 | #undef FLD | |
612 | return idesc; | |
613 | } | |
614 | ||
615 | extract_sfmt_ldindwbe: | |
616 | { | |
617 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
618 | CGEN_INSN_WORD insn = base_insn; | |
619 | #define FLD(f) abuf->fields.sfmt_ldindwbe.f | |
620 | INT f_imm32; | |
621 | UINT f_srcbe; | |
622 | ||
623 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
624 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
625 | ||
626 | /* Record the fields for the semantic handler. */ | |
627 | FLD (f_imm32) = f_imm32; | |
628 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 629 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldindwbe", "f_imm32 0x%x", 'x', f_imm32, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
630 | |
631 | #undef FLD | |
632 | return idesc; | |
633 | } | |
634 | ||
635 | extract_sfmt_ldindhbe: | |
636 | { | |
637 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
638 | CGEN_INSN_WORD insn = base_insn; | |
639 | #define FLD(f) abuf->fields.sfmt_ldindwbe.f | |
640 | INT f_imm32; | |
641 | UINT f_srcbe; | |
642 | ||
643 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
644 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
645 | ||
646 | /* Record the fields for the semantic handler. */ | |
647 | FLD (f_imm32) = f_imm32; | |
648 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 649 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldindhbe", "f_imm32 0x%x", 'x', f_imm32, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
650 | |
651 | #undef FLD | |
652 | return idesc; | |
653 | } | |
654 | ||
655 | extract_sfmt_ldindbbe: | |
656 | { | |
657 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
658 | CGEN_INSN_WORD insn = base_insn; | |
659 | #define FLD(f) abuf->fields.sfmt_ldindwbe.f | |
660 | INT f_imm32; | |
661 | UINT f_srcbe; | |
662 | ||
663 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
664 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
665 | ||
666 | /* Record the fields for the semantic handler. */ | |
667 | FLD (f_imm32) = f_imm32; | |
668 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 669 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldindbbe", "f_imm32 0x%x", 'x', f_imm32, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
670 | |
671 | #undef FLD | |
672 | return idesc; | |
673 | } | |
674 | ||
675 | extract_sfmt_ldinddwbe: | |
676 | { | |
677 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
678 | CGEN_INSN_WORD insn = base_insn; | |
679 | #define FLD(f) abuf->fields.sfmt_ldindwbe.f | |
680 | INT f_imm32; | |
681 | UINT f_srcbe; | |
682 | ||
683 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
684 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
685 | ||
686 | /* Record the fields for the semantic handler. */ | |
687 | FLD (f_imm32) = f_imm32; | |
688 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 689 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldinddwbe", "f_imm32 0x%x", 'x', f_imm32, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
690 | |
691 | #undef FLD | |
692 | return idesc; | |
693 | } | |
694 | ||
695 | extract_sfmt_ldxwbe: | |
696 | { | |
697 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
698 | CGEN_INSN_WORD insn = base_insn; | |
699 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
700 | HI f_offset16; | |
701 | UINT f_dstbe; | |
702 | UINT f_srcbe; | |
703 | ||
704 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
705 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
706 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
707 | ||
708 | /* Record the fields for the semantic handler. */ | |
709 | FLD (f_offset16) = f_offset16; | |
710 | FLD (f_srcbe) = f_srcbe; | |
711 | FLD (f_dstbe) = f_dstbe; | |
ba2f0de2 | 712 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldxwbe", "f_offset16 0x%x", 'x', f_offset16, "f_srcbe 0x%x", 'x', f_srcbe, "f_dstbe 0x%x", 'x', f_dstbe, (char *) 0)); |
8c4c1818 JM |
713 | |
714 | #undef FLD | |
715 | return idesc; | |
716 | } | |
717 | ||
718 | extract_sfmt_ldxhbe: | |
719 | { | |
720 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
721 | CGEN_INSN_WORD insn = base_insn; | |
722 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
723 | HI f_offset16; | |
724 | UINT f_dstbe; | |
725 | UINT f_srcbe; | |
726 | ||
727 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
728 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
729 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
730 | ||
731 | /* Record the fields for the semantic handler. */ | |
732 | FLD (f_offset16) = f_offset16; | |
733 | FLD (f_srcbe) = f_srcbe; | |
734 | FLD (f_dstbe) = f_dstbe; | |
ba2f0de2 | 735 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldxhbe", "f_offset16 0x%x", 'x', f_offset16, "f_srcbe 0x%x", 'x', f_srcbe, "f_dstbe 0x%x", 'x', f_dstbe, (char *) 0)); |
8c4c1818 JM |
736 | |
737 | #undef FLD | |
738 | return idesc; | |
739 | } | |
740 | ||
741 | extract_sfmt_ldxbbe: | |
742 | { | |
743 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
744 | CGEN_INSN_WORD insn = base_insn; | |
745 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
746 | HI f_offset16; | |
747 | UINT f_dstbe; | |
748 | UINT f_srcbe; | |
749 | ||
750 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
751 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
752 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
753 | ||
754 | /* Record the fields for the semantic handler. */ | |
755 | FLD (f_offset16) = f_offset16; | |
756 | FLD (f_srcbe) = f_srcbe; | |
757 | FLD (f_dstbe) = f_dstbe; | |
ba2f0de2 | 758 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldxbbe", "f_offset16 0x%x", 'x', f_offset16, "f_srcbe 0x%x", 'x', f_srcbe, "f_dstbe 0x%x", 'x', f_dstbe, (char *) 0)); |
8c4c1818 JM |
759 | |
760 | #undef FLD | |
761 | return idesc; | |
762 | } | |
763 | ||
764 | extract_sfmt_ldxdwbe: | |
765 | { | |
766 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
767 | CGEN_INSN_WORD insn = base_insn; | |
768 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
769 | HI f_offset16; | |
770 | UINT f_dstbe; | |
771 | UINT f_srcbe; | |
772 | ||
773 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
774 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
775 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
776 | ||
777 | /* Record the fields for the semantic handler. */ | |
778 | FLD (f_offset16) = f_offset16; | |
779 | FLD (f_srcbe) = f_srcbe; | |
780 | FLD (f_dstbe) = f_dstbe; | |
ba2f0de2 | 781 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldxdwbe", "f_offset16 0x%x", 'x', f_offset16, "f_srcbe 0x%x", 'x', f_srcbe, "f_dstbe 0x%x", 'x', f_dstbe, (char *) 0)); |
8c4c1818 JM |
782 | |
783 | #undef FLD | |
784 | return idesc; | |
785 | } | |
786 | ||
787 | extract_sfmt_stxwbe: | |
788 | { | |
789 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
790 | CGEN_INSN_WORD insn = base_insn; | |
791 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
792 | HI f_offset16; | |
793 | UINT f_dstbe; | |
794 | UINT f_srcbe; | |
795 | ||
796 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
797 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
798 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
799 | ||
800 | /* Record the fields for the semantic handler. */ | |
801 | FLD (f_dstbe) = f_dstbe; | |
802 | FLD (f_offset16) = f_offset16; | |
803 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 804 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stxwbe", "f_dstbe 0x%x", 'x', f_dstbe, "f_offset16 0x%x", 'x', f_offset16, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
805 | |
806 | #undef FLD | |
807 | return idesc; | |
808 | } | |
809 | ||
810 | extract_sfmt_stxhbe: | |
811 | { | |
812 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
813 | CGEN_INSN_WORD insn = base_insn; | |
814 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
815 | HI f_offset16; | |
816 | UINT f_dstbe; | |
817 | UINT f_srcbe; | |
818 | ||
819 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
820 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
821 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
822 | ||
823 | /* Record the fields for the semantic handler. */ | |
824 | FLD (f_dstbe) = f_dstbe; | |
825 | FLD (f_offset16) = f_offset16; | |
826 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 827 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stxhbe", "f_dstbe 0x%x", 'x', f_dstbe, "f_offset16 0x%x", 'x', f_offset16, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
828 | |
829 | #undef FLD | |
830 | return idesc; | |
831 | } | |
832 | ||
833 | extract_sfmt_stxbbe: | |
834 | { | |
835 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
836 | CGEN_INSN_WORD insn = base_insn; | |
837 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
838 | HI f_offset16; | |
839 | UINT f_dstbe; | |
840 | UINT f_srcbe; | |
841 | ||
842 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
843 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
844 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
845 | ||
846 | /* Record the fields for the semantic handler. */ | |
847 | FLD (f_dstbe) = f_dstbe; | |
848 | FLD (f_offset16) = f_offset16; | |
849 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 850 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stxbbe", "f_dstbe 0x%x", 'x', f_dstbe, "f_offset16 0x%x", 'x', f_offset16, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
851 | |
852 | #undef FLD | |
853 | return idesc; | |
854 | } | |
855 | ||
856 | extract_sfmt_stxdwbe: | |
857 | { | |
858 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
859 | CGEN_INSN_WORD insn = base_insn; | |
860 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
861 | HI f_offset16; | |
862 | UINT f_dstbe; | |
863 | UINT f_srcbe; | |
864 | ||
865 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
866 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
867 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
868 | ||
869 | /* Record the fields for the semantic handler. */ | |
870 | FLD (f_dstbe) = f_dstbe; | |
871 | FLD (f_offset16) = f_offset16; | |
872 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 873 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stxdwbe", "f_dstbe 0x%x", 'x', f_dstbe, "f_offset16 0x%x", 'x', f_offset16, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
874 | |
875 | #undef FLD | |
876 | return idesc; | |
877 | } | |
878 | ||
879 | extract_sfmt_stbbe: | |
880 | { | |
881 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
882 | CGEN_INSN_WORD insn = base_insn; | |
883 | #define FLD(f) abuf->fields.sfmt_stbbe.f | |
884 | INT f_imm32; | |
885 | HI f_offset16; | |
886 | UINT f_dstbe; | |
887 | ||
888 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
889 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
890 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
891 | ||
892 | /* Record the fields for the semantic handler. */ | |
893 | FLD (f_dstbe) = f_dstbe; | |
894 | FLD (f_imm32) = f_imm32; | |
895 | FLD (f_offset16) = f_offset16; | |
ba2f0de2 | 896 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stbbe", "f_dstbe 0x%x", 'x', f_dstbe, "f_imm32 0x%x", 'x', f_imm32, "f_offset16 0x%x", 'x', f_offset16, (char *) 0)); |
8c4c1818 JM |
897 | |
898 | #undef FLD | |
899 | return idesc; | |
900 | } | |
901 | ||
902 | extract_sfmt_sthbe: | |
903 | { | |
904 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
905 | CGEN_INSN_WORD insn = base_insn; | |
906 | #define FLD(f) abuf->fields.sfmt_stbbe.f | |
907 | INT f_imm32; | |
908 | HI f_offset16; | |
909 | UINT f_dstbe; | |
910 | ||
911 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
912 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
913 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
914 | ||
915 | /* Record the fields for the semantic handler. */ | |
916 | FLD (f_dstbe) = f_dstbe; | |
917 | FLD (f_imm32) = f_imm32; | |
918 | FLD (f_offset16) = f_offset16; | |
ba2f0de2 | 919 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sthbe", "f_dstbe 0x%x", 'x', f_dstbe, "f_imm32 0x%x", 'x', f_imm32, "f_offset16 0x%x", 'x', f_offset16, (char *) 0)); |
8c4c1818 JM |
920 | |
921 | #undef FLD | |
922 | return idesc; | |
923 | } | |
924 | ||
925 | extract_sfmt_stwbe: | |
926 | { | |
927 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
928 | CGEN_INSN_WORD insn = base_insn; | |
929 | #define FLD(f) abuf->fields.sfmt_stbbe.f | |
930 | INT f_imm32; | |
931 | HI f_offset16; | |
932 | UINT f_dstbe; | |
933 | ||
934 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
935 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
936 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
937 | ||
938 | /* Record the fields for the semantic handler. */ | |
939 | FLD (f_dstbe) = f_dstbe; | |
940 | FLD (f_imm32) = f_imm32; | |
941 | FLD (f_offset16) = f_offset16; | |
ba2f0de2 | 942 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stwbe", "f_dstbe 0x%x", 'x', f_dstbe, "f_imm32 0x%x", 'x', f_imm32, "f_offset16 0x%x", 'x', f_offset16, (char *) 0)); |
8c4c1818 JM |
943 | |
944 | #undef FLD | |
945 | return idesc; | |
946 | } | |
947 | ||
948 | extract_sfmt_stdwbe: | |
949 | { | |
950 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
951 | CGEN_INSN_WORD insn = base_insn; | |
952 | #define FLD(f) abuf->fields.sfmt_stbbe.f | |
953 | INT f_imm32; | |
954 | HI f_offset16; | |
955 | UINT f_dstbe; | |
956 | ||
957 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
958 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
959 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
960 | ||
961 | /* Record the fields for the semantic handler. */ | |
962 | FLD (f_dstbe) = f_dstbe; | |
963 | FLD (f_imm32) = f_imm32; | |
964 | FLD (f_offset16) = f_offset16; | |
ba2f0de2 | 965 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stdwbe", "f_dstbe 0x%x", 'x', f_dstbe, "f_imm32 0x%x", 'x', f_imm32, "f_offset16 0x%x", 'x', f_offset16, (char *) 0)); |
8c4c1818 JM |
966 | |
967 | #undef FLD | |
968 | return idesc; | |
969 | } | |
970 | ||
971 | extract_sfmt_jeqibe: | |
972 | { | |
973 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
974 | CGEN_INSN_WORD insn = base_insn; | |
975 | #define FLD(f) abuf->fields.sfmt_stbbe.f | |
976 | INT f_imm32; | |
977 | HI f_offset16; | |
978 | UINT f_dstbe; | |
979 | ||
980 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
981 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
982 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
983 | ||
984 | /* Record the fields for the semantic handler. */ | |
985 | FLD (f_offset16) = f_offset16; | |
986 | FLD (f_dstbe) = f_dstbe; | |
987 | FLD (f_imm32) = f_imm32; | |
ba2f0de2 | 988 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jeqibe", "f_offset16 0x%x", 'x', f_offset16, "f_dstbe 0x%x", 'x', f_dstbe, "f_imm32 0x%x", 'x', f_imm32, (char *) 0)); |
8c4c1818 JM |
989 | |
990 | #if WITH_PROFILE_MODEL_P | |
991 | /* Record the fields for profiling. */ | |
992 | if (PROFILE_MODEL_P (current_cpu)) | |
993 | { | |
994 | } | |
995 | #endif | |
996 | #undef FLD | |
997 | return idesc; | |
998 | } | |
999 | ||
1000 | extract_sfmt_jeqrbe: | |
1001 | { | |
1002 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
1003 | CGEN_INSN_WORD insn = base_insn; | |
1004 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
1005 | HI f_offset16; | |
1006 | UINT f_dstbe; | |
1007 | UINT f_srcbe; | |
1008 | ||
1009 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
1010 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
1011 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
1012 | ||
1013 | /* Record the fields for the semantic handler. */ | |
1014 | FLD (f_offset16) = f_offset16; | |
1015 | FLD (f_dstbe) = f_dstbe; | |
1016 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 1017 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jeqrbe", "f_offset16 0x%x", 'x', f_offset16, "f_dstbe 0x%x", 'x', f_dstbe, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
1018 | |
1019 | #if WITH_PROFILE_MODEL_P | |
1020 | /* Record the fields for profiling. */ | |
1021 | if (PROFILE_MODEL_P (current_cpu)) | |
1022 | { | |
1023 | } | |
1024 | #endif | |
1025 | #undef FLD | |
1026 | return idesc; | |
1027 | } | |
1028 | ||
1029 | extract_sfmt_callbe: | |
1030 | { | |
1031 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
1032 | CGEN_INSN_WORD insn = base_insn; | |
1033 | #define FLD(f) abuf->fields.sfmt_ldindwbe.f | |
1034 | INT f_imm32; | |
1035 | UINT f_srcbe; | |
1036 | ||
1037 | f_imm32 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 63, 32) << 0)); | |
1038 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
1039 | ||
1040 | /* Record the fields for the semantic handler. */ | |
1041 | FLD (f_imm32) = f_imm32; | |
1042 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 1043 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_callbe", "f_imm32 0x%x", 'x', f_imm32, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
1044 | |
1045 | #undef FLD | |
1046 | return idesc; | |
1047 | } | |
1048 | ||
1049 | extract_sfmt_ja: | |
1050 | { | |
1051 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
1052 | CGEN_INSN_WORD insn = base_insn; | |
1053 | #define FLD(f) abuf->fields.sfmt_stbbe.f | |
1054 | HI f_offset16; | |
1055 | ||
1056 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
1057 | ||
1058 | /* Record the fields for the semantic handler. */ | |
1059 | FLD (f_offset16) = f_offset16; | |
ba2f0de2 | 1060 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ja", "f_offset16 0x%x", 'x', f_offset16, (char *) 0)); |
8c4c1818 JM |
1061 | |
1062 | #if WITH_PROFILE_MODEL_P | |
1063 | /* Record the fields for profiling. */ | |
1064 | if (PROFILE_MODEL_P (current_cpu)) | |
1065 | { | |
1066 | } | |
1067 | #endif | |
1068 | #undef FLD | |
1069 | return idesc; | |
1070 | } | |
1071 | ||
1072 | extract_sfmt_exit: | |
1073 | { | |
1074 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
1075 | #define FLD(f) abuf->fields.sfmt_empty.f | |
1076 | ||
1077 | ||
1078 | /* Record the fields for the semantic handler. */ | |
ba2f0de2 | 1079 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_exit", (char *) 0)); |
8c4c1818 JM |
1080 | |
1081 | #undef FLD | |
1082 | return idesc; | |
1083 | } | |
1084 | ||
1085 | extract_sfmt_xadddwbe: | |
1086 | { | |
1087 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
1088 | CGEN_INSN_WORD insn = base_insn; | |
1089 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
1090 | HI f_offset16; | |
1091 | UINT f_dstbe; | |
1092 | UINT f_srcbe; | |
1093 | ||
1094 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
1095 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
1096 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
1097 | ||
1098 | /* Record the fields for the semantic handler. */ | |
1099 | FLD (f_dstbe) = f_dstbe; | |
1100 | FLD (f_offset16) = f_offset16; | |
1101 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 1102 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_xadddwbe", "f_dstbe 0x%x", 'x', f_dstbe, "f_offset16 0x%x", 'x', f_offset16, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
1103 | |
1104 | #undef FLD | |
1105 | return idesc; | |
1106 | } | |
1107 | ||
1108 | extract_sfmt_xaddwbe: | |
1109 | { | |
1110 | const IDESC *idesc = &bpfbf_ebpfbe_insn_data[itype]; | |
1111 | CGEN_INSN_WORD insn = base_insn; | |
1112 | #define FLD(f) abuf->fields.sfmt_ldxwbe.f | |
1113 | HI f_offset16; | |
1114 | UINT f_dstbe; | |
1115 | UINT f_srcbe; | |
1116 | ||
1117 | f_offset16 = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 31, 16) << 0)); | |
1118 | f_dstbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 15, 4) << 0)); | |
1119 | f_srcbe = (0|(EXTRACT_LSB0_LGUINT (insn, 64, 11, 4) << 0)); | |
1120 | ||
1121 | /* Record the fields for the semantic handler. */ | |
1122 | FLD (f_dstbe) = f_dstbe; | |
1123 | FLD (f_offset16) = f_offset16; | |
1124 | FLD (f_srcbe) = f_srcbe; | |
ba2f0de2 | 1125 | CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_xaddwbe", "f_dstbe 0x%x", 'x', f_dstbe, "f_offset16 0x%x", 'x', f_offset16, "f_srcbe 0x%x", 'x', f_srcbe, (char *) 0)); |
8c4c1818 JM |
1126 | |
1127 | #undef FLD | |
1128 | return idesc; | |
1129 | } | |
1130 | ||
1131 | } |