aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-10-26 22:30:13 +0545
committerMike Frysinger <vapier@gentoo.org>2022-10-31 21:24:39 +0545
commitead2618501e8ba696bf29de635a9a5f6a1ba1b0e (patch)
treee8248ed4bcd5d7c69bba5bd695a099d00edbaf41 /sim
parent5b94c3808140206d3b5204a3780f294d590cc458 (diff)
downloadgdb-ead2618501e8ba696bf29de635a9a5f6a1ba1b0e.zip
gdb-ead2618501e8ba696bf29de635a9a5f6a1ba1b0e.tar.gz
gdb-ead2618501e8ba696bf29de635a9a5f6a1ba1b0e.tar.bz2
sim: cgen: constify GETT helpers
These functions only read from memory, so mark the pointer as const.
Diffstat (limited to 'sim')
-rw-r--r--sim/common/cgen-mem.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/common/cgen-mem.h b/sim/common/cgen-mem.h
index 873194f..15ba872 100644
--- a/sim/common/cgen-mem.h
+++ b/sim/common/cgen-mem.h
@@ -181,13 +181,13 @@ DECLARE_SETMEM (DF, 8) /* TAGS: SETMEMDF */
only used when interfacing with the outside world (e.g. gdb). */
#define DECLARE_GETT_EXTERN(mode, size) \
-extern mode XCONCAT2 (GETT,mode) (unsigned char *);
+extern mode XCONCAT2 (GETT,mode) (const unsigned char *);
#if defined (MEMOPS_DEFINE_INLINE)
#define DECLARE_GETT(mode, size) \
DECLARE_GETT_EXTERN (mode, size) \
mode \
-XCONCAT2 (GETT,mode) (unsigned char *p) \
+XCONCAT2 (GETT,mode) (const unsigned char *p) \
{ \
mode tmp; \
memcpy (&tmp, p, sizeof (mode)); \