![](http://datasheet.mmic.net.cn/260000/PTM1300FBEA_datasheet_15959396/PTM1300FBEA_417.png)
Philips Semiconductors
DSPCPU Operations for TM1300
PRODUCT SPECIFICATION
A-131
32-bit load with scaled index
SYNTAX
[ IF rguard ] ld32x rsrc1 rsrc2
→
rdest
FUNCTION
if
rguard
then {
if
PCSW.bytesex = LITTLE_ENDIAN
then
bs
←
3
else
bs
←
0
rdest<7:0>
←
mem[rsrc1+ (4
×
rsrc2) +(3
⊕
bs)]
rdest<15:8>
←
mem[rsrc1+ (4
×
rsrc2) + (2
⊕
bs)]
rdest<23:16>
←
mem[rsrc1+ (4
×
rsrc2) + (1
⊕
bs)]
rdest<31:24>
←
mem[rsrc1+ (4
×
rsrc2) + (0
⊕
bs)]
}
ATTRIBUTES
Function unit
Operation code
Number of operands
Modifier
Modifier range
Latency
Issue slots
dmem
201
2
No
—
3
4, 5
DESCRIPTION
The
ld32x
operation loads the 32-bit memory value from the address computed by rsrc1 + 4
×
rsrc2 and stores the
result in rdest If the memory address computed by rsrc1 + 4
×
rsrc2 is not a multiple of 4, the result of
ld32x
is
undefined but no exception will be raised. This load operation is performed as little-endian or big-endian depending on
the current setting of the bytesex bit in the PCSW.
The
ld32x
operation can be used to access the MMIO address aperture (the result of MMIO access by 8- or 16-bit
memory operations is undefined). The state of the BSX bit in the PCSW has no effect on MMIO access by
ld32x
.
The
ld32x
operation optionally takes a guard, specified in rguard If a guard is present, its LSB controls the
modification of the destination register and the occurrence of side effects. If the LSB of rguardis 1, rdestis written and
the data cache status bits are updated if the addressed locations are cacheable. if the LSB of rguard is 0, rdest is not
changed and
ld32x
has no side effects whatever.
EXAMPLES
Initial Values
Operation
Result
r10 = 0xcfc, r30 = 0x1,
[0xd00] = 0x84, [0xd01] = 0x33,
[0xd02] = 0x22, [0xd03] = 0x11
r50 = 0, r40 = 0xd0c, r20 = 0xfffffffe,
[0xd04] = 0x48, [0xd05] = 0x66,
[0xd06] = 0x55, [0xd07] = 0x44
r60 = 1, r40 = 0xd0c, r20 = 0xfffffffe,
[0xd04] = 0x48, [0xd05] = 0x66,
[0xd06] = 0x55, [0xd07] = 0x44
r70 = 0xd01, r30 = 0x1
ld32x r10 r30
→
r100
r100
←
0x84332211
IF r50 ld32x r40 r20
→
r80
no change, since guard is false
IF r60 ld32x r40 r20
→
r90
r90
←
0x48665544
ld32x r70 r30
→
r110
r110 undefined, since 0xd01 + 4
×
1 is not a
multiple of 4
SEE ALSO
ld32 ld32d ld32r st32
st32d h_st32d
ld32x