1 /* Moxie Simulator definition.
2 Copyright (C) 2009-2015 Free Software Foundation, Inc.
4 This file is part of GDB, the GNU debugger.
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 3 of the License, or
9 (at your option) any later version.
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.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 #include "sim-basics.h"
24 typedef struct _sim_cpu SIM_CPU
;
41 /* System registers. For sh-dsp this also includes A0 / X0 / X1 / Y0 / Y1
42 which are located in fregs, i.e. strictly speaking, these are
43 out-of-bounds accesses of sregs.i . This wart of the code could be
44 fixed by making fregs part of sregs, and including pc too - to avoid
45 alignment repercussions - but this would cause very onerous union /
46 structure nesting, which would only be managable with anonymous
47 unions and structs. */
56 int fpul
; /* A1 for sh-dsp - but only for movs etc. */
57 int fpscr
; /* dsr for sh-dsp */
71 /* Control registers; on the SH4, ldc / stc is privileged, except when
88 int dbr
; /* debug base register */
89 int sgr
; /* saved gr15 */
90 int ldst
; /* load/store flag (boolean) */
92 int ibcr
; /* sh2a bank control register */
93 int ibnr
; /* sh2a bank number register */
98 unsigned char *insn_end
;
110 int end_of_registers
;
113 #define PROFILE_FREQ 1
114 #define PROFILE_SHIFT 2
116 unsigned short *profile_hist
;
117 unsigned char *memory
;
118 int xyram_select
, xram_start
, yram_start
;
121 unsigned char *xmem_offset
;
122 unsigned char *ymem_offset
;
123 unsigned long bfd_mach
;
124 regstacktype
*regstack
;
129 /* TODO: Move into sim_cpu. */
130 extern saved_state_type saved_state
;
139 sim_cpu
*cpu
[MAX_NR_PROCESSORS
];