Initializing And Modifying The Pc Register - Intel i960 Jx Developer's Manual

Microprocessor
Table of Contents

Advertisement

PROGRAMMING ENVIRONMENT
The processor uses the priority field to determine whether to service an interrupt immediately or to
post the interrupt. The processor compares the priority of a requested interrupt with the current
process priority. When the interrupt priority is greater than the current process priority or equal to 31,
the interrupt is serviced; otherwise it is posted. When an interrupt is serviced, the process priority
field is automatically changed to reflect interrupt priority. See
The PC register trace enable bit (bit 0) and trace fault pending flag (bit 10) control the tracing function.
The trace enable bit determines whether trace faults are globally enabled (1) or globally disabled (0).
The trace fault pending flag indicates that a trace event has been detected (1) or not detected (0). The
tracing functions are further described in
3.7.3.1

Initializing and Modifying the PC Register

Any of the following three methods can be used to change bits in the PC register:
Modify process controls instruction (
Alter the saved process controls prior to a return from an interrupt handler or fault handler
The
modpc
instruction reads and modifies the PC register directly. A TYPE.MISMATCH fault
results when software executes
provides a mask operand that can be used to limit access to specific bits or groups of bits
modpc
in the register. In user mode, software can use
In the latter two methods, the interrupt or fault handler changes process controls in the interrupt or
fault record that is saved on the stack. Upon return from the interrupt or fault handler, the modified
process controls are copied into the PC register. The processor must be in supervisor mode prior to
return for modified process controls to be copied into the PC register.
When process controls are changed as described above, the processor recognizes the changes
immediately except for one situation: when
processor may not recognize the change before the next four non-branch instructions are executed.
After initialization (hardware reset), the process controls reflect the following conditions:
priority = 31
trace enable = disabled
trace fault pending = 0
When the processor is reinitialized with a
reset value. See
Table 12-2 on page
Software should not use
modpc
special circumstances, such as in initialization code. Normally, execution mode is changed
through the call and return mechanism. See
3-22
CHAPTER 9, TRACING AND
)
modpc
modpc
in user mode with a non-zero mask. As with
to read the current PC register.
modpc
is used to change the trace enable bit, the
modpc
execution mode = supervisor
state = interrupted
sysctl
reinitialize message, the PC register returns to its
5.
to modify execution mode or trace fault state flags except under
section 6.2.43, "modpc" (pg. 6-78)
CHAPTER 11,
INTERRUPTS.
DEBUGGING.
for more details.
modac
,

Advertisement

Table of Contents
loading

Table of Contents