mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 10:00:16 +02:00
OpcodeDispatcher: For PF2IWOp use VSQXTN instead of VUnZip to saturate values falling outside the 16-bit range
This commit is contained in:
1 parent
cac8785aca
commit
5ab2c723ff
1 file changed
+3
-3
@@ -3583,9 +3583,9 @@ void OpDispatchBuilder::PF2IWOp(OpcodeArgs) {
|
||||
// Float to int32_t
|
||||
Src = _Vector_FToZS(Size, OpSize::i32Bit, Src);
|
||||
|
||||
// We now need to transpose the lower 16-bits of each element together
|
||||
// Only needing to move the upper element down in this case
|
||||
Src = _VUnZip(Size, OpSize::i16Bit, Src, Src);
|
||||
// Truncate the 32-bit integers to 16-bit
|
||||
// Saturate values outside the 16-bit range to smallest and largest 16-bit values
|
||||
Src = _VSQXTN(Size, OpSize::i32Bit, Src);
|
||||
|
||||
// Now we need to sign extend the 16bit value to 32-bit
|
||||
Src = _VSXTL(Size, OpSize::i16Bit, Src);
|
||||
|
||||
Reference in new issue
Block a user