xssqrtqpo

VSX Scalar Square Root Quad-Precision Odd

xssqrtqpo vD, vB

Used for Quad-Precision arithmetic on hardware that splits quads.

Details

The xssqrtqpo instruction computes the square root of a quad-precision floating-point value in VSR[VRB+32] using the Round to Odd rounding mode. If the source is a signaling NaN, an Invalid Operation exception occurs and VXSNAN is set.

Pseudocode Operation

src ← bfp_CONVERT_FROM_BFP128(VSR[VRB+32])
v ← bfp_SQUARE_ROOT(src)
rnd ← bfp_ROUND_TO_BFP128(RO, FPSCR.RN, v)
result ← bfp128_CONVERT_FROM_BFP(rnd)

if vxsnan_flag = 1 then SetFX(FPSCR.VXSNAN)
if vxsqrt_flag = 1 then SetFX(FPSCR.VXSQRT)
if xx_flag = 1 then SetFX(FPSCR.XX)
vx_flag ← vxsnan_flag | vxsqrt_flag
vex_flag ← FPSCR.VE & vx_flag

if vex_flag = 0 then do
    VSR[VRT+32] ← result
    FPSCR.FPRF ← fprf_CLASS_BFP128(result)
end

FPSCR.FR ← (vx_flag = 0) & inc_flag
FPSCR.FI ← (vx_flag = 0) & xx_flag

Programming Note

The xssqrtqpo instruction is used to compute the square root of a quad-precision floating-point value using the Round to Odd rounding mode. It handles signaling NaNs by raising an Invalid Operation exception and setting VXSNAN in the FPSCR. Ensure that the input is properly aligned and check the FPSCR for exceptions after execution.

Example

xssqrtqpo vd, vb

Encoding

Binary Layout
63
0
vD
6
0
11
vB
16
676
21
/
31
 
Format X-form
Opcode 0xFC000544
Extension VSX
Registers Altered FPSCR

Operands

  • vD
    Target
  • vB
    Source