xref: /openbmc/qemu/target/hexagon/opcodes.h (revision 2cf382d4)
1 /*
2  *  Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef HEXAGON_OPCODES_H
19 #define HEXAGON_OPCODES_H
20 
21 typedef enum {
22 #define OPCODE(IID) IID
23 #include "opcodes_def_generated.h.inc"
24     XX_LAST_OPCODE
25 #undef OPCODE
26 } Opcode;
27 
28 typedef enum {
29     NORMAL,
30     HALF,
31     SUBINSN_A,
32     SUBINSN_L1,
33     SUBINSN_L2,
34     SUBINSN_S1,
35     SUBINSN_S2,
36     EXT_noext,
37     EXT_mmvec,
38     XX_LAST_ENC_CLASS
39 } EncClass;
40 
41 extern const char * const opcode_names[];
42 
43 typedef struct {
44     const char * const encoding;
45     const EncClass enc_class;
46 } OpcodeEncoding;
47 
48 extern const OpcodeEncoding opcode_encodings[XX_LAST_OPCODE];
49 
50 void opcode_init(void);
51 
52 #endif
53