| 1 | /* ARC target-dependent stuff. Extension data structures. | 
|---|
| 2 | Copyright 1995, 1997, 2000, 2001 Free Software Foundation, Inc. | 
|---|
| 3 |  | 
|---|
| 4 | This file is part of GDB. | 
|---|
| 5 |  | 
|---|
| 6 | This program 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 2 of the License, or | 
|---|
| 9 | (at your option) any later version. | 
|---|
| 10 |  | 
|---|
| 11 | This program is distributed in the hope that it will be useful, | 
|---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 14 | GNU General Public License for more details. | 
|---|
| 15 |  | 
|---|
| 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */ | 
|---|
| 19 |  | 
|---|
| 20 | #ifndef ARCEXT_H | 
|---|
| 21 | #define ARCEXT_H | 
|---|
| 22 |  | 
|---|
| 23 | enum {EXT_INSTRUCTION   = 0}; | 
|---|
| 24 | enum {EXT_CORE_REGISTER = 1}; | 
|---|
| 25 | enum {EXT_AUX_REGISTER  = 2}; | 
|---|
| 26 | enum {EXT_COND_CODE     = 3}; | 
|---|
| 27 |  | 
|---|
| 28 | enum {NUM_EXT_INST = (0x1f-0x10+1) + (0x3f-0x09+1)}; | 
|---|
| 29 | enum {NUM_EXT_CORE = 59-32+1}; | 
|---|
| 30 | enum {NUM_EXT_COND = 0x1f-0x10+1}; | 
|---|
| 31 |  | 
|---|
| 32 | struct ExtInstruction | 
|---|
| 33 | { | 
|---|
| 34 | char flags; | 
|---|
| 35 | char *name; | 
|---|
| 36 | }; | 
|---|
| 37 |  | 
|---|
| 38 | struct ExtAuxRegister | 
|---|
| 39 | { | 
|---|
| 40 | long address; | 
|---|
| 41 | char *name; | 
|---|
| 42 | struct ExtAuxRegister *next; | 
|---|
| 43 | }; | 
|---|
| 44 |  | 
|---|
| 45 | struct arcExtMap | 
|---|
| 46 | { | 
|---|
| 47 | struct ExtAuxRegister *auxRegisters; | 
|---|
| 48 | struct ExtInstruction *instructions[NUM_EXT_INST]; | 
|---|
| 49 | unsigned char *coreRegisters[NUM_EXT_CORE]; | 
|---|
| 50 | unsigned char *condCodes[NUM_EXT_COND]; | 
|---|
| 51 | }; | 
|---|
| 52 |  | 
|---|
| 53 | extern int arcExtMap_add(void*, unsigned long); | 
|---|
| 54 | extern const char *arcExtMap_coreRegName(int); | 
|---|
| 55 | extern const char *arcExtMap_auxRegName(long); | 
|---|
| 56 | extern const char *arcExtMap_condCodeName(int); | 
|---|
| 57 | extern const char *arcExtMap_instName(int, int, int*); | 
|---|
| 58 | extern void build_ARC_extmap(bfd *); | 
|---|
| 59 |  | 
|---|
| 60 | #define IGNORE_FIRST_OPD 1 | 
|---|
| 61 |  | 
|---|
| 62 | #endif | 
|---|