dscli

Decimal Shift Coefficient Left Immediate

dscli FRT,FRA,SH
(Rc=0)

Shifts the significand of a DFP operand left by a specified number of digits.

Details

The significand of the DFP operand in FRA is shifted left SH digits. For NaN or infinity, all significand digits are in the trailing significand field. SH is a 6-bit unsigned binary integer. Digits shifted out of the leftmost digit are lost. Zeros are supplied to the vacated positions on the right. The result is placed into FRT. The sign of the result is the same as the sign of the source operand in FRA.

Pseudocode Operation

if 'dscli' then
    FRT <- (FRA) << SH

Programming Note

The dscli instruction shifts the significand of a decimal floating-point number to the left by a specified number of digits. Ensure that the shift amount (SH) is within the 0-63 range, as it's a 6-bit unsigned integer. This operation does not affect the sign or exponent of the operand. If SH is greater than the precision of the significand, leading zeros will be introduced to fill the vacated positions on the right.

Example

dscli f1, f2, 3

Encoding

Binary Layout
59
0
FRT
6
FRA
11
SH
16
66
22
/
 
Format Z23-form
Opcode 0xEC000084
Extension Decimal Floating-Point
Registers Altered CR1, (if, Rc=1), FPSCR

Operands

  • FRT
    Target
  • FRA
    Source
  • SH
    Shift Amount