From 35c071168937f10f31ffada23ee2fb03185b2ca7 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Wed, 4 Oct 2023 23:35:10 +0300 Subject: [PATCH] use the right type of cast --- src/util/supervector/arch/ppc64el/impl.cpp | 6 +++--- unit/internal/simd_utils.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/supervector/arch/ppc64el/impl.cpp b/src/util/supervector/arch/ppc64el/impl.cpp index add84418..de7c73fa 100644 --- a/src/util/supervector/arch/ppc64el/impl.cpp +++ b/src/util/supervector/arch/ppc64el/impl.cpp @@ -166,7 +166,7 @@ template<> template<> really_inline SuperVector<16>::SuperVector(int64_t const other) { - u.s64x2[0] = static_cast(vec_splats(static_cast(other))); + u.s64x2[0] = reinterpret_cast(vec_splats(static_cast(other))); } #if defined(__clang__) && (__clang_major__ >= 15) #pragma clang diagnostic pop @@ -176,7 +176,7 @@ template<> template<> really_inline SuperVector<16>::SuperVector(uint64_t const other) { - u.u64x2[0] = static_cast(vec_splats(static_cast(other))); + u.u64x2[0] = reinterpret_cast(vec_splats(static_cast(other))); } // Constants @@ -284,7 +284,7 @@ SuperVector<16>::comparemask(void) const { uint8x16_t bitmask = vec_gb(u.u8x16[0]); bitmask = (uint8x16_t) vec_perm(vec_splat_u8(0), bitmask, perm); u32 ALIGN_ATTR(16) movemask; - vec_ste(static_cast(bitmask), 0, &movemask); + vec_ste(reinterpret_cast(bitmask), 0, &movemask); return movemask; } #if defined(__clang__) && (__clang_major__ >= 15) diff --git a/unit/internal/simd_utils.cpp b/unit/internal/simd_utils.cpp index 7ebd013a..c57cd598 100644 --- a/unit/internal/simd_utils.cpp +++ b/unit/internal/simd_utils.cpp @@ -678,7 +678,7 @@ TEST(SimdUtilsTest, movq) { #pragma clang diagnostic ignored "-Wdeprecate-lax-vec-conv-all" #endif // defined(__clang__) && (__clang_major__ == 15) int64x2_t a = {0x123456789abcdefLL, ~0LL }; - simd = static_cast(a); + simd = reinterpret_cast(a); #if defined(__clang__) && (__clang_major__ >= 15) #pragma clang diagnostic pop #endif // defined(__clang__) && (__clang_major__ == 15)