summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/compiler.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/compiler.h b/src/include/compiler.h
index 2151fc6ac..8d76ac474 100644
--- a/src/include/compiler.h
+++ b/src/include/compiler.h
@@ -280,6 +280,18 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr,
#define __cdecl __attribute__ (( cdecl , regparm(0) ))
/**
+ * Declare a function as pure - i.e. without side effects
+ */
+#define __pure __attribute__ (( pure ))
+
+/**
+ * Declare a function as const - i.e. it does not access global memory
+ * (including dereferencing pointers passed to it) at all.
+ * Must also not call any non-const functions.
+ */
+#define __const __attribute__ (( const ))
+
+/**
* Declare a function as used.
*
* Necessary only if the function is called only from assembler code.