
TM1300 Data Book
Philips Semiconductors
A-34
PRODUCT SPECIFICATION
dualasr
Dual-16 arithmetic shift right
SYNTAX
[ IF rguard ] dualasr rsrc1 rsrc2
→ rdest
FUNCTION
if r
guard then {
n <- rsrc2<3:0>
rdest<31:31-n> <- rsrc1<31>
rdest<30-n:16> <- rsrc1<30:16+n>
rdest<15:15-n> <- rsrc1<15>
rdest<14-n:0> <- rsrc1<14:n>
if rsrc2<31:4> != 0 {
rdest<31:16> <- rsrc1<31>
rdest<15:0> <- rsrc1<15>
}
ATTRIBUTES
Function unit
shifter
Operation code
102
Number of operands
2
Modier
No
Modier range
-
Latency
1
Issue slots
1,2
DESCRIPTION
The argument rsrc1 contains two 16-bit signed integers, rsrc1<31:16> and rsrc1<15:0>. Rsrc2 species an
unsigned shift amount, and the two 16-bit integers shifted right by this amount. The sign bits rsrc1<31> and rsrc1<15>
are replicated as needed within each 16-bit value from the left. If the rsrc2<31:4> value is not zero, then take this as a
shift by 16 or more, i.e. extend the sign bit into either result.
The dualasr operation optionally takes a guard, specied in rguard. If a guard is present, its LSB controls the
modication of the destination register. If the LSB of rguard is 1, rdest is written; otherwise, rdest is not changed.
EXAMPLES
Initial Values
Operation
Result
r30 = 0x70087008, r40 = 0x1
dualasr r30 r40 -> r50
r50 <- 0x38043804
r30 = 0x70087008, r40 = 0x2
dualasr r30 r40 -> r50
r50 <- 0x1c021c02
r10 = 0, r30 = 0x70087008, r40 = 0x2
IF r10 dualasr r30 r40 -> r50
no change, since guard is false
r10 = 1, r30 = 0x70084008, r40 = 0x4
IF r10 dualasr r30 r40 -> r50
r50 <- 0x07000400
r10 = 1, r30 = 0x800c800c, r40 = 0x4
IF r10 dualasr r30 r40 -> r50
r50 <- 0xf800f800
r10 = 1, r30 = 0x700c700c, r40 = 0xf
IF r10 dualasr r30 r40 -> r50
r50 <- 0x00000000
r10 = 1, r30 = 0x700c800c, r40 = 0xf
IF r10 dualasr r30 r40 -> r50
r50 <- 0x0000ffff
r10 = 1, r30 = 0x800c700c, r40 = 0xf
IF r10 dualasr r30 r40 -> r50
r50 <- 0xffff0000
r10 = 1, r30 = 0x800c700c, r40 = 0x10000000 IF r10 dualasr r30 r40 -> r50
r50 <- 0xffff0000
r10 = 1, r30 = 0x800c700c, r40 = 0x10
IF r10 dualasr r30 r40 -> r50
r50 <- 0xffff0000
0
3
r
src1
0
3
r
src2
n
Right shifter
0
31
r
dest
28
S
Four LSBs of r
src2
S
15
Right shifter
Four LSBs of r
src2
S
Lower 13 bits
Intermediate result
(example:
n = 3)
S
Lower 13 bits
Intermediate result
(example:
n = 3)
S
15
12
S
SEE ALSO
asl asli asri lsl lsli lsr
lsri rol roli