Inspect Manual
Using Inspect on a TNS/R System
Inspect Manual—429164-006
15-3
Executing Accelerated Programs
When you execute a TNS object file on a TNS/R machine, the TNS instructions that it
contains are executed by means of millicode. Millicode implements the actions of TNS
machine instructions using the appropriate TNS/R instructions. It may be easier to
debug a program executing TNS object code than to debug a program executing code
generated by the accelerator.
When TNS instructions are executed on a TNS/R system, the TNS machine state (the
register stack, S, P, E, and L registers) is maintained as if you were executing your
program on a TNS machine. Because the TNS machine state is maintained, no
change is required to run existing TNS programs on TNS/R systems and, with very few
exceptions, debugging is the same.
Figure 15-1 illustrates the methods of executing TNS programs on a TNS/R system.
On a TNS/R machine, Inspect supports the debugging of two types of programs:
Non-accelerated programs, programs that are executed as is.
Accelerated programs, programs that have been optimized by the accelerator.
Three mechanisms maintain the TNS machine state sufficiently to ensure correct
program behavior, but they differ in the extent to which the machine state is
maintained. The first, TNS object code execution, most faithfully maintains the TNS
machine state—for instance, all TNS instruction side effects, such as changes to ENV
register flags, even if not used by the program code, are maintained.
Executing Accelerated Programs
The Axcel accelerator can be used to optimize program performance. The accelerator
generates optimized TNS/R code, which is written to an object file that is a superset of
the original object file. The TNS/R instructions contained in this object file can be
directly executed by the TNS/R machine. The accelerator produces programs that
execute significantly faster, but may be more difficult to debug.
The accelerator takes as input an executable TNS object file, and produces as output a
file containing both that original code and logically equivalent optimized TNS/R (RISC)
instructions. The accelerator produces for each TNS instruction its functional
equivalent for the TNS/R system, in the form of either:
A sequence of TNS/R instructions
A call to a millicode routine
Sequences of TNS/R instructions that correspond to individual TNS instructions may
be interleaved as a result of optimizations.
The accuracy with which TNS/R code maintains the TNS machine state varies. Based
on its analysis of the program, the accelerator is able to generate code that maintains
only the portions of the TNS machine state that are required by the program. The
optimization level and options used with the Axcel accelerator also have some effect
on the extent to which the TNS machine state is maintained. For more information, see
Section 16, Using Inspect With Accelerated Programs on TNS/R Systems
.