English
Language : 

PNX1300 Datasheet, PDF (376/548 Pages) NXP Semiconductors – Media Processors
Philips Semiconductors
Signed select byte
PNX1300/01/02/11 DSPCPU Operations
ibytesel
SYNTAX
[ IF rguard ] ibytesel rsrc1 rsrc2 → rdest
FUNCTION
if rguard then {
if rsrc2 = 0 then
rdest ← sign_ext8to32(rsrc1<7:0>)
else if rsrc2 = 1 then
rdest ← sign_ext8to32(rsrc1<15:8>)
else if rsrc2 = 2 then
rdest ← sign_ext8to32(rsrc1<23:16>)
else if rsrc2 = 3 then
rdest ← sign_ext8to32(rsrc1<31:24>)
}
ATTRIBUTES
Function unit
Operation code
Number of operands
Modifier
Modifier range
Latency
Issue slots
alu
56
2
No
—
1
1, 2, 3, 4, 5
SEE ALSO
ubytesel sex8 packbytes
DESCRIPTION
As shown below, the ibytesel operation selects one byte from the argument, rsrc1, sign-extends the byte to 32
bits, and stores the result in rdest. The value of rsrc2 determines which byte is selected, with rsrc2=0 selecting the
LSB of rsrc1 and rsrc2=3 selecting the MSB of rsrc1. If rsrc2 is not between 0 and 3 inclusive, the result of
ibytesel is undefined.
31
23
15
7
0
31
10
rsrc1 signed
signed
signed
signed
rsrc2
3
2
1
0
7
0
S signed
31
7
0
rdest S S S S S S S S S S S S S S S S S S S S S S S S S signed
The ibytesel 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 rguard is 1, rdest is written; otherwise, rdest is not changed.
EXAMPLES
Initial Values
r30 = 0x44332211, r40 = 1
r10 = 0, r60 = 0xddccbbaa, r70 = 2
r20 = 1, r60 = 0xddccbbaa, r70 = 2
r100 = 0xffffff7f, r110 = 0
Operation
ibytesel r30 r40 → r50
IF r10 ibytesel r60 r70 → r80
IF r20 ibytesel r60 r70 → r90
ibytesel r100 r110 → r120
Result
r50 ← 0x00000022
no change, since guard is false
r90 ← 0xffffffcc
r120 ← 0x0000007f
PRELIMINARY SPECIFICATION
A-78