dcmpuq

Decimal Compare Unordered Quad-Precision

dcmpuq BF, vA, vB

Compares two 128-bit DFP numbers (Non-signaling).

Details

Compares two 128-bit Decimal Floating-Point values in vA and vB without signaling an exception on QNaN operands (unordered comparison). The result is written to the condition register field BF as: LT, GT, EQ, or UN (unordered). NaN comparisons result in UN, and FPSCR[VXSNAN] is not set unless SNaN is present.

Pseudocode Operation

if vA is NaN or vB is NaN then
  CR[BF] ← 0b0001 (UN)
else if vA < vB then
  CR[BF] ← 0b1000 (LT)
else if vA > vB then
  CR[BF] ← 0b0100 (GT)
else
  CR[BF] ← 0b0010 (EQ)

Programming Note

Use dcmpuq for comparing two DFP operands while handling unordered cases, which include NaNs. Ensure that the operands are properly aligned and check the FPSCR for exception conditions after execution.

Example

dcmpuq cr0, va, vb

Encoding

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

Operands

  • BF
    CR Field
  • vA
    Src A
  • vB
    Src B