]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/avr/interp.c
sim: common: change sim_{fetch,store}_register helpers to use void* buffers
[thirdparty/binutils-gdb.git] / sim / avr / interp.c
index 0aa7132cf779a22ae94e36336c8c362c871277c1..9be19a12a5255d293d596d20f0894418d69803b2 100644 (file)
@@ -1600,8 +1600,10 @@ sim_read (SIM_DESC sd, SIM_ADDR addr, void *buffer, int size)
 }
 
 static int
-avr_reg_store (SIM_CPU *cpu, int rn, const unsigned char *memory, int length)
+avr_reg_store (SIM_CPU *cpu, int rn, const void *buf, int length)
 {
+  const unsigned char *memory = buf;
+
   if (rn < 32 && length == 1)
     {
       sram[rn] = *memory;
@@ -1629,8 +1631,10 @@ avr_reg_store (SIM_CPU *cpu, int rn, const unsigned char *memory, int length)
 }
 
 static int
-avr_reg_fetch (SIM_CPU *cpu, int rn, unsigned char *memory, int length)
+avr_reg_fetch (SIM_CPU *cpu, int rn, void *buf, int length)
 {
+  unsigned char *memory = buf;
+
   if (rn < 32 && length == 1)
     {
       *memory = sram[rn];