
Philips Semiconductors
DSPCPU Architecture
File: arch.fm5, modified 7/23/99
PRELIMINARY INFORMATION
3-5
3.2
INSTRUCTION SET OVERVIEW
3.2.1
Guarding (Conditional Execution)
In the TM1100 architecture, all operations are optionally
'guarded'. A guarded operation executes conditionally,
depending on the value in the ‘guard' register. For exam-
ple, a guarded add is written as:
IF R23 iadd R14 R10
→ R13
This should be taken to mean
if R23 then R13
← R14 + R10.
The ’if R23' clause controls the execution of the opera-
tion based on the LSB of R23. Hence, depending on the
LSB of R23, R13 is either unchanged or set to contain
the integer sum of R14 and R10.
Guarding applies to all DSPCPU operations, except the
iimm and uimm (load-immediate) operations. Guarding
controls the effect on all programmer visible state of the
system, i.e. register values, memory content, exception
raising and device state.
3.2.2
Load and Store Operations
Memory is byte addressable. Loads and stores have to
be ‘naturally aligned’, i.e. a 16-bit load or store must tar-
get an address that is a multiple of two. A 32-bit load or
store must target an address that is a multiple of four.
The BSX bit in the PCSW determines the byte order of
loads and stores. For example, see
ld32 and
st32 in
Ap-Only 32-bit load and store operations are allowed to ac-
cess MMIO registers in the MMIO address aperture (see
fined for other loads and stores. A load from a non-exis-
tent MMIO register returns an undefined result. A store to
a non-existent MMIO register times out and then does
not happen. There are no other sideeffects of an access
to a nonexistent MMIO register. The state of the BSX bit
has no effect on the result of MMIO accesses.
Loads are allowed to be issued speculatively. Loads that
are outside the range of valid data memory addresses for
the active process return an implementation dependent
value and do not generate an exception. Misaligned
loads also return an implementation dependent value
and do not generate an exception.
If a pair of memory operations involves one or more com-
mon bytes in memory, the effect on the common bytes is
The
addressing
modes
supported
are
shown
in
Table 3-4 and the minimum values of implementation-
dependent addressing-mode components are shown in
Note: The index and scaled-index modes are not
allowed with store opcodes, due to the hardware
restriction that each operation have at most two
source operand registers and 1 condition register—
stores use one operand register for the value to be
stored, which leaves only one register to form an
address.
The scale factor applied (1/2/4) in the scaled addressing
modes is equal to the size of the item loaded or stored,
i.e. 1 for a byte operation, 2 for a 16-bit operation and 4
for a 32-bit operation.
Table 3-7 lists the available load and store mnemonics
for the three addressing modes.
Example usage of load and store operations:
IF r10 ild16d(12) r12
→ r13
If the LSB of r10 is set, load 16 bits starting at
address (r12+12) using the byte ordering indicated
in PCSW.BSX, sign-extend the value to 32 bits and
store the result in r13.
IF r10 st32d(40) r12 r13
if the LSB of r10 is set, store the 32-bit value from
r13 to the address (r12+40) using the byte ordering
indicated in PCSW.BSX.
Table 3-6. Behavior of Loads and Stores with
Coincident Addresses
Condition
Behavior
Tstore < Tload
If a store is issued before a load, the value
loaded contains the new bytes.
Tload < Tstore
If a load is issued before a store, the value
loaded contains the old bytes.
Tstore1 < Tstore2 If store1 is issued before store2, the result-
ing value contains the bytes of store2.
Tstore = Tload
If a load and store are issued in the same
clock cycle, the result is UNDEFINED.
Tstore1 = Tstore2 If two stores are issued in the same clock
cycle, the resulting stored value is unde-
ned.
Table 3-7. Load and Store Mnemonics
Operation
Displacement
Index
Scaled-
Index
8-bit signed load
ild8d
ild8r
—
8-bit unsigned load
uld8d
uld8r
—
16-bit signed load
ild16d
ild16r
ild16x
16-bit unsigned load
uld16d
uld16r
uld16x
32-bit load
ld32d
ld32r
ld32x
8-bit store
st8d
—
16-bit store
st16d
—
32-bit store
st32d
—