mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-02-16 23:29:54 +08:00
Fixes
This commit is contained in:
parent
2b118c843a
commit
20f3870361
@ -36,7 +36,7 @@ fastfloat_really_inline constexpr uint64_t byteswap(uint64_t val) {
|
|||||||
| (val & 0x00000000000000FF) << 56;
|
| (val & 0x00000000000000FF) << 56;
|
||||||
}
|
}
|
||||||
|
|
||||||
fastfloat_really_inline FASTFLOAT_CONSTEXPR20
|
fastfloat_really_inline
|
||||||
uint64_t fast_read_u64(const char* chars)
|
uint64_t fast_read_u64(const char* chars)
|
||||||
{
|
{
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
@ -48,7 +48,7 @@ fastfloat_really_inline
|
|||||||
uint64_t fast_read_u64(const char16_t* chars)
|
uint64_t fast_read_u64(const char16_t* chars)
|
||||||
{
|
{
|
||||||
#if FASTFLOAT_SSE2
|
#if FASTFLOAT_SSE2
|
||||||
const void* const p = chars;
|
const unsigned char* const p = reinterpret_cast<const unsigned char *>(chars);
|
||||||
|
|
||||||
static const char16_t masks[] = {0xff, 0xff, 0xff, 0xff};
|
static const char16_t masks[] = {0xff, 0xff, 0xff, 0xff};
|
||||||
const __m128i m_masks = _mm_loadu_si128(reinterpret_cast<const __m128i*>(masks));
|
const __m128i m_masks = _mm_loadu_si128(reinterpret_cast<const __m128i*>(masks));
|
||||||
@ -61,7 +61,7 @@ uint64_t fast_read_u64(const char16_t* chars)
|
|||||||
|
|
||||||
// extract
|
// extract
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
_mm_storeu_epi64(&val, _mm_shuffle_epi32(packed, 0x8));
|
_mm_storeu_si64(&val, _mm_shuffle_epi32(packed, 0x8));
|
||||||
return val;
|
return val;
|
||||||
#else
|
#else
|
||||||
alignas(8) unsigned char bytes[8];
|
alignas(8) unsigned char bytes[8];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user