dmul

Decimal Multiply

dmul FRT,FRA,FRB
dmul. FRT,FRA,FRB

Multiplies the contents of two DFP registers and places the result in another DFP register.

Details

The dmul instruction multiplies the DFP operand in FRA by the DFP operand in FRB, rounds the result to the target-format precision under control of DRN (bits 29:31 of the FPSCR), and selects an appropriate form of the rounded result based on the ideal exponent. The result is placed in FRT.

Pseudocode Operation

if 'dmul' then
    FRT <- (FRA) * (FRB)
    round to target-format precision under control of DRN
    select appropriate form based on ideal exponent
    if Rc=1 then
        set CR1 based on result class and sign

Programming Note

dmul[q][.] are treated as Floating-Point instructions in terms of resource availability.

Example

dmul f1, f2, f3

Encoding

Binary Layout
0
0
FRT
6
FRA
11
FRB
16
Rc
21
0
26
0
27
0
31
 
Format X-form
Opcode 0xEC000044
Extension Decimal Floating-Point
Registers Altered FPSCR, CR1

Operands

  • FRT
    Target FPR
  • FRA
    Source A
  • FRB
    Source B