mirror of
https://github.com/recp/cglm.git
synced 2025-10-03 16:51:35 +00:00
make xor enable in SSEonly + fast math
This commit is contained in:
@@ -55,8 +55,20 @@
|
||||
#endif
|
||||
|
||||
/* Note that `0x80000000` corresponds to `INT_MIN` for a 32-bit int. */
|
||||
#define GLMM_NEGZEROf ((int)0x80000000) /* 0x80000000 ---> -0.0f */
|
||||
#define GLMM_POSZEROf ((int)0x00000000) /* 0x00000000 ---> +0.0f */
|
||||
|
||||
#if defined(__SSE2__)
|
||||
# define GLMM_NEGZEROf ((int)0x80000000) /* 0x80000000 ---> -0.0f */
|
||||
# define GLMM_POSZEROf ((int)0x00000000) /* 0x00000000 ---> +0.0f */
|
||||
#else
|
||||
# ifdef CGLM_FAST_MATH
|
||||
union { int i; float f; } static GLMM_NEGZEROf_TU = { .i = 0x80000000 };
|
||||
# define GLMM_NEGZEROf GLMM_NEGZEROf_TU.f
|
||||
# define GLMM_POSZEROf 0.0f
|
||||
# else
|
||||
# define GLMM_NEGZEROf -0.0f
|
||||
# define GLMM_POSZEROf 0.0f
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__SSE2__)
|
||||
# define GLMM__SIGNMASKf(X, Y, Z, W) \
|
||||
|
Reference in New Issue
Block a user