mirror of
https://git.freebsd.org/ports.git
synced 2025-06-29 00:20:40 -04:00
vec_vbpermq requires -mpower8-vector. bswap64 needs to be used instead of bswap_64 on FreeBSD. In file included from app/qmlutils.cpp:16: ../3rdparty/simdjson/singleheader/simdjson.h:14999:44: error: use of undeclared identifier 'vec_vbpermq' result = ((__vector unsigned long long)vec_vbpermq((__m128i)this->value, ^ ../3rdparty/simdjson/singleheader/simdjson.h:15022:22: error: use of undeclared identifier 'vec_vsx_ld' return (__m128i)(vec_vsx_ld(0, reinterpret_cast<const uint8_t *>(values))); ^ ../3rdparty/simdjson/singleheader/simdjson.h:15108:9: error: use of undeclared identifier 'vec_vsx_ld' vec_vsx_ld(0, reinterpret_cast<const uint8_t *>(pshufb_combine_table + pop1 * 8)); ^ ../3rdparty/simdjson/singleheader/simdjson.h:15110:5: error: use of undeclared identifier 'vec_vsx_st'; did you mean 'vec_xst'? vec_vsx_st(answer, 0, reinterpret_cast<__m128i *>(output)); ^~~~~~~~~~ vec_xst /usr/lib/clang/11.0.1/include/altivec.h:16610:33: note: 'vec_xst' declared here static inline __ATTRS_o_ai void vec_xst(vector float __vec, ^ In file included from app/qmlutils.cpp:16: ../3rdparty/simdjson/singleheader/simdjson.h:15110:27: error: cannot initialize a parameter of type 'float *' with an rvalue of type 'simdjson::ppc64::(anonymous namespace)::simd::__m128i *' vec_vsx_st(answer, 0, reinterpret_cast<__m128i *>(output)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/lib/clang/11.0.1/include/altivec.h:16612:48: note: passing argument to parameter '__ptr' here float *__ptr) { ^ In file included from app/qmlutils.cpp:16: ../3rdparty/simdjson/singleheader/simdjson.h:15768:9: error: use of undeclared identifier 'bswap_64' val = bswap_64(val); ^ ../3rdparty/simdjson/singleheader/simdjson.h:15039:5: error: use of undeclared identifier 'vec_vsx_st' vec_vsx_st(this->value, 0, reinterpret_cast<__m128i *>(dst)); ^ ../3rdparty/simdjson/singleheader/simdjson.h:15586:6: note: in instantiation of member function 'simdjson::ppc64::(anonymous namespace)::simd::base8_numeric<unsigned char>::store' requested here v0.store(dst); ^
23 lines
744 B
C++
23 lines
744 B
C++
--- 3rdparty/simdjson/singleheader/simdjson.h.orig 2021-09-07 18:36:17 UTC
|
|
+++ 3rdparty/simdjson/singleheader/simdjson.h
|
|
@@ -17189,7 +17189,11 @@ simdjson_unused simdjson_warn_unused simdjson_really_i
|
|
#ifndef SIMDJSON_PPC64_NUMBERPARSING_H
|
|
#define SIMDJSON_PPC64_NUMBERPARSING_H
|
|
|
|
+#ifdef linux
|
|
#include <byteswap.h>
|
|
+#elif defined(__FreeBSD__)
|
|
+#include <sys/endian.h>
|
|
+#endif
|
|
|
|
namespace simdjson {
|
|
namespace ppc64 {
|
|
@@ -17202,7 +17206,7 @@ parse_eight_digits_unrolled(const uint8_t *chars) {
|
|
uint64_t val;
|
|
std::memcpy(&val, chars, sizeof(uint64_t));
|
|
#ifdef __BIG_ENDIAN__
|
|
- val = bswap_64(val);
|
|
+ val = bswap64(val);
|
|
#endif
|
|
val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8;
|
|
val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16;
|