English
Language : 

W90210F Datasheet, PDF (51/67 Pages) Winbond – PA-RISC EMBEDDED CONTROLLER
W90210F
Halfword parallel shift left and add
Format:
HSHLADD
r1,k,r2,t or
HSL1ADD
r1,r2,t
HSL2ADD
r1,r2,t
HSL3ADD
r1,r2,t
HSHLADD
0:5
5:10
11:15
26 27:31
02 r2 r1 0 0 7 k 0 t
6
5 5 3 1 4 21 5
Purpose: To perform multiple pairs of halfword shift left and add operations in parallel with
saturation.
Description:Each halfword of GR r1 is shifted left by k bits, and then added to the corresponding
halfword of GR r2. Signed saturation is performed on the addition, which forces each
halfword result to either the maximum or the minimum value, if the result would have been
out of range. The halfword results are placed in GR t. The shift amount is either 1, 2, or 3,
and is encoded in the k field of the instruction.
All operands are treated as signed numbers, and the results are signed numbers. Signed
saturation is performed.
For this instruction, signed saturation is based both on the shift operation and the add
operation. That is, if the result of the shift operation is not representable in 16 bits, signed
saturation occurs. If GR r1 was positive, maximum saturation occurs. If GR r1 was negative,
minimum saturation occurs. If the result of the shift operation is representable in 16 bits,
then saturation is determined by the add operation in the normal fashion.
Operation: GR[t]{0..15} ← lshift(GR[r1]{0..15},k) + GR[r2]{0..15};
GR[t]{16..31} ← lshift(GR[r1]{16..31},k) + GR[r2]{16..31};
if (max_signed_sat_L)
GR[t]{0..15} ← 0x7FFF;
else if (min_signed_sat_L)
GR[t]{0..15} ← 0x8000;
if (max_signed_sat_R)
GR[t]{16..31} ← 0x7FFF;
else if (min_signed_sat_R)
GR[t]{16..31} ← 0x8000;
Exceptions: None.
51
The above information is the exclusive intellectual property of Winbond Electronics Corp. and shall not be disclosed, distributed or reproduced without permission from Winbond.
Version 1.4, 10/8/97