xsdivqpo

VSX Scalar Divide Quad-Precision Odd

xsdivqpo vD, vA, vB

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

Details

The xsdivqpo instruction performs a scalar divide operation on two quad-precision floating-point values. It rounds the result to the nearest odd integer when there is a tie. If src2 is zero, the result is infinity with the sign of src1. If both src1 and src2 are zero, the result is a default quiet NaN.

Pseudocode Operation

if MSR.VSX=0 then VSX_Unavailable()

v ← D(src1, src2)
if v is NaN then
    if src2 is QNaN then
        v ← src2
    else if src1 and src2 are Infinity values or Zero values then
        v ← dQNaN
    else if src1 is non-zero and src2 is Zero value then
        v ← ±Infinity (sign of src1)
else
    if v is SNaN then
        vxsnan_flag ← 1
        v ← Q(src1)
v ← round_to_odd(v)

Programming Note

The xsdivqpo instruction performs a scalar divide operation on two quad-precision floating-point values, rounding the result to the nearest odd integer when there is a tie. Ensure that VSX is enabled in the MSR register; otherwise, an exception will be raised. Be cautious with division by zero, as it results in infinity or NaN depending on the sign of the dividend.

Example

xsdivqpo vd, va, vb

Encoding

Binary Layout
63
0
vD
6
vA
11
vB
16
548
21
/
31
 
Format X-form
Opcode 0xFC000444
Extension VSX
Registers Altered FPSCR, MSR

Operands

  • vD
    Target
  • vA
    Src A
  • vB
    Src B