From e109eedd35af8709c248334b66558d6f16529410 Mon Sep 17 00:00:00 2001 From: IRainman Date: Sun, 9 Nov 2025 17:21:52 +0300 Subject: [PATCH] * try to fix error on x86 platform step3. --- include/fast_float/ascii_number.h | 4 ++-- include/fast_float/float_common.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index 94abf96..05149bb 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -70,7 +70,7 @@ read8_to_u64(UC const *chars) { #ifdef FASTFLOAT_SSE2 -fastfloat_really_inline uint64_t simd_read8_to_u64(__m128i const data) { +fastfloat_really_inline uint64_t simd_read8_to_u64(__m128i const &data) { FASTFLOAT_SIMD_DISABLE_WARNINGS // _mm_packus_epi16 is SSE2+, converts 8×u16 → 8×u8 __m128i const packed = _mm_packus_epi16(data, data); @@ -94,7 +94,7 @@ fastfloat_really_inline uint64_t simd_read8_to_u64(char16_t const *chars) { #elif defined(FASTFLOAT_NEON) -fastfloat_really_inline uint64_t simd_read8_to_u64(uint16x8_t const data) { +fastfloat_really_inline uint64_t simd_read8_to_u64(uint16x8_t const &data) { FASTFLOAT_SIMD_DISABLE_WARNINGS uint8x8_t utf8_packed = vmovn_u16(data); return vget_lane_u64(vreinterpret_u64_u8(utf8_packed), 0); diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 9a56cf3..2801437 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -179,8 +179,7 @@ using parse_options = parse_options_t; #if defined(__SSE2__) || (defined(FASTFLOAT_VISUAL_STUDIO) && \ (defined(_M_AMD64) || defined(_M_X64) || \ (defined(_M_IX86_FP) && _M_IX86_FP == 2))) -// try to fix error on x86 platform: disable SSE2 code -// #define FASTFLOAT_SSE2 1 +#define FASTFLOAT_SSE2 1 #endif #if defined(__aarch64__) || defined(_M_ARM64)