xscvqpswz
VSX Scalar Convert with round to zero Quad-Precision to Signed Word format
Converts a quad-precision floating-point value to a signed word format.
Details
Converts a quad-precision floating-point value from the source VSR to a signed 32-bit word integer using round-toward-zero mode and stores the result in the target VSR. Only the scalar element is processed. Out-of-range values saturate to the limits of signed 32-bit representation; FPSCR is updated.
Pseudocode Operation
VRT[0:31] ← ConvertToSignedWord_RoundTowardZero(VRB[0:127])
VRT[32:127] ← 0
Programming Note
The xscvqpswz instruction converts a quad-precision floating-point value to a signed word, rounding towards zero. It handles NaNs by setting the result to 0xFFFF_FFFF_8000_0000 and flags VXSNAN and VXCVI accordingly. For infinities, it sets the result to the maximum or minimum signed word value based on the sign of the infinity. Ensure that VSX is enabled (MSR.VSX=1) before using this instruction; otherwise, a VSX_Unavailable exception will be raised.
Example
Encoding
Operands
-
VRT
Target Vector-Scalar Register -
VRB
Source Vector-Scalar Register