GDB (API)
|
00001 /* This file defines the interface between the cr16 simulator and gdb. 00002 00003 Copyright 2008-2013 Free Software Foundation, Inc. 00004 00005 This file is part of GDB. 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, see <http://www.gnu.org/licenses/>. */ 00019 00020 #if !defined (SIM_CR16_H) 00021 #define SIM_CR16_H 00022 00023 #ifdef __cplusplus 00024 extern "C" { // } 00025 #endif 00026 00027 enum 00028 { 00029 SIM_CR16_MEMORY_UNIFIED = 0x00000000, 00030 SIM_CR16_MEMORY_INSN = 0x10000000, 00031 SIM_CR16_MEMORY_DATA = 0x10000000, 00032 SIM_CR16_MEMORY_DMAP = 0x10000000, 00033 SIM_CR16_MEMORY_IMAP = 0x10000000 00034 }; 00035 00036 extern unsigned long sim_cr16_translate_dmap_addr 00037 (unsigned long offset, 00038 int nr_bytes, 00039 unsigned long *phys, 00040 void *regcache, 00041 unsigned long (*dmap_register) (void *regcache, int reg_nr)); 00042 00043 extern unsigned long sim_cr16_translate_imap_addr 00044 (unsigned long offset, 00045 int nr_bytes, 00046 unsigned long *phys, 00047 void *regcache, 00048 unsigned long (*imap_register) (void *regcache, int reg_nr)); 00049 00050 extern unsigned long sim_cr16_translate_addr 00051 (unsigned long vaddr, 00052 int nr_bytes, 00053 unsigned long *phys, 00054 void *regcache, 00055 unsigned long (*dmap_register) (void *regcache, int reg_nr), 00056 unsigned long (*imap_register) (void *regcache, int reg_nr)); 00057 00058 00059 /* The simulator makes use of the following register information. */ 00060 00061 enum sim_cr16_regs 00062 { 00063 SIM_CR16_R0_REGNUM, 00064 SIM_CR16_R1_REGNUM, 00065 SIM_CR16_R2_REGNUM, 00066 SIM_CR16_R3_REGNUM, 00067 SIM_CR16_R4_REGNUM, 00068 SIM_CR16_R5_REGNUM, 00069 SIM_CR16_R6_REGNUM, 00070 SIM_CR16_R7_REGNUM, 00071 SIM_CR16_R8_REGNUM, 00072 SIM_CR16_R9_REGNUM, 00073 SIM_CR16_R10_REGNUM, 00074 SIM_CR16_R11_REGNUM, 00075 SIM_CR16_R12_REGNUM, 00076 SIM_CR16_R13_REGNUM, 00077 SIM_CR16_R14_REGNUM, 00078 SIM_CR16_R15_REGNUM, 00079 00080 SIM_CR16_PC_REGNUM, 00081 SIM_CR16_ISP_REGNUM, 00082 SIM_CR16_USP_REGNUM, 00083 SIM_CR16_INTBASE_REGNUM, 00084 SIM_CR16_PSR_REGNUM, 00085 SIM_CR16_CFG_REGNUM, 00086 SIM_CR16_DBS_REGNUM, 00087 SIM_CR16_DCR_REGNUM, 00088 SIM_CR16_DSR_REGNUM, 00089 SIM_CR16_CAR0_REGNUM, 00090 SIM_CR16_CAR1_REGNUM 00091 }; 00092 00093 enum 00094 { 00095 SIM_CR16_NR_R_REGS = 16, 00096 SIM_CR16_NR_A_REGS = 2, 00097 SIM_CR16_NR_IMAP_REGS = 2, 00098 SIM_CR16_NR_DMAP_REGS = 4, 00099 SIM_CR16_NR_CR_REGS = 11 00100 }; 00101 00102 #ifdef __cplusplus 00103 } 00104 #endif 00105 00106 #endif