dcmpoq

Decimal Compare Ordered Quad-Precision

dcmpoq BF, vA, vB

Compares two DFP values and sets the condition register based on their order.

Details

The dcmpoq instruction compares two decimal floating-point operands in quad-precision format. It sets the designated CR field to indicate the result of the comparison and updates the FPCC field accordingly.

Pseudocode Operation

if (RA < RB) then
    CR0 <- LT
else if (RA > RB) then
    CR0 <- GT
else
    CR0 <- EQ

Programming Note

The dcmpoq instruction is used to compare two quad-precision decimal floating-point numbers. It sets the CR0 register field to indicate whether the first operand is less than, greater than, or equal to the second operand. Ensure that operands are properly aligned and that the FPSCR (Floating Point Status and Control Register) is correctly configured for accurate comparison results.

Example

dcmpoq cr0, va, vb

Encoding

Binary Layout
63
0
BF
6
/
9
vA
11
vB
16
130
21
/
31
 
Format X-form
Opcode 0xFC000102
Extension Decimal Floating-Point
Registers Altered CR0, FPSCR

Operands

  • BF
    CR Field
  • vA
    Src A
  • vB
    Src B
  • RT
    Target General Purpose Register
  • RA
    Source General Purpose Register
  • RB
    Source General Purpose Register