dcmpu
Decimal Compare Unordered
dcmpu BF, FRA, FRB
Compares two DFP operands and sets the CR field to indicate the result.
Details
The dcmpu instruction compares the DFP operand in FRA[p] with the DFP operand in FRB[p]. The result of the compare is placed into CR field BF and the FPCC.
Pseudocode Operation
if (FRA[p] < FRB[p]) then
BF <- FL
else if (FRA[p] > FRB[p]) then
BF <- FG
else if (FRA[p] = FRB[p]) then
BF <- FE
else
BF <- FU
Programming Note
The dcmpu instruction is used to compare two decimal floating-point numbers. It sets the condition register field BF based on the comparison result, which can be less than (FL), greater than (FG), equal to (FE), or unordered (FU) if either operand is NaN. Ensure that both operands are properly aligned and valid DFP values to avoid undefined behavior.
Example
dcmpu cr0, f2, f3
Encoding
Binary Layout
63
0
BF
6
FRA
11
FRB
16
0
21
0
26
0
30
0
31
Operands
-
BF
CR Field -
FRA
Src A -
FRB
Src B