PPU LLVM: fix VMINFP and VMAXFP accuracy
PPU cache needs to be cleared.
This commit is contained in:
@@ -999,7 +999,7 @@ void PPUTranslator::VMADDFP(ppu_opcode_t op)
|
|||||||
void PPUTranslator::VMAXFP(ppu_opcode_t op)
|
void PPUTranslator::VMAXFP(ppu_opcode_t op)
|
||||||
{
|
{
|
||||||
const auto [a, b] = get_vrs<f32[4]>(op.va, op.vb);
|
const auto [a, b] = get_vrs<f32[4]>(op.va, op.vb);
|
||||||
set_vr(op.vd, vec_handle_result(select(bitcast<u32[4]>(fmin(a, b)) == bitcast<u32[4]>(a), b, a)));
|
set_vr(op.vd, vec_handle_result(bitcast<f32[4]>(bitcast<u32[4]>(fmax(a, b)) & bitcast<u32[4]>(fmax(b, a)))));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PPUTranslator::VMAXSB(ppu_opcode_t op)
|
void PPUTranslator::VMAXSB(ppu_opcode_t op)
|
||||||
@@ -1061,7 +1061,7 @@ void PPUTranslator::VMHRADDSHS(ppu_opcode_t op)
|
|||||||
void PPUTranslator::VMINFP(ppu_opcode_t op)
|
void PPUTranslator::VMINFP(ppu_opcode_t op)
|
||||||
{
|
{
|
||||||
const auto [a, b] = get_vrs<f32[4]>(op.va, op.vb);
|
const auto [a, b] = get_vrs<f32[4]>(op.va, op.vb);
|
||||||
set_vr(op.vd, vec_handle_result(select(bitcast<u32[4]>(fmax(a, b)) == bitcast<u32[4]>(a), b, a)));
|
set_vr(op.vd, vec_handle_result(bitcast<f32[4]>(bitcast<u32[4]>(fmin(a, b)) | bitcast<u32[4]>(fmin(b, a)))));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PPUTranslator::VMINSB(ppu_opcode_t op)
|
void PPUTranslator::VMINSB(ppu_opcode_t op)
|
||||||
|
|||||||
Reference in New Issue
Block a user