mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
fix mingw compile errors
This commit is contained in:
parent
f7b13da349
commit
bfa33b3ed1
@ -131,7 +131,7 @@ fastfloat_really_inline int leading_zeroes(uint64_t input_num) {
|
|||||||
|
|
||||||
#ifdef FASTFLOAT_32BIT
|
#ifdef FASTFLOAT_32BIT
|
||||||
|
|
||||||
#if !defined(_WIN32)
|
#if (!defined(_WIN32)) || defined(__MINGW32__)
|
||||||
// slow emulation routine for 32-bit
|
// slow emulation routine for 32-bit
|
||||||
fastfloat_really_inline uint64_t __emulu(uint32_t x, uint32_t y) {
|
fastfloat_really_inline uint64_t __emulu(uint32_t x, uint32_t y) {
|
||||||
return x * (uint64_t)y;
|
return x * (uint64_t)y;
|
||||||
@ -139,6 +139,7 @@ fastfloat_really_inline uint64_t __emulu(uint32_t x, uint32_t y) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// slow emulation routine for 32-bit
|
// slow emulation routine for 32-bit
|
||||||
|
#if !defined(__MINGW64__)
|
||||||
fastfloat_really_inline uint64_t _umul128(uint64_t ab, uint64_t cd,
|
fastfloat_really_inline uint64_t _umul128(uint64_t ab, uint64_t cd,
|
||||||
uint64_t *hi) {
|
uint64_t *hi) {
|
||||||
uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd);
|
uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd);
|
||||||
@ -150,6 +151,8 @@ fastfloat_really_inline uint64_t _umul128(uint64_t ab, uint64_t cd,
|
|||||||
(adbc_carry << 32) + !!(lo < bd);
|
(adbc_carry << 32) + !!(lo < bd);
|
||||||
return lo;
|
return lo;
|
||||||
}
|
}
|
||||||
|
#endif // !__MINGW64__
|
||||||
|
|
||||||
#endif // FASTFLOAT_32BIT
|
#endif // FASTFLOAT_32BIT
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
#include "fast_float/fast_float.h"
|
|
||||||
#include <iomanip>
|
|
||||||
#define DOCTEST_CONFIG_SUPER_FAST_ASSERTS
|
#define DOCTEST_CONFIG_SUPER_FAST_ASSERTS
|
||||||
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
||||||
#include <doctest/doctest.h>
|
#include <doctest/doctest.h>
|
||||||
|
|
||||||
|
#include "fast_float/fast_float.h"
|
||||||
|
#include <iomanip>
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE("leading_zeroes") {
|
TEST_CASE("leading_zeroes") {
|
||||||
constexpr const uint64_t bit = 1;
|
constexpr const uint64_t bit = 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user