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/ft32/interp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sim/ft32/interp.c') diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c index 65c7141..5625856 100644 --- a/sim/ft32/interp.c +++ b/sim/ft32/interp.c @@ -745,7 +745,7 @@ ft32_lookup_register (SIM_CPU *cpu, int nr) static int ft32_reg_store (SIM_CPU *cpu, int rn, - const unsigned char *memory, + const void *memory, int length) { if (0 <= rn && rn <= 32) @@ -762,7 +762,7 @@ ft32_reg_store (SIM_CPU *cpu, static int ft32_reg_fetch (SIM_CPU *cpu, int rn, - unsigned char *memory, + void *memory, int length) { if (0 <= rn && rn <= 32) -- cgit v1.1