Fix ARM compile errors on g++ 7.4 (#354)
* Fix ARM compilation errors * Update singleheader
This commit is contained in:
parent
b1224a77db
commit
c97eb41dc6
|
@ -1,4 +1,4 @@
|
|||
/* auto-generated on Sun Oct 13 11:11:50 DST 2019. Do not edit! */
|
||||
/* auto-generated on Sun Nov 3 14:09:55 STD 2019. Do not edit! */
|
||||
|
||||
#include <iostream>
|
||||
#include "simdjson.h"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
/* auto-generated on Sun Oct 13 11:11:50 DST 2019. Do not edit! */
|
||||
/* auto-generated on Sun Nov 3 14:09:55 STD 2019. Do not edit! */
|
||||
/* begin file include/simdjson/simdjson_version.h */
|
||||
// /include/simdjson/simdjson_version.h automatically generated by release.py,
|
||||
// do not change by hand
|
||||
|
@ -101,6 +101,10 @@ static inline int trailing_zeroes(uint64_t input_num) {
|
|||
return static_cast<int>(_tzcnt_u64(input_num));
|
||||
}
|
||||
|
||||
static inline uint64_t clear_lowest_bit(uint64_t input_num) {
|
||||
return _blsr_u64(input_num);
|
||||
}
|
||||
|
||||
static inline int leading_zeroes(uint64_t input_num) {
|
||||
return static_cast<int>(_lzcnt_u64(input_num));
|
||||
}
|
||||
|
@ -139,6 +143,15 @@ static inline NO_SANITIZE_UNDEFINED int trailing_zeroes(uint64_t input_num) {
|
|||
#endif
|
||||
}
|
||||
|
||||
/* result might be undefined when input_num is zero */
|
||||
static inline uint64_t clear_lowest_bit(uint64_t input_num) {
|
||||
#ifdef __BMI__ // blsr is BMI1
|
||||
return _blsr_u64(input_num);
|
||||
#else
|
||||
return input_num & (input_num-1);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* result might be undefined when input_num is zero */
|
||||
static inline int leading_zeroes(uint64_t input_num) {
|
||||
#ifdef __BMI2__
|
||||
|
@ -1781,6 +1794,9 @@ int json_parse_implementation(const uint8_t *buf, size_t len, ParsedJson &pj,
|
|||
} // if(realloc_if_needed) {
|
||||
int stage1_is_ok = simdjson::find_structural_bits<T>(buf, len, pj);
|
||||
if (stage1_is_ok != simdjson::SUCCESS) {
|
||||
if (reallocated) { // must free before we exit
|
||||
aligned_free((void *)buf);
|
||||
}
|
||||
pj.error_code = stage1_is_ok;
|
||||
return pj.error_code;
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ int json_parse_dispatch(const uint8_t *buf, size_t len, ParsedJson &pj,
|
|||
return json_parse_ptr.load(std::memory_order_relaxed)(buf, len, pj, realloc);
|
||||
}
|
||||
|
||||
std::atomic<json_parse_functype *> json_parse_ptr = &json_parse_dispatch;
|
||||
std::atomic<json_parse_functype *> json_parse_ptr{&json_parse_dispatch};
|
||||
|
||||
WARN_UNUSED
|
||||
ParsedJson build_parsed_json(const uint8_t *buf, size_t len,
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "simdjson/portability.h"
|
||||
#include "jsoncharutils.h"
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
#ifdef JSON_TEST_NUMBERS // for unit testing
|
||||
void found_invalid_number(const uint8_t *buf);
|
||||
|
@ -15,7 +16,7 @@ void found_float(double result, const uint8_t *buf);
|
|||
#endif
|
||||
|
||||
namespace simdjson {
|
||||
// Allowable floating-point values range from
|
||||
// Allowable floating-point values range
|
||||
// std::numeric_limits<double>::lowest() to std::numeric_limits<double>::max(),
|
||||
// so from -1.7976e308 all the way to 1.7975e308 in binary64. The lowest
|
||||
// non-zero normal values is std::numeric_limits<double>::min() or
|
||||
|
|
Loading…
Reference in New Issue