mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
PPU LLVM: Fix VMAXFP, VMINFP
This commit is contained in:
parent
613212f9e1
commit
bd1f5ff194
1 changed files with 2 additions and 2 deletions
|
@ -1290,7 +1290,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(bitcast<f32[4]>(bitcast<u32[4]>(fmax(a, b)) & bitcast<u32[4]>(fmax(b, a)))));
|
set_vr(op.vd, vec_handle_result(select(fcmp_ord(a < b) | fcmp_uno(b != b), b, a)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PPUTranslator::VMAXSB(ppu_opcode_t op)
|
void PPUTranslator::VMAXSB(ppu_opcode_t op)
|
||||||
|
@ -1352,7 +1352,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(bitcast<f32[4]>(bitcast<u32[4]>(fmin(a, b)) | bitcast<u32[4]>(fmin(b, a)))));
|
set_vr(op.vd, vec_handle_result(select(fcmp_ord(a > b) | fcmp_uno(b != b), b, a)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PPUTranslator::VMINSB(ppu_opcode_t op)
|
void PPUTranslator::VMINSB(ppu_opcode_t op)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue