]>
git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/fr30/fr30-sim.h
1 /* collection of junk waiting time to sort out
2 Copyright (C) 1998, 1999 Free Software Foundation, Inc.
3 Contributed by Cygnus Solutions.
5 This file is part of the GNU Simulators.
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 2, or (at your option)
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 along
18 with this program; if not, write to the Free Software Foundation, Inc.,
19 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24 /* gdb register numbers */
34 extern BI
fr30bf_h_sbit_get_handler (SIM_CPU
*);
35 extern void fr30bf_h_sbit_set_handler (SIM_CPU
*, BI
);
36 #define GET_H_SBIT() fr30bf_h_sbit_get_handler (current_cpu)
37 #define SET_H_SBIT(val) fr30bf_h_sbit_set_handler (current_cpu, (val))
39 extern UQI
fr30bf_h_ccr_get_handler (SIM_CPU
*);
40 extern void fr30bf_h_ccr_set_handler (SIM_CPU
*, UQI
);
41 #define GET_H_CCR() fr30bf_h_ccr_get_handler (current_cpu)
42 #define SET_H_CCR(val) fr30bf_h_ccr_set_handler (current_cpu, (val))
44 extern UQI
fr30bf_h_scr_get_handler (SIM_CPU
*);
45 extern void fr30bf_h_scr_set_handler (SIM_CPU
*, UQI
);
46 #define GET_H_SCR() fr30bf_h_scr_get_handler (current_cpu)
47 #define SET_H_SCR(val) fr30bf_h_scr_set_handler (current_cpu, (val))
49 extern UQI
fr30bf_h_ilm_get_handler (SIM_CPU
*);
50 extern void fr30bf_h_ilm_set_handler (SIM_CPU
*, UQI
);
51 #define GET_H_ILM() fr30bf_h_ilm_get_handler (current_cpu)
52 #define SET_H_ILM(val) fr30bf_h_ilm_set_handler (current_cpu, (val))
54 extern USI
fr30bf_h_ps_get_handler (SIM_CPU
*);
55 extern void fr30bf_h_ps_set_handler (SIM_CPU
*, USI
);
56 #define GET_H_PS() fr30bf_h_ps_get_handler (current_cpu)
57 #define SET_H_PS(val) fr30bf_h_ps_set_handler (current_cpu, (val))
59 extern SI
fr30bf_h_dr_get_handler (SIM_CPU
*, UINT
);
60 extern void fr30bf_h_dr_set_handler (SIM_CPU
*, UINT
, SI
);
61 #define GET_H_DR(regno) fr30bf_h_dr_get_handler (current_cpu, (regno))
62 #define SET_H_DR(regno, val) fr30bf_h_dr_set_handler (current_cpu, (regno), (val))
67 /* Hardware/device support.
68 ??? Will eventually want to move device stuff to config files. */
70 /* Special purpose traps. */
71 #define TRAP_SYSCALL 10
72 #define TRAP_BREAKPOINT 9
74 /* Support for the MCCR register (Cache Control Register) is needed in order
75 for overlays to work correctly with the scache: cached instructions need
76 to be flushed when the instruction space is changed at runtime. */
78 /* Cache Control Register */
79 #define MCCR_ADDR 0xffffffff
85 /* Serial device addresses. */
86 /* These are the values for the MSA2000 board.
87 ??? Will eventually need to move this to a config file. */
88 #define UART_INCHAR_ADDR 0xff004009
89 #define UART_OUTCHAR_ADDR 0xff004007
90 #define UART_STATUS_ADDR 0xff004002
92 #define UART_INPUT_READY 0x4
93 #define UART_OUTPUT_READY 0x1
95 /* Start address and length of all device support. */
96 #define FR30_DEVICE_ADDR 0xff000000
97 #define FR30_DEVICE_LEN 0x00ffffff
99 /* sim_core_attach device argument. */
100 extern device fr30_devices
;
102 /* FIXME: Temporary, until device support ready. */
103 struct _device
{ int foo
; };
105 /* Handle the trap insn. */
106 USI
fr30_int (SIM_CPU
*, PCADDR
, int);
108 #endif /* FR30_SIM_H */