diff options
Diffstat (limited to 'sim/sh')
-rw-r--r-- | sim/sh/ChangeLog | 5 | ||||
-rw-r--r-- | sim/sh/interp.c | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index 9b5c69e..fc359ed 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,8 @@ +2015-04-17 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sh_pc_get, sh_pc_set): New functions. + (sim_open): Call CPU_PC_FETCH & CPU_PC_STORE for all cpus. + 2015-04-15 Mike Frysinger <vapier@gentoo.org> * Makefile.in (SIM_OBJS): Delete sim-cpu.o. diff --git a/sim/sh/interp.c b/sim/sh/interp.c index 13f6e65..2f02e69 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -2373,6 +2373,18 @@ sim_info (SIM_DESC sd, int verbose) } } +static sim_cia +sh_pc_get (sim_cpu *cpu) +{ + return saved_state.asregs.pc; +} + +static void +sh_pc_set (sim_cpu *cpu, sim_cia pc) +{ + saved_state.asregs.pc = pc; +} + static void free_state (SIM_DESC sd) { @@ -2448,6 +2460,15 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) return 0; } + /* CPU specific initialization. */ + for (i = 0; i < MAX_NR_PROCESSORS; ++i) + { + SIM_CPU *cpu = STATE_CPU (sd, i); + + CPU_PC_FETCH (cpu) = sh_pc_get; + CPU_PC_STORE (cpu) = sh_pc_set; + } + for (p = argv + 1; *p != NULL; ++p) { if (isdigit (**p)) |