dtstsfiq

Decimal Test Significance Immediate Quad

dtstsfiq BF, U, FRB

Tests DFP Quad significance.

Details

The dtstsfiq instruction compares the number of significant digits (NSDb) of a DFP value in two floating-point registers (FRBp and FRBp+1) to an immediate reference significance specified by UIM. The result of this comparison is stored in the condition register field BF and the FPSCR's FPCC field.

Pseudocode Operation

Let UIM specify the reference significance.
Let NSDb be the number of significant digits of the DFP value in FPR[FRBp:FRBp+1].
If UIM ≠ 0 and UIM < NSDb, set CR field BF to 0b0001 and FPCC to 0b0001.
Else if UIM ≠ 0 and UIM > NSDb, or UIM = 0, set CR field BF to 0b0010 and FPCC to 0b0010.
Else if UIM ≠ 0 and UIM = NSDb, set CR field BF to 0b0100 and FPCC to 0b0100.

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

dtstsfiq cr0, 0, f3

Encoding

Binary Layout
63
0
BF
6
/
11
U
16
FRB
21
675
31
 
Format X-form
Opcode 0xFC000543
Extension Decimal Floating-Point
Registers Altered FPSCR

Operands

  • BF
    CR Field
  • U
    Imm
  • FRB
    Source