aboutsummaryrefslogtreecommitdiff
path: root/sim/cr16/interp.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-10-26 23:01:21 +0545
committerMike Frysinger <vapier@gentoo.org>2022-10-31 21:24:39 +0545
commit5bab16fdf1775c8abd16376458c5843fbe1d4314 (patch)
tree0b41c08b25c87525ba53362fca775a7d6acb6599 /sim/cr16/interp.c
parented60d3edd51f6c33fb0f3f09400094a1b1c2ceb2 (diff)
downloadbinutils-5bab16fdf1775c8abd16376458c5843fbe1d4314.zip
binutils-5bab16fdf1775c8abd16376458c5843fbe1d4314.tar.gz
binutils-5bab16fdf1775c8abd16376458c5843fbe1d4314.tar.bz2
sim: reg: constify store helper
These functions only read from memory, so mark the pointer as const.
Diffstat (limited to 'sim/cr16/interp.c')
-rw-r--r--sim/cr16/interp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c
index cbdcdc6..6e27fad 100644
--- a/sim/cr16/interp.c
+++ b/sim/cr16/interp.c
@@ -386,7 +386,7 @@ free_state (SIM_DESC sd)
}
static int cr16_reg_fetch (SIM_CPU *, int, unsigned char *, int);
-static int cr16_reg_store (SIM_CPU *, int, unsigned char *, int);
+static int cr16_reg_store (SIM_CPU *, int, const unsigned char *, int);
SIM_DESC
sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *cb,
@@ -769,7 +769,7 @@ cr16_reg_fetch (SIM_CPU *cpu, int rn, unsigned char *memory, int length)
}
static int
-cr16_reg_store (SIM_CPU *cpu, int rn, unsigned char *memory, int length)
+cr16_reg_store (SIM_CPU *cpu, int rn, const unsigned char *memory, int length)
{
SIM_DESC sd = CPU_STATE (cpu);
int size;