spu: remove rotqby C++ impl

rotqby C++ implementation is broken, since replacing it with the
intrinsic version reliably fixes spurs test. A conditional branch
immediately after a rotqby instruction will fail using the C++ version
but succeed using the intrinsic.
This commit is contained in:
sguo35 2022-07-09 23:35:27 -07:00 committed by Ivan
parent 27acebc5f5
commit 77ab872bec

View File

@ -27,6 +27,10 @@
#include "util/simd.hpp"
#include "util/sysinfo.hpp"
#if defined(ARCH_ARM64)
#include "Emu/CPU/sse2neon.h"
#endif
const extern spu_decoder<spu_itype> g_spu_itype;
const extern spu_decoder<spu_iname> g_spu_iname;
const extern spu_decoder<spu_iflag> g_spu_iflag;
@ -6877,20 +6881,14 @@ public:
set_vr(op.rt, fshl(a, zshuffle(a, 4, 0, 1, 2), b));
}
#if defined(ARCH_X64)
#if defined(ARCH_X64) || defined(ARCH_ARM64)
static __m128i exec_rotqby(__m128i a, u8 b)
{
alignas(32) const __m128i buf[2]{a, a};
return _mm_loadu_si128(reinterpret_cast<const __m128i*>(reinterpret_cast<const u8*>(buf) + (16 - (b & 0xf))));
}
#else
static v128 exec_rotqby(v128 a, u8 b)
{
alignas(32) const v128 buf[2]{a, a};
alignas(16) v128 res;
std::memcpy(&res, reinterpret_cast<const u8*>(buf) + (16 - (b & 0xf)), 16);
return res;
}
#error "Unimplemented"
#endif
void ROTQBY(spu_opcode_t op)