mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-24 02:19:41 +00:00
Use vec_xl and vec_xst for Clang PPC64 loads and stores
This commit is contained in:
parent
0c2b909c35
commit
c5c0cf68e4
16
ppc_simd.h
16
ppc_simd.h
@ -353,7 +353,7 @@ inline uint32x4_p VecLoad(const word32 src[4])
|
||||
# if defined(__clang__)
|
||||
// GCC and XLC use integer math for the effective address.
|
||||
// LLVM uses pointer math for the effective address.
|
||||
return (uint32x4_p)VecLoad_ALTIVEC(0, CONST_V8_CAST(eff));
|
||||
return (uint32x4_p)vec_xl(0, CONST_V32_CAST(eff));
|
||||
# else
|
||||
return (uint32x4_p)vec_xl(0, CONST_V32_CAST(src));
|
||||
# endif
|
||||
@ -387,7 +387,7 @@ inline uint32x4_p VecLoad(int off, const word32 src[4])
|
||||
# if defined(__clang__)
|
||||
// GCC and XLC use integer math for the effective address.
|
||||
// LLVM uses pointer math for the effective address.
|
||||
return (uint32x4_p)VecLoad_ALTIVEC(0, CONST_V8_CAST(eff));
|
||||
return (uint32x4_p)vec_xl(0, CONST_V32_CAST(eff));
|
||||
# else
|
||||
return (uint32x4_p)vec_xl(off, CONST_V32_CAST(src));
|
||||
# endif
|
||||
@ -423,7 +423,7 @@ inline uint64x2_p VecLoad(const word64 src[2])
|
||||
# if defined(__clang__)
|
||||
// GCC and XLC use integer math for the effective address.
|
||||
// LLVM uses pointer math for the effective address.
|
||||
return (uint64x2_p)VecLoad_ALTIVEC(0, CONST_V8_CAST(eff));
|
||||
return (uint64x2_p)vec_xl(0, CONST_V32_CAST(eff));
|
||||
# else
|
||||
return (uint64x2_p)vec_xl(0, CONST_V32_CAST(src));
|
||||
# endif
|
||||
@ -458,7 +458,7 @@ inline uint64x2_p VecLoad(int off, const word64 src[2])
|
||||
# if defined(__clang__)
|
||||
// GCC and XLC use integer math for the effective address.
|
||||
// LLVM uses pointer math for the effective address.
|
||||
return (uint64x2_p)VecLoad_ALTIVEC(0, CONST_V8_CAST(eff));
|
||||
return (uint64x2_p)vec_xl(0, CONST_V32_CAST(eff));
|
||||
# else
|
||||
// 32-bit cast is not a typo. Compiler workaround.
|
||||
return (uint64x2_p)vec_xl(off, CONST_V32_CAST(src));
|
||||
@ -729,7 +729,7 @@ inline void VecStore(const T data, word32 dest[4])
|
||||
# if defined(__clang__)
|
||||
// GCC and XLC use integer math for the effective address.
|
||||
// LLVM uses pointer math for the effective address.
|
||||
VecStore_ALTIVEC((uint8x16_p)data, 0, NCONST_V8_CAST(eff));
|
||||
vec_xst((uint32x4_p)data, 0, NCONST_V32_CAST(eff));
|
||||
# else
|
||||
vec_xst((uint32x4_p)data, 0, NCONST_V32_CAST(dest));
|
||||
# endif
|
||||
@ -766,7 +766,7 @@ inline void VecStore(const T data, int off, word32 dest[4])
|
||||
# if defined(__clang__)
|
||||
// GCC and XLC use integer math for the effective address.
|
||||
// LLVM uses pointer math for the effective address.
|
||||
VecStore_ALTIVEC((uint8x16_p)data, 0, NCONST_V8_CAST(eff));
|
||||
vec_xst((uint32x4_p)data, 0, NCONST_V32_CAST(eff));
|
||||
# else
|
||||
vec_xst((uint32x4_p)data, off, NCONST_V32_CAST(dest));
|
||||
# endif
|
||||
@ -803,7 +803,7 @@ inline void VecStore(const T data, word64 dest[2])
|
||||
# if defined(__clang__)
|
||||
// GCC and XLC use integer math for the effective address.
|
||||
// LLVM uses pointer math for the effective address.
|
||||
VecStore_ALTIVEC((uint8x16_p)data, 0, NCONST_V8_CAST(dest));
|
||||
vec_xst((uint32x4_p)data, 0, NCONST_V32_CAST(eff));
|
||||
# else
|
||||
// 32-bit cast is not a typo. Compiler workaround.
|
||||
vec_xst((uint32x4_p)data, 0, NCONST_V32_CAST(dest));
|
||||
@ -842,7 +842,7 @@ inline void VecStore(const T data, int off, word64 dest[2])
|
||||
# if defined(__clang__)
|
||||
// GCC and XLC use integer math for the effective address.
|
||||
// LLVM uses pointer math for the effective address.
|
||||
VecStore_ALTIVEC((uint8x16_p)data, 0, NCONST_V8_CAST(eff));
|
||||
vec_xst((uint32x4_p)data, 0, NCONST_V32_CAST(eff));
|
||||
# else
|
||||
// 32-bit cast is not a typo. Compiler workaround.
|
||||
vec_xst((uint32x4_p)data, off, NCONST_V32_CAST(dest));
|
||||
|
Loading…
Reference in New Issue
Block a user