Add openRISC support in opcodes
[deliverable/binutils-gdb.git] / opcodes / openrisc-opc.h
CommitLineData
87e6d782
NC
1/* Instruction opcode header for openrisc.
2
3THIS FILE IS MACHINE GENERATED WITH CGEN.
4
5Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
6
7This file is part of the GNU Binutils and/or GDB, the GNU debugger.
8
9This program is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 2, or (at your option)
12any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License along
20with this program; if not, write to the Free Software Foundation, Inc.,
2159 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23*/
24
25#ifndef OPENRISC_OPC_H
26#define OPENRISC_OPC_H
27
28/* -- opc.h */
29#undef CGEN_DIS_HASH_SIZE
30#define CGEN_DIS_HASH_SIZE 64
31#undef CGEN_DIS_HASH
32#define CGEN_DIS_HASH(buffer, value) (((unsigned char *) (buffer))[0] >> 2)
33
34/* -- */
35/* Enum declaration for openrisc instruction types. */
36typedef enum cgen_insn_type {
37 OPENRISC_INSN_INVALID, OPENRISC_INSN_L_J, OPENRISC_INSN_L_JAL, OPENRISC_INSN_L_JR
38 , OPENRISC_INSN_L_JALR, OPENRISC_INSN_L_BAL, OPENRISC_INSN_L_BNF, OPENRISC_INSN_L_BF
39 , OPENRISC_INSN_L_BRK, OPENRISC_INSN_L_RFE, OPENRISC_INSN_L_SYS, OPENRISC_INSN_L_NOP
40 , OPENRISC_INSN_L_MOVHI, OPENRISC_INSN_L_MFSR, OPENRISC_INSN_L_MTSR, OPENRISC_INSN_L_LW
41 , OPENRISC_INSN_L_LBZ, OPENRISC_INSN_L_LBS, OPENRISC_INSN_L_LHZ, OPENRISC_INSN_L_LHS
42 , OPENRISC_INSN_L_SW, OPENRISC_INSN_L_SB, OPENRISC_INSN_L_SH, OPENRISC_INSN_L_SLL
43 , OPENRISC_INSN_L_SLLI, OPENRISC_INSN_L_SRL, OPENRISC_INSN_L_SRLI, OPENRISC_INSN_L_SRA
44 , OPENRISC_INSN_L_SRAI, OPENRISC_INSN_L_ROR, OPENRISC_INSN_L_RORI, OPENRISC_INSN_L_ADD
45 , OPENRISC_INSN_L_ADDI, OPENRISC_INSN_L_SUB, OPENRISC_INSN_L_SUBI, OPENRISC_INSN_L_AND
46 , OPENRISC_INSN_L_ANDI, OPENRISC_INSN_L_OR, OPENRISC_INSN_L_ORI, OPENRISC_INSN_L_XOR
47 , OPENRISC_INSN_L_XORI, OPENRISC_INSN_L_MUL, OPENRISC_INSN_L_MULI, OPENRISC_INSN_L_DIV
48 , OPENRISC_INSN_L_DIVU, OPENRISC_INSN_L_SFGTS, OPENRISC_INSN_L_SFGTU, OPENRISC_INSN_L_SFGES
49 , OPENRISC_INSN_L_SFGEU, OPENRISC_INSN_L_SFLTS, OPENRISC_INSN_L_SFLTU, OPENRISC_INSN_L_SFLES
50 , OPENRISC_INSN_L_SFLEU, OPENRISC_INSN_L_SFGTSI, OPENRISC_INSN_L_SFGTUI, OPENRISC_INSN_L_SFGESI
51 , OPENRISC_INSN_L_SFGEUI, OPENRISC_INSN_L_SFLTSI, OPENRISC_INSN_L_SFLTUI, OPENRISC_INSN_L_SFLESI
52 , OPENRISC_INSN_L_SFLEUI, OPENRISC_INSN_L_SFEQ, OPENRISC_INSN_L_SFEQI, OPENRISC_INSN_L_SFNE
53 , OPENRISC_INSN_L_SFNEI
54} CGEN_INSN_TYPE;
55
56/* Index of `invalid' insn place holder. */
57#define CGEN_INSN_INVALID OPENRISC_INSN_INVALID
58
59/* Total number of insns in table. */
60#define MAX_INSNS ((int) OPENRISC_INSN_L_SFNEI + 1)
61
62/* This struct records data prior to insertion or after extraction. */
63struct cgen_fields
64{
65 int length;
66 long f_nil;
67 long f_anyof;
68 long f_class;
69 long f_sub;
70 long f_r1;
71 long f_r2;
72 long f_r3;
73 long f_simm16;
74 long f_uimm16;
75 long f_uimm5;
76 long f_hi16;
77 long f_lo16;
78 long f_op1;
79 long f_op2;
80 long f_op3;
81 long f_op4;
82 long f_op5;
83 long f_op6;
84 long f_op7;
85 long f_i16_1;
86 long f_i16_2;
87 long f_disp26;
88 long f_abs26;
89 long f_i16nc;
90 long f_f_15_8;
91 long f_f_10_3;
92 long f_f_4_1;
93 long f_f_7_3;
94 long f_f_10_7;
95 long f_f_10_11;
96};
97
98#define CGEN_INIT_PARSE(od) \
99{\
100}
101#define CGEN_INIT_INSERT(od) \
102{\
103}
104#define CGEN_INIT_EXTRACT(od) \
105{\
106}
107#define CGEN_INIT_PRINT(od) \
108{\
109}
110
111
112#endif /* OPENRISC_OPC_H */
This page took 0.027177 seconds and 4 git commands to generate.