Local Registers; Table 3-1. Registers And Literals Used As Instruction Operands - Intel i960 Jx Developer's Manual

Microprocessor
Table of Contents

Advertisement

Table 3-1. Registers and Literals Used as Instruction Operands

Instruction Operand
g0 - g14
fp
pfp
sp
rip
r3 - r15
0-31
The i960 architecture supplies 16 global registers, designated g0 through g15. Register g15 is
reserved for the current Frame Pointer (FP), which contains the address of the first byte in the
current (topmost) stack frame in memory. See
description of the FP and procedure stack.
After the processor is reset, register g0 contains device identification and stepping information
(DeviceID). Refer to
Section 1.4, "Related Documents" (pg.
IDs can be found in these documents. The information is retained in g0 until it is written over by
the user program. The device identification and stepping information is also stored in the
memory-mapped DEVICEID register located at FF00 8710H.
3.2.2

Local Registers

The i960 architecture provides a separate set of 32-bit local data registers (r0 through r15) for each
active procedure. These registers provide storage for variables that are local to a procedure. Each
time a procedure is called, the processor allocates a new set of local registers and saves the calling
procedure's local registers. When the application returns from the procedure, the local registers are
released for the next procedure call. The processor performs local register management; a program
need not explicitly save and restore these registers.
Local registers r3 through r15 are general purpose registers; r0 through r2 are reserved for special
functions; r0 contains the Previous Frame Pointer (PFP); r1 contains the Stack Pointer (SP); r2 contains
the Return Instruction Pointer (RIP). These are discussed in
The processor does not always clear or initialize the set of local registers assigned to a new
procedure. Also, the processor does not initialize the local register save area in the newly created
stack frame for the procedure. User software should not rely on the initial values of local registers.
Register Name (number)
global (g0-g14)
global (g15)
local (r0)
local (r1)
local (r2)
local (r3-r15)
CHAPTER 7, PROCEDURE CALLS
PROGRAMMING ENVIRONMENT
Function
general purpose
frame pointer
previous frame pointer
stack pointer
return instruction pointer
general purpose
literals
1-10). Further information on Device
CHAPTER 7, PROCEDURE
Acronym
FP
3
PFP
SP
RIP
for a
CALLS.
3-3

Advertisement

Table of Contents
loading

Table of Contents