IDT
Operation Section Notation and Functions
79RC32355 User Reference Manual
A - 7
November 4, 2002
Notes
Pseudocode Functions
There are several functions used in the pseudocode descriptions. These are used either to make the
pseudocode more readable, to abstract implementation-specific behavior, or both. These functions include
the following: Load Memory and Store Memory Functions, and Miscellaneous Functions.
Load Memory and Store Memory Functions
Regardless of byte ordering (big- or little-endian), the address of a halfword, word, or doubleword is the
smallest byte address of the bytes that form the object. For big-endian ordering this is the most-significant
byte; for a little-endian ordering this is the least-significant byte.
In the Operation pseudocode for load and store operations, the following functions summarize the
handling of virtual addresses and the access of physical memory. The size of the data item to be loaded or
stored is passed in the AccessLength field. The valid constant names and values are shown in Table 11-2.
The bytes within the addressed unit of memory (word for 32-bit processors or doubleword for 64-bit proces-
sors) that are used can be determined directly from the AccessLength and the two or three low-order bits of
the address.
ReverseEndian
Signal to reverse the endianness of load and store instructions. This feature is avail-
able in User mode only, and is implemented by setting the
RE
bit of the
Status
regis-
ter. Thus, ReverseEndian may be computed as (SR
RE
and User mode).
LLbit
Bit of
virtual
state used to specify operation for instructions that provide atomic
read-modify-write.
LLbit
is set when a linked load occurs; it is tested and cleared by
the conditional store. It is cleared, during other CPU operation, when a store to the
location would no longer be atomic. In particular, it is cleared by exception return
instructions.
I:,
I+n:,
I-n:
This occurs as a prefix to
Operation
description lines and functions as a label. It indi-
cates the instruction time during which the pseudocode appears to “execute.”
Unless otherwise indicated, all effects of the current instruction appear to occur dur-
ing the instruction time of the current instruction. No label is equivalent to a time
label of
I
. Sometimes effects of an instruction appear to occur either earlier or later
— that is, during the instruction time of another instruction. When this happens, the
instruction operation is written in sections labeled with the instruction time, relative
to the current instruction
I
, in which the effect of that pseudocode appears to occur.
For example, an instruction may have a result that is not available until after the next
instruction. Such an instruction has the portion of the instruction operation descrip-
tion that writes the result register in a section labeled
I
+
1
.
The effect of pseudocode statements for the current instruction labelled
I
+
1
appears
to occur “at the same time” as the effect of pseudocode statements labeled
I
for the
following instruction. Within one pseudocode sequence, the effects of the state-
ments take place in order. However, between sequences of statements for different
instructions that occur “at the same time,” there is no defined order. Programs must
not depend on a particular order of evaluation between such sections.
PC
The
Program Counter
value. During the instruction time of an instruction, this is the
address of the instruction word. The address of the instruction that occurs during the
next instruction time is determined by assigning a value to
PC
during an instruction
time. If no value is assigned to
PC
during an instruction time by any pseudocode
statement, it is automatically incremented by either 2 (in the case of a 16-bit MIPS16
instruction) or 4 before the next instruction time. A taken branch assigns the target
address to the
PC
during the instruction time of the instruction in the branch delay
slot.
PABITS
The number of physical address bits implemented is represented by the symbol
PABITS. As such, if 36 physical address bits were implemented, the size of the
physical address space would be 2
PABITS
= 2
36
bytes.
Symbol
Meaning
Table A.1 Symbols Used in Instruction Operation Statements (Part 2 of 2)