Debug Manual

Table Of Contents
Using Debug on TNS/R Processors
Debug Manual421921-003
2-12
TNS and TNS/R Register Correspondence
TNS and TNS/R Register Correspondence
TNS/R processors maintain many of the TNS environment hardware and program
registers. The location and contents of TNS environment registers might vary
depending on the registers involved and the state of the process when Debug was
entered.
Table 2-1 lists TNS environment registers and corresponding TNS/R implementation.
Table 2-2 on page 2-13 provides a summary of how TNS/R registers are used with
native, TNS, and accelerated execution modes.
Table 2-1. TNS Register Implementation Summary
TNS
Register TNS/R Implementation
S S register (stack pointer) is maintained in register $29 (alias $SP). The value
is exact in TNS execution mode but approximate in accelerated execution
mode, except at register-exact points. The value is a 32-bit byte address
equivalent to the TNS S register value.
P The P-register is inferred from the TNS/R PC register (program counter) in
accelerated execution mode; it is retained in the PX register in TNS execution
mode.
ENV The ENV register is maintained in several different TNS/R registers and data
locations. The bits from left to right are implemented as follows:
< 0:15>Unused; must be 0
<16:19>Reserved; must be 0
<20>LS; 1 if executing in user library
<21>PRIV; valid only if privileged
<22>DS; 1 if executing TNS interrupt handler; valid only if privileged
<23>CS; 1 if executing in TNS execution mode in system library
<24>T; 1 if TNS arithmetic overflow traps are enabled
<25>Undefined; see K register ($14, alias $T6)
<26>V;1 if TNS arithmetic overflow occurred
<27:31>CSPACEINDEX; set #0 through 31 within current code file
L L register (frame pointer) is maintained in TNS/R register $30 (alias $S8 or
$FP). The value always contains a 32-bit byte address equivalent to the TNS
L register value.
CSPACEID This is maintained in fields LS, CS, and CSPACEINDEX of ENV.
R0,R1,...R7 TNS register stack pointers are maintained in registers $16 through $23 (alias
$S0 through $S7) in accelerated execution mode; values in accelerated
execution mode are equal to the TNS register values only at register-exact
points.
Also, in TNS execution mode, register $22 (alias $S6) contains an extended
address pointing to the register stack array that holds the TNS registers R0
through R7.