![](http://datasheet.mmic.net.cn/260000/PTM1300FBEA_datasheet_15959396/PTM1300FBEA_418.png)
TM1300 Data Book
Philips Semiconductors
A-132
PRODUCT SPECIFICATION
Logical shift left
pseudo-op for asl
SYNTAX
[ IF rguard ] lsl rsrc1 rsrc2
→
rdest
FUNCTION
if
rguard
then {
n
←
rsrc2<4:0>
rdest<31:n>
←
rsrc1<31–n:0>
rdest<n–1:0>
←
0
if rsrc2<31:5> != 0 {
rdest <- 0
}
}
ATTRIBUTES
Function unit
Operation code
Number of operands
Modifier
Modifier range
Latency
Issue slots
shifter
19
2
No
—
1
1, 2
DESCRIPTION
The
lsl
operation is a pseudo operation that is transformed by the scheduler into an
asl
with the same arguments.
(Note: pseudo operations cannot be used in assembly source files.)
As shown below, the
lsl
operation takes two arguments, rsrc1 and rsrc2 Rsrc2 specify an unsigned shift amount,
and rdest is set to rsrc1 logically shifted left by this amount. If the rsrc2<31:5> value is not zero, then take this as a
shift by 32 or more bits. Zeros are shifted into the LSBs of rdestwhile the MSBs shifted out of rsrc1are lost.
The
lsl
operation optionally takes a guard, specified in rguard If a guard is present, its LSB controls the
modification of the destination register. If the LSB of rguardis 1, rdestis written; otherwise, rdestis unchanged.
EXAMPLES
Initial Values
Operation
Result
r60 = 0x20, r30 = 3
r10 = 0, r60 = 0x20, r30 = 3
r20 = 1, r60 = 0x20, r30 = 3
r70 = 0xfffffffc, r40 = 2
r80 = 0xe, r50 = 0xfffffffe
r30 = 0x7008000f, r45 = 0x20
r30 = 0x8008000f, r45 = 0x80000000
r30 = 0x8008000f, r45 = 0x23
lsl r60 r30
→
r90
IF r10 lsl r60 r30
→
r100
IF r20 lsl r60 r30
→
r110
lsl r70 r40
→
r120
lsl r80 r50
→
r125
lsl r30 r45
→
r100
lsl r30 r45
→
r100
lsl r30 r45
→
r100
r90
←
0x100
no change, since guard is false
r110
←
0x100
r120
←
0xfffffff0
r125
←
0x00000000 (shift by more than 32))
r100
←
0x00000000
r100
←
0x00000000
r100
←
0x00000000
0
31
rsrc1
0
31
rsrc2
0
0
0
Left shifter
32 bits from rsrc1
0
3
rdest
3
0
0
0
Intermediate result
(example: n= 3)
rsrc2
SEE ALSO
asl asli asr asri lsli lsr
lsri rol roli
lsl