aboutsummaryrefslogtreecommitdiff
path: root/sim/h8300
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
parentc78dff22918f29b3970729f32f70060b70e75678 (diff)
downloadbinutils-e1211e55062594679697d2175b7ea77dad173823.zip
binutils-e1211e55062594679697d2175b7ea77dad173823.tar.gz
binutils-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')
-rw-r--r--sim/h8300/ChangeLog8
-rw-r--r--sim/h8300/compile.c13
2 files changed, 16 insertions, 5 deletions
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index b293b29..67d3c66 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,5 +1,13 @@
2015-12-30 Mike Frysinger <vapier@gentoo.org>
+ * wrapper.c (sim_store_register): Rename to ...
+ (h8300_reg_store): ... this. Declare sd.
+ (sim_fetch_register): Rename to ...
+ (h8300_reg_fetch): ... this. Declare sd.
+ (sim_open): Call CPU_REG_FETCH/CPU_REG_STORE.
+
+2015-12-30 Mike Frysinger <vapier@gentoo.org>
+
* compile.c (lreg): Delete.
(init_pointers): Delete lreg assignments.
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;
}