forked from Imagelibrary/binutils-gdb
sim: reg: constify store helper
These functions only read from memory, so mark the pointer as const.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user