From 5bab16fdf1775c8abd16376458c5843fbe1d4314 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 26 Oct 2022 23:01:21 +0545 Subject: sim: reg: constify store helper These functions only read from memory, so mark the pointer as const. --- sim/mcore/interp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sim/mcore') diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c index 082bc4e..8ca2eee 100644 --- a/sim/mcore/interp.c +++ b/sim/mcore/interp.c @@ -1242,7 +1242,7 @@ sim_engine_run (SIM_DESC sd, } static int -mcore_reg_store (SIM_CPU *cpu, int rn, unsigned char *memory, int length) +mcore_reg_store (SIM_CPU *cpu, int rn, const unsigned char *memory, int length) { if (rn < NUM_MCORE_REGS && rn >= 0) { -- cgit v1.1