sim: reg: constify store helper

These functions only read from memory, so mark the pointer as const.
This commit is contained in:
Mike Frysinger
2022-10-26 23:01:21 +05:45
parent ed60d3edd5
commit 5bab16fdf1
38 changed files with 48 additions and 46 deletions

View File

@@ -98,7 +98,7 @@ m32rbf_fetch_register (SIM_CPU *current_cpu, int rn, unsigned char *buf, int len
/* The contents of BUF are in target byte order. */
int
m32rbf_store_register (SIM_CPU *current_cpu, int rn, unsigned char *buf, int len)
m32rbf_store_register (SIM_CPU *current_cpu, int rn, const unsigned char *buf, int len)
{
int size = m32rbf_register_size (rn);
if (len != size)

View File

@@ -38,7 +38,7 @@ m32r2f_fetch_register (SIM_CPU *current_cpu, int rn, unsigned char *buf, int len
/* The contents of BUF are in target byte order. */
int
m32r2f_store_register (SIM_CPU *current_cpu, int rn, unsigned char *buf, int len)
m32r2f_store_register (SIM_CPU *current_cpu, int rn, const unsigned char *buf, int len)
{
return m32rbf_store_register (current_cpu, rn, buf, len);
}

View File

@@ -38,7 +38,7 @@ m32rxf_fetch_register (SIM_CPU *current_cpu, int rn, unsigned char *buf, int len
/* The contents of BUF are in target byte order. */
int
m32rxf_store_register (SIM_CPU *current_cpu, int rn, unsigned char *buf, int len)
m32rxf_store_register (SIM_CPU *current_cpu, int rn, const unsigned char *buf, int len)
{
return m32rbf_store_register (current_cpu, rn, buf, len);
}