Compaq ECQD2KCTE Laptop User Manual


 
Instruction Formats 3–11
3.3.1 Memory Instruction Format
The Memory format is used to transfer data between registers and memory, to load an effec-
tive address, and for subroutine jumps. It has the format shown in Figure 3–1.
Figure 3–1: Memory Instruction Format
A Memory format instruction contains a 6-bit opcode field, two 5-bit register address fields, Ra
and Rb, and a 16-bit signed displacement field.
The displacement field is a byte offset. It is sign-extended and added to the contents of register
Rb to form a virtual address. Overflow is ignored in this calculation.
The virtual address is used as a memory load/store address or a result value, depending on the
specific instruction. The virtual address (va) is computed as follows for all memory format
instructions except the load address high (LDAH):
va {Rbv + SEXT(Memory_disp)}
For LDAH the virtual address (va) is computed as follows:
va {Rbv + SEXT(Memory_disp*65536)}
3.3.1.1 Memory Format Instructions with a Function Code
Memory format instructions with a function code replace the memory displacement field in the
memory instruction format with a function code that designates a set of miscellaneous instruc-
tions. The format is shown in Figure 3–2.
Figure 3–2: Memory Instruction with Function Code Format
The memory instruction with function code format contains a 6-bit opcode field and a 16-bit
function field. Unused function codes produce UNPREDICTABLE but not UNDEFINED
results; they are not security holes.
There are two fields, Ra and Rb. The usage of those fields depends on the instruction. See Sec-
tion 4.11.
031 26 25 2120 1615
Opcode Ra Rb Memory_disp
031 26 25 2120 1615
Opcode Ra Rb Function