xsrqpix

VSX Scalar Round Quad-Precision to Integer Extended

xsrqpix vD, vB, R

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

xsrqpix vd, vb, 0

Encoding

Binary Layout
63
0
FRT
6
/
11
FRB
16
Rc
21
37
22
 
Format Z23-form
Opcode 0xFC000025
Extension VSX
Registers Altered FPSCR, MSR

Operands

  • vD
    Target
  • vB
    Source
  • R
    Mode