Commit | Line | Data |
---|---|---|
79472b45 JM |
1 | /* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */ |
2 | /* Instruction opcode header for bpf. | |
3 | ||
4 | THIS FILE IS MACHINE GENERATED WITH CGEN. | |
5 | ||
6 | Copyright (C) 1996-2019 Free Software Foundation, Inc. | |
7 | ||
8 | This file is part of the GNU Binutils and/or GDB, the GNU debugger. | |
9 | ||
10 | This file is free software; you can redistribute it and/or modify | |
11 | it under the terms of the GNU General Public License as published by | |
12 | the Free Software Foundation; either version 3, or (at your option) | |
13 | any later version. | |
14 | ||
15 | It is distributed in the hope that it will be useful, but WITHOUT | |
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
17 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
18 | License for more details. | |
19 | ||
20 | You should have received a copy of the GNU General Public License along | |
21 | with this program; if not, write to the Free Software Foundation, Inc., | |
22 | 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. | |
23 | ||
24 | */ | |
25 | ||
26 | #ifndef BPF_OPC_H | |
27 | #define BPF_OPC_H | |
28 | ||
29 | #ifdef __cplusplus | |
30 | extern "C" { | |
31 | #endif | |
32 | ||
33 | /* -- opc.h */ | |
34 | ||
35 | #undef CGEN_DIS_HASH_SIZE | |
36 | #define CGEN_DIS_HASH_SIZE 1 | |
37 | ||
38 | #undef CGEN_DIS_HASH | |
39 | #define CGEN_DIS_HASH(buffer, value) 0 | |
40 | ||
41 | /* Allows reason codes to be output when assembler errors occur. */ | |
42 | #define CGEN_VERBOSE_ASSEMBLER_ERRORS | |
43 | ||
44 | #define CGEN_VALIDATE_INSN_SUPPORTED | |
45 | extern int bpf_cgen_insn_supported (CGEN_CPU_DESC, const CGEN_INSN *); | |
46 | ||
47 | \f | |
48 | /* -- opc.c */ | |
49 | /* Enum declaration for bpf instruction types. */ | |
50 | typedef enum cgen_insn_type { | |
51 | BPF_INSN_INVALID, BPF_INSN_ADDILE, BPF_INSN_ADDRLE, BPF_INSN_ADD32ILE | |
52 | , BPF_INSN_ADD32RLE, BPF_INSN_SUBILE, BPF_INSN_SUBRLE, BPF_INSN_SUB32ILE | |
53 | , BPF_INSN_SUB32RLE, BPF_INSN_MULILE, BPF_INSN_MULRLE, BPF_INSN_MUL32ILE | |
54 | , BPF_INSN_MUL32RLE, BPF_INSN_DIVILE, BPF_INSN_DIVRLE, BPF_INSN_DIV32ILE | |
55 | , BPF_INSN_DIV32RLE, BPF_INSN_ORILE, BPF_INSN_ORRLE, BPF_INSN_OR32ILE | |
56 | , BPF_INSN_OR32RLE, BPF_INSN_ANDILE, BPF_INSN_ANDRLE, BPF_INSN_AND32ILE | |
57 | , BPF_INSN_AND32RLE, BPF_INSN_LSHILE, BPF_INSN_LSHRLE, BPF_INSN_LSH32ILE | |
58 | , BPF_INSN_LSH32RLE, BPF_INSN_RSHILE, BPF_INSN_RSHRLE, BPF_INSN_RSH32ILE | |
59 | , BPF_INSN_RSH32RLE, BPF_INSN_MODILE, BPF_INSN_MODRLE, BPF_INSN_MOD32ILE | |
60 | , BPF_INSN_MOD32RLE, BPF_INSN_XORILE, BPF_INSN_XORRLE, BPF_INSN_XOR32ILE | |
61 | , BPF_INSN_XOR32RLE, BPF_INSN_MOVILE, BPF_INSN_MOVRLE, BPF_INSN_MOV32ILE | |
62 | , BPF_INSN_MOV32RLE, BPF_INSN_ARSHILE, BPF_INSN_ARSHRLE, BPF_INSN_ARSH32ILE | |
63 | , BPF_INSN_ARSH32RLE, BPF_INSN_NEGLE, BPF_INSN_NEG32LE, BPF_INSN_ADDIBE | |
64 | , BPF_INSN_ADDRBE, BPF_INSN_ADD32IBE, BPF_INSN_ADD32RBE, BPF_INSN_SUBIBE | |
65 | , BPF_INSN_SUBRBE, BPF_INSN_SUB32IBE, BPF_INSN_SUB32RBE, BPF_INSN_MULIBE | |
66 | , BPF_INSN_MULRBE, BPF_INSN_MUL32IBE, BPF_INSN_MUL32RBE, BPF_INSN_DIVIBE | |
67 | , BPF_INSN_DIVRBE, BPF_INSN_DIV32IBE, BPF_INSN_DIV32RBE, BPF_INSN_ORIBE | |
68 | , BPF_INSN_ORRBE, BPF_INSN_OR32IBE, BPF_INSN_OR32RBE, BPF_INSN_ANDIBE | |
69 | , BPF_INSN_ANDRBE, BPF_INSN_AND32IBE, BPF_INSN_AND32RBE, BPF_INSN_LSHIBE | |
70 | , BPF_INSN_LSHRBE, BPF_INSN_LSH32IBE, BPF_INSN_LSH32RBE, BPF_INSN_RSHIBE | |
71 | , BPF_INSN_RSHRBE, BPF_INSN_RSH32IBE, BPF_INSN_RSH32RBE, BPF_INSN_MODIBE | |
72 | , BPF_INSN_MODRBE, BPF_INSN_MOD32IBE, BPF_INSN_MOD32RBE, BPF_INSN_XORIBE | |
73 | , BPF_INSN_XORRBE, BPF_INSN_XOR32IBE, BPF_INSN_XOR32RBE, BPF_INSN_MOVIBE | |
74 | , BPF_INSN_MOVRBE, BPF_INSN_MOV32IBE, BPF_INSN_MOV32RBE, BPF_INSN_ARSHIBE | |
75 | , BPF_INSN_ARSHRBE, BPF_INSN_ARSH32IBE, BPF_INSN_ARSH32RBE, BPF_INSN_NEGBE | |
76 | , BPF_INSN_NEG32BE, BPF_INSN_ENDLELE, BPF_INSN_ENDBELE, BPF_INSN_ENDLEBE | |
3719fd55 JM |
77 | , BPF_INSN_ENDBEBE, BPF_INSN_LDDWLE, BPF_INSN_LDDWBE, BPF_INSN_LDABSW |
78 | , BPF_INSN_LDABSH, BPF_INSN_LDABSB, BPF_INSN_LDABSDW, BPF_INSN_LDINDWLE | |
79 | , BPF_INSN_LDINDHLE, BPF_INSN_LDINDBLE, BPF_INSN_LDINDDWLE, BPF_INSN_LDINDWBE | |
79472b45 JM |
80 | , BPF_INSN_LDINDHBE, BPF_INSN_LDINDBBE, BPF_INSN_LDINDDWBE, BPF_INSN_LDXWLE |
81 | , BPF_INSN_LDXHLE, BPF_INSN_LDXBLE, BPF_INSN_LDXDWLE, BPF_INSN_STXWLE | |
82 | , BPF_INSN_STXHLE, BPF_INSN_STXBLE, BPF_INSN_STXDWLE, BPF_INSN_LDXWBE | |
83 | , BPF_INSN_LDXHBE, BPF_INSN_LDXBBE, BPF_INSN_LDXDWBE, BPF_INSN_STXWBE | |
84 | , BPF_INSN_STXHBE, BPF_INSN_STXBBE, BPF_INSN_STXDWBE, BPF_INSN_STBLE | |
85 | , BPF_INSN_STHLE, BPF_INSN_STWLE, BPF_INSN_STDWLE, BPF_INSN_STBBE | |
86 | , BPF_INSN_STHBE, BPF_INSN_STWBE, BPF_INSN_STDWBE, BPF_INSN_JEQILE | |
87 | , BPF_INSN_JEQRLE, BPF_INSN_JGTILE, BPF_INSN_JGTRLE, BPF_INSN_JGEILE | |
88 | , BPF_INSN_JGERLE, BPF_INSN_JLTILE, BPF_INSN_JLTRLE, BPF_INSN_JLEILE | |
89 | , BPF_INSN_JLERLE, BPF_INSN_JSETILE, BPF_INSN_JSETRLE, BPF_INSN_JNEILE | |
90 | , BPF_INSN_JNERLE, BPF_INSN_JSGTILE, BPF_INSN_JSGTRLE, BPF_INSN_JSGEILE | |
91 | , BPF_INSN_JSGERLE, BPF_INSN_JSLTILE, BPF_INSN_JSLTRLE, BPF_INSN_JSLEILE | |
92 | , BPF_INSN_JSLERLE, BPF_INSN_JEQIBE, BPF_INSN_JEQRBE, BPF_INSN_JGTIBE | |
93 | , BPF_INSN_JGTRBE, BPF_INSN_JGEIBE, BPF_INSN_JGERBE, BPF_INSN_JLTIBE | |
94 | , BPF_INSN_JLTRBE, BPF_INSN_JLEIBE, BPF_INSN_JLERBE, BPF_INSN_JSETIBE | |
95 | , BPF_INSN_JSETRBE, BPF_INSN_JNEIBE, BPF_INSN_JNERBE, BPF_INSN_JSGTIBE | |
96 | , BPF_INSN_JSGTRBE, BPF_INSN_JSGEIBE, BPF_INSN_JSGERBE, BPF_INSN_JSLTIBE | |
97 | , BPF_INSN_JSLTRBE, BPF_INSN_JSLEIBE, BPF_INSN_JSLERBE, BPF_INSN_JA | |
98 | , BPF_INSN_CALL, BPF_INSN_EXIT, BPF_INSN_XADDDWLE, BPF_INSN_XADDWLE | |
99 | , BPF_INSN_XADDDWBE, BPF_INSN_XADDWBE | |
100 | } CGEN_INSN_TYPE; | |
101 | ||
102 | /* Index of `invalid' insn place holder. */ | |
103 | #define CGEN_INSN_INVALID BPF_INSN_INVALID | |
104 | ||
105 | /* Total number of insns in table. */ | |
106 | #define MAX_INSNS ((int) BPF_INSN_XADDWBE + 1) | |
107 | ||
108 | /* This struct records data prior to insertion or after extraction. */ | |
109 | struct cgen_fields | |
110 | { | |
111 | int length; | |
112 | long f_nil; | |
113 | long f_anyof; | |
114 | long f_op_code; | |
115 | long f_op_src; | |
116 | long f_op_class; | |
117 | long f_op_mode; | |
118 | long f_op_size; | |
119 | long f_dstle; | |
120 | long f_srcle; | |
121 | long f_dstbe; | |
122 | long f_srcbe; | |
123 | long f_regs; | |
124 | long f_offset16; | |
125 | long f_imm32; | |
126 | long f_imm64_a; | |
127 | long f_imm64_b; | |
128 | long f_imm64_c; | |
129 | int64_t f_imm64; | |
130 | }; | |
131 | ||
132 | #define CGEN_INIT_PARSE(od) \ | |
133 | {\ | |
134 | } | |
135 | #define CGEN_INIT_INSERT(od) \ | |
136 | {\ | |
137 | } | |
138 | #define CGEN_INIT_EXTRACT(od) \ | |
139 | {\ | |
140 | } | |
141 | #define CGEN_INIT_PRINT(od) \ | |
142 | {\ | |
143 | } | |
144 | ||
145 | ||
146 | #ifdef __cplusplus | |
147 | } | |
148 | #endif | |
149 | ||
150 | #endif /* BPF_OPC_H */ |