aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-17 12:42:15 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-17 12:42:15 +0000
commitc6e113f5680538a551f79df3ab19b69aed628521 (patch)
tree481bad0ddb13bebf28c6adf95a0f0dd778677085 /tcg/tcg.h
parent0b6ce4cffe977387b9d578c97d4bbe4fbbb00468 (diff)
added 'pure' function attribute - fixed indirect function calls
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4469 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r--tcg/tcg.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tcg/tcg.h b/tcg/tcg.h
index 66bbe73a4a..1b8546729f 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -148,6 +148,10 @@ typedef int TCGv;
#define TCG_CALL_TYPE_REGPARM_1 0x0001 /* i386 style regparm call (1 reg) */
#define TCG_CALL_TYPE_REGPARM_2 0x0002 /* i386 style regparm call (2 regs) */
#define TCG_CALL_TYPE_REGPARM 0x0003 /* i386 style regparm call (3 regs) */
+/* A pure function only reads its arguments and globals variables and
+ cannot raise exceptions. Hence a call to a pure function can be
+ safely suppressed if the return value is not used. */
+#define TCG_CALL_PURE 0x0010
typedef enum {
TCG_COND_EQ,