Check in ARCompact simulator. A valid configuration is arc-elf.
[binutils/xnox.git] / opcodes / arc-ext.h
blob1143490e0aef9e901cf6f1f600e421308351cec1
1 /* ARC target-dependent stuff. Extension data structures.
2 Copyright 1995, 1997, 2000, 2001, 2005, 2007 Free Software Foundation, Inc.
4 This file is part of libopcodes.
6 This library is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
11 It is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
21 #ifndef ARCEXT_H
22 #define ARCEXT_H
25 enum { INST_HASH_BITS = 6 };
26 enum {NUM_EXT_CORE = 59-32+1};
27 enum {NUM_EXT_COND = 0x1f-0x10+1};
29 enum { INST_HASH_SIZE = 1 << INST_HASH_BITS };
30 #define INST_HASH(MAJOR,MINOR) \
31 ((((MAJOR) << 3) ^ (MINOR)) & ((INST_HASH_SIZE) - 1))
33 enum ExtOperType
35 EXT_INSTRUCTION,
36 EXT_CORE_REGISTER,
37 EXT_AUX_REGISTER,
38 EXT_COND_CODE,
39 EXT_AC_INSTRUCTION,
40 EXT_LONG_CORE_REGISTER = 0x06
43 /* Define this if we do not want to encode instructions based on the
44 ARCompact Programmer's Reference. */
45 #define UNMANGLED
47 struct ExtInstruction
49 char major;
50 char minor;
51 char flags;
52 char *name;
53 struct ExtInstruction *next;
56 struct ExtAuxRegister
58 long address;
59 char *name;
60 struct ExtAuxRegister *next;
63 enum ExtReadWrite
65 REG_INVALID,
66 REG_READ,
67 REG_WRITE,
68 REG_READWRITE
71 struct ExtCoreRegister
73 short number;
74 enum ExtReadWrite rw;
75 char *name;
78 struct arcExtMap
80 struct ExtAuxRegister *auxRegisters;
81 struct ExtInstruction *instructions[INST_HASH_SIZE];
82 struct ExtCoreRegister coreRegisters[NUM_EXT_CORE];
83 char *condCodes[NUM_EXT_COND];
86 extern int arcExtMap_add(void*, unsigned long);
87 extern enum ExtReadWrite arcExtMap_coreReadWrite (int);
88 extern const char *arcExtMap_coreRegName(int);
89 extern const char *arcExtMap_auxRegName(long);
90 extern const char *arcExtMap_condCodeName(int);
91 extern const char *arcExtMap_instName(int, int, int*);
93 /* Ravi:
94 warning: implicit declaration of function `build_ARC_extmap'
96 extern void build_ARC_extmap (bfd *);
99 #define IGNORE_FIRST_OPD 1
101 #endif /* __arcExtMap_h__ */