+2021-02-08 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * mem.c (mem_put_blk): Rename parameter, add cast from parameter
+ type to local type. Remove cast later in the function.
+ (mem_get_blk): Likewise.
+ * mem.h (mem_put_blk): Rename parameter to match definition.
+ (mem_get_blk): Likewise.
+
2021-02-08 Andrew Burgess <andrew.burgess@embecosm.com>
* load.c: Replace 'elf/internal.h' and 'elf/common.h' includes
}
void
-mem_put_blk (int address, void *bufptr, int nbytes)
+mem_put_blk (int address, void *bufptr_void, int nbytes)
{
+ unsigned char *bufptr = (unsigned char *) bufptr_void;
+
S ("<=");
if (enable_counting)
mem_counters[1][1] += nbytes;
while (nbytes--)
- mem_put_byte (address++, *(unsigned char *) bufptr++);
+ mem_put_byte (address++, *bufptr++);
E ();
}
}
void
-mem_get_blk (int address, void *bufptr, int nbytes)
+mem_get_blk (int address, void *bufptr_void, int nbytes)
{
+ char *bufptr = (char *) bufptr_void;
+
S ("=>");
if (enable_counting)
mem_counters[0][1] += nbytes;
while (nbytes--)
- *(char *) bufptr++ = mem_get_byte (address++);
+ *bufptr++ = mem_get_byte (address++);
E ();
}
void mem_put_psi (int address, unsigned long value);
void mem_put_si (int address, unsigned long value);
-void mem_put_blk (int address, void *bufptr, int nbytes);
+void mem_put_blk (int address, void *bufptr_void, int nbytes);
unsigned char mem_get_pc (int address);
unsigned long mem_get_psi (int address);
unsigned long mem_get_si (int address);
-void mem_get_blk (int address, void *bufptr, int nbytes);
+void mem_get_blk (int address, void *bufptr_void, int nbytes);
int sign_ext (int v, int bits);