xsmindp
VSX Scalar Minimum Double-Precision
Computes the minimum of two double-precision floating-point values and places the result into a vector scalar register.
Details
The xsmindp 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 lesser of these two values is placed into doubleword element 0 of VSR[XT], and doubleword element 1 of VSR[XT] is set to 0. If either operand is a NaN, the result is determined by specific rules involving QNaNs and SNaNs.
Pseudocode Operation
if src1 is QNaN or src2 is QNaN then
T(Q(src2))
else if src1 is SNaN or src2 is SNaN then
fx(VXSNAN)
else if src1 is +Infinity and src2 is -Infinity then
T(src2)
else if src1 is -Infinity and src2 is +Infinity then
T(src1)
else if src1 is NZF and src2 is Zero then
T(src2)
else if src1 is Zero and src2 is NZF then
T(src1)
else if src1 is NZF and src2 is NZF then
T(M(src1,src2))
else if src1 is +Zero and src2 is +Zero then
T(src2)
else if src1 is -Zero and src2 is -Zero then
T(src2)
else if src1 is +Infinity and src2 is +Infinity then
T(src2)
else if src1 is -Infinity and src2 is -Infinity then
T(src1)
else if src1 is QNaN or src2 is SNaN then
fx(VXSNAN)T(Q(src2))
else if src1 is +NZF and src2 is +NZF then
T(src2)
else if src1 is -NZF and src2 is -NZF then
T(src2)
else if src1 is QNaN or src2 is SNaN then
fx(VXSNAN)T(Q(src2))
else if src1 is +Infinity and src2 is +Infinity then
T(src2)
else if src1 is -Infinity and src2 is -Infinity then
T(src1)
else if src1 is QNaN or src2 is SNaN then
fx(VXSNAN)T(Q(src2))
else if src1 is +NZF and src2 is +NZF then
T(src2)
else if src1 is -NZF and src2 is -NZF then
T(src2)
else if src1 is QNaN or src2 is SNaN then
fx(VXSNAN)T(Q(src2))
else if src1 is +Infinity and src2 is +Infinity then
T(src2)
else if src1 is -Infinity and src2 is -Infinity then
T(src1)
else if src1 is QNaN or src2 is SNaN then
fx(VXSNAN)T(Q(src2))
else if src1 is +NZF and src2 is +NZF then
T(src2)
else if src1 is -NZF and src2 is -NZF then
T(src2)
else if src1 is QNaN or src2 is SNaN then
fx(VXSNAN)T(Q(src2))
else if src1 is +Infinity and src2 is +Infinity then
T(src2)
else if src1 is -Infinity and src2 is -Infinity then
T(src1)
Programming Note
['The minimum of +0 and –0 is –0. The minimum of a QNaN and any value is that value. The minimum of any value and an SNaN is that SNaN converted to a QNaN.', 'FPRF, FR and FI are not modified.', 'If a trap-enabled invalid operation exception occurs, VSR[XT] is not modified.', 'This instruction can be used to operate on single-precision source operands.']
Example
Encoding
Operands
-
XT
Target -
XA
Src A -
XB
Src B