xref: /openbsd-src/gnu/usr.bin/binutils/opcodes/arc-ext.h (revision 5f210c2af8ad7a823d98e333e3a6e3d7999783f5)
1*5f210c2aSfgsch /* ARC target-dependent stuff. Extension data structures.
2*5f210c2aSfgsch    Copyright 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
3*5f210c2aSfgsch 
4*5f210c2aSfgsch This file is part of GDB.
5*5f210c2aSfgsch 
6*5f210c2aSfgsch This program is free software; you can redistribute it and/or modify
7*5f210c2aSfgsch it under the terms of the GNU General Public License as published by
8*5f210c2aSfgsch the Free Software Foundation; either version 2 of the License, or
9*5f210c2aSfgsch (at your option) any later version.
10*5f210c2aSfgsch 
11*5f210c2aSfgsch This program is distributed in the hope that it will be useful,
12*5f210c2aSfgsch but WITHOUT ANY WARRANTY; without even the implied warranty of
13*5f210c2aSfgsch MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*5f210c2aSfgsch GNU General Public License for more details.
15*5f210c2aSfgsch 
16*5f210c2aSfgsch You should have received a copy of the GNU General Public License
17*5f210c2aSfgsch along with this program; if not, write to the Free Software
18*5f210c2aSfgsch Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
19*5f210c2aSfgsch 
20*5f210c2aSfgsch #ifndef ARCEXT_H
21*5f210c2aSfgsch #define ARCEXT_H
22*5f210c2aSfgsch 
23*5f210c2aSfgsch enum {EXT_INSTRUCTION   = 0};
24*5f210c2aSfgsch enum {EXT_CORE_REGISTER = 1};
25*5f210c2aSfgsch enum {EXT_AUX_REGISTER  = 2};
26*5f210c2aSfgsch enum {EXT_COND_CODE     = 3};
27*5f210c2aSfgsch 
28*5f210c2aSfgsch enum {NUM_EXT_INST = (0x1f-0x10+1) + (0x3f-0x09+1)};
29*5f210c2aSfgsch enum {NUM_EXT_CORE = 59-32+1};
30*5f210c2aSfgsch enum {NUM_EXT_COND = 0x1f-0x10+1};
31*5f210c2aSfgsch 
32*5f210c2aSfgsch struct ExtInstruction
33*5f210c2aSfgsch {
34*5f210c2aSfgsch   char flags;
35*5f210c2aSfgsch   char *name;
36*5f210c2aSfgsch };
37*5f210c2aSfgsch 
38*5f210c2aSfgsch struct ExtAuxRegister
39*5f210c2aSfgsch {
40*5f210c2aSfgsch   long address;
41*5f210c2aSfgsch   char *name;
42*5f210c2aSfgsch   struct ExtAuxRegister *next;
43*5f210c2aSfgsch };
44*5f210c2aSfgsch 
45*5f210c2aSfgsch struct arcExtMap
46*5f210c2aSfgsch {
47*5f210c2aSfgsch   struct ExtAuxRegister *auxRegisters;
48*5f210c2aSfgsch   struct ExtInstruction *instructions[NUM_EXT_INST];
49*5f210c2aSfgsch   unsigned char *coreRegisters[NUM_EXT_CORE];
50*5f210c2aSfgsch   unsigned char *condCodes[NUM_EXT_COND];
51*5f210c2aSfgsch };
52*5f210c2aSfgsch 
53*5f210c2aSfgsch extern int arcExtMap_add(void*, unsigned long);
54*5f210c2aSfgsch extern const char *arcExtMap_coreRegName(int);
55*5f210c2aSfgsch extern const char *arcExtMap_auxRegName(long);
56*5f210c2aSfgsch extern const char *arcExtMap_condCodeName(int);
57*5f210c2aSfgsch extern const char *arcExtMap_instName(int, int, int*);
58*5f210c2aSfgsch extern void build_ARC_extmap(bfd *);
59*5f210c2aSfgsch 
60*5f210c2aSfgsch #define IGNORE_FIRST_OPD 1
61*5f210c2aSfgsch 
62*5f210c2aSfgsch #endif
63