aboutsummaryrefslogtreecommitdiff
path: root/sim/h8300/compile.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/h8300/compile.c
parentc78dff22918f29b3970729f32f70060b70e75678 (diff)
downloadfsf-binutils-gdb-e1211e55062594679697d2175b7ea77dad173823.zip
fsf-binutils-gdb-e1211e55062594679697d2175b7ea77dad173823.tar.gz
fsf-binutils-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/h8300/compile.c')
-rw-r--r--sim/h8300/compile.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index beb2ab6..4c55a37 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -4600,10 +4600,10 @@ sim_read (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
return size;
}
-
-int
-sim_store_register (SIM_DESC sd, int rn, unsigned char *value, int length)
+static int
+h8300_reg_store (SIM_CPU *cpu, int rn, unsigned char *value, int length)
{
+ SIM_DESC sd = CPU_STATE (cpu);
int longval;
int shortval;
int intval;
@@ -4665,9 +4665,10 @@ sim_store_register (SIM_DESC sd, int rn, unsigned char *value, int length)
return length;
}
-int
-sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
+static int
+h8300_reg_fetch (SIM_CPU *cpu, int rn, unsigned char *buf, int length)
{
+ SIM_DESC sd = CPU_STATE (cpu);
int v;
int longreg = 0;
@@ -4963,6 +4964,8 @@ sim_open (SIM_OPEN_KIND kind,
{
SIM_CPU *cpu = STATE_CPU (sd, i);
+ CPU_REG_FETCH (cpu) = h8300_reg_fetch;
+ CPU_REG_STORE (cpu) = h8300_reg_store;
CPU_PC_FETCH (cpu) = h8300_pc_get;
CPU_PC_STORE (cpu) = h8300_pc_set;
}