summaryrefslogtreecommitdiff
path: root/src/cairo-compiler-private.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-10-05 10:39:10 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-10-06 12:52:09 +0100
commitc98c1cb5325bbc05c88ea350ff99d6eaf56fd339 (patch)
treedc16b0190efb8e0f52ace973d872671a887cf48a /src/cairo-compiler-private.h
parent76dd4603d01068b1b377312ced6b44fe5419794f (diff)
downloadcairo-c98c1cb5325bbc05c88ea350ff99d6eaf56fd339.tar.gz
[wideint] Mark functions as pure
Take advantage of the gcc function attribute 'pure', which tells gcc that the function result only depends upon its arguments and it has zero side effects (e.g. it does not clobber memory). This gives gcc greater opportunity to rearrange and optimize the wideint arithmetic.
Diffstat (limited to 'src/cairo-compiler-private.h')
-rw-r--r--src/cairo-compiler-private.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cairo-compiler-private.h b/src/cairo-compiler-private.h
index fc4164516..d772f7715 100644
--- a/src/cairo-compiler-private.h
+++ b/src/cairo-compiler-private.h
@@ -111,6 +111,12 @@
# define CAIRO_FUNCTION_ALIAS(old, new)
#endif
+#if __GNUC__ >= 3
+#define cairo_pure __attribute__((pure))
+#else
+#define cairo_pure
+#endif
+
#ifndef __GNUC__
#undef __attribute__
#define __attribute__(x)