Partially Executed Instructions - IBM PPC440X5 CPU Core User Manual

Cpu core
Table of Contents

Advertisement

User's Manual
PPC440x5 CPU Core

6.3.1 Partially Executed Instructions

In general, the architecture permits load and store instructions to be partially executed, interrupted, and then
to be restarted from the beginning upon return from the interrupt. In order to guarantee that a particular load
or store instruction will complete without being interrupted and restarted, software must mark the storage
being referred to as Guarded, and must use an elementary (not a string or multiple) load or store that is
aligned on an operand-sized boundary.
In order to guarantee that load and store instructions can, in general, be restarted and completed correctly
without software intervention, the following rules apply when an instruction is partially executed and then
interrupted:
• For an elementary load, no part of the target register (GPR(RT), FPR(FRT), or auxiliary processor regis-
ter) will have been altered.
• For the "update" forms of load and store instructions, the update register, GPR(RA), will not have been
altered.
On the other hand, the following effects are permissible when certain instructions are partially executed and
then restarted:
• For any store instruction, some of the bytes at the addressed storage location may have been accessed
and/or updated (if write access to that page in which bytes were altered is permitted by the access control
mechanism). In addition, for the stwcx. instruction, if the address is not aligned on a word boundary, then
the value in CR[CR0] is undefined, as is whether or not the reservation (if one existed) has been cleared.
• For any load, some of the bytes at the addressed storage location may have been accessed (if read
access to that page in which bytes were accessed is permitted by the access control mechanism). In
addition, for the lwarx instruction, if the address is not aligned on a word boundary, it is undefined
whether or not a reservation has been set.
• For load multiple and load string instructions, some of the registers in the range to be loaded may have
been altered. Including the addressing registers (GPR(RA), and possibly GPR(RB)) in the range to be
loaded is an invalid form of these instructions (and a programming error), and thus the rules for partial
execution do not protect against overwriting of these registers. Such possible overwriting of the address-
ing registers makes these invalid forms of load multiple and load strings inherently non-restartable.
In no case will access control be violated.
As previously stated, the only load or store instructions that are guaranteed to not be interrupted after being
partially executed are elementary, aligned, guarded loads and stores. All others may be interrupted after
being partially executed. The following list identifies the specific instruction types for which interruption after
partial execution may occur, as well as the specific interrupt types that could cause the interruption:
1. Any load or store (except elementary, aligned, guarded):
Critical Input
Machine Check
External Input
Program (Imprecise Mode Floating-Point Enabled)
Note that this type of interrupt can lead to partial execution of a load or store instruction under the
architectural definition only; the PPC440x5 core handles the imprecise modes of the Floating-Point
Enabled exceptions precisely, and hence this type of interrupt will not lead to partial execution.
Page 164 of 589
Preliminary
intrupts.fm.
September 12, 2002

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents