dtstsfiq
Decimal Test Significance Immediate Quad
Tests DFP Quad significance.
Details
Tests the significance of a Decimal Floating-Point Quad-precision operand based on the immediate value U and updates the specified condition register field. The result indicates whether the value is zero, subnormal, normal, or special (infinity/NaN). Requires the Decimal Floating-Point facility and updates the target CR field.
Pseudocode Operation
if isSpecial(FRB[0:127]) then
CR[BF*4:BF*4+3] ← test_special(FRB[0:127], U)
elif isZero(FRB[0:127]) then
CR[BF*4:BF*4+3] ← 0b0100
elif isSubnormal(FRB[0:127]) then
CR[BF*4:BF*4+3] ← 0b0010
else
CR[BF*4:BF*4+3] ← 0b0001
end
Programming Note
The dtstsfiq instruction is used to compare the number of significant digits in a DFP value with an immediate reference significance. Ensure that the UIM (immediate reference significance) is correctly set according to your comparison needs. The result is stored in both the condition register field BF and the FPSCR's FPCC field, allowing for easy conditional branching based on the comparison outcome.
Example
Encoding
Operands
-
BF
CR Field -
U
Imm -
FRB
Source