185815Sobrien/* Disassembler structures definitions for the ARC. 285815Sobrien Copyright 1994, 1995, 1997, 1998, 2000, 2001 385815Sobrien Free Software Foundation, Inc. 485815Sobrien Contributed by Doug Evans (dje@cygnus.com). 585815Sobrien 685815Sobrien This program is free software; you can redistribute it and/or modify 785815Sobrien it under the terms of the GNU General Public License as published by 885815Sobrien the Free Software Foundation; either version 2 of the License, or 985815Sobrien (at your option) any later version. 1085815Sobrien 1185815Sobrien This program is distributed in the hope that it will be useful, 1285815Sobrien but WITHOUT ANY WARRANTY; without even the implied warranty of 1385815Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1485815Sobrien GNU General Public License for more details. 1585815Sobrien 1685815Sobrien You should have received a copy of the GNU General Public License 1785815Sobrien along with this program; if not, write to the Free Software Foundation, 18218822Sdim Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 1985815Sobrien 2085815Sobrien#ifndef ARCDIS_H 2185815Sobrien#define ARCDIS_H 2285815Sobrien 2385815Sobrienenum 2485815Sobrien{ 2585815Sobrien BR_exec_when_no_jump, 2685815Sobrien BR_exec_always, 2785815Sobrien BR_exec_when_jump 2885815Sobrien}; 2985815Sobrien 3085815Sobrienenum Flow 3185815Sobrien{ 3285815Sobrien noflow, 3385815Sobrien direct_jump, 3485815Sobrien direct_call, 3585815Sobrien indirect_jump, 3685815Sobrien indirect_call, 3785815Sobrien invalid_instr 3885815Sobrien}; 3985815Sobrien 4085815Sobrienenum { no_reg = 99 }; 4185815Sobrienenum { allOperandsSize = 256 }; 4285815Sobrien 4385815Sobrienstruct arcDisState 4485815Sobrien{ 4585815Sobrien void *_this; 4685815Sobrien int instructionLen; 4785815Sobrien void (*err)(void*, const char*); 4885815Sobrien const char *(*coreRegName)(void*, int); 4985815Sobrien const char *(*auxRegName)(void*, int); 5085815Sobrien const char *(*condCodeName)(void*, int); 5185815Sobrien const char *(*instName)(void*, int, int, int*); 5285815Sobrien 5385815Sobrien unsigned char* instruction; 5485815Sobrien unsigned index; 5585815Sobrien const char *comm[6]; /* instr name, cond, NOP, 3 operands */ 5685815Sobrien int opWidth; 5785815Sobrien int targets[4]; 5885815Sobrien int addresses[4]; 5985815Sobrien /* Set as a side-effect of calling the disassembler. 6085815Sobrien Used only by the debugger. */ 6185815Sobrien enum Flow flow; 6285815Sobrien int register_for_indirect_jump; 6385815Sobrien int ea_reg1, ea_reg2, _offset; 6485815Sobrien int _cond, _opcode; 6585815Sobrien unsigned long words[2]; 6685815Sobrien char *commentBuffer; 6785815Sobrien char instrBuffer[40]; 6885815Sobrien char operandBuffer[allOperandsSize]; 6985815Sobrien char _ea_present; 7085815Sobrien char _mem_load; 7185815Sobrien char _load_len; 7285815Sobrien char nullifyMode; 7385815Sobrien unsigned char commNum; 7485815Sobrien unsigned char isBranch; 7585815Sobrien unsigned char tcnt; 7685815Sobrien unsigned char acnt; 7785815Sobrien}; 7885815Sobrien 7985815Sobrien#define __TRANSLATION_REQUIRED(state) ((state).acnt != 0) 8085815Sobrien 8185815Sobrien#endif 82