aboutsummaryrefslogtreecommitdiff
path: root/sim/moxie/interp.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-12-30 03:28:45 -0500
committerMike Frysinger <vapier@gentoo.org>2015-12-30 03:30:25 -0500
commite1211e55062594679697d2175b7ea77dad173823 (patch)
treefc4ef40e234adb3dc4072d112d9302ffcd6f4819 /sim/moxie/interp.c
parentc78dff22918f29b3970729f32f70060b70e75678 (diff)
downloadgdb-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/moxie/interp.c')
-rw-r--r--sim/moxie/interp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c
index b2e6352..3bf6f4d 100644
--- a/sim/moxie/interp.c
+++ b/sim/moxie/interp.c
@@ -1111,8 +1111,8 @@ sim_engine_run (SIM_DESC sd,
} while (1);
}
-int
-sim_store_register (SIM_DESC sd, int rn, unsigned char *memory, int length)
+static int
+moxie_reg_store (SIM_CPU *scpu, int rn, unsigned char *memory, int length)
{
if (rn < NUM_MOXIE_REGS && rn >= 0)
{
@@ -1131,8 +1131,8 @@ sim_store_register (SIM_DESC sd, int rn, unsigned char *memory, int length)
return 0;
}
-int
-sim_fetch_register (SIM_DESC sd, int rn, unsigned char *memory, int length)
+static int
+moxie_reg_fetch (SIM_CPU *scpu, int rn, unsigned char *memory, int length)
{
if (rn < NUM_MOXIE_REGS && rn >= 0)
{
@@ -1237,6 +1237,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) = moxie_reg_fetch;
+ CPU_REG_STORE (cpu) = moxie_reg_store;
CPU_PC_FETCH (cpu) = moxie_pc_get;
CPU_PC_STORE (cpu) = moxie_pc_set;