dsubq
Decimal Subtract Quad-Precision
Subtracts two 128-bit DFP numbers.
Details
Subtracts the 128-bit Decimal Floating-Point value in vB from vA, storing the result in vD. The operation follows DFP semantics, respecting the current rounding mode in FPSCR and producing an exact result or DFP exception as appropriate. The FPSCR is updated with exception flags.
Pseudocode Operation
vD ← vA - vB (DFP arithmetic)
FPSCR ← updated with exception flags (XX, ZX, UX, OX, IE)
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
Encoding
Operands
-
vD
Target -
vA
Src A -
vB
Src B