Rizin
unix-like reverse engineering framework and cli tools
arc-dis.h
Go to the documentation of this file.
1 /* Disassembler structures definitions for the ARC.
2  Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2009
3  Free Software Foundation, Inc.
4  Contributed by Doug Evans (dje@cygnus.com).
5 
6  Copyright 2008-2012 Synopsys Inc.
7 
8  This file is part of libopcodes.
9 
10  This library 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
21  along with this program; if not, write to the Free Software Foundation,
22  Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
23 
24 #ifndef ARC_DIS_H
25 #define ARC_DIS_H
26 
28 {
32 };
33 
35 {
40  ARCOMPACT_REGISTER /* Valid only for the
41  registers allowed in
42  16 bit mode */
43 };
44 
45 enum Flow
46 {
53 };
54 
55 enum { no_reg = 99 };
56 enum { allOperandsSize = 256 };
57 
59 {
60  void *_this;
62  void (*err)(void*, const char*);
63  const char *(*coreRegName)(void*, int);
64  const char *(*auxRegName)(void*, int);
65  const char *(*condCodeName)(void*, int);
66  const char *(*instName)(void*, int, int, int*);
67 
68  unsigned char* instruction;
69  unsigned index;
70  const char *comm[6]; /* instr name, cond, NOP, 3 operands */
71 
72  union {
73  unsigned int registerNum;
74  unsigned int shortimm;
75  unsigned int longimm;
78 
79  int opWidth;
80  int targets[4];
81  /* START ARC LOCAL */
82  unsigned int addresses[4];
83  /* END ARC LOCAL */
84  /* Set as a side-effect of calling the disassembler.
85  Used only by the debugger. */
86  enum Flow flow;
89  int _cond, _opcode;
90  unsigned long words[2];
92  char instrBuffer[40];
95  char _addrWriteBack; /* Address writeback */
96  char _mem_load;
97  char _load_len;
99  unsigned char commNum;
100  unsigned char isBranch;
101  unsigned char tcnt;
102  unsigned char acnt;
103 };
104 
105 #if 0
107 #endif
109 
110 #define __TRANSLATION_REQUIRED(state) ((state).acnt != 0)
111 
112 #endif /* ARC_DIS_H */
int ARCTangent_decodeInstr(bfd_vma address, disassemble_info *info)
Definition: arc-dis.c:1025
@ no_reg
Definition: arc-dis.h:55
@ allOperandsSize
Definition: arc-dis.h:56
ARC_Debugger_OperandType
Definition: arc-dis.h:35
@ ARC_SHIMM
Definition: arc-dis.h:38
@ ARCOMPACT_REGISTER
Definition: arc-dis.h:40
@ ARC_UNDEFINED
Definition: arc-dis.h:36
@ ARC_LIMM
Definition: arc-dis.h:37
@ ARC_REGISTER
Definition: arc-dis.h:39
Flow
Definition: arc-dis.h:46
@ invalid_instr
Definition: arc-dis.h:52
@ indirect_jump
Definition: arc-dis.h:50
@ direct_jump
Definition: arc-dis.h:48
@ indirect_call
Definition: arc-dis.h:51
@ direct_call
Definition: arc-dis.h:49
@ noflow
Definition: arc-dis.h:47
int ARCompact_decodeInstr(bfd_vma address, disassemble_info *info)
NullifyMode
Definition: arc-dis.h:28
@ BR_exec_when_jump
Definition: arc-dis.h:31
@ BR_exec_when_no_jump
Definition: arc-dis.h:29
@ BR_exec_always
Definition: arc-dis.h:30
RzBinInfo * info(RzBinFile *bf)
Definition: bin_ne.c:86
BFD_HOST_U_64_BIT bfd_vma
Definition: mybfd.h:111
static int
Definition: sfsocketcall.h:114
int _cond
Definition: arc-dis.h:89
unsigned long words[2]
Definition: arc-dis.h:90
enum NullifyMode nullifyMode
Definition: arc-dis.h:98
unsigned int longimm
Definition: arc-dis.h:75
char _ea_present
Definition: arc-dis.h:94
unsigned char tcnt
Definition: arc-dis.h:101
void(* err)(void *, const char *)
Definition: arc-dis.h:62
int instructionLen
Definition: arc-dis.h:61
unsigned char * instruction
Definition: arc-dis.h:68
union arcDisState::@33 source_operand
unsigned char commNum
Definition: arc-dis.h:99
int targets[4]
Definition: arc-dis.h:80
enum ARC_Debugger_OperandType sourceType
Definition: arc-dis.h:77
char _mem_load
Definition: arc-dis.h:96
unsigned index
Definition: arc-dis.h:69
int opWidth
Definition: arc-dis.h:79
char operandBuffer[allOperandsSize]
Definition: arc-dis.h:93
unsigned char acnt
Definition: arc-dis.h:102
char * commentBuffer
Definition: arc-dis.h:91
const char * comm[6]
Definition: arc-dis.h:70
unsigned int addresses[4]
Definition: arc-dis.h:82
void * _this
Definition: arc-dis.h:60
int _opcode
Definition: arc-dis.h:89
unsigned char isBranch
Definition: arc-dis.h:100
int _offset
Definition: arc-dis.h:88
char instrBuffer[40]
Definition: arc-dis.h:92
unsigned int registerNum
Definition: arc-dis.h:73
char _load_len
Definition: arc-dis.h:97
char _addrWriteBack
Definition: arc-dis.h:95
int ea_reg1
Definition: arc-dis.h:88
unsigned int shortimm
Definition: arc-dis.h:74
int register_for_indirect_jump
Definition: arc-dis.h:87
enum Flow flow
Definition: arc-dis.h:86
int ea_reg2
Definition: arc-dis.h:88