dtstdc

Test Data Class

dtstdc BF,FRA,DCM

Tests the data class of a DFP operand and sets the CR field.

Details

Tests the data class of the DFP operand in FRA against the data class mask DCM and stores the test result in condition register field BF. The instruction sets CR field BF based on whether FRA belongs to any of the classes specified by the 8-bit mask DCM. This is a Decimal Floating-Point instruction that requires the DFP category.

Pseudocode Operation

if (FRA matches any data class in DCM) then
  CR[BF] ← 0b0010
else
  CR[BF] ← 0b0000

Programming Note

The dtstdc instruction is used to test the data class of a decimal floating-point operand against a specified mask. Ensure that the DFP operand is correctly aligned and that the DCM mask accurately reflects the desired data classes for testing. The instruction updates the CR field BF and FPSCR FPCC based on the sign and data class match, which can be used in conditional logic within your program.

Example

dtstdc cr0, f2, 0

Encoding

Binary Layout
0
0
BF
6
FRA
9
DCM
11
194
16
 
Format Z22-form
Opcode 0xEC000184
Extension Decimal Floating-Point
Registers Altered CR, FPSCR

Operands

  • BF
    Condition Register Field
  • FRA
    Floating-Point Register A
  • DCM
    Data Class Mask