diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-10-26 23:01:21 +0545 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-10-31 21:24:39 +0545 |
commit | 5bab16fdf1775c8abd16376458c5843fbe1d4314 (patch) | |
tree | 0b41c08b25c87525ba53362fca775a7d6acb6599 /sim/cris | |
parent | ed60d3edd51f6c33fb0f3f09400094a1b1c2ceb2 (diff) | |
download | gdb-5bab16fdf1775c8abd16376458c5843fbe1d4314.zip gdb-5bab16fdf1775c8abd16376458c5843fbe1d4314.tar.gz gdb-5bab16fdf1775c8abd16376458c5843fbe1d4314.tar.bz2 |
sim: reg: constify store helper
These functions only read from memory, so mark the pointer as const.
Diffstat (limited to 'sim/cris')
-rw-r--r-- | sim/cris/cris-tmpl.c | 2 | ||||
-rw-r--r-- | sim/cris/sim-if.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sim/cris/cris-tmpl.c b/sim/cris/cris-tmpl.c index 9f0c06e..a21a79a 100644 --- a/sim/cris/cris-tmpl.c +++ b/sim/cris/cris-tmpl.c @@ -90,7 +90,7 @@ MY (f_fetch_register) (SIM_CPU *current_cpu, int rn, int MY (f_store_register) (SIM_CPU *current_cpu, int rn, - unsigned char *buf, int len ATTRIBUTE_UNUSED) + const unsigned char *buf, int len ATTRIBUTE_UNUSED) { XCONCAT3(crisv,BASENUM,f_h_gr_set) (current_cpu, rn, GETTSI (buf)); return -1; diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index bedc0d0..64fefd6 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -933,7 +933,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, CPU_CRIS_MISC_PROFILE (cpu)->flags = STATE_TRACE_FLAGS (sd)[0]; /* Set SP to the stack we allocated above. */ - (* CPU_REG_STORE (cpu)) (cpu, H_GR_SP, (unsigned char *) sp_init, 4); + (* CPU_REG_STORE (cpu)) (cpu, H_GR_SP, (const unsigned char *) sp_init, 4); /* Set the simulator environment data. */ cpu->highest_mmapped_page = NULL; |