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

@@ -70,8 +70,8 @@ void or1k32bf_mtspr (sim_cpu *current_cpu, USI addr, USI val);
int or1k32bf_fetch_register (sim_cpu *current_cpu, int rn, unsigned char *buf,
int len);
int or1k32bf_store_register (sim_cpu *current_cpu, int rn, unsigned char *buf,
int len);
int or1k32bf_store_register (sim_cpu *current_cpu, int rn,
const unsigned char *buf, int len);
int or1k32bf_model_or1200_u_exec (sim_cpu *current_cpu, const IDESC *idesc,
int unit_num, int referenced);
int or1k32bf_model_or1200nd_u_exec (sim_cpu *current_cpu, const IDESC *idesc,

View File

@@ -55,7 +55,7 @@ or1k32bf_fetch_register (sim_cpu *current_cpu, int rn, unsigned char *buf,
}
int
or1k32bf_store_register (sim_cpu *current_cpu, int rn, unsigned char *buf,
or1k32bf_store_register (sim_cpu *current_cpu, int rn, const unsigned char *buf,
int len)
{
if (rn < 32)