2001-02-17 Philip Blundell <philb@gnu.org>
[binutils.git] / opcodes / arc-dis.h
blob992510c1cf74cf71dc69b433ebb3db1d97e752a3
1 /* Disassembler structures definitions for the ARC.
2 Copyright (C) 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
3 Contributed by Doug Evans (dje@cygnus.com).
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software Foundation,
17 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
19 #ifndef ARCDIS_H
20 #define ARCDIS_H
22 enum
24 BR_exec_when_no_jump,
25 BR_exec_always,
26 BR_exec_when_jump
29 enum Flow
31 noflow,
32 direct_jump,
33 direct_call,
34 indirect_jump,
35 indirect_call,
36 invalid_instr
39 enum { no_reg = 99 };
40 enum { allOperandsSize = 256 };
42 struct arcDisState
44 void *_this;
45 int instructionLen;
46 void (*err)(void*, const char*);
47 const char *(*coreRegName)(void*, int);
48 const char *(*auxRegName)(void*, int);
49 const char *(*condCodeName)(void*, int);
50 const char *(*instName)(void*, int, int, int*);
52 unsigned char* instruction;
53 unsigned index;
54 const char *comm[6]; /* instr name, cond, NOP, 3 operands */
55 int opWidth;
56 int targets[4];
57 int addresses[4];
58 /* Set as a side-effect of calling the disassembler.
59 Used only by the debugger. */
60 enum Flow flow;
61 int register_for_indirect_jump;
62 int ea_reg1, ea_reg2, _offset;
63 int _cond, _opcode;
64 unsigned long words[2];
65 char *commentBuffer;
66 char instrBuffer[40];
67 char operandBuffer[allOperandsSize];
68 char _ea_present;
69 char _mem_load;
70 char _load_len;
71 char nullifyMode;
72 unsigned char commNum;
73 unsigned char isBranch;
74 unsigned char tcnt;
75 unsigned char acnt;
78 #define __TRANSLATION_REQUIRED(state) ((state).acnt != 0)
80 #endif