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.
This commit is contained in:
Mike Frysinger
2022-10-31 21:43:10 +05:45
parent 26f228db71
commit ee1cffd388
37 changed files with 123 additions and 115 deletions

View File

@@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
cpus. */
int
sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
sim_fetch_register (SIM_DESC sd, int rn, void *buf, int length)
{
SIM_CPU *cpu = STATE_CPU (sd, 0);
@@ -45,7 +45,7 @@ sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
cpus. */
int
sim_store_register (SIM_DESC sd, int rn, const unsigned char *buf, int length)
sim_store_register (SIM_DESC sd, int rn, const void *buf, int length)
{
SIM_CPU *cpu = STATE_CPU (sd, 0);