xsrqpix
VSX Scalar Round Quad-Precision to Integer Extended
xsrqpix vD, vB, R
Rounds a Quad float to a Quad integer (Exact).
Encoding
Binary Layout
63
0:5
VRT
6:10
///
11:14
R
15
VRB
16:20
RMC
21:22
5
23:30
EX
31
Operands
-
vD
Target -
vB
Source -
R
Mode
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
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.