Chapter 7. The AltiVec Technology Implementation
7-5
AltiVec Technology and the Programming Model
7.1.2.1 LRU Instructions
The AltiVec architecture suggests that the
lvxl
and
stvxl
instructions differ from other
AltiVec load and store instructions in that they leave data cache entries in a
least-recently-used (LRU) state instead of a most-recently-used state (MRU).This is used
to identify data known to have little reuse and poor caching characteristics.
On the MPC7400, these instructions follow the cache allocation and replacement policies
described in Section 3.7.7, òL2 Cache Testing,ó but they leave their addressed data cache
entries in the LRU state. In addition, all LRU instructions are also interpreted to be transient
and are also treated as described in the following section.
7.1.2.2 Transient Instructions
The MPC7400 supports both static and transient memory access behavior as deTned by the
AltiVec technology.
A static memory assumes a reasonable degree of locality and that the data is needed several
times over a relatively long period. A transient memory reference has poor locality and is
likely to be referenced a very few times or over a very short period of time.
If a memory access is designated as transient, that cache block is marked to not be cast out
to the L2 unless it has been modiTed in the L1 data cache. If it is modiTed in the L1, the
block is not allocated in the L2 cache when it is cast out from the L1 data cache. Instead,
the block is written directly to main memory, bypassing the L2 cache.
The following instructions are interpreted to be transient:
¥
lvxl
and
stvxl
¥
dstt
and
dststt
(transient forms of the two data stream touch instructions). These are
described in detail in the following section.
The AltiVec architecture speciTes the data stream touch instructions
dst(t)
,
dstst(t)
, and it
speciTes two data stream stop (
dss(all)
) instructions. MPC7400 implements all of them.
The term
dst
x
used below refers to all of the data stream touch instructions. The T Teld in
the
dst
x
instruction is used as the transient hint bit indicator.
The instructions summarized in this section provide user-level programs the ability to
manage on-chip caches, see Chapter 5, òCache Model and Memory Coherency,ó in
PowerPC: The Programming Environments Manual
for more information about cache
topics.