mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
util: Prefer atomic intrinsics to inline assembly.
Cuts a little more than 1k of .text size from i915g. This was previously done in commit5f66b340and subsequently reverted in commit3661f757after 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.
This commit is contained in:
parent
99cebffda9
commit
024db256d4
1 changed files with 2 additions and 2 deletions
|
|
@ -24,12 +24,12 @@
|
|||
#define PIPE_ATOMIC_MSVC_INTRINSIC
|
||||
#elif (defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86))
|
||||
#define PIPE_ATOMIC_ASM_MSVC_X86
|
||||
#elif defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 401)
|
||||
#define PIPE_ATOMIC_GCC_INTRINSIC
|
||||
#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86))
|
||||
#define PIPE_ATOMIC_ASM_GCC_X86
|
||||
#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64))
|
||||
#define PIPE_ATOMIC_ASM_GCC_X86_64
|
||||
#elif defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 401)
|
||||
#define PIPE_ATOMIC_GCC_INTRINSIC
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue