[x264-devel] commit: Disable __builtin_clz() intrinsic on gcc versions prior to 3.4. ( Brad Smith )

git version control git at videolan.org
Mon Jan 5 21:59:47 CET 2009


x264 | branch: master | Brad Smith <brad at comstyle.com> | Mon Jan  5 15:58:32 2009 -0500| [87b6d55ebda8a11186f7b09b5866b05a4584d13d] | committer: Jason Garrett-Glaser 

Disable __builtin_clz() intrinsic on gcc versions prior to 3.4.
The function did not exist before that version.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=87b6d55ebda8a11186f7b09b5866b05a4584d13d
---

 common/osdep.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/osdep.h b/common/osdep.h
index 94d5c1a..c9dd3c4 100644
--- a/common/osdep.h
+++ b/common/osdep.h
@@ -170,7 +170,7 @@ static ALWAYS_INLINE intptr_t endian_fix( intptr_t x )
 }
 #endif
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 3)
 #define x264_clz(x) __builtin_clz(x)
 #else
 static int ALWAYS_INLINE x264_clz( uint32_t x )



More information about the x264-devel mailing list