From ee1cffd3883c1d846ad58c1fb86559bb2f930361 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 31 Oct 2022 21:43:10 +0545 Subject: sim: common: change sim_{fetch,store}_register helpers to use void* buffers When reading/writing arbitrary data to the system's memory, the unsigned char pointer type doesn't make that much sense. Switch it to void so we align a bit with standard C library read/write functions, and to avoid having to sprinkle casts everywhere. --- sim/sh/interp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sim/sh/interp.c') diff --git a/sim/sh/interp.c b/sim/sh/interp.c index 21de384..bfac1ba 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -1913,7 +1913,7 @@ enum { }; static int -sh_reg_store (SIM_CPU *cpu, int rn, const unsigned char *memory, int length) +sh_reg_store (SIM_CPU *cpu, int rn, const void *memory, int length) { unsigned val; @@ -2086,7 +2086,7 @@ sh_reg_store (SIM_CPU *cpu, int rn, const unsigned char *memory, int length) } static int -sh_reg_fetch (SIM_CPU *cpu, int rn, unsigned char *memory, int length) +sh_reg_fetch (SIM_CPU *cpu, int rn, void *memory, int length) { int val; -- cgit v1.1