aboutsummaryrefslogtreecommitdiff
path: root/sim/h8300
diff options
context:
space:
mode:
Diffstat (limited to 'sim/h8300')
-rw-r--r--sim/h8300/compile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 5f64b47..f49e83d 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -4442,9 +4442,10 @@ sim_engine_run (SIM_DESC sd,
}
int
-sim_write (SIM_DESC sd, SIM_ADDR addr, const unsigned char *buffer, int size)
+sim_write (SIM_DESC sd, SIM_ADDR addr, const void *buffer, int size)
{
int i;
+ const unsigned char *data = buffer;
init_pointers (sd);
if (addr < 0)
@@ -4453,7 +4454,7 @@ sim_write (SIM_DESC sd, SIM_ADDR addr, const unsigned char *buffer, int size)
{
if (addr < memory_size)
{
- h8_set_memory (sd, addr + i, buffer[i]);
+ h8_set_memory (sd, addr + i, data[i]);
}
else
break;
@@ -4462,7 +4463,7 @@ sim_write (SIM_DESC sd, SIM_ADDR addr, const unsigned char *buffer, int size)
}
int
-sim_read (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
+sim_read (SIM_DESC sd, SIM_ADDR addr, void *buffer, int size)
{
init_pointers (sd);
if (addr < 0)