xsrqpix
VSX Scalar Round Quad-Precision to Integer Extended
Rounds a Quad float to a Quad integer (Exact).
Details
Rounds a quad-precision floating-point value in FRB to a quad-precision integer, placing the result in FRT. The rounding mode is specified by the R operand. FPSCR is updated with exceptions; this is a VSX instruction requiring VSX support.
Pseudocode Operation
let temp ← RoundToQuadInt(FRB, R)
FRT ← temp
FPSCR[FPRF, XX, ZX, UX, OX] ← updated based on operation
Programming Note
The xsrqpix instruction is used to round a quad-precision floating-point number to an integer. Ensure that the VSX (Vector Scalar Extensions) are enabled in the MSR register, as attempting to use this instruction when VSX is unavailable will result in an exception. The rounding mode is determined by the FPSCR register, and the instruction handles special cases like NaNs by setting appropriate flags in the FPSCR.
Example
Encoding
Operands
-
vD
Target -
vB
Source -
R
Mode