mesa: Replace a priori knowledge of gcc builtins with configure tests.
authorMatt Turner <mattst88@gmail.com>
Mon, 22 Sep 2014 00:25:49 +0000 (17:25 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 25 Sep 2014 20:52:55 +0000 (13:52 -0700)
commit4a96df73e770bcca6396d3c8ffe3fd1693c73e50
tree6f0d990309a36c1b62b091fd17c0dd93645c186d
parent3e0082261959762460dde18553ce0615df5c7a0a
mesa: Replace a priori knowledge of gcc builtins with configure tests.

Presumbly this will let clang and other compilers use the built-ins as
well.

Notice two changes specifically:
   - in _mesa_next_pow_two_64(), always use __builtin_clzll and add a
     static assertion that this is safe.
   - in macros.h, remove the clang-specific definition since it should
     be able to detect __builtin_unreachable in configure.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> [C bits]
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
configure.ac
scons/gallium.py
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
src/mesa/main/imports.c
src/mesa/main/imports.h
src/util/macros.h