]>
Commit | Line | Data |
---|---|---|
886a2506 | 1 | /* ARC target-dependent stuff. Extension data structures. |
b90efa5b | 2 | Copyright (C) 1995-2015 Free Software Foundation, Inc. |
0d2bcfaf | 3 | |
9b201bb5 | 4 | This file is part of libopcodes. |
0d2bcfaf | 5 | |
9b201bb5 NC |
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. | |
0d2bcfaf | 10 | |
9b201bb5 NC |
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. | |
0d2bcfaf | 15 | |
9b201bb5 NC |
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. */ | |
0d2bcfaf | 20 | |
886a2506 NC |
21 | /*This header file defines a table of extensions to the ARC processor |
22 | architecture. These extensions are read from the '.arcextmap' or | |
23 | '.gnu.linkonce.arcextmap.<type>.<N>' sections in the ELF file which | |
24 | is identified by the bfd parameter to the build_ARC_extmap function. | |
0d2bcfaf | 25 | |
886a2506 NC |
26 | These extensions may include: |
27 | core registers | |
28 | auxiliary registers | |
29 | instructions | |
30 | condition codes | |
0d2bcfaf | 31 | |
886a2506 NC |
32 | Once the table has been constructed, accessor functions may be used |
33 | to retrieve information from it. | |
0d2bcfaf | 34 | |
886a2506 NC |
35 | The build_ARC_extmap constructor function build_ARC_extmap may be |
36 | called as many times as required; it will re-initialize the table | |
37 | each time. */ | |
38 | ||
39 | #ifndef ARC_EXTENSIONS_H | |
40 | #define ARC_EXTENSIONS_H | |
41 | ||
42 | #define IGNORE_FIRST_OPD 1 | |
43 | ||
44 | /* Define this if we do not want to encode instructions based on the | |
45 | ARCompact Programmer's Reference. */ | |
46 | #define UNMANGLED | |
0d2bcfaf | 47 | |
886a2506 NC |
48 | |
49 | /* This defines the kinds of extensions which may be read from the | |
50 | ections in the executable files. */ | |
51 | enum ExtOperType | |
0d2bcfaf | 52 | { |
886a2506 NC |
53 | EXT_INSTRUCTION = 0, |
54 | EXT_CORE_REGISTER = 1, | |
55 | EXT_AUX_REGISTER = 2, | |
56 | EXT_COND_CODE = 3, | |
57 | EXT_INSTRUCTION32 = 4, | |
58 | EXT_AC_INSTRUCTION = 4, | |
59 | EXT_REMOVE_CORE_REG = 5, | |
60 | EXT_LONG_CORE_REGISTER = 6, | |
61 | EXT_AUX_REGISTER_EXTENDED = 7, | |
62 | EXT_INSTRUCTION32_EXTENDED = 8, | |
63 | EXT_CORE_REGISTER_CLASS = 9 | |
0d2bcfaf NC |
64 | }; |
65 | ||
886a2506 NC |
66 | |
67 | enum ExtReadWrite | |
0d2bcfaf | 68 | { |
886a2506 NC |
69 | REG_INVALID, |
70 | REG_READ, | |
71 | REG_WRITE, | |
72 | REG_READWRITE | |
0d2bcfaf NC |
73 | }; |
74 | ||
0d2bcfaf | 75 | |
886a2506 NC |
76 | /* Constructor function. */ |
77 | extern void build_ARC_extmap (bfd *); | |
78 | ||
79 | /* Accessor functions. */ | |
80 | extern enum ExtReadWrite arcExtMap_coreReadWrite (int); | |
81 | extern const char * arcExtMap_coreRegName (int); | |
82 | extern const char * arcExtMap_auxRegName (long); | |
83 | extern const char * arcExtMap_condCodeName (int); | |
84 | extern const char * arcExtMap_instName (int, int, int *); | |
85 | ||
86 | /* Dump function (for debugging). */ | |
87 | extern void dump_ARC_extmap (void); | |
0d2bcfaf | 88 | |
886a2506 | 89 | #endif /* ARC_EXTENSIONS_H */ |