mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
Add support for other architectures.
This commit is contained in:
parent
39911d9799
commit
b712b6f9a5
@ -16,9 +16,20 @@
|
|||||||
|| defined(__arm__) \
|
|| defined(__arm__) \
|
||||||
|| defined(__MINGW32__))
|
|| defined(__MINGW32__))
|
||||||
#define FASTFLOAT_32BIT
|
#define FASTFLOAT_32BIT
|
||||||
|
#else
|
||||||
|
// Need to check incrementally, since SIZE_MAX is a size_t, avoid overflow.
|
||||||
|
// We can never tell the register width, but the SIZE_MAX is a good approximation.
|
||||||
|
// UINTPTR_MAX and INTPTR_MAX are optional, so avoid them for max portability.
|
||||||
|
#if SIZE_MAX == 0xffff
|
||||||
|
#error Unknown platform (16-bit, unsupported)
|
||||||
|
#elif SIZE_MAX == 0xffffffff
|
||||||
|
#define FASTFLOAT_32BIT
|
||||||
|
#elif SIZE_MAX == 0xffffffffffffffff
|
||||||
|
#define FASTFLOAT_64BIT
|
||||||
#else
|
#else
|
||||||
#error Unknown platform (not 32-bit, not 64-bit?)
|
#error Unknown platform (not 32-bit, not 64-bit?)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ((defined(_WIN32) || defined(_WIN64)) && !defined(__clang__))
|
#if ((defined(_WIN32) || defined(_WIN64)) && !defined(__clang__))
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user