HP (Hewlett-Packard) IA-64 Computer Accessories User Manual


 
3-6 Screen Presentation Copyright © 2000 Hewlett-Packard Co.
Ski IA-64 Simulator Reference Manual 1.0L
3.5 The Program Window
The Program Window provides a view into the program space. Whether you load a program into the simulated processor’s
address space via the command line or using Ski’s load, iaload,orromload commands, the program is displayed in a
format resembling a compiler’s assembler listing file. For IA-64 programs compiled from a high-level language such as
‘C’ and linked with the appropriate options, the source code is displayed with line numbers, mixed in with the generated
assembly language as shown in Figure 3-9. As an example, to compile the “hello world” program with the IA-64 compiler
used in testing Ski, the command line is:
cc -o hello -g hello.c
Note that the -O (capital-O) “optimization” flag was not specified. Optimization, by definition, rearranges the object code.
If you turn on optimization, the correspondence between source code and object code will be obscured and you may find
the resulting display difficult to interpret.
IA-64 assembly code is displayed through disassembly; the original assembler source code is not displayed. Source code
for IA-32 programs, high-level and assembly, is not displayed.
Ski chooses whether to interpret the instructions as IA-64 or IA-32 encodings based on the setting of the psr.is bit. If your
program has a mix of IA-64 and IA-32 code, you may need to manually set or clear this bit when trying to view a part of
the program that is in a different encoding from the encoding at the current ip location. You can set the bit with the Ski
command “= psr.is 1” and you can clear the bit with “= psr.is 0”. If the bit is set incorrectly, Ski will use the wrong
instruction decoder and will show IA-64 code disassembled as if it was IA-32 code or vice-versa! Remember to set the bit
back before resuming simulation.
3.5.1 IA-64 Instruction Display
Each IA-64 instruction bundle is labelled on the left with an hexadecimal byte-addressed offset from the nearest, preced-
ing symbol up to 0xffff bytes away. If the symbol name and offset are longer than sixteen characters, the first fifteen are
displayed and an asterisk (“*”) is added to indicate that the symbolic display has been abbreviated. For each 128 bit bun-
dle, the two or three instructions are displayed in the center of the window with operands to their immediate right. The
template for the bundle is shown as a triplet of capital letters, such as “MII,” to the right of the last operand of the first
Figure 3-8. The
ski
Register Window (at Top)