Enable -Wstrict-aliasing=1 (GCC)

Fixed partially.
This commit is contained in:
Nekotekina 2021-03-08 23:41:23 +03:00
parent 3990e2d3e6
commit a4fdbf0a88
34 changed files with 141 additions and 81 deletions

View file

@ -3411,9 +3411,11 @@ bool ppu_interpreter::MFOCRF(ppu_thread& ppu, ppu_opcode_t op)
else
{
// MFCR
auto* lanes = reinterpret_cast<be_t<v128>*>(+ppu.cr.bits);
const u32 mh = _mm_movemask_epi8(_mm_slli_epi64(lanes[0].value().vi, 7));
const u32 ml = _mm_movemask_epi8(_mm_slli_epi64(lanes[1].value().vi, 7));
be_t<v128> lane0, lane1;
std::memcpy(&lane0, ppu.cr.bits, sizeof(v128));
std::memcpy(&lane1, ppu.cr.bits + 16, sizeof(v128));
const u32 mh = _mm_movemask_epi8(_mm_slli_epi64(lane0.value().vi, 7));
const u32 ml = _mm_movemask_epi8(_mm_slli_epi64(lane0.value().vi, 7));
ppu.gpr[op.rd] = (mh << 16) | ml;
}