
SSHL
Shift Left With Saturation
3-118
Syntax
SSHL (.unit)
src2, src1, dst
.unit = .S1 or .S2
Opcode map field used...
For operand type...
Unit
Opfield
src2
src1
dst
xsint
uint
sint
.S1, .S2
100011
src2
src1
dst
xsint
ucst5
sint
.S1, .S2
100010
Opcode
31
29 28 27
23 22
18 17
creg
z
dst
13 12
5
4
3
2
1
0
op
0
0
0
s
p
3
5
5
5
6
6
1
11
x
src1/cst
src2
Description
The
src2 operand is shifted to the left by the src1 operand. The result is placed
in
dst. When a register is used to specify the shift, the five least significant bits
specify the shift amount. Valid values are 0 through 31, and the result of the
shift is invalid if the shift amount is greater than 31. The result of the shift is
saturated to 32 bits. If a saturate occurs, the SAT bit in the CSR is set one cycle
after
dst is written.
Execution
if
(cond)
{
if ( bit(31) through bit(31–
src1) of src2 are all 1s or all 0s)
dst = src2 << src1;
else if (
src2 > 0)
saturate
dst to 0x7FFF FFFF;
else if (
src2 < 0)
saturate
dst to 0x8000 0000;
}
else
nop
Pipeline
Stage
E1
Read
src1, src2
Written
dst
Unit in use
.S
Instruction Type
Single-cycle
Delay Slots
0
Pipeline