Fix: Use more selectivity when building SSE specific code
See: https://github.com/OpenTTD/OpenTTD/issues/9935 (cherry picked from commit c3f55d53405af04bfe928d9e1a815e06c187ca50)
This commit is contained in:

committed by
Jonathan G Rennison

parent
432717b21d
commit
44e3b05c50
10
src/stdafx.h
10
src/stdafx.h
@@ -437,11 +437,13 @@ static_assert(SIZE_MAX >= UINT32_MAX);
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
# define likely(x) __builtin_expect(!!(x), 1)
|
||||
# define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
# define likely(x) __builtin_expect(!!(x), 1)
|
||||
# define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
# define GNU_TARGET(x) [[gnu::target(x)]]
|
||||
#else
|
||||
# define likely(x) (x)
|
||||
# define unlikely(x) (x)
|
||||
# define likely(x) (x)
|
||||
# define unlikely(x) (x)
|
||||
# define GNU_TARGET(x)
|
||||
#endif /* __GNUC__ || __clang__ */
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
|
Reference in New Issue
Block a user