arm: Support pac_key_* register operand for MRS/MSR in Armv8.1-M Mainline
[binutils-gdb.git] / sim / iq2000 / sim-main.h
blob82865943e3bc14c809a3184b52888e89960990e2
2 /* Main header for the Vitesse IQ2000. */
4 #ifndef SIM_MAIN_H
5 #define SIM_MAIN_H
7 /* This is a global setting. Different cpu families can't mix-n-match -scache
8 and -pbb. However some cpu families may use -simple while others use
9 one of -scache/-pbb. ???? */
10 #define WITH_SCACHE_PBB 1
12 #include "sim-basics.h"
13 #include "opcodes/iq2000-desc.h"
14 #include "opcodes/iq2000-opc.h"
15 #include "arch.h"
17 /* Pull in IQ2000_{DATA,INSN}_{MASK,VALUE}. */
18 #include "elf/iq2000.h"
20 #include "sim-base.h"
21 #include "cgen-sim.h"
23 struct iq2000_sim_cpu {
24 /* CPU specific parts go here.
25 Note that in files that don't need to access these pieces WANT_CPU_FOO
26 won't be defined and thus these parts won't appear. This is ok in the
27 sense that things work. It is a source of bugs though.
28 One has to of course be careful to not take the size of this
29 struct and no structure members accessed in non-cpu specific files can
30 go after here. Oh for a better language. */
31 #if defined (WANT_CPU_IQ2000BF)
32 IQ2000BF_CPU_DATA cpu_data;
33 #endif
35 #define IQ2000_SIM_CPU(cpu) ((struct iq2000_sim_cpu *) CPU_ARCH_DATA (cpu))
37 /* Misc. */
39 /* Catch address exceptions. */
40 extern SIM_CORE_SIGNAL_FN iq2000_core_signal ATTRIBUTE_NORETURN;
41 #define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
42 iq2000_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
43 (TRANSFER), (ERROR))
45 /* Convert between CPU-internal addresses and sim_core addresses. */
46 #define CPU2DATA(addr) (IQ2000_DATA_VALUE + (addr))
47 #define DATA2CPU(addr) ((addr) - IQ2000_DATA_VALUE)
48 #define CPU2INSN(addr) (IQ2000_INSN_VALUE + ((addr) & ~IQ2000_INSN_MASK))
49 #define INSN2CPU(addr) ((addr) - IQ2000_INSN_VALUE)
50 #define IQ2000_INSN_MEM_SIZE (CPU2INSN(0x800000) - CPU2INSN(0x0000))
51 #define IQ2000_DATA_MEM_SIZE (CPU2DATA(0x800000) - CPU2DATA(0x0000))
53 PCADDR get_h_pc (SIM_CPU *);
54 void set_h_pc (SIM_CPU *, PCADDR);
55 void do_syscall (SIM_CPU *, PCADDR);
56 void do_break (SIM_CPU *, PCADDR);
58 #endif /* SIM_MAIN_H */