dsubq

Decimal Subtract Quad-Precision

dsubq vD, vA, vB

Subtracts two 128-bit DFP numbers.

Details

The dsubq instruction performs a decimal subtraction operation on two quad-precision operands held in FPR pairs. The result is rounded to the target-format precision under control of DRN (bits 29:31 of the FPSCR). An appropriate form of the rounded result is selected based on the ideal exponent and placed in the destination FPR pair.

Pseudocode Operation

dsubq FRTp, FRAp, FRBp
FRTp ← FRAp - FRBp
Rounding under control of DRN
Select appropriate form based on ideal exponent
Set FPRF field

Programming Note

The dsubq instruction is used for precise decimal subtraction of quad-precision numbers. Ensure that the operands are correctly aligned and formatted to avoid precision loss. The result's rounding mode is controlled by the FPSCR register, so verify DRN settings before execution. This operation requires floating-point privilege level.

Example

dsubq vd, va, vb

Encoding

Binary Layout
63
0
vD
6
vA
11
vB
16
514
21
/
31
 
Format X-form
Opcode 0xFC000402
Extension Decimal Floating-Point
Registers Altered FPSCR

Operands

  • vD
    Target
  • vA
    Src A
  • vB
    Src B