util: Prefer atomic intrinsics to inline assembly.
authorMatt Turner <mattst88@gmail.com>
Fri, 21 Nov 2014 22:29:41 +0000 (14:29 -0800)
committerMatt Turner <mattst88@gmail.com>
Mon, 24 Nov 2014 22:09:23 +0000 (14:09 -0800)
commit024db256d446668e65d39ca988b00ba16e3a88bc
tree9a8b9613002bbaa689c355b518a908b454a867aa
parent99cebffda9cd2d42edd6c1cbeceb994e6b320c5a
util: Prefer atomic intrinsics to inline assembly.

Cuts a little more than 1k of .text size from i915g.

This was previously done in commit 5f66b340 and subsequently reverted in
commit 3661f757 after bug 30514 was filed. I believe the cause of bug
30514 wasn't anything related to cross compiling, but rather that the
toolchain used defaulted to -march=i386, and i386 doesn't have the
CMPXCHG or XADD instructions used to implement the intrinsics.

So we reverted a patch that improved things so that we didn't break
compilation for a platform that never could have worked anyway.
src/gallium/auxiliary/util/u_atomic.h