xscmpudp

VSX Scalar Compare Unordered Double-Precision

xscmpudp BF, XA, XB

Compares two double-precision floating-point values and sets the condition register based on the comparison.

Details

The instruction compares the double-precision floating-point value in doubleword element 0 of VSR[XA] with the double-precision floating-point value in doubleword element 0 of VSR[XB]. The result is placed into CR field BF and the FPCC. If either operand is a NaN, VXSNAN is set.

Pseudocode Operation

if 'xscmpudp' then
    src1 <- VSR[XA][0]
    src2 <- VSR[XB][0]
    cc <- C(src1, src2)
    FPCC <- cc
    CR[BF] <- cc
    if vxsnan_flag then
        fx(VXSNAN)
        if VE and not ignore-exception mode then
            error()

Programming Note

['This instruction can be used to operate on single-precision source operands.', 'Previous versions of the architecture allowed the contents of doubleword 1 of the result register to be undefined. However, all processors that support this instruction write 0s into doubleword 1 of the result register.']

Example

xscmpudp cr0, vs2, vs3

Encoding

Binary Layout
111100
0
XA
6
XB
9
000000
11
000000
16
000000
21
000000
000000
000000
000000
000000
000000
000000
000000
000000
000000
 
Format XX3-form
Opcode 0xF0000023
Extension VSX
Registers Altered CR, FPSCR

Operands

  • BF
    CR Field
  • XA
    Src A
  • XB
    Src B
  • VS32
    Target Vector Register