未验证 提交 29970cc3 编写于 作者: V Vlad Ilyushchenko 提交者: GitHub

fix(sql): fixed isnan() function for SSE2/SSE4 platforms (#1044)

* fix(sql): fixed isnan() function for SSE2/SSE4 platforms

* chore: linux binary

* chore: OSX amd64 binary

* chore: OSX apple silicon binary

* chore(lib): Compile freebsd lib

* chore: added Eugene to the CODEOWNERS
Co-authored-by: NPatrick Mackinlay <github.9fadd@nospam.spacesurfer.com>
上级 8277318c
* @bluestreak01 @ideoma @patrickSpaceSurfer @mpsq @bsmth
* @bluestreak01 @ideoma @patrickSpaceSurfer @bsmth @eugenels
\ No newline at end of file
......@@ -1968,23 +1968,23 @@ static inline Vec2db is_nan(Vec2d const a) {
// assume that compiler does not optimize this away with -ffinite-math-only:
return Vec2db(_mm_fpclass_pd_mask(a, 0x81));
}
//#elif defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
//#elif defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
//__attribute__((optimize("-fno-unsafe-math-optimizations")))
//static inline Vec2db is_nan(Vec2d const a) {
// return a != a; // not safe with -ffinite-math-only compiler option
//}
#elif (defined(__GNUC__) || defined(__clang__)) && !defined(__INTEL_COMPILER)
static inline Vec2db is_nan(Vec2d const a) {
__m128d aa = a;
__m128i unordered;
__asm volatile("vcmppd $3, %1, %1, %0" : "=x" (unordered) : "x" (aa) );
return Vec2db(unordered);
}
//#elif (defined(__GNUC__) || defined(__clang__)) && !defined(__INTEL_COMPILER)
//static inline Vec2db is_nan(Vec2d const a) {
// __m128d aa = a;
// __m128i unordered;
// __asm volatile("vcmppd $3, %1, %1, %0" : "=x" (unordered) : "x" (aa) );
// return Vec2db(unordered);
//}
#else
static inline Vec2db is_nan(Vec2d const a) {
// assume that compiler does not optimize this away with -ffinite-math-only:
return _mm_cmp_pd(a, a, 3); // compare unordered
// return a != a; // This is not safe with -ffinite-math-only, -ffast-math, or /fp:fast compiler option
// return _mm_cmp_pd(a, a, 3); // compare unordered
return a != a; // This is not safe with -ffinite-math-only, -ffast-math, or /fp:fast compiler option
}
#endif
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册