English
Language : 

W90210F Datasheet, PDF (52/67 Pages) Winbond – PA-RISC EMBEDDED CONTROLLER
W90210F
Halfword parallel shift right and add
Format:
HSHRADD
r1,k,r2,t or
HSR1ADD
r1,r2,t
HSR2ADD
r1,r2,t
HSR3ADD
r1,r2,t
HSHRADD
0:5
5:10
11:15
26 27:31
02 r2 r1 0 0 5 k 0 t
6
5 5 3 1 4 21 5
Purpose: To perform multiple pairs of halfword shift right and add operations in parallel with
saturation.
Description:Each halfword of GR r1 is shifted right by k bits, and then added to the corresponding
halfword of GR r2. The bits shifted into each halfword, from the left, are the same as the
sign bit for each halfword. 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.
Operation: GR[t]{0..15} ← arshift(GR[r1]{0..15},k) + GR[r2]{0..15};
GR[t]{16..31} ← arshift(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.
52
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