Rizin
unix-like reverse engineering framework and cli tools
arc-ext.h
Go to the documentation of this file.
1 /* ARC target-dependent stuff. Extension data structures.
2  Copyright 1995, 1997, 2000, 2001, 2005, 2007 Free Software Foundation, Inc.
3 
4  Copyright 2008-2012 Synopsys Inc.
5 
6  This file is part of libopcodes.
7 
8  This library is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 3, or (at your option)
11  any later version.
12 
13  It is distributed in the hope that it will be useful, but WITHOUT
14  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16  License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21  MA 02110-1301, USA. */
22 
23 
24 /******************************************************************************/
25 /* */
26 /* Outline: */
27 /* This header file defines a table of extensions to the ARC processor */
28 /* architecture. These extensions are read from the '.arcextmap' or */
29 /* '.gnu.linkonce.arcextmap.<type>.<N>' sections in the ELF file which is */
30 /* identified by the bfd parameter to the build_ARC_extmap function. */
31 /* */
32 /* These extensions may include: */
33 /* core registers */
34 /* auxiliary registers */
35 /* instructions */
36 /* condition codes */
37 /* */
38 /* Once the table has been constructed, accessor functions may be used to */
39 /* retrieve information from it. */
40 /* */
41 /* The build_ARC_extmap constructor function build_ARC_extmap may be */
42 /* called as many times as required; it will re-initialize the table each */
43 /* time. */
44 /* */
45 /******************************************************************************/
46 
47 #ifndef ARC_EXTENSIONS_H
48 #define ARC_EXTENSIONS_H
49 
50 #define IGNORE_FIRST_OPD 1
51 
52 /* Define this if we do not want to encode instructions based on the
53  ARCompact Programmer's Reference. */
54 #define UNMANGLED
55 
56 
57 /* this defines the kinds of extensions which may be read from the sections in
58  * the executable files
59  */
61 {
66  EXT_INSTRUCTION32 = 4, /* why are there */
67  EXT_AC_INSTRUCTION = 4, /* two with value 4? */
73 };
74 
75 
77 {
82 };
83 
84 
85 /* constructor function */
86 extern void build_ARC_extmap (void* text_bfd);
87 /* accessor functions */
88 extern enum ExtReadWrite arcExtMap_coreReadWrite (int regnum);
89 extern const char* arcExtMap_coreRegName (int regnum);
90 extern const char* arcExtMap_auxRegName (long regnum);
91 extern const char* arcExtMap_condCodeName (int code);
92 extern const char* arcExtMap_instName (int opcode, int insn, int* flags);
93 /* dump function (for debugging) */
94 void dump_ARC_extmap (void);
95 
96 #endif /* ARC_EXTENSIONS_H */
97 /******************************************************************************/
void dump_ARC_extmap(void)
Definition: arc-ext.c:483
const char * arcExtMap_auxRegName(long regnum)
Definition: arc-ext.c:435
ExtOperType
Definition: arc-ext.h:61
@ EXT_LONG_CORE_REGISTER
Definition: arc-ext.h:69
@ EXT_CORE_REGISTER_CLASS
Definition: arc-ext.h:72
@ EXT_AUX_REGISTER_EXTENDED
Definition: arc-ext.h:70
@ EXT_AUX_REGISTER
Definition: arc-ext.h:64
@ EXT_INSTRUCTION32_EXTENDED
Definition: arc-ext.h:71
@ EXT_COND_CODE
Definition: arc-ext.h:65
@ EXT_INSTRUCTION
Definition: arc-ext.h:62
@ EXT_INSTRUCTION32
Definition: arc-ext.h:66
@ EXT_CORE_REGISTER
Definition: arc-ext.h:63
@ EXT_AC_INSTRUCTION
Definition: arc-ext.h:67
@ EXT_REMOVE_CORE_REG
Definition: arc-ext.h:68
const char * arcExtMap_instName(int opcode, int insn, int *flags)
Definition: arc-ext.c:300
const char * arcExtMap_condCodeName(int code)
Definition: arc-ext.c:424
const char * arcExtMap_coreRegName(int regnum)
Definition: arc-ext.c:402
enum ExtReadWrite arcExtMap_coreReadWrite(int regnum)
Definition: arc-ext.c:413
ExtReadWrite
Definition: arc-ext.h:77
@ REG_WRITE
Definition: arc-ext.h:80
@ REG_READWRITE
Definition: arc-ext.h:81
@ REG_READ
Definition: arc-ext.h:79
@ REG_INVALID
Definition: arc-ext.h:78
void build_ARC_extmap(void *text_bfd)
Definition: arc-ext.c:453
static struct sockaddr static addrlen static backlog const void static flags void flags
Definition: sfsocketcall.h:123
Definition: inftree9.h:24