Skip to content

Commit e35ff9b

Browse files
deps: update simdjson to 4.4.0
1 parent 1989f4d commit e35ff9b

File tree

2 files changed

+1890
-242
lines changed

2 files changed

+1890
-242
lines changed

deps/simdjson/simdjson.cpp

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2026-02-20 16:16:37 -0500. version 4.3.1 Do not edit! */
1+
/* auto-generated on 2026-03-12 20:40:43 -0400. version 4.4.0 Do not edit! */
22
/* including simdjson.cpp: */
33
/* begin file simdjson.cpp */
44
#define SIMDJSON_SRC_SIMDJSON_CPP
@@ -146,7 +146,6 @@
146146
#define SIMDJSON_CONSTEVAL 0
147147
#endif // defined(__cpp_consteval) && __cpp_consteval >= 201811L && defined(__cpp_lib_constexpr_string) && __cpp_lib_constexpr_string >= 201907L
148148
#endif // !defined(SIMDJSON_CONSTEVAL)
149-
150149
#endif // SIMDJSON_COMPILER_CHECK_H
151150
/* end file simdjson/compiler_check.h */
152151
/* including simdjson/portability.h: #include "simdjson/portability.h" */
@@ -219,6 +218,25 @@ using std::size_t;
219218
#define SIMDJSON_IS_LASX 1 // We can always run both
220219
#elif defined(__loongarch_sx)
221220
#define SIMDJSON_IS_LSX 1
221+
222+
// Adjust for runtime dispatching support.
223+
#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__NVCOMPILER)
224+
#if __GNUC__ > 15 || (__GNUC__ == 15 && __GNUC_MINOR__ >= 0)
225+
// We are ok, we will support runtime dispatch for LASX.
226+
#else
227+
// We disable runtime dispatch for LASX, which means that we will not be able to use LASX
228+
// even if it is supported by the hardware.
229+
// Loongson users should update to GCC 15 or better.
230+
#define SIMDJSON_IMPLEMENTATION_LASX 0
231+
#endif
232+
#else
233+
// We are not using GCC, so we assume that we can support runtime dispatch for LASX.
234+
// https://godbolt.org/z/jcMnrjYhs
235+
#define SIMDJSON_IMPLEMENTATION_LASX 0
236+
#endif
237+
238+
239+
222240
#endif
223241
#elif defined(__PPC64__) || defined(_M_PPC64)
224242
#define SIMDJSON_IS_PPC64 1
@@ -60938,6 +60956,19 @@ simdjson_inline int leading_zeroes(uint64_t input_num) {
6093860956
#endif// _MSC_VER
6093960957
}
6094060958

60959+
simdjson_inline int trailing_zeroes(uint64_t input_num) {
60960+
#ifdef _MSC_VER
60961+
unsigned long trailing_zero = 0;
60962+
// Search the mask data from least significant bit (LSB)
60963+
// to most significant bit (MSB) for a set bit (1).
60964+
if (_BitScanForward64(&trailing_zero, input_num))
60965+
return (int)trailing_zero;
60966+
else return 64;
60967+
#else
60968+
return __builtin_ctzll(input_num);
60969+
#endif// _MSC_VER
60970+
}
60971+
6094160972
} // unnamed namespace
6094260973
} // namespace fallback
6094360974
} // namespace simdjson
@@ -63169,6 +63200,19 @@ simdjson_inline int leading_zeroes(uint64_t input_num) {
6316963200
#endif// _MSC_VER
6317063201
}
6317163202

63203+
simdjson_inline int trailing_zeroes(uint64_t input_num) {
63204+
#ifdef _MSC_VER
63205+
unsigned long trailing_zero = 0;
63206+
// Search the mask data from least significant bit (LSB)
63207+
// to most significant bit (MSB) for a set bit (1).
63208+
if (_BitScanForward64(&trailing_zero, input_num))
63209+
return (int)trailing_zero;
63210+
else return 64;
63211+
#else
63212+
return __builtin_ctzll(input_num);
63213+
#endif// _MSC_VER
63214+
}
63215+
6317263216
} // unnamed namespace
6317363217
} // namespace fallback
6317463218
} // namespace simdjson

0 commit comments

Comments
 (0)