summaryrefslogtreecommitdiffstats
path: root/src/util/u_atomic.h
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-11-21 15:51:42 -0800
committerMatt Turner <[email protected]>2014-12-01 11:28:45 -0800
commit972f8458f1ebdf805059d9252ae0ebb727934613 (patch)
treecb9f49a35c454032350cecd8a300533fc1a03fc3 /src/util/u_atomic.h
parent504062be2ad15ca6a85e3d00b16cff196a4a4eef (diff)
util: Remove u_atomic.h's MSVC inline assembly.
There was already an intrinsics path that implemented all of the same functions, plus more. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/util/u_atomic.h')
-rw-r--r--src/util/u_atomic.h70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/util/u_atomic.h b/src/util/u_atomic.h
index 51e799ec1aa..f326bd1c2c3 100644
--- a/src/util/u_atomic.h
+++ b/src/util/u_atomic.h
@@ -19,8 +19,6 @@
#define PIPE_ATOMIC_OS_SOLARIS
#elif defined(_MSC_VER)
#define PIPE_ATOMIC_MSVC_INTRINSIC
-#elif (defined(_MSC_VER) && (defined(__i386__) || defined(_M_IX86))
-#define PIPE_ATOMIC_ASM_MSVC_X86
#elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 401)
#define PIPE_ATOMIC_GCC_INTRINSIC
#elif (defined(__GNUC__) && defined(__i386__))
@@ -226,74 +224,6 @@ p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new)
#endif
-/* Locally coded assembly for MSVC on x86:
- */
-#if defined(PIPE_ATOMIC_ASM_MSVC_X86)
-
-#define PIPE_ATOMIC "MSVC x86 assembly"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define p_atomic_set(_v, _i) (*(_v) = (_i))
-#define p_atomic_read(_v) (*(_v))
-
-static inline boolean
-p_atomic_dec_zero(int32_t *v)
-{
- unsigned char c;
-
- __asm {
- mov eax, [v]
- lock dec dword ptr [eax]
- sete byte ptr [c]
- }
-
- return c != 0;
-}
-
-static inline void
-p_atomic_inc(int32_t *v)
-{
- __asm {
- mov eax, [v]
- lock inc dword ptr [eax]
- }
-}
-
-static inline void
-p_atomic_dec(int32_t *v)
-{
- __asm {
- mov eax, [v]
- lock dec dword ptr [eax]
- }
-}
-
-static inline int32_t
-p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new)
-{
- int32_t orig;
-
- __asm {
- mov ecx, [v]
- mov eax, [old]
- mov edx, [_new]
- lock cmpxchg [ecx], edx
- mov [orig], eax
- }
-
- return orig;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
#if defined(PIPE_ATOMIC_MSVC_INTRINSIC)
#define PIPE_ATOMIC "MSVC Intrinsics"