xscmpeqqp
VSX Scalar Compare Equal Quad-Precision X-form
xscmpeqqp VRT,VRA,VRB
Compares two quad-precision floating-point values and sets the target vector register to all 1s if they are equal, otherwise all 0s.
Details
The instruction compares the quad-precision floating-point values in VSR[VRA+32] and VSR[VRB+32]. If either value is a SNaN, an Invalid Operation exception occurs. The contents of VSR[VRT+32] are set to all 1s if the values are equal, otherwise all 0s.
Pseudocode Operation
src1 ← bfp_CONVERT_FROM_BFP128(VSR[VRA+32])
src2 ← bfp_CONVERT_FROM_BFP128(VSR[VRB+32])
vxsnan_flag ← src1.class.SNaN | src2.class.SNaN
vex_flag ← FPSCR.VE & vxsnan_flag
if vxsnan_flag=1 SetFX(FPSCR.VXSNAN)
if vex_flag=0 then do
if bfp_COMPARE_EQ(src1, src2)=1 then
VSR[VRT+32] ← 0xFFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF
else
VSR[VRT+32] ← 0x0000_0000_0000_0000_0000_0000_0000_0000
Programming Note
xscmpeqqp can be used to implement the C/C++ conditional operation, RESULT = (x=y) ? a : b. xscmpeqqp vEQ,vX,vY xxsel vRESULT,vA,vB,vEQ
Example
xscmpeqqp v1, v2, v3
Encoding
Binary Layout
0
0
VRT
16
VRA
21
VRB
26
Operands
-
VRT
Target Vector Register -
VRA
Source Vector Register -
VRB
Source Vector Register