diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-12-30 03:28:45 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-12-30 03:30:25 -0500 |
commit | e1211e55062594679697d2175b7ea77dad173823 (patch) | |
tree | fc4ef40e234adb3dc4072d112d9302ffcd6f4819 /sim/sh | |
parent | c78dff22918f29b3970729f32f70060b70e75678 (diff) | |
download | gdb-e1211e55062594679697d2175b7ea77dad173823.zip gdb-e1211e55062594679697d2175b7ea77dad173823.tar.gz gdb-e1211e55062594679697d2175b7ea77dad173823.tar.bz2 |
sim: arm/d10v/h8300/m68hc11/microblaze/mips/mn10300/moxie/sh/v850: convert to common sim_{fetch,store}_register
Diffstat (limited to 'sim/sh')
-rw-r--r-- | sim/sh/ChangeLog | 8 | ||||
-rw-r--r-- | sim/sh/interp.c | 10 |
2 files changed, 14 insertions, 4 deletions
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index 14c4b18..0a0bb56 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,11 @@ +2015-12-30 Mike Frysinger <vapier@gentoo.org> + + * wrapper.c (sim_store_register): Rename to ... + (sh_reg_store): ... this. + (sim_fetch_register): Rename to ... + (sh_reg_fetch): ... this. + (sim_open): Call CPU_REG_FETCH/CPU_REG_STORE. + 2015-12-27 Mike Frysinger <vapier@gentoo.org> * Makefile.in (SIM_OBJS): Delete sim-hload.o. diff --git a/sim/sh/interp.c b/sim/sh/interp.c index 2092a1a..3abeda6 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -1977,8 +1977,8 @@ enum { REGBANK_MACL = 19 }; -int -sim_store_register (SIM_DESC sd, int rn, unsigned char *memory, int length) +static int +sh_reg_store (SIM_CPU *cpu, int rn, unsigned char *memory, int length) { unsigned val; @@ -2150,8 +2150,8 @@ sim_store_register (SIM_DESC sd, int rn, unsigned char *memory, int length) return length; } -int -sim_fetch_register (SIM_DESC sd, int rn, unsigned char *memory, int length) +static int +sh_reg_fetch (SIM_CPU *cpu, int rn, unsigned char *memory, int length) { int val; @@ -2460,6 +2460,8 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) { SIM_CPU *cpu = STATE_CPU (sd, i); + CPU_REG_FETCH (cpu) = sh_reg_fetch; + CPU_REG_STORE (cpu) = sh_reg_store; CPU_PC_FETCH (cpu) = sh_pc_get; CPU_PC_STORE (cpu) = sh_pc_set; } |