
TM1300 Data Book
Philips Semiconductors
A-132
PRODUCT SPECIFICATION
Logical shift left
pseudo-op for asl
SYNTAX
[ IF r
guard ] lsl rsrc1 rsrc2
→ rdest
FUNCTION
if r
guard then {
n
← rsrc2<4:0>
r
dest<31:n>
← rsrc1<31–n:0>
r
dest<n–1:0>
← 0
if rsrc2<31:5> != 0 {
rdest <- 0
}
}
ATTRIBUTES
Function unit
shifter
Operation code
19
Number of operands
2
Modier
No
Modier range
—
Latency
1
Issue slots
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 les.)
As shown below, the lsl operation takes two arguments, r
src1 and rsrc2.Rsrc2 specify an unsigned shift amount,
and rdest is set to r
src1 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 r
dest while the MSBs shifted out of rsrc1 are lost.
The lsl operation optionally takes a guard, specied in r
guard. If a guard is present, its LSB controls the
modication of the destination register. If the LSB of r
guard is 1, rdest is written; otherwise, rdest is unchanged.
EXAMPLES
Initial Values
Operation
Result
r60 = 0x20, r30 = 3
lsl r60 r30
→ r90
r90
← 0x100
r10 = 0, r60 = 0x20, r30 = 3
IF r10 lsl r60 r30
→ r100
no change, since guard is false
r20 = 1, r60 = 0x20, r30 = 3
IF r20 lsl r60 r30
→ r110
r110
← 0x100
r70 = 0xfffffffc, r40 = 2
lsl r70 r40
→ r120
r120
← 0xfffffff0
r80 = 0xe, r50 = 0xfffffffe
lsl r80 r50
→ r125
r125
← 0x00000000 (shift by more than 32))
r30 = 0x7008000f, r45 = 0x20
lsl r30 r45
→ r100
r100
← 0x00000000
r30 = 0x8008000f, r45 = 0x80000000
lsl r30 r45
→ r100
r100
← 0x00000000
r30 = 0x8008000f, r45 = 0x23
lsl r30 r45
→ r100
r100
← 0x00000000
0
31
r
src1
0
31
r
src2
0
Left shifter
32 bits from r
src1
0
3
r
dest
3
0
Intermediate result
(example:
n = 3)
r
src2
SEE ALSO
asl asli asr asri lsli lsr
lsri rol roli
lsl