
MOTOROLA
Chapter 2. Programming Model
2-29
Integer load and store string instructions
Floating-point load instructions
Floating-point store instructions
2.3.4.3.1 Self-Modifying Code
When a processor modifies a memory location that may be contained in the instruction
cache, software must ensure that memory updates are visible to the instruction fetching
mechanism. This can be achieved by the following instruction sequence:
dcbst
sync
icbi
isync
|update memory
|wait for update
|remove (invalidate) copy in instruction cache
|remove copy in own instruction buffer
These operations are required because the data cache is a write-back cache. Since
instruction fetching bypasses the data cache, changes to items in the data cache may not be
reflected in memory until the fetch operations complete.
Special care must be taken to avoid coherency paradoxes in systems that implement unified
secondary caches, and designers should carefully follow the guidelines for maintaining
cache coherency that are provided in the VEA, and discussed in Chapter 5, “Cache Model
and Memory Coherency,” in
The
Programming Environments Manual
. Because the 603e
does not broadcast the M bit for instruction fetches, external caches are subject to
coherency paradoxes.
2.3.4.3.2 Integer Load and Store Address Generation
Integer load and store operations generate effective addresses using register indirect with
immediate index mode, register indirect with index mode, or register indirect mode. See
Section 2.3.2.3, “Effective Address Calculation,” for information about calculating
effective addresses. Note that the 603e is optimized for load and store operations that are
aligned on natural boundaries, and operations that are not naturally aligned may suffer
performance degradation. Refer to Section 4.5.6.1, “Integer Alignment Exceptions,” for
additional information about load and store address alignment exceptions.
2.3.4.3.3 Register Indirect Integer Load Instructions
For integer load instructions, the byte, half word, word, or double word addressed by the
EA is loaded into
r
D. Many integer load instructions have an update form, in which
r
A is
updated with the generated effective address. For these forms, the EA is placed into
r
A and
the memory element (byte, half word, word, or double word) addressed by EA is loaded
into
r
D.
Implementation Note
—In some implementations of the PowerPC architecture, the load
half word algebraic instructions (
lha
and
lhax
) and the load with update (
lbzu
,
lbzux
,
lhzu
,
lhzux
,
lhau
,
lhaux
,
lwu
, and
lwux
) instructions may execute with greater latency than
other types of load instructions. In the 603e, these instructions operate with the same
latency as other load instructions.