aboutsummaryrefslogtreecommitdiff
path: root/sim/arm
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-10-26 22:42:10 +0545
committerMike Frysinger <vapier@gentoo.org>2022-10-31 21:24:39 +0545
commited60d3edd51f6c33fb0f3f09400094a1b1c2ceb2 (patch)
tree9fec7827dac0d17642f854d02c497a3b45692dfb /sim/arm
parentsim: cgen: constify GETT helpers (diff)
downloadbinutils-gdb-ed60d3edd51f6c33fb0f3f09400094a1b1c2ceb2.tar.gz
binutils-gdb-ed60d3edd51f6c33fb0f3f09400094a1b1c2ceb2.tar.bz2
binutils-gdb-ed60d3edd51f6c33fb0f3f09400094a1b1c2ceb2.zip
sim: constify various integer readers
These functions only read from memory, so mark the pointer as const.
Diffstat (limited to 'sim/arm')
-rw-r--r--sim/arm/iwmmxt.c2
-rw-r--r--sim/arm/iwmmxt.h2
-rw-r--r--sim/arm/wrapper.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/sim/arm/iwmmxt.c b/sim/arm/iwmmxt.c
index 5f91012bc2a..ad065317b41 100644
--- a/sim/arm/iwmmxt.c
+++ b/sim/arm/iwmmxt.c
@@ -3723,7 +3723,7 @@ Fetch_Iwmmxt_Register (unsigned int regnum, unsigned char * memory)
}
int
-Store_Iwmmxt_Register (unsigned int regnum, unsigned char * memory)
+Store_Iwmmxt_Register (unsigned int regnum, const unsigned char * memory)
{
if (regnum >= 16)
{
diff --git a/sim/arm/iwmmxt.h b/sim/arm/iwmmxt.h
index e49a8d78d09..2f677affa31 100644
--- a/sim/arm/iwmmxt.h
+++ b/sim/arm/iwmmxt.h
@@ -24,4 +24,4 @@ extern unsigned IwmmxtCDP (ARMul_State *, unsigned, ARMword);
extern int ARMul_HandleIwmmxt (ARMul_State *, ARMword);
extern int Fetch_Iwmmxt_Register (unsigned int, unsigned char *);
-extern int Store_Iwmmxt_Register (unsigned int, unsigned char *);
+extern int Store_Iwmmxt_Register (unsigned int, const unsigned char *);
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c
index 38a1f27a3b0..72a65242b9d 100644
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -397,7 +397,7 @@ sim_create_inferior (SIM_DESC sd ATTRIBUTE_UNUSED,
}
static int
-frommem (struct ARMul_State *state, unsigned char *memory)
+frommem (struct ARMul_State *state, const unsigned char *memory)
{
if (state->bigendSig == HIGH)
return (memory[0] << 24) | (memory[1] << 16)