Enable LIBDIVIDE_USE_SSE2 under x86_64 builds or if the binary is built with SSE2 optimizations.

git-svn-id: https://svn.eduke32.com/eduke32@5716 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-05-04 00:25:27 +00:00
parent 61fe1c554a
commit 93a86e2840

View file

@ -31,10 +31,8 @@
#define __has_builtin(x) 0 // Compatibility with non-clang compilers. #define __has_builtin(x) 0 // Compatibility with non-clang compilers.
#endif #endif
#ifdef __ICC #if defined(__SIZEOF_INT128__)
#define HAS_INT128_T 0 #define HAS_INT128_T 1
#else
#define HAS_INT128_T __LP64__
#endif #endif
#if defined(__x86_64__) || defined(_WIN64) || defined(_M_64) #if defined(__x86_64__) || defined(_WIN64) || defined(_M_64)
@ -49,6 +47,10 @@
#define LIBDIVIDE_GCC_STYLE_ASM 1 #define LIBDIVIDE_GCC_STYLE_ASM 1
#endif #endif
#if LIBDIVIDE_IS_X86_64 || defined __SSE2__ || (defined _M_IX86_FP && _M_IX86_FP == 2)
#define LIBDIVIDE_USE_SSE2 1
#endif
/* Explanation of "more" field: bit 6 is whether to use shift path. If we are using the shift path, bit 7 is whether the divisor is negative in the signed case; in the unsigned case it is 0. Bits 0-4 is shift value (for shift path or mult path). In 32 bit case, bit 5 is always 0. We use bit 7 as the "negative divisor indicator" so that we can use sign extension to efficiently go to a full-width -1. /* Explanation of "more" field: bit 6 is whether to use shift path. If we are using the shift path, bit 7 is whether the divisor is negative in the signed case; in the unsigned case it is 0. Bits 0-4 is shift value (for shift path or mult path). In 32 bit case, bit 5 is always 0. We use bit 7 as the "negative divisor indicator" so that we can use sign extension to efficiently go to a full-width -1.