1 /* This file defines the interface between the cr16 simulator and gdb.
3 Copyright 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, see <http://www.gnu.org/licenses/>. */
20 #if !defined (SIM_CR16_H)
29 SIM_CR16_MEMORY_UNIFIED = 0x00000000,
30 SIM_CR16_MEMORY_INSN = 0x10000000,
31 SIM_CR16_MEMORY_DATA = 0x10000000,
32 SIM_CR16_MEMORY_DMAP = 0x10000000,
33 SIM_CR16_MEMORY_IMAP = 0x10000000
36 extern unsigned long sim_cr16_translate_dmap_addr
37 (unsigned long offset,
41 unsigned long (*dmap_register) (void *regcache, int reg_nr));
43 extern unsigned long sim_cr16_translate_imap_addr
44 (unsigned long offset,
48 unsigned long (*imap_register) (void *regcache, int reg_nr));
50 extern unsigned long sim_cr16_translate_addr
55 unsigned long (*dmap_register) (void *regcache, int reg_nr),
56 unsigned long (*imap_register) (void *regcache, int reg_nr));
59 /* The simulator makes use of the following register information. */
83 SIM_CR16_INTBASE_REGNUM,
95 SIM_CR16_NR_R_REGS = 16,
96 SIM_CR16_NR_A_REGS = 2,
97 SIM_CR16_NR_IMAP_REGS = 2,
98 SIM_CR16_NR_DMAP_REGS = 4,
99 SIM_CR16_NR_CR_REGS = 11