Rewrite cpu_translator::rol, add fshl and fshr

Use new funnel shift intrinsics
This commit is contained in:
Nekotekina 2019-04-19 14:28:27 +03:00
parent 42448cf3e5
commit ac473eb400
3 changed files with 153 additions and 29 deletions

View file

@ -1301,20 +1301,20 @@ void PPUTranslator::VRFIZ(ppu_opcode_t op)
void PPUTranslator::VRLB(ppu_opcode_t op)
{
const auto ab = GetVrs(VrType::vi8, op.va, op.vb);
SetVr(op.vd, RotateLeft(ab[0], ab[1]));
const auto [a, b] = get_vrs<u8[16]>(op.va, op.vb);
set_vr(op.vd, rol(a, b));
}
void PPUTranslator::VRLH(ppu_opcode_t op)
{
const auto ab = GetVrs(VrType::vi16, op.va, op.vb);
SetVr(op.vd, RotateLeft(ab[0], ab[1]));
const auto [a, b] = get_vrs<u16[8]>(op.va, op.vb);
set_vr(op.vd, rol(a, b));
}
void PPUTranslator::VRLW(ppu_opcode_t op)
{
const auto ab = GetVrs(VrType::vi32, op.va, op.vb);
SetVr(op.vd, RotateLeft(ab[0], ab[1]));
const auto [a, b] = get_vrs<u32[4]>(op.va, op.vb);
set_vr(op.vd, rol(a, b));
}
void PPUTranslator::VRSQRTEFP(ppu_opcode_t op)