HP Hewlett Packard Hewlett Packard Computer Accessories IA 64 User Manual

Ski IA-64 Simulator Reference Manual  
Rev. 1.0L (26 Apr 00)  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Preface  
This document is the Ski IA-64 Simulator Reference Manual. The goal of this document is to provide a description of the  
features, commands, and simulation environment provided by the Ski IA-64 simulator. The version of the simulator  
described here is Version 0.873l.  
How to Use This Manual  
The first chapter of this manual is a quick-start tutorial. Using only the first chapter, you can learn enough about Ski to do  
useful work. If you are using Ski to simulate an IA-64 application program and are familiar with debuggers such as HP’s  
xdb, the first chapter and Appendix A, “Command Reference” may be all you need to read.  
The remaining chapters provide information about Ski in depth. Use these chapters to learn about commands not covered  
in the tutorial and to learn more about how Ski operates.  
Use Appendix A, “Command Reference” and the on-line helpcommand to find a list of all Ski commands and a brief  
description of each command.  
Use Appendix D, “Simulator Status and Error Messages” to understand the causes and possible solutions for each of Ski’s  
error messages.  
Font Conventions  
In this manual, fonts are used as described below. Depending on how you are viewing this document (paper, a web page, a  
PDF file, etc.), some distinctions may not be visible.  
italic  
is used for optional text including operand fields such as count, and for the names of bitfields such as psr.be.  
light italic  
is used for graphical button names such as Run.  
fixed-width bold  
is used for literal text including commands such as dbndl, and for examples such as bski -icnt foo <bar >baz.  
SMALL UPPERCASE  
is used for processor instructions such as BREAK.  
fixed-width regular  
is used for directories and filenames such as hello, and for web URL’s such as http://www.hp.com.  
Syntax Conventions  
In this manual, symbols are used as described below.  
[italic]  
Square brackets surrounding optional argument(s) indicate that the argument(s) can be omitted, as in the Appendix  
A, “Command Reference” description of the djcommand: dj[address].  
Copyright © 2000 Hewlett-Packard Co.  
Preface  
iii  
Ski IA-64 Simulator Reference Manual 1.0L  
italic+  
A plus sign applied to an argument indicates that the argument must be supplied one or more times, as in the Appen-  
dix A, “Command Reference” description of the evalcommand: evalexpression_without_spaces+.  
[italic]+  
A plus sign applied to optional argument(s) in square brackets indicates that the argument(s) can be supplied zero or  
more times, as in the Appendix A, “Command Reference” description of the loadcommand: loadfilename [args]+.  
iv  
Syntax Conventions  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0  
Table of Contents  
1 Getting Started: A Ski Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1  
1.1 The Ski Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1  
1.2 How to Run an IA-64 Application Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1  
1.2.1 Starting xski. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1  
1.2.2 Exiting Ski. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3  
1.2.3 Loading Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3  
1.2.4 Inspecting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5  
1.2.5 Viewing Data in ASCII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8  
1.2.6 Looking at Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8  
1.2.7 Viewing Source Code Mixed In with Assembly Code . . . . . . . . . . . . . . . . . . . . . . . . 1-9  
1.2.8 Controlling Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10  
1.2.9 Running a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11  
1.2.10 Single-stepping a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12  
1.2.11 Changing Registers and Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13  
1.2.12 Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17  
1.2.13 Next Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17  
2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1  
2.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1  
2.1.1 Ski’s Strengths. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1  
2.1.2 Ski’s Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1  
2.2 What You Need to Know to Use This Manual. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1  
2.3 Defects and Defect Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1  
2.4 Ski Variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2  
2.4.1 Using bski for Batch Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2  
2.5 Starting Ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4  
2.5.1 Command Line Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4  
2.5.2 The XSkiFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5  
2.6 Quitting Ski. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6  
2.6.1 Summary of the Quit Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6  
3 Screen Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1  
3.1 Ski’s Use of Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1  
3.2 The Register Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1  
3.2.1 The User Registers Pane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2  
3.2.2 The General Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3  
3.2.3 The Floating Point Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3  
3.2.4 The System Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4  
3.2.5 The IA-32 Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4  
3.3 Resizing Register Window Panes with xski. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5  
3.4 The Register Window and ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5  
3.5 The Program Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6  
3.5.1 IA-64 Instruction Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6  
3.5.2 IA-32 Instruction Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8  
3.5.3 Changing the Range of Locations Shown in the Program Window. . . . . . . . . . . . . . . . . . 3-9  
3.5.4 Invalid Code and the Program Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9  
3.6 The Data Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10  
3.6.1 Changing the Range of Locations Shown in the Data Window. . . . . . . . . . . . . . . . . . . 3-11  
3.6.2 Invalid Code and the Data Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12  
3.7 The Command/Main Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12  
3.7.1 The xski Main Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12  
3.7.2 The ski Command Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13  
3.8 Other Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14  
4 Command Language. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1  
Copyright © 2000 Hewlett-Packard Co.  
Table of Contents  
v
Ski IA-64 Simulator Reference Manual 1.0  
4.1 Command Entry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1  
4.2 Command Arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1  
4.3 Command Sequences, Repetition, and Abbreviation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1  
4.4 Argument Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2  
4.4.1 Numeric Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2  
4.4.2 Symbolic Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4  
4.4.3 Resolving Ambiguous Symbols and Numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5  
5 Screen Manipulation Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1  
5.1 Register Window Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1  
5.1.1 Summary of Register Window Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1  
5.2 Program Window Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2  
5.2.1 Summary of Program Window Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2  
5.3 Data Window Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5  
5.3.1 Summary of Data Window Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5  
6 Program Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1  
6.1 Application-Mode and System-Mode Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1  
6.2 Ski Support for Application-Mode Programs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1  
6.2.1 Application-Mode IA-64 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1  
6.2.2 Application-Mode IA-32 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1  
6.3 Ski Support for System-Mode Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1  
6.3.1 System-Mode IA-64 Programs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2  
6.3.2 System-Mode IA-32 Programs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2  
6.3.3 System-Mode TLB Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2  
6.4 Misaligned Data Access Trap. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3  
6.5 Program Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3  
6.5.1 How to Load a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3  
6.5.2 Summary of Program Loading Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4  
6.5.3 Notes about Program Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4  
6.6 Program Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5  
6.6.1 Summary of Program Execution Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5  
7 Linux and MS-DOS ABI Emulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1  
7.1 Interruptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1  
7.2 Linux Application Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1  
7.3 MS-DOS Application Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3  
7.4 Program I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3  
8 Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1  
8.1 Changing Registers and Memory with Assignment Commands . . . . . . . . . . . . . . . . . . . . . . . . 8-1  
8.1.1 Summary of Assignment Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1  
8.1.2 Examples of Assignment Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1  
8.1.3 Notes on Assignment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3  
8.2 Evaluating Formulas and Formatting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4  
8.2.1 Summary of The evalCommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4  
8.3 Program Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4  
8.3.1 Setting Program Breakpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4  
8.3.2 Deleting Program Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5  
8.3.3 Listing Program Breakpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5  
8.3.4 Notes on Program Breakpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6  
8.3.5 Summary of Program Breakpoint Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6  
8.4 Data Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7  
8.4.1 Setting Data Breakpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7  
8.4.2 Deleting Data Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7  
8.4.3 Listing Data Breakpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7  
8.4.4 Summary of Data Breakpoint Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7  
8.5 Dumping Registers and Memory to a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8  
8.6 Saving and Restoring the Simulator State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8  
8.6.1 Summary of Save and Restore Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8  
8.7 Symbol Table Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8  
vi  
Table of Contents  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0  
8.7.1 Summary of Symbol Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8  
9 Command Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1  
9.1 Initialization File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1  
9.2 Labels and Control Flow in Command Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1  
9.2.1 The gotoCommand and Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1  
9.2.2 The ifCommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2  
9.3 Comments in Command Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2  
9.4 An Example Command File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2  
9.5 Summary of Command File Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3  
A Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1  
B Register Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .B-1  
B.1 IA-64 Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .B-1  
C Internal Variable Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C-1  
C.1 Internal Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C-1  
D Simulator Status and Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1  
Copyright © 2000 Hewlett-Packard Co.  
Table of Contents  
vii  
Ski IA-64 Simulator Reference Manual 1.0  
viii  
Table of Contents  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
List of Figures  
Figure 1-1.  
Figure 1-2.  
Figure 1-3.  
Figure 1-4.  
Figure 1-5.  
Figure 1-6.  
Figure 1-7.  
Figure 1-8.  
Figure 1-9.  
Starting xski From the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2  
The Four Primary xski Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3  
Loading the “hello” Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4  
The xski Program Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4  
The xski Data Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5  
The xski Register Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5  
Changing the Data Window Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6  
The Data Window Showing the argvand envpVectors. . . . . . . . . . . . . . . . . . . . . . . . . 1-6  
The Data Window Showing argvand envpStrings in Hexadecimal . . . . . . . . . . . . . . . . . . 1-7  
Figure 1-10. The Main Window Showing Commands in the Command History . . . . . . . . . . . . . . . . . . . 1-7  
Figure 1-11. The Data Window Showing argvand envpStrings in ASCII . . . . . . . . . . . . . . . . . . . . . . 1-8  
Figure 1-12. Jumping the Program Window to the Beginning of main(). . . . . . . . . . . . . . . . . . . . . . . . 1-9  
Figure 1-13. The Program Window Showing Code at the Beginning of main() . . . . . . . . . . . . . . . . . . . . 1-9  
Figure 1-14. The Program Window Showing a Breakpoint at main() . . . . . . . . . . . . . . . . . . . . . . . . 1-10  
Figure 1-15. The Breakpoint List Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11  
Figure 1-16. The Terminal Window After the “hello” Program is Run . . . . . . . . . . . . . . . . . . . . . . 1-12  
Figure 1-17. The xski Main Window after the “hello” Program is Run . . . . . . . . . . . . . . . . . . . . . . 1-12  
Figure 1-18. The Main Window After Reaching the Breakpoint at main+10 . . . . . . . . . . . . . . . . . . . . 1-13  
Figure 1-19. The xski Register Window After Stopping at a Breakpoint at main+10. . . . . . . . . . . . . . . . 1-14  
Figure 1-20. The xski Register Window After Changing the ipRegister. . . . . . . . . . . . . . . . . . . . . . 1-15  
Figure 1-21. The xski Data Window Widened to Show ASCII . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16  
Figure 1-22. The xski Data Window After Changing the “Hello, world” String . . . . . . . . . . . . . . . . . . 1-16  
Figure 1-23. The xski Main Window Showing an evalCommand and Its Result . . . . . . . . . . . . . . . . . 1-17  
Figure 2-1.  
Figure 2-2.  
Figure 2-3.  
Figure 3-1.  
Figure 3-2.  
Figure 3-3.  
Figure 3-4.  
Figure 3-5.  
Figure 3-6.  
Figure 3-7.  
Figure 3-8.  
Figure 3-9.  
The Curses-based ski Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2  
The X Window System, Motif-based xski Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3  
The Command-Line bski Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4  
The Register Window in xski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2  
The xski User Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3  
The xski General Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3  
The xski Floating Point Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4  
The xski System Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4  
The xski IA-32 Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5  
An xski Pane Resizer: The Small Box Between the Scrollbars . . . . . . . . . . . . . . . . . . . . . 3-5  
The ski Register Window (at Top) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6  
xski’s Program Window Showing Part of an IA-64 “hello world” Program . . . . . . . . . . . . . . 3-7  
Figure 3-10. xski’s Program Window Showing IA-64 Predication and Breakpoints . . . . . . . . . . . . . . . . . 3-8  
Figure 3-11. xski’s Program Window Showing IA-32 Code, the Instruction Pointer, and a Breakpoint . . . . . . . 3-9  
Figure 3-12. xski’s Program Window Showing Illegal Instructions. . . . . . . . . . . . . . . . . . . . . . . . . 3-10  
Figure 3-13. xski’s Program Window Showing Unallocated Space or No Translation . . . . . . . . . . . . . . . 3-10  
Figure 3-14. xski’s Data Window Showing Unallocated Space Followed by Data . . . . . . . . . . . . . . . . . 3-11  
Figure 3-15. xski’s Data Window Showing Data Interpreted as Instruction Bundles . . . . . . . . . . . . . . . . 3-11  
Figure 3-16. xski’s Main (Command) Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13  
Figure 3-17. ski’s Command Window (at Bottom) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14  
Figure 3-18. xski’s Symbol List Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15  
Figure 4-1.  
Figure 4-2.  
Figure 5-1.  
Figure 5-2.  
Figure 5-3.  
Figure 5-4.  
Figure 5-5.  
Figure 5-6.  
Figure 6-1.  
Figure 6-2.  
xski Evaluating Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3  
xski’s Symbol List Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4  
xski’s Program Window Showing IA-64 Assembly Language Code . . . . . . . . . . . . . . . . . . 5-3  
xski’s Program Window Showing Intermixed C and IA-64 Assembly Code . . . . . . . . . . . . . . 5-4  
xski’s Assembly Language Dump Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4  
xski Showing Data as Instruction Bundles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5  
xski Showing Data in Raw Hexadecimal and ASCII . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6  
xski’s Hexadecimal Dump Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6  
Example Code to Simulate an External Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2  
sdtCommand Output in xski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3  
Copyright © 2000 Hewlett-Packard Co.  
List of Figures  
ix  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 8-1.  
Figure 8-2.  
Figure 8-3.  
Figure 8-4.  
Figure 8-5.  
Figure 9-1.  
The Original Program Loaded in ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2  
The Program After Assigning a String in ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3  
Three Breakpoints, 0, 2, and 1, Visible in xski’s Program Window . . . . . . . . . . . . . . . . . . 8-5  
xski’s Breakpoint List Window Showing IA-64 and IA-32 Breakpoints. . . . . . . . . . . . . . . . 8-6  
The symlistOutput from xski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-9  
An Example Command File to Compute Fibonacci Numbers . . . . . . . . . . . . . . . . . . . . . 9-3  
x
List of Figures  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
List of Tables  
Table 4-1.  
Table 7-1.  
Table 7-2.  
Table 7-3.  
Ski Simulator Arithmetic and Logic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3  
Linux System Calls Supported by Ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2  
Linux System Calls Accepted but Ignored by Ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2  
MS-DOS System Calls (in Hexadecimal) Supported by Ski . . . . . . . . . . . . . . . . . . . . . . . 7-3  
Copyright © 2000 Hewlett-Packard Co.  
List of Tables  
xi  
Ski IA-64 Simulator Reference Manual 1.0L  
xii  
List of Tables  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
1
Getting Started: A Ski Tutorial  
In this chapter, you learn how to use Ski by executing a brief tutorial. At the end of the tutorial, you will learn where to  
look in this manual for detailed descriptions of Ski’s operation and commands. Introductory information on Ski is pre-  
sented in Chapter 2, “Overview”.  
1.1  
The Ski Simulator  
Ski simulates the IA-64 architecture and also has limited support for simulating IA-32 programs. Ski runs on IA-32 Linux  
host systems. You can use Ski for many purposes, as described in Section 2.1, “Introduction”. One of the most common  
uses of Ski is to test an IA-64 program in a Linux environment, and in this chapter, you will learn how to use xski, the X  
Window System version of Ski, by “walking through” a sample session, in about ten minutes. Ok, twenty minutes.  
You should already be familiar with the IA-64 architecture and the C programming language, have xski installed on your  
Linux system, and have the XSkifile in your home directory or in your X Window System app-defaults directory, typi-  
cally /usr/lib/X11/app-defaults. You will also need to have an executable Linux IA-64 program such as the classic  
hello world” program.  
1.2  
How to Run an IA-64 Application Program  
Ski provides a Linux application environment in which an IA-64 program you provide can be simulated. The release notes  
provide the most up-to-date information on Ski’s support for the Linux Application Binary Interface (ABI). The following  
sections provide a short tutorial which leads you through an IA-64 program session with xski. You will learn how to use  
the most common Ski commands.  
1.2.1  
Starting xski  
As shown in Figure 1-1, start xski by typing its name to the Linux shell, just like any other Linux program, as shown in  
Figure 1-1. When running inside the IA-64 Linux Native User Environment (NUE), make sure that the environment vari-  
able DISPLAY is set to a string of the form hostname:display(e.g., ‘‘myhost:0’’, values such as ‘‘unix:0’’ or ‘‘:0’’  
won’t work) before invoking xski. If you have never run the simulator before, it will first prompt you to read and accept  
the software license it is distributed under. After accepting the license, the four primary xski windows will be displayed  
on your screen, as shown in Figure 1-2. No IA-64 program is loaded yet, so the Program Window and Data Window are  
empty. Scroll the various panes of the Register Window and note that with few exceptions, the registers are set to zero.  
Copyright © 2000 Hewlett-Packard Co.  
Getting Started: A Ski Tutorial  
1-1  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 1-1. Starting xski From the Command Line  
1-2  
Getting Started: A Ski Tutorial  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 1-2. The Four Primary xski Windows  
1.2.2  
Exiting Ski  
You can quit xski and this tutorial with the Quitbutton, with the File->Quit menu selection, or with the “quit” com-  
mand. All are in the Main Window. (Don’t quit now; you are just beginning!)  
1.2.3  
Loading Your Program  
Use the “Command” area of the “main” Window to load your program. For example, let’s say your program is the famous  
“Hello, world” program, the executable file is named “hello”, and the source code file is named “hello.c”. Type “load  
hello” in the Command area to load it into Ski, as you see in Figure 1-3. After a moment, the other three windows will  
change appropriately: the Program Window will show the program code in assembly language form as shown in  
Figure 1-4, the Data Window will show global and static data as shown in Figure 1-5, and the Register Window will show,  
in r12the value of the stack pointer, as shown in Figure 1-6. (You may need to use the scrollbar in the general registers  
pane of the Register Window to see these registers.)  
Copyright © 2000 Hewlett-Packard Co.  
Getting Started: A Ski Tutorial  
1-3  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 1-3. Loading the “hello” Program  
Figure 1-4. The xski Program Window  
1-4  
Getting Started: A Ski Tutorial  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 1-5. The xski Data Window  
Figure 1-6. The xski Register Window  
1.2.4  
Inspecting Data  
To look at the argvand envpstrings, you need to use the Data Window. Linux passes argc, argv, and envpon the mem-  
ory stack (r12). To look at this memory area, use the “dj” command (“data jump”) in “Command” area of the Main Win-  
dow. Supply, as an operand, the address of the memory stack. For example, if r12is set to 9ffffffffff780, you can  
Copyright © 2000 Hewlett-Packard Co.  
Getting Started: A Ski Tutorial  
1-5  
Ski IA-64 Simulator Reference Manual 1.0L  
type “dj r12” or “dj 9ffffffffff780”, as shown in Figure 1-7 and the Data Window changes to display the hexadec-  
imal data stored at the location, as shown in Figure 1-8. Find the value of r12in your program and use “dj” now. (You  
might wonder why “dj” exists, instead of a simple scroll bar. Imagine scrolling through the entire IA-64 address space– it  
would take a long, long time!)  
Figure 1-7. Changing the Data Window Display  
Figure 1-8. The Data Window Showing the argvand envpVectors  
Looking at the Data Window, you can see that the first 16 bytes of the stack are all zeros. This is a scratch storage area.  
The next 8-byte word contains argc, the argument count. It has a value of 1 as the only argument passed to the program is  
the program name itself. The argccount is then followed by the argvand envpvectors. All C programs receive the same  
kind of data structure for argv: a variable-length vector of char *pointers whose end is marked with a NULL pointer. In  
Figure 1-8, the first of the char *pointers is 9ffffffffffff938. (The first char *pointer may be in a different place  
on your system. Adjust the following instructions accordingly.) Jump the Data Window there using the command “dj  
9ffffffffffff938” (12 f’s) and you will see Figure 1-9, showing the hexadecimal codes for the null-terminated ASCII  
1-6  
Getting Started: A Ski Tutorial  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
character strings of argvand envp. (In a moment, you’ll learn how to see data in ASCII translation.)  
Figure 1-9. The Data Window Showing argvand envpStrings in Hexadecimal  
Typing hexadecimal numbers is error-prone, and Ski provides several shortcuts to avoid it. The first is xski’s Command  
History, an unlabeled window pane just above the “Command” area in the Main Window. As you execute commands, they  
move up to the Command History. Later, you can bring them back into the Command area. A single click brings a com-  
mand back for you to edit. A double click brings the command back and re-executes it immediately. Try the Command  
History by doing this: Type “dj 0” to jump the Data Window to location 0. The Main Window should look like  
Figure 1-10. Then click on the “dj 9ffffffffffff938” command in the Command History. Hit the enter/return key to  
execute it.  
Figure 1-10. The Main Window Showing Commands in the Command History  
Copyright © 2000 Hewlett-Packard Co.  
Getting Started: A Ski Tutorial  
1-7  
Ski IA-64 Simulator Reference Manual 1.0L  
Another shortcut is the *pointer-dereference operator for indirect addressing. Type “dj 0” to jump the Data Window to  
location 0. Then type “dj *(r12+18)”. Ski will take the contents of r12(9ffffffffff780, remember?), add 18(hex)  
and use that as the address of the operand. The * operator fetches the contents of *(r12+18) and uses that value,  
9ffffffffff938, as the address to jump to. Compare the Data Window display resulting from “dj r12+18” with the  
display resulting from “dj *(r12+18)”.  
You will use the *operator a lot in debugging C programs because it performs the same function as C’s *operator: it  
dereferences pointers. Unlike C’s *, however, Ski’s *operator is not type-specific: you can use it in any context where any  
kind of address is needed and you can use it to dereference registers like r12, memory locations, or anything that has a  
value. (This doesn’t always make sense, of course. For example, dereferencing a floating-point register is rarely useful  
because floating-point registers don’t hold pointers.)  
1.2.5  
Viewing Data in ASCII  
Hexadecimal is no fun. To expose the ASCII translation, use your window manager’s standard mechanism to make the  
Data Window wider. (How you do this depends on the window manager you’re using, but generally this can be accom-  
plished by grabbing the edge of the Data Window with your mouse cursor and dragging it to the right.) You should see  
approximately Figure 1-11. Now click on the Main Window, to make it the active window again. Try the “df” (“data for-  
wards”) and “db” (“data backwards”) commands without operands to move forwards and backwards in the Data Window,  
one screenful each time.  
Figure 1-11. The Data Window Showing argvand envpStrings in ASCII  
1.2.6  
Looking at Code  
Initially, the Program Window shows the beginning of the program. For C programs, this isn’t the first line of user code,  
it’s the start-up routine from crt1.othat provides an interface between the operating system environment and the ANSI  
C environment. This routine is named “_start” and the ELF header in hellonames it as the start of the program. That’s  
what Ski shows in the Program Window by default: the start of the program according to ELF.  
You use the “pj” command (“program jump”) to jump the program window elsewhere. For example, jump it to the first  
instruction in the user’s main(), as shown in Figure 1-12. The Program Window now looks like Figure 1-13. You can move  
the Program Window forwards and backwards through program code with the “pf” (“program forwards”) and “pb”  
(“program backwards”) commands, respectively. Try these commands, and then try using “pj” without an operand: note  
how it jumps you back and forth between the previous and current locations. The “dj” command does the same thing in  
the Data Window. Handy, eh?  
1-8  
Getting Started: A Ski Tutorial  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 1-12. Jumping the Program Window to the Beginning of main()  
Figure 1-13. The Program Window Showing Code at the Beginning of main()  
1.2.7  
Viewing Source Code Mixed In with Assembly Code  
The Program Window shows the C source code intermixed with the IA-64 assembly code. You can turn the source code  
Copyright © 2000 Hewlett-Packard Co.  
Getting Started: A Ski Tutorial  
1-9  
Ski IA-64 Simulator Reference Manual 1.0L  
display off or on using the pa(“program assembly”) and pm(“program mixed”) commands, respectively. Mixed code dis-  
play only works if you have the source code to the program available to Ski; the source code isn’t embedded in the ELF  
file. Also, you must compile your code with the appropriate compiler flags, for example, with the -gflag used by many C  
compilers to generate debug line record information. If your program is composed of multiple object files, for example  
cc -o test foo.o bar.o baz.o”, Ski can only show source code from the files compiled with the -gflag. Make sure  
the Program Window is in mixed mode for now.  
1.2.8  
Controlling Breakpoints  
You can think of Ski as a debugger that happens to work on a simulated processor rather than a real processor. Like any  
good debugger, Ski provides breakpoints. To set a breakpoint in an IA-64 program, use the “bs” command (“breakpoint  
set”). In the example that follows, you will want to have the Program Window display the area of code near main(). Use  
the command “pj main”, as you learned above.  
To set a breakpoint at the beginning of main(), type “bs main” in the Main Window. The Program Window shows a “0”  
in the first column of the window at the breakpoint location (the ‘‘alloc’’ instruction), because you just used breakpoint #0,  
as Figure 1-14 shows. (The first three columns are also used for line numbers.) Set a breakpoint at main+10and another at  
main+20. Ski lets you set up to ten breakpoints.  
Figure 1-14. The Program Window Showing a Breakpoint at main()  
Use the “bl” command (“breakpoint list”) to see a list of the breakpoints, as shown in Figure 1-15. If you prefer using a  
mouse, use the “Breakpoints” item on the View menu instead of the “bl” command. When you are finished viewing the  
breakpoint list, click its Closebutton to dismiss the window.  
To delete breakpoints individually, use the “bd” command (“breakpoint delete”). Use the “bD” command (“breakpoint  
Delete all”) to delete all breakpoints at once. Delete all your breakpoints before continuing this tutorial.  
1-10 Getting Started: A Ski Tutorial  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 1-15. The Breakpoint List Window  
1.2.9  
Running a Program  
To run your program, type the “run” command or click the Runbutton in the Main Window. Ski will start the simulation  
and connect the program’s standard I/O ports (stdin, stdout, and stderr) to Ski’s standard ports. For example, assuming  
there are no breakpoints still set in hello, you will see “hello world” printed out when you run it, as Figure 1-16 shows,  
and run statistics will appear in the Main Window, as Figure 1-17 shows. The statistics tell you how many instructions  
were simulated and how much time it took, the instructions-per-second rate, the number of IA-64 processor cycles that  
were consumed on the simulated CPU, and the average number of instructions per cycle, which provides an indication of  
the best-case effective parallelism of the program. (Ski simulates all the instructions in an instruction group in one cycle;  
a hardware implementation may not be as capable.)  
Ski will stop the simulation for three reasons: if a breakpoint is reached, if the IA-64 program attempts to access privi-  
leged resources or non-existent memory, or if the program ends normally by calling exit() or similar functions. If simula-  
tion stops due to a breakpoint, you can continue simulation with the “cont” command (“continue”) or you can step  
through the simulation with the “step” command or Stepbutton. You cannot re-run a program, nor can you re-load it and  
start over. You must exit and re-enter xski and then reload your program.  
Copyright © 2000 Hewlett-Packard Co.  
Getting Started: A Ski Tutorial 1-11  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 1-16. The Terminal Window After the “hello” Program is Run  
Figure 1-17. The xski Main Window after the “hello” Program is Run  
1.2.10  
Single-stepping a Program  
To try single-stepping (and no, this is not a kind of ethnic dance), set a breakpoint at main+10. Then use the “run” com-  
mand or Runbutton to simulate the program up to the breakpoint. (If you receive the error message “Nothing to run”,  
stop and reread the last sentence in the previous paragraph.) Ski stops at the breakpoint and notifies you with a message in  
1-12 Getting Started: A Ski Tutorial  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
the Main Window. Ski tells you why it stopped and gives you statistics about program execution up to this point, as you  
can see in Figure 1-18. The Program Window marks the next instruction to be fetched with a greater-than symbol in the  
second column. If the instruction is predicated off, Ski uses an asterisk instead of a greater-than symbol, and shows the  
predication register in parentheses.  
Figure 1-18. The Main Window After Reaching the Breakpoint at main+10  
Move and resize your windows so the Main Window and Program Window don’t overlap. Now use the “step” command  
or Stepbutton to execute one instruction. Note that the greater-than symbol moves down one line: Ski keeps track of IA-  
64 bundles and groups but it simulates individual instructions. You can follow the “step” command with a (decimal)  
number to specify how many steps Ski should take, for example, “step 10” to execute ten instructions. As a shortcut,  
shift-clicking on the Step button causes Ski to take ten steps. Most Ski commands can be abbreviated, as described in  
Appendix A, “Command Reference”. The stepcommand can be abbreviated as “s”.  
1.2.11  
Changing Registers and Memory  
To debug a program, you usually need to inspect and alter registers and memory. The first three panes in the Register Win-  
dow shows the registers of most concern to application programmers: user registers in the first pane, general registers in  
the second pane, and floating point registers in the third pane, as you can see in Figure 1-19.  
Copyright © 2000 Hewlett-Packard Co.  
Getting Started: A Ski Tutorial 1-13  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 1-19. The xski Register Window After Stopping at a Breakpoint at main+10  
By changing the value of the ipregister, you can change where in the program Ski will resume simulation. Enter the com-  
mand “= ip main+20” in the Main Window and observe the first line of the first pane in the Register Window: notice  
that the ipregister changes to reflect your command, as Figure 1-20 shows. (You may need to left-click in the Main Win-  
dow to make it active.) You can make similar changes to all of the architecturally-visible, non-hardwired IA-64 registers,  
which helps you debug your program. You can test your program’s behavior in exceptional cases, such as handling  
unusual errors.  
1-14 Getting Started: A Ski Tutorial  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 1-20. The xski Register Window After Changing the ipRegister  
Changing registers isn’t enough to debug most programs, however. Often, you need to change values in memory as well.  
Ski provides several commands for this, differing in whether they modify one-byte chunks, two-byte chunks, four-byte  
chunks, eight-byte chunks, or variable-length C-language text strings. For example, instead of “hello world”, you can  
have the program output “Ski!Ski!Ski!”. You can do this by using the “=s” command (“= string”) to modify the data  
stored at the address “_IO_stdin_used+8”. (The string may be stored at a different address in your program. If so, use  
the Data Window to locate the string and then use the corresponding address instead.) Here’s what to do:  
First, make sure the Data Window is wide enough to show ASCII translations along with hexadecimal, as in Figure 1-21.  
To avoid confusion, make sure the Data Window doesn’t overlap the Main Window.  
Copyright © 2000 Hewlett-Packard Co.  
Getting Started: A Ski Tutorial 1-15  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 1-21. The xski Data Window Widened to Show ASCII  
Next, issue the command “=s _IO_stdin_used+8 Ski!Ski!Ski!” in the Main Window. (You may need to left-click in  
the Main Window to make it active.) Observe how the Data Window changes: the hexadecimal values at, and after,  
_IO_stdin_used+8have changed, as have their corresponding ASCII translations, and a null byte (the value zero) has  
been added to the end of your string to make it a valid C-language string. Compare Figure 1-21 and Figure 1-22.  
Figure 1-22. The xski Data Window After Changing the “Hello, world” String  
The commands to change one, two, four, and eight byte quantities are =1, =2, =4, and =8, respectively. They are described  
in detail in Appendix 8.1, “Changing Registers and Memory with Assignment Commands” and in Appendix A, “Com-  
mand Reference”.  
Often, you will need to evaluate formulas. For example, to find the address of the first envp string, you would need to  
compute the sum of the contents of r12and 18(hex) and then add the length of the argvvector (argc+1) multiplied by  
eight (the size of a char * on IA-64). To do this, you use the “eval” command in the Main Window, as shown in  
Figure 1-23. (The use of the “*” operator was discussed in Section 1.2.4, “Inspecting Data”.) As you see, the result is  
shown in decimal and hexadecimal.  
1-16 Getting Started: A Ski Tutorial  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 1-23. The xski Main Window Showing an evalCommand and Its Result  
1.2.12  
Getting Help  
To see what commands are available, type “help” in the Main Window or use the Help->Commands menu selection. To  
see the syntax of a specific command, type “help” followed by the command name, as in “help eval”.  
1.2.13  
Next Steps  
Congratulations! You now know how to use xski to test an IA-64 program. In the rest of this manual, you’ll find out how  
to use ski and bski and the many additional commands and facilities not covered in this brief tutorial.  
• Chapter 2, “Overview” presents the capabilities of Ski, how to start it and stop it, and a brief discussion of installation  
issues. The chapter also shows how to use bski for batch simulations.  
• Chapter 3, “Screen Presentation”, discusses the various screen displays of xski and ski in depth.  
• Chapter 4, “Command Language”, defines the syntax of the language you use to control Ski’s operation.  
• Chapter 5, “Screen Manipulation Commands”, presents the Ski commands for controlling Ski’s screen displays.  
• Chapter 6, “Program Simulation”, introduces the concepts of Ski program simulation, shows you how to load pro-  
grams, and presents the Ski commands for simulating a program. Much of the information needed to use Ski for firm-  
ware development and operating system simulation is in this chapter.  
• Chapter 7, “Linux and MS-DOS ABI Emulation”, discusses the Ski mechanisms and support for simulating applica-  
tion programs. If you are using Ski for to develop system software, such as bootstrap firmware or operating systems,  
you can skip this chapter.  
• Chapter 8, “Debugging”, presents Ski commands and facilities that are useful in debugging and tuning programs.  
• Chapter 9, “Command Files”, introduces command files, a mechanism that lets you extend Ski to meet your particular  
needs.  
• The appendices contain summaries of the Ski command set, a list of the registers and internal variables Ski recog-  
nizes, and a description of the Ski error and status messages, their causes, and, for error messages, possible solutions.  
Copyright © 2000 Hewlett-Packard Co.  
Getting Started: A Ski Tutorial 1-17  
Ski IA-64 Simulator Reference Manual 1.0L  
1-18 Getting Started: A Ski Tutorial  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
2
Overview  
2.1  
Introduction  
The Ski simulator is a software package designed to functionally simulate the IA-64 processor architecture at the instruc-  
tion level. Ski offers an informative, screen-oriented machine state display and a friendly, powerful command interface.  
Programs may be loaded from disk in executable format; they may be run from start to finish, single-stepped, and break-  
pointed. Translation lookaside buffers may be simulated. Certain Linux and MS-DOS operating system functions (system  
calls) are provided for simulation of application programs. These capabilities are complemented by screen-oriented sym-  
bolic debugging to provide a view into the simulated IA-64 processor.  
2.1.1  
Ski’s Strengths  
Ski is particularly well-suited for:  
• IA-64 application development:  
Ski can simulate IA-64 programs in a Linux environment and IA-32 programs in an MS-DOS environment. Ski  
provides a user interface that looks very much like a typical debugger– but the processor you are debugging on is  
virtual, simulated by Ski. Ski has successfully executed the SPEC-92 and SPEC-95 benchmark suites.  
• IA-64 compiler tuning:  
Ski provides performance statistics that can help you tune IA-64 compiler code generators. Ski can help you improve  
your compiler’s use of IA-64 architectural enhancements for parallelism.  
• IA-64 operating system and firmware development:  
Ski can simulate a “raw” IA-64 processor, with no operating system provided. Because of this, you can use Ski to  
simulate an IA-64 operating system running IA-64 and IA-32 programs. For example, Ski has been used successfully  
to develop the IA-64 version of the Linux kernel.  
• IA-64 processor functional hardware verification:  
Ski is a true implementation of the IA-64 architecture. You can compare the behavior of code simulated with Ski to  
the same code running on other IA-64 implementations. This helps you verify the correctness of those  
implementations.  
2.1.2  
Ski’s Scope  
Many different kinds of simulators can be created: device simulators that function at the semiconductor quantum physics  
level, circuit simulators that model the behavior of small numbers of transistors and other circuit elements, gate simulators  
that model digital circuits at the boolean logic level, and so on. Ski is an instruction simulator, which makes it very fast.  
Ski doesn’t model any particular physical IA-64 implementation. Instead, it models an architecturally-compliant IA-64  
processor with extensive compute resources.  
2.2  
What You Need to Know to Use This Manual  
This manual describes the user interface of Ski in detail. In reading this manual, you will learn how to use Ski to simulate  
your IA-64 and IA-32 programs. To understand this manual, you should already be familiar with the IA-64 architecture.  
IA-64 abbreviations such as ip, psr, and eaxare used without explanation.  
2.3  
Defects and Defect Reporting  
Ski is provided "as is", without any guarantees or warranties. However, a mailing list has been created for reporting Ski  
defects and for general Ski discussions. See the release notes for details on the mailing list address and how to subscribe.  
Copyright © 2000 Hewlett-Packard Co.  
Overview  
2-1  
Ski IA-64 Simulator Reference Manual 1.0L  
2.4  
Ski Variations  
The simulator is available in three varieties, distinguished by their user interfaces: ski, xski, and bski. The underlying  
simulation engine is identical across all three varieties. The figures below show how each variety looks when first started.  
Figure 2-1 shows ski, which uses a terminal-oriented, curses-based, character user interface. Figure 2-2 shows xski,  
using an X Window System, Motif-based, graphical user interface. Figure 2-3 shows bski, which provides a batch-ori-  
ented, command-line-driven environment and no user interface. Ski command line flags, some of which are shown in  
Figure 2-3, are described in Section 2.5.1, “Command Line Flags”.  
The three varieties understand the same command language. There are a few, unavoidable differences and they are pointed  
out where appropriate in this manual. Most examples and sample screen displays are taken from xski sessions. All exam-  
ples have been verified in actual use.  
2.4.1  
Using bski for Batch Simulations  
Because bski has no user interface, you typically control it using a command file (see Chapter 9, “Command Files”) and  
the -icommand line flag (see Section 2.5.1, “Command Line Flags”). ski and xski are intended for you to use interac-  
tively, while bski excels at batch simulations that might run for a long time as background jobs on your workstation or on  
a higher-powered remote simulation server. The cron and make programs work well with bski. With cron, you can  
schedule simulations to run at night and on remote servers. With make, you can execute complex networks of tests  
quickly, letting makekeep track of the dependencies between the tests. These programs are documented in man pages.  
Figure 2-1. The Curses-based ski Interface  
2-2  
Overview  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 2-2. The X Window System, Motif-based xski Interface  
Copyright © 2000 Hewlett-Packard Co.  
Overview  
2-3  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 2-3. The Command-Line bski Interface  
2.5  
Starting Ski  
To start the Ski simulator, type its name (ski, xski, or bski) and any necessary command line options and file redirec-  
tions, just as you would start any other Linux program. (Command line options are described in Section 2.5.1, “Command  
Line Flags”.) The simplest invocation of the simulator is:  
ski  
This starts the (curses-based) ski version of the simulator with no program loaded: a “bare” IA-64 emulation is ready  
for you to use.  
A more sophisticated invocation would be:  
xski my_program  
This starts the (X/Motif-based) xski version of the simulator and loads the IA-64 executable file my_program, ready  
to run. The program will not receive any command line arguments (via the argc/argv mechanism) when you run it.  
To run the simulator as a batch job in the background on an all-night run, you might execute this command line:  
bski -noconsole -stats -i my_commands my_program foo bar <test_data >out_stuff 2>bad_news &  
This invokes the (batch) bski version of the simulator and loads the IA-64 executable file my_program, ready to run.  
The -noconsoleflag tells bski not to create a separate console window for the program’s standard I/O. The program  
will receive the command line arguments foo and bar via the argc/argv mechanism when bski runs it. Both the  
simulator and the program being simulated will have standard in, standard out, and standard err redirected from/to  
test_data, out_stuff, and bad_news, respectively, and the simulator will execute the commands in  
my_commands. (Ski never reads from standard in, so there is no possibility of confusion.) The -statsflag specifies  
that at the end of the run, collected statistics will be output to standard out (which is redirected). The ampersand (“&”)  
runs the job in the background.  
2.5.1  
Command Line Flags  
The simulator accepts certain flags on the command line when you start it up. The flags are passed on the command line in  
2-4  
Overview  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
standard Linux fashion. The Ski command line syntax is shown below. The -i, -rest, -icnt, and -stats flags can  
appear in any order.  
ski[-help] [-i filename] [-restfilename] [program_filename [args]+]  
xski[-help] [-noconsole] [-i filename] [-restfilename] [program_filename [args]+]  
bski [-help] [-noconsole] [-i filename] [-rest filename] [-icnt filename] [-stats] [program_filename  
[args]+]  
2.5.1.1  
Summary of Flags  
-help  
A list of flags accepted by this variety of Ski (ski, xski, or bski) is printed out. No other processing is done and Ski  
terminates.  
-i filename  
The specified file is run as a command file before the first prompt to the user. If an program_filename is provided on  
the same command line, the program_filename is loaded before the command file is run. This provides a convenient  
way to load a program, initialize other machine state, and then turn control over to the user.  
-icntfilename  
For bski only: This flag specifies instruction counts should be saved in the specified file. For each kind of instruction  
executed during the simulation, the instruction count file shows five fields of information:  
• The instruction mnemonic  
• The total number of times the instruction was executed  
• The number of executions that were predicated on  
• The number of executions that were predicated off  
• The number of executions that were predicated on predicate register 0, which is “hardwired” on  
The value in the second field equals the sum of the values in the last three fields.  
-noconsole  
For xski and bski only: This flag tells Ski not to create a separate console window for the simulated program’s  
standard I/O. Instead, Ski will use the existing console window’s for standard I/O purposes in the simulated program.  
-restfilename  
Restore the simulator run saved in filename. See Section 8.6, “Saving and Restoring the Simulator State”. This flag  
cannot be combined with an program_filename. If combined with a -iflag, the -iflag is accepted and the -restflag  
is silently ignored.  
-stats  
For bski only: specifies execution run-time and instruction rate information should be send to standard out (stdout) at  
the end of the run. This information is normally displayed in the Main/Command Window of xski and ski. The  
-statsflag allows users of bski to get the same information.  
2.5.2  
The XSkiFile  
xski’s screen presentation is substantially controlled by the contents of the XSkifile, which uses the X Window System’s  
resource mechanism to provide information to xski. You can edit this file to change xski’s use of graphic buttons,  
described in Section 3.7.1, “The xski Main Window”. The XSkifile is part of the standard Ski distribution and you should  
put this file in your X Window System’s app-defaultsdirectory or in your home directory. If there is no valid XSkifile,  
the simulator will not be usable. You can find more information on installing xski in the release notes that come with each  
Ski distribution.  
Copyright © 2000 Hewlett-Packard Co.  
Overview  
2-5  
Ski IA-64 Simulator Reference Manual 1.0L  
2.6  
Quitting Ski  
The quitcommand causes the simulator to exit. If a numeric operand or expression is supplied, the value is returned to  
the shell as Ski’s exit status. This can be particularly useful with bski and command files (see Chapter 9, “Command  
Files”), for automated testing and regression testing. The exit status from Ski becomes the new value of your shell’s $?  
variable (for most shells) and can also be retrieved automatically by the make program, if you use makefiles to control  
batch runs.  
2.6.1  
Summary of the Quit Command  
quit[expression]  
Terminates the simulator and returns control to the system, setting the exit status to expression (default is 0).  
2-6  
Overview  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
3
Screen Presentation  
3.1  
Ski’s Use of Windows  
xski and ski generally divide the screen into four windows. (bski doesn’t create any windows because it has no user  
interface, only a command line interface.) xski uses Motif windows which you can move and resize using the mecha-  
nisms provided by your window manager (WindowMaker, Englightenment, fvwm, twm, etc.) xski creates additional win-  
dows as necessary.  
ski uses the curses package to create four windows on the terminal screen. Because ski uses curses, it runs on nearly any  
terminal or terminal emulator, including xterm. When ski needs to show data that isn’t appropriate for one of its four win-  
dows, it uses a pager such as “more” or “less” instead and restores the curses windows when the pager completes.  
Ski uses three of the windows to display information to you. The fourth window is shared between you and Ski: You enter  
commands that control Ski and Ski reports errors and other immediate information to you. You control the windows using  
Ski commands (see Chapter 5, “Screen Manipulation Commands”) and the simulator updates the windows whenever nec-  
essary to maintain consistency with the internal state of the simulator engine. The four windows are described in more  
detail below.  
3.2  
The Register Window  
Ski divides the IA-64 processor registers into five sets. In xski, all five sets are displayed in one window, the Register  
Window, with each set in its own subwindow or “pane”. The panes show user registers, general registers, floating point  
registers, system registers, and IA-32 registers respectively, as shown in Figure 3-1. The five panes share screen space and,  
unless you have a very large screen, it’s not possible to see all five panes at full size simultaneously. xski shows portions  
of all five panes by default, but you can toggle any panes off with commands described in Chapter 5, “Screen Manipula-  
tion Commands”.  
xski understands the Page Up and Page Down keys and the up-arrow and down-arrow keys found on most keyboards.  
These keys operate on the current pane, which is usually highlighted with a bright border. When the Register Window has  
the X Window System focus, the Page Up and Page Down keys scroll the current pane one “pane-full” less one line of  
overlap. The up-arrow and down-arrow keys scroll the current pane one line. The Tab and Shift+tab keys change the cur-  
rent pane highlight to the next or previous pane, respectively, “wrapping around” the top and bottom of the Register Win-  
dow.  
Copyright © 2000 Hewlett-Packard Co.  
Screen Presentation  
3-1  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 3-1. The Register Window in xski  
ski shows only a portion of a register set at a time and you use the commands described in Section 5.1, “Register Window  
Commands” to select which portion of which set to see. The sets are described below in the order they appear in the Reg-  
ister Window. Their xski realizations are shown as well.  
3.2.1  
The User Registers Pane  
The user registers pane (see Figure 3-2) displays the Predicate Registers (prs) in binary, the Application Registers in  
hexadecimal, and the Branch Registers (b0-b7) and the Instruction Pointer (ip) symbolically if possible, otherwise in  
hexadecimal. Symbolic displays are limited to sixteen characters; when more than sixteen characters are needed, the first  
fifteen are displayed and an asterisk (“*”) is added to indicate that the symbolic display has been abbreviated. The fields of  
the Current Frame Marker (cfm) register and subfields of the Previous Frame Marker field (pfm) are displayed in decimal.  
For bit-encoded registers, some bits are displayed individually using their IA-64 mnemonics. If a bit name is displayed in  
uppercase, the bit is currently set, and if the name is displayed in lowercase, the bit is currently clear. For example, the  
psr.be bit is shown as “BE” in Figure 3-2, indicating that the bit is set. The User Mask bitfield (psr.um) from the Processor  
Status Register (psr) is displayed in this pane; the entire psris shown in the System Registers pane, described in Section  
3.2.4, “The System Registers Pane”. Predicate Registers pr16-pr63are displayed in their rotated form, as indicated by  
the rrbpfield of the Current Frame Marker (cfm) register.  
At the middle of the pane, the line starting “clean” shows, in decimal, the values in the internal registers that control the  
Register Save Engine (rse). The IA-64 architecture requires that these registers exist but provides no program-visible  
access to them.  
3-2  
Screen Presentation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 3-2. The xski User Registers Pane  
3.2.2  
The General Registers Pane  
The general registers pane shows the current values of the 64-bit general (integer) data registers, four to a line, in hexadec-  
imal. Registers whose corresponding NaT bits are set are displayed with a leading asterisk (“*”) to indicate this. The dis-  
play reflects IA-64 register stacking and rotation: only the 32 static registers and the stacked registers allocated to a  
function are displayed. The allocated rotating registers are displayed in their rotated form, as indicated by the rrbgfield  
of the cfmregister, displayed in the user registers pane. The general registers pane is shown in Figure 3-3.  
Figure 3-3. The xski General Registers Pane  
3.2.3  
The Floating Point Registers Pane  
The floating point registers pane shows the current values of the 82-bit floating point data registers, two to a line displayed  
in hex and scientific decimal notation. Floating point registers f32-f127are displayed in their rotated form, as indicated  
by the rrbffield of the cfmregister, displayed in the user registers pane. The floating point registers pane is shown in  
Figure 3-4 with various values in the registers.  
Due to the nature of floating point arithmetic on the host computer, the scientific decimal displays may be inaccurate for  
very large and very small numbers, positive and negative. The hexadecimal display is always correct, as are all calcula-  
tions done by the simulated program.  
Copyright © 2000 Hewlett-Packard Co.  
Screen Presentation  
3-3  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 3-4. The xski Floating Point Registers Pane  
3.2.4  
The System Registers Pane  
The system registers pane shows the Processor Status Register (psr), Control Registers, Region Registers (rr0-rr7), Pro-  
tection Key Registers (pkr0-pkr15), Data Breakpoint Registers (dbr0-dbr15), Instruction Breakpoint Registers (ibr0-  
ibr15), and Performance Monitor Configuration Registers (pmc0-pmc15), in hexadecimal. Application programs have  
limited access to these registers. Addresses are displayed symbolically when possible. Symbolic displays are limited to  
sixteen characters; when more than sixteen characters are needed, the first fifteen are displayed and an asterisk (“*”) is  
added to indicate that the symbolic display has been abbreviated. The iva register shown on the second text line in  
Figure 3-5 is an example of this.  
Figure 3-5. The xski System Registers Pane  
3.2.5  
The IA-32 Registers Pane  
The IA-32 registers pane shows IA-32 registers in hexadecimal. For bit-encoded registers, the bits are named individually  
using their IA-32 mnemonics. If a name is displayed in uppercase, the corresponding bit is currently set, and if the name is  
displayed in lowercase, the bit is currently clear, as shown in Figure 3-6.  
3-4  
Screen Presentation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 3-6. The xski IA-32 Registers Pane  
3.3  
Resizing Register Window Panes with xski  
As mentioned above, even a large X Window System screen is too small to display all the registers simultaneously, so you  
may have to scroll a pane to see the registers you want, or resize the pane by dragging Pane Resizer, the small resize  
square on the right side of the dividing line between each pair of panes, as shown in Figure 3-7.  
Figure 3-7. An xski Pane Resizer: The Small Box Between the Scrollbars  
3.4  
The Register Window and ski  
The ski simulator, as noted above, uses curses to display multiple windows on non-graphic (text) terminals and terminal  
emulators. These windows are fixed in size and are not big enough to display all the data at the same time. On a conven-  
tional, twenty four line screen, ski uses five lines for the Register Window, as shown in Figure 3-8. Because of this lack of  
space, the Register Window shows only one of the five sets of registers at a time: user, integer, floating point, system, or  
IA-32, and then only a portion of each set. If your screen is larger than twenty four lines when you start ski, ski will make  
use of the extra space. (You can resize terminal emulators using command-line arguments or by using your window man-  
ager’s standard mechanisms for window resizing.)  
You use the ur, gr, fr, sr, and iarcommands to tell ski which set of registers to display. To see the various registers in a  
set, you use the rfand rbcommands to scroll the Register Window forwards and backwards, respectively. These com-  
mands are described in Section 5.1.1, “Summary of Register Window Commands”.  
Copyright © 2000 Hewlett-Packard Co.  
Screen Presentation  
3-5  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 3-8. The ski Register Window (at Top)  
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, or romloadcommands, 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 iplocation. 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  
3-6  
Screen Presentation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
instruction in the bundle. The end of each instruction group (a unit of potentially parallel execution) is marked with a pair  
of semicolons (“;;”) after the last operand of the last instruction in the group.  
Figure 3-9. xski’s Program Window Showing Part of an IA-64 “hello world” Program  
Ski uses the first few columns for source code line numbers. Ski also uses the first column to show breakpoint locations  
for IA-64 assembly language instructions, numbering the breakpoints “0” through “9.” IA-64 breakpoint commands  
include bs, bD, bd, and bl, and are described in Section 8.3, “Program Breakpoints”. For the purpose of setting breakpoint  
addresses, Ski “pretends” that the slot 0 instruction in a bundle is located at the first byte of the bundle, the slot 1 instruc-  
tion is located at the fourth byte, and the slot 2 instruction is located at the eighth byte. See “How Ski Implements Break-  
points” on page 8-6 for more information.  
Predication is an IA-64 feature that increases the usable parallelism of user programs and allows better utilization of func-  
tional units. Ski shows predication information in the second column of the Program Window, as shown in Figure 3-10. If  
the second column of a given instruction line contains an exclamation mark (“!”), the instruction is predicated on a predi-  
cate register that is currently 0: the instruction is “predicated off”. The predicate register is displayed in parenthesis imme-  
diately to the left of the instruction mnemonic. Ski uses a different encoding for the instruction pointed to by the ip  
register: an asterisk (“*”) indicates that the instruction is predicated off and a greater-than symbol (“>”) indicates that the  
instruction is predicated on. (That is, the “>” symbol means “This is the next instruction to be simulated.”)  
Copyright © 2000 Hewlett-Packard Co.  
Screen Presentation  
3-7  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 3-10. xski’s Program Window Showing IA-64 Predication and Breakpoints  
3.5.2  
IA-32 Instruction Display  
IA-32 instructions are displayed as shown in Figure 3-11, according to the conventions for Intel assembly code. As with  
IA-64 instruction display, Ski uses the first column of each assembly language instruction line to show breakpoint loca-  
tions, numbering them “0” through “9.” Except for the use of iabsrather than bs, IA-32 breakpoint commands are the  
same as IA-64 breakpoint commands and include iabs, bD, bd, and bl,as described in Section 8.3, “Program Break-  
points”. In the second column, Ski puts a greater-than symbol (“>”) to point to the next instruction to be executed, i.e., the  
location pointed to by the ipregister.  
Because IA-32 instructions are variable in length, it is possible to set the ipto point into the middle of an instruction. This  
can happen, for example, when an instruction with prefix bytes is needed at the top of the first pass through a loop, and the  
same instruction without the prefix bytes is needed at the top of subsequent passes. When this happens, Ski uses a plus-  
sign (“+”) in column two, rather than a greater-than symbol, to warn you that ippoints somewhere in the middle of the  
line of code displayed on the screen. To update the display, use the command “pj ip”. This will cause Ski to reinterpret  
the instruction stream and to display the variable length instructions with the new interpretation.  
3-8  
Screen Presentation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 3-11. xski’s Program Window Showing IA-32 Code, the Instruction Pointer, and a Breakpoint  
3.5.3  
Changing the Range of Locations Shown in the Program Window  
xski doesn’t place a scroll bar in the Program Window. Instead, like ski, xski provides the pf and pb commands,  
described in Section 5.2, “Program Window Commands”. You use these commands to scroll the Program Window for-  
wards and backwards, respectively, through the assembly language program display. Ski also provides the pjcommand  
which lets you “jump” the Program Window to any location in the address space. In addition, xski understands the Page  
Up and Page Down keys and the arrow keys. When the Program Window has the X Window System focus, the Page Up,  
Page Down, up-arrow, and down-arrow keys emit the “pb”, “pf”, “pb 1”, and “pf 1” commands, respectively.  
You can control the size of xski’s Program Window using your window manager’s standard mechanisms. If you are using  
ski, the window is fixed in size; on a twenty four line terminal, the window will be nine lines tall.  
3.5.4  
Invalid Code and the Program Window  
Ski will disassemble the area of memory it is displaying in the program window, regardless of whether the area contains  
program code or data. If you tell Ski to display non-program memory, Ski attempts to display the (non-existent) instruc-  
tions. When Ski finds bit encodings that don’t represent valid instructions, it displays the word “illegalOp” instead, as  
shown in Figure 3-12. Sometimes, Ski may display x’s, indicating that you asked Ski to show a page of memory that  
doesn’t exist, as shown in Figure 3-13. There are three cases to consider:  
• In application-mode, x’s indicate a page of memory that hasn’t been accessed by the program and therefore hasn’t  
been allocated by Ski.  
• In system-mode with instruction address translation enabled (the psr.it bit is on), x’s indicate a page of memory for  
which no entry exists in the Translation Lookaside Buffer (TLB) or in the Virtual Hash Page Table (VHPT).  
• In system-mode with instruction address translation disabled (the psr.it bit is off), x’s indicate a page of memory that  
has not yet been accessed by the program.  
Application-mode and system-mode programming are discussed in more detail in Chapter 6, “Program Simulation”.  
Copyright © 2000 Hewlett-Packard Co.  
Screen Presentation  
3-9  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 3-12. xski’s Program Window Showing Illegal Instructions  
Figure 3-13. xski’s Program Window Showing Unallocated Space or No Translation  
3.6  
The Data Window  
In the Data Window, xski and ski present data in hexadecimal format, sixteen bytes to a line, as shown in Figure 3-14.  
The data are displayed as four groups of eight hexadecimal digits each, with an ASCII character translation on the right  
and the data address on the left. (The endianness of the displayed bytes is determined by the current value of the psr.be bit  
3-10 Screen Presentation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
which may change by the time the simulated IA-64 processor actually loads the bytes.) The address is expressed as a sym-  
bol from the executable file’s symbol table or as a sixteen digit hexadecimal number.  
With the dbndl command, Ski can display data formatted as IA-64 instruction bundles in hexadecimal, as shown in  
Figure 3-15. (The figure was generated by loading a program and then issuing the command “dj main-10” followed by  
the dbndlcommand.) This is useful when you need to see the raw hexadecimal instruction encodings. The first column  
displays the address of each bundle. The second column displays the template field. The remaining three columns are the  
41-bit instructions from slots 0, 1, and 2. Note: for the purpose of setting breakpoint addresses, Ski “pretends” that the slot  
0 instruction is located at the first byte of the bundle, the slot 1 instruction is located at the fourth byte, and the slot 2  
instruction is located at the eighth byte. See “How Ski Implements Breakpoints” on page 8-6 for more information.  
Figure 3-14. xski’s Data Window Showing Unallocated Space Followed by Data  
Figure 3-15. xski’s Data Window Showing Data Interpreted as Instruction Bundles  
3.6.1  
Changing the Range of Locations Shown in the Data Window  
As with the Program Window, xski doesn’t place a scroll bar in the Data Window. Instead, like ski, xski provides the df,  
db, and djcommands, described in Section 5.3, “Data Window Commands”. Use these commands to scroll the Data Win-  
dow forwards and backwards and to “jump” the Data Window. In addition, xski understands the Page Up and Page Down  
keys and the arrow keys. When the Data Window has the X Window System focus, the Page Up, Page Down, up-arrow,  
and down-arrow keys emit the “db”, “df”, “db 1”, and “df 1” commands, respectively.  
You can control the size of xski’s Data Window with your window manager’s standard mechanisms. If you are using ski,  
the window is fixed in size; on a twenty four line terminal, the window will be two lines tall.  
Copyright © 2000 Hewlett-Packard Co.  
Screen Presentation 3-11  
Ski IA-64 Simulator Reference Manual 1.0L  
3.6.2  
Invalid Code and the Data Window  
If you tell Ski to display non-existent memory, Ski will display x’s instead, as shown in Figure 3-14. Non-existent mem-  
ory is defined for the Data Window similarly to its definition for the Program Window, described in Section 3.5.4, “Invalid  
Code and the Program Window”, except that the relevant bit for system-mode programs is psr.dt.  
3.7  
The Command/Main Window  
xski and ski are command-driven simulators. Most of your interaction with them is done by typing commands. Your  
commands are typed in a window titled “main” in xski (see Figure 3-16) and “Command” in ski (see Figure 3-17).  
3.7.1  
The xski Main Window  
xski divides the Main Window into five areas:  
• Menus: File, View, Configure, and Help. The File menu provides a “Quit” selection for you to exit the program. The  
View menu lets you choose which windows to see. The Configure menu is currently non-functional. The Help menu  
provides a “Commands” selection that displays the commands Ski recognizes and a “Product Information” selection  
that displays information about xski.  
• Buttons: Step, Run, Prog, Data, Regs, Cache, TLB, and Quit. Clicking on the Stepbutton executes the command  
step 1”, single-stepping the simulated program. Shift-clicking the button executes the command “step 10”, step-  
ping the simulated program through ten instructions. The Run, Prog, Data, and TLBbuttons execute the run, pj, dj,  
and sdtcommands respectively. If the Program Window has been closed (removed from the screen, not merely min-  
imized to an icon), the Progbutton recreates it. The Databutton operates similarly with respect to the Data Window.  
The Regsand Cachebuttons are currently non-functional.  
xski’s buttons are configurable. Using the X Window System resource mechanism, you can change the number of  
buttons, the button labels, and the commands the buttons emit. The easiest way to do this is to edit the XSki file,  
described in Section 2.5.2, “The XSki File”. Much of xski’s user interface behavior is controlled by this file but you  
should be careful in making changes to any elements other than button descriptions; xski may change in the future in  
ways that are not backwards-compatible with changes you make.  
• Command History: commands you’ve already entered.  
• Command: where you type commands to xski.  
• Responses: responses and error messages from xski.  
The Menu, Button, and Command History areas provide shortcuts for typing commands. The Stepbutton is particularly  
useful: when you are single-stepping through a program, you can click on the Stepbutton instead of repeatedly typing the  
step” command. The Command History area provides another way to avoid typing: you can double-click on a command  
in the Command History to run the command again, or single-click on the command to move it to the Command area  
where you can edit and then re-run it. The Command area is where you type commands to the simulator, but, as mentioned  
above, you can use the menus, buttons, and Command History as shortcuts. Two useful commands to know are “help”,  
which causes a window listing all the commands to be displayed, and “helpcommand” which causes information about  
the command to be shown in the Responses area. The Responses area is also used by the simulator to give you feedback  
when it can’t execute one of your commands.  
xski understands the Prev and Next keys and the arrow keys found on many HP keyboards. When the Main Window has  
the X Window System focus, the current area is highlighted, usually with a bright outline. You can make a different area  
current with Tab and Shift-tab. The Prev, Next, up-arrow, and down-arrow keys scroll through the current area, allowing  
you to easily edit and re-run previous commands from the Command History and review previous messages in the  
Response area. In addition, you can use the Alternate key (“alt”) like a Shift key, along with the underlined letter in each  
menu name as a shortcut to access the menu, rather than using the mouse. For example, Alt+F brings up the File menu.  
This lets you spend less time shuttling between the keyboard and mouse, and more time doing productive work.  
3-12 Screen Presentation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 3-16. xski’s Main (Command) Window  
3.7.2  
The ski Command Window  
ski’s Command Window is simpler, as shown in Figure 3-17. There are no menus, buttons, or Command History. Instead,  
you enter commands when you see a *prompt in the 4-line Command Window at the bottom of the screen. ski displays  
its responses in this window as well. The window scrolls so that information lost off the top of the window may be recov-  
ered using the up and down arrows on your keyboard (for Emacs fans, Ctrl-P and Ctrl-N serve the same function). As a  
typing shortcut, if you hit the enter/return key, ski will repeat the last command you entered.  
Copyright © 2000 Hewlett-Packard Co.  
Screen Presentation 3-13  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 3-17. ski’s Command Window (at Bottom)  
3.8  
Other Windows  
Some commands, such as help, isyms, and symlist, cause xski and ski to create additional windows. When xski cre-  
ates an additional window, it adds scroll bars if there is more information than will fit. As an example, the output window  
created by xski for the symlistcommand is shown in Figure 3-18. xski understands the Page Up and Page Down keys  
and the arrow keys. The Page Up and Page Down keys scroll through the window a windowful at a time, with one line of  
overlap. The up-arrow and down-arrow keys scroll through the window a line at a time.  
When ski needs to display additional information, it does so by overwriting the four standard windows. ski sends the  
information through a pager, using lessby default. When the pager finishes, ski refreshes the screen with the standard  
ski windows. If you prefer to use a different pager, for example more or page, set the PAGER environment variable  
accordingly, before starting the simulator.  
3-14 Screen Presentation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 3-18. xski’s Symbol List Window  
Copyright © 2000 Hewlett-Packard Co.  
Screen Presentation 3-15  
Ski IA-64 Simulator Reference Manual 1.0L  
3-16 Screen Presentation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
4
Command Language  
The Ski command language is simple, efficient, and easy to learn. It consists of commands you can invoke from the key-  
board or from a command file (see Chapter 9, “Command Files”). Each command is given with an appropriate set of argu-  
ments (some optional) to further qualify the command. Commonly-used commands may be abbreviated as described in  
Appendix A, “Command Reference” and commands may be repeated easily. A limited on-line help facility (the help  
command) is provided for quick reference. This chapter presents the syntax of the command language. Information about  
specific commands (command semantics) is in later chapters and in Appendix A, “Command Reference”.  
4.1  
Command Entry  
xski and ski provide similar mechanisms for controlling the simulator. Both provide for direct keyboard entry of com-  
mands. In addition, xski offers buttons, menus, and the Command History to minimize typing, as described Section 3.7.1,  
“The xski Main Window”, and ski provides the command repetition mechanism for the same purpose, as described in  
Section 3.7.2, “The ski Command Window”.You give a command to Ski by typing the command name at the keyboard  
followed by operands and the enter/return key. (Use the helpcommand to see a menu of available commandsor helpfol-  
lowed by the command name to see the command syntax.) xski displays the command you typed in the Command area of  
the Main Window. ski displays the command in the Command Window at the bottom of the screen following the *  
prompt. Commands are case sensitive. When you hit the enter/return key, Ski acts on your command and updates the  
screen to reflect any changes caused by the command. For example, the command  
db  
causes the Data Window to show the contents of lower addresses in memory.  
4.2  
Command Arguments  
Some commands, such as save, require additional information. If you don’t provide the information, Ski displays an error  
message. Some commands have optional arguments. As described in “Syntax Conventions” on page -iii, command sum-  
maries in this manual show optional arguments surrounded by square brackets [like this]. If you don’t specify an optional  
argument, Ski uses a suitable default value. For example,  
pf 3  
causes the Program Window to advance three bundles after the last bundle in the Program Window, while  
pf  
alone moves the Program Window ahead one windowful. Some arguments can be supplied in a list, one or more times;  
these are shown by putting a plus sign (“+”) after the argument name like this+. For example, the syntax description for  
the =1command is:  
=1 address_or_symbol value+  
which suggests that the command  
=1 __data_start 12 56 90 cd  
assigns the hexadecimal values 12, 56, 90, and cd to the four bytes starting at the location specified by the symbol  
__data_start. Brackets and plus signs can be combined, [like this]+, to signify optional arguments that can be supplied  
zero or more times.  
4.3  
Command Sequences, Repetition, and Abbreviation  
You can type multiple commands on a single command line by separating the individual commands with semicolons  
(“;”). This is called a “command sequence”. Command sequences make re-executing a series of commands easy, using  
the Command History mechanism of xski (see Section 3.7.1, “The xski Main Window”) or the command repetition  
mechanism of ski (see Section 3.7.2, “The ski Command Window”). For example, you might want to repeatedly execute  
Copyright © 2000 Hewlett-Packard Co.  
Command Language  
4-1  
Ski IA-64 Simulator Reference Manual 1.0L  
the commands “step 100” and “eval my_buffer”. This pair of commands would execute one hundred instructions and  
then print the value of (your) variable named “my_buffer”. By combining these two commands into one command  
sequence, i.e., “step 100 ; eval my_buffer”, you can use the Command History or command repetition mechanism  
to run these commands over and over. (The spaces around the semicolon are optional but improve readability.)  
There is no grouping construct in Ski. This can be important when you write command files: when you want to execute  
commands conditionally using the ifcommand, you cannot use the semicolon to group several commands into the “then”  
or “else” clauses. Instead, you must use labels and the gotocommand. Chapter 9, “Command Files” discusses command  
files in depth.  
Most commands may be abbreviated, some to a single letter. A command may be abbreviated to the shortest prefix which  
is not also a prefix of a command which precedes it in the command menu. (See Appendix A, “Command Reference”.)  
4.4  
Argument Specification  
The arguments which are given with commands are, in general, obvious and natural. The description which follows  
should clarify those cases which are not. The terms defined here are used in the command summaries throughout the  
remainder of this manual.  
4.4.1  
Numeric Arguments  
Many commands accept numeric arguments. The argument may be an address, a value, an execution count, or some other  
variable which is best expressed numerically.  
4.4.1.1  
Numbers and Counts  
Some commands take arguments that are naturally expressed in hexadecimal: addresses, for example. Other commands  
take arguments that are naturally expressed in decimal, such as the number of instructions to simulate with the stepcom-  
mand. To make using Ski easier, some Ski commands default to interpreting their arguments as (hexadecimal) numbers  
and some default to interpreting their arguments as (decimal) counts. You can always override the default interpretation by  
specifying a radix override, as described below.  
Hexadecimal digits may be upper or lower case. The default radix may be overridden by preceding the number or count  
with 0Dor 0dfor decimal, 0Xor 0xfor hexadecimal, 0Oor 0o(zero-oh) for octal, and 0Bor 0bfor binary. Since both the  
decimal and binary prefixes look like hexadecimal, hexadecimal values such as 0d600000and 0b100000must be speci-  
fied either with an explicit hexadecimal prefix, as in 0x0d600000 and 0x0b100000, or without the leading 0, as in  
d600000and b100000.  
4.4.1.2  
Expressions  
Wherever a number or count is needed, you can use a numeric expression instead, with parenthesis as needed for group-  
ing. No spaces are allowed in an expression. In an expression whose result will be used as a number, numbers not pre-  
ceded by a radix override are assumed to be hexadecimal. If the result will be used as a count, numbers not preceded by a  
radix override are assumed to be decimal. For example, the stepcommand expects a count operand, so the command  
step r0+10  
steps (decimal) ten instructions. On the other hand, the pjcommand expects an address operand, which is a number, so  
the command  
pj r0+10  
displays (hexadecimal) address 0x10 in the Program Window. (r0is hardwired to always return a zero when read.)  
The available operators are shown in order from higher to lower precedence in Table 4-1. Operator precedence rules fol-  
low the C language rules.  
4-2  
Command Language  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Table 4-1. Ski Simulator Arithmetic and Logic Operators  
Operator  
( )  
Description  
group operators with operands  
! ~ + - *  
opposite truth value, logical one’s complement,  
unary plus, unary minus, dereference: treat as an  
address and read eight bytes  
* /  
multiply, divide  
+ -  
add, subtract  
<< >>  
< <= > >=  
logical left shift, logical right shift  
less than, less than or equal to, greater than, greater  
than or equal to  
== !=  
equal to, not equal to  
bitwise and  
&
^
bitwise exclusive or  
bitwise or  
|
&&  
||  
logical and  
logical or  
As an example, in xski,  
eval 64 0d64 0o64 0b100000 *main ~(((0D1234+0X10EF0)*4)<<6)+0B10001001  
prints the values of the six expressions in the Main Window, as shown in Figure 4-1. The first expression is taken as a  
hexadecimal number, the second as a decimal number, the third as an octal number, and the fourth as a binary number. The  
fifth expression is the value at the location specified by the symbol “main” (the first 64 bits of the code bundle at that loca-  
tion), and the sixth expression is the result of some arithmetic.  
Figure 4-1. xski Evaluating Expressions  
Copyright © 2000 Hewlett-Packard Co.  
Command Language  
4-3  
Ski IA-64 Simulator Reference Manual 1.0L  
4.4.1.3  
Addresses  
An address is specified by a 64 bit hexadecimal number. For example, the command  
pj 1000  
repositions (“jumps”) the Program Window to address 0x1000. As discussed in Section 6.1, “Application-Mode and Sys-  
tem-Mode Simulation”, Ski supports generic addresses in application-mode programs (that is, the concept of “virtual  
memory” doesn’t apply to application mode programs), and physical and virtual addresses in system-mode programs. For  
system-mode programs, the psr.dt and psr.it bits control whether Ski interprets addresses as physical or virtual. In some  
cases, you may need to change the value of one or both of these bits temporarily, so that Ski will interpret addresses the  
way you want. You should restore the bit values before resuming simulation, of course. You can set the psr.dt bit with the  
Ski command “= psr.dt 1” and clear the bit with “= psr.dt 0”. The corresponding commands for the psr.it bit are “=  
psr.it 1” and “= psr.it 0”, respectively.  
Addresses may be computed using expressions. For example, the command  
dj 1000+0d50  
repositions (“jumps”) the Program Window to address 1032, because 1000 (hexadecimal) added to 50 (decimal) is 1032  
(hexadecimal). Address expressions are particularly useful in symbolic constructs, as described below.  
4.4.2  
Symbolic Arguments  
A symbol is a sequence of characters (a “name”). Examples of symbols are program-defined symbols, registers, internal  
variables, labels, and filenames. Arguments may (and sometimes must) be expressed symbolically.  
4.4.2.1  
Program-Defined Symbols  
A program-defined symbol is an identifier which can be used as a mnemonic for a memory location. Program-defined  
symbol names are defined in the executable file for the program being simulated. Some symbols are common, well-known  
names (e.g. printf, main), and others are defined by the programmer (e.g. foo, bar). The symlistcommand shows you  
the symbols sorted by address, as Figure 4-2 shows.  
Figure 4-2. xski’s Symbol List Window  
4.4.2.2  
Registers  
A register name is a predefined mnemonic for a processor register. The general registers, for example, are referred to as  
r0, r1, ..., r127. (The register names Ski recognizes are listed in Section B.1, “IA-64 Registers”.) For example, the com-  
mand  
= r31 ip  
4-4  
Command Language  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
assigns the value contained in the ipregister to general register 31. (For a description of the =command, see Section 8.1,  
“Changing Registers and Memory with Assignment Commands”.) Wherever the simulator expects you to supply a  
numeric argument, you can use a register instead. You may only refer to currently-visible registers, according to the stack-  
ing and rotation mechanisms of the IA-64 architecture.  
4.4.2.3  
Internal Variables  
The simulator provides internal variables for you to use in command files (see Chapter 9, “Command Files”). These inter-  
nal variables are read-only; you cannot change their values. You can refer to an internal variable in any context where you  
could refer to an IA-64 register. Ski has four internal variables:  
$cycles$  
The total number of “virtual cycles” simulated. A virtual cycle is a cycle on a machine with an very large number of  
execution units and very fast memory; a real IA-64 processor may take more cycles. In a command file, you might  
use this variable to gather statistics about the efficiency of a particular compiler optimization algorithm. The value of  
$cycles$is always equal to the value of $insts$for IA-32 programs.  
$exited$  
The value 0 until the simulated program exits. Then the variable takes the value 1. In a command file, you would use  
$exited$to detect a program termination. Program termination is defined for IA-64 application-mode programs as  
a call to the exit()function or the receipt of an unhandled signal. For IA-64 system-mode programs, normal termi-  
nation is defined to be a call to the Simulator System Call exit function or execution of BREAK 0 instruction. This  
variable is not supported for IA-32 programs in application-mode or system-mode. (See Section 6.1, “Application-  
Mode and System-Mode Simulation” for details on these modes.)  
$heap$  
This variable has meaning only for IA-64 programs running in application-mode, as described in Section 6.1,  
“Application-Mode and System-Mode Simulation”. $heap$marks the address past the “far end” of the simulated  
heap, that is, the end farthest from the end of the data section. The heap starts at the first sixteen-byte-aligned address  
after the data section. Ski updates the $heap$variable as the program being simulated malloc’s memory (for pro-  
grams written in C; adapt accordingly for other programming languages). You can use the $heap$variable to debug  
wild pointer problems: if your program has a pointer that allegedly points to a malloc’ed data structure, but the  
pointer value exceeds $heap$, the pointer is invalid. For system-mode programs and IA-32 programs, this variable  
is meaningless, as there is no malloc support.  
$insts$  
The number of instructions that have been simulated so far (including any faulting instructions, for programs run-  
ning in system-mode, described in Section 6.1, “Application-Mode and System-Mode Simulation”). In a command  
file, you might use this variable to stop simulation after a certain number of instructions. The value of $insts$is  
always equal to the value of $cycles$for IA-32 programs.  
4.4.2.4  
Labels  
Labels (see Section 9.2, “Labels and Control Flow in Command Files”) are names which consist of an alpha (upper or  
lower case alphabetic, $, or _), followed by a sequence of alphas or digits (e.g., abc123, $foo_bar, etc.) and ending with  
a colon (“:”). They may be up to 132 characters long. Labels are used in command files as targets of the gotocommand.  
4.4.2.5  
Filenames  
Filenames are subject to the restrictions of the underlying Linux operating system. Ski performs tilde (“~”) expansion: if  
you provide a pathname whose first word starts with a tilde, Ski assumes the word is a username and tries to replace it  
(and the tilde) with the user’s home directory. For example, “~david/hello” might be expanded to “/home/david/  
hello”.  
4.4.3  
Resolving Ambiguous Symbols and Numbers  
Some character sequences can be interpreted in more than one way. For example, the character sequence “b3” can be  
interpreted as a branch register, a program-defined symbol, or a hexadecimal number. To resolve the ambiguity, Ski looks  
Copyright © 2000 Hewlett-Packard Co.  
Command Language  
4-5  
Ski IA-64 Simulator Reference Manual 1.0L  
first in its symbol tables for program-defined symbols and internal variables (which includes register names). If a match is  
found, the matching value is used, otherwise the character sequence is taken as a number. You can force the numeric inter-  
pretation by putting a “0x” or “0X” prefix in front of the number, such as “0xb3”. It is undefined whether Ski searches the  
symbol table for program-defined symbols before or after the internal variable symbol table. Because of this, it is wise to  
avoid naming global variables and functions with names duplicating any of Ski’s internal variables. In practice, this means  
you should avoid using register names as names of variables and functions in your programs.  
4-6  
Command Language  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
5
Screen Manipulation Commands  
Ski provides several commands to manipulate windows. These commands let you make major changes of context or fine  
adjustments. xski provides more flexibility: you can change the location and size of xski windows using the mechanisms  
provided by your window manager, and xski provides scrollbars in some windows, for minor adjustments.  
5.1  
Register Window Commands  
As described in Section 3.2, “The Register Window”, xski shows all five sets of registers in the Register Window, with  
scroll bars and pane resizers so you can select what registers to see within each set and how much screen space should be  
devoted to each set. The fr, gr, iar, sr, and ur commands allow you to toggle display of individual sets on and off.  
Figure 3-1, “The Register Window in xski,” on page 3-2 shows the xski Register Window.  
ski has much less screen space available and therefore shows only one set and only a part of it at a time. The fr, gr, iar,  
sr, and urcommands allow you to choose which register set to see. The rfand rbcommands let you choose what part of  
the chosen register set to see. Figure 3-8, “The ski Register Window (at Top),” on page 3-6 shows the ski Register Win-  
dow.  
5.1.1  
Summary of Register Window Commands  
rd[filename]  
Dump the Register Window to the screen in a new window (xski) or using a pager (ski), or, if filename is provided,  
to the file given by filename. The mnemonic stands for “register dump”.  
5.1.1.1  
xski Register Window Commands  
fr  
Toggles display of the floating point registers (fr) pane in the Register Window. See Figure 3-4, “The xski Floating  
Point Registers Pane,” on page 3-4.  
gr  
Toggles display of the general registers (gr) pane in the Register Window. See Figure 3-3, “The xski General  
Registers Pane,” on page 3-3.  
iar  
Toggles display of the IA-32 registers (eax, ebx, esp, etc.) pane in the Register Window. See Figure 3-6, “The xski  
IA-32 Registers Pane,” on page 3-5.  
sr  
Toggles display of the system registers (cr, rr, pkr, dbr, ibr, pmc, and pmd) pane in the Register Window. See  
Figure 3-5, “The xski System Registers Pane,” on page 3-4.  
ur  
Toggles display of the user registers (pr, br, ar, ip, psr.um) pane in the Register Window. See Figure 3-2, “The xski  
User Registers Pane,” on page 3-3.  
5.1.1.2  
ski Register Window Commands  
fr  
Displays the floating point registers (fr) in the Register Window.  
gr  
Displays the general registers (gr) in the Register Window.  
iar  
Copyright © 2000 Hewlett-Packard Co.  
Screen Manipulation Commands  
5-1  
Ski IA-64 Simulator Reference Manual 1.0L  
Displays the IA-32 (eax, ebx, esp, etc.) registers in the Register Window.  
sr  
Displays the system registers (cr, rr, pkr, dbr, ibr, pmc, and pmd) in the Register Window.  
ur  
Displays the user registers (pr, br, ar, ip, psr.um) in the Register Window.  
rf[count]  
Moves the Register Window “forward” (scrolls down) through the currently-displayed register set. The Register  
Window is scrolled count lines. If count is omitted, the Register Window scrolls down one windowful less one line,  
i.e. the last line of the old window is displayed as the first line of the new window.  
rb[count]  
Moves the Register Window “backward” (scrolls up) through the currently-displayed register set. The Register  
Window is scrolled count lines. If count is omitted, the Register Window scrolls up one windowful less one line, i.e.  
the first line of the old window is displayed as the last line of the new window.  
5.2  
Program Window Commands  
The Program Window displays disassembled instructions, one instruction per line. (See “The Program Window” on  
page 3-6.)  
5.2.1  
Summary of Program Window Commands  
pj[address]  
If address is specified, repositions (“jumps”) the Program Window so that the IA-64 bundle or IA-32 instruction  
containing the specified address is second in the window. If no address is given, jumps to the previous location. The  
mnemonic stands for “program jump”.  
pf[count]  
Moves the Program Window forward count IA-64 bundles or IA-32 instructions. If count is not specified, moves the  
Program Window forward one windowful less one bundle or instruction. The mnemonic stands for “program  
forward”.  
pb[count]  
Moves the Program Window backward count IA-64 bundles or IA-32 instructions. If count is not specified, moves the  
Program Window backward one windowful less one bundle or instruction. The mnemonic stands for “program  
backward”.  
pa  
Display the program being simulated in assembly language only, as shown in Figure 5-1. This command is valid for  
IA-64 code only. The mnemonic stands for “program display assembly”.  
5-2  
Screen Manipulation Commands  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 5-1. xski’s Program Window Showing IA-64 Assembly Language Code  
pm  
Display the program being simulated in its source code form with the assembly language translation mixed in, as  
shown in Figure 5-2. The source code display is for your convenience only; you cannot interact with the source code,  
e.g., modify the source code, click on a variable name to see its value in the Data Window, and so on. The source code  
is not embedded in the executable file. Instead, the compiler and linker place into the executable file a record of the  
location and filename of the source code. The source code file must be available to Ski in the location recorded in the  
executable file. In practice, this means you will want to run xski or ski from the directory where the program was  
compiled. (See Section 3.5, “The Program Window” for more information on source code compilation.) This  
command is valid for IA-64 code only. The mnemonic stands for “program display mixed”.  
Copyright © 2000 Hewlett-Packard Co.  
Screen Manipulation Commands  
5-3  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 5-2. xski’s Program Window Showing Intermixed C and IA-64 Assembly Code  
pdstarting_address ending_address [filename]  
Dump the assembly language translation of the program in the area between the two addresses (inclusive) to the  
screen (ski) or to a window (xski) if no filename is given, or to the specified file if one is. Source code will not be  
dumped along with the assembly language, even if the pm command is given. Figure 5-3 shows an example of an  
assembly language dump of the program in Figure 5-1 and Figure 5-2. The mnemonic stands for “program dump”.  
Figure 5-3. xski’s Assembly Language Dump Window  
5-4  
Screen Manipulation Commands  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
5.3  
Data Window Commands  
The Data Window displays an area of memory in hexadecimal format and, if the window is wide enough, an ASCII trans-  
lation. (See Section 3.6, “The Data Window”.) The commands to adjust the Data Window are similar to those for the Pro-  
gram Window and are described below.  
5.3.1  
Summary of Data Window Commands  
dj[address]  
If address is specified, repositions (“jumps”) the Data Window so that the bytes containing the specified address are  
first in the window. If no address is given, jumps to the previous location. The mnemonic stands for “data jump”.  
df[count]  
Moves the Data Window forward count display lines or one windowful if count is not specified. The mnemonic  
stands for “data forward”.  
db[count]  
Moves the Data Window backward count display lines or one windowful if count is not specified. The mnemonic  
stands for “data backward”.  
dbndl  
Displays the data as hexadecimal instruction bundles, as shown in Figure 5-4 and in Figure 3-15, “xski’s Data  
Window Showing Data Interpreted as Instruction Bundles,” on page 3-11. It is your responsibility to ensure that the  
Data Window is actually positioned on instructions; if not, Ski will dutifully display nonsense. The first column  
displays the address. The second column displays the template field. The remaining three columns display the 41-bit  
instructions from slots 0, 1, and 2, with the least-significant bit to the right. The mnemonic stands for “data window  
bundle”.  
Figure 5-4. xski Showing Data as Instruction Bundles  
dh  
Displays the data as raw hexadecimal with an ASCII translation, as shown in Figure 5-5. The mnemonic stands for  
“data window hexadecimal”.  
Copyright © 2000 Hewlett-Packard Co.  
Screen Manipulation Commands  
5-5  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 5-5. xski Showing Data in Raw Hexadecimal and ASCII  
ddstarting_address ending_address [filename]  
Dump the memory area between the two addresses (inclusive) to the screen (ski) or window (xski) if no filename is  
given or to the specified file if one is. The dump will be in the format selected by the most recent dbndl or dh  
command. An example of a hexadecimal dump is shown in Figure 5-6. The mnemonic stands for “data dump”.  
Figure 5-6. xski’s Hexadecimal Dump Window  
5-6  
Screen Manipulation Commands  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
6
Program Simulation  
Ski’s main responsibility is to simulate IA-64 instructions and programs built from these instructions. Many commands  
and features are supplied to provide you with a great deal of flexibility in using Ski.  
6.1  
Application-Mode and System-Mode Simulation  
Ski supports two instruction sets and two modes of simulation. The two instruction sets supported by Ski are the IA-64  
instruction set and a subset of the traditional IA-32 instruction set, often called the “Intel x86” instruction set.  
Ski’s two simulation modes let you simulate an application program (“application-mode”) or an operating system or firm-  
ware (“system-mode”). For IA-64 programs, Ski determines the mode based on the presence or absence of the _atexit  
symbol. (If you strip symbols from your IA-64 program, Ski will not find _atexitand will assume your program is a sys-  
tem-mode program.) For IA-32 programs, you select the mode, using the ialoadcommand for application-mode simula-  
tion and the romload command for system-mode simulation. Program loading is discussed in Section 6.5, “Program  
Loading”.  
6.2  
Ski Support for Application-Mode Programs  
To support application-mode programs, Ski emulates a Linux operating system (for IA-64 programs) or an MS-DOS oper-  
ating system (for IA-32 programs).  
6.2.1  
Application-Mode IA-64 Programs  
For IA-64 programs, Ski provides (simulated) memory for the text and data portions of the program’s address space. Ski  
also manages a growable heap for the C language’s malloc() function, a growable Register Save Engine area, and a grow-  
able stack. As your program runs, Ski tracks the memory references emitted by the program. Ski tries to distinguish  
between reasonable references and ridiculous references indicative of wild pointers. To track stack-based data structures,  
Ski adds stack pages when it notices a reference to a location just past the end of the stack. To track heap-based data struc-  
tures, Ski provides an implementation of the malloc() family of functions. (Chapter 7, “Linux and MS-DOS ABI Emula-  
tion”, discusses Ski’s pseudo-operating system in detail.) Ski tracks pages used by the Register Save Engine as well.  
Application program calls to Linux system functions are emulated by the simulator or passed to the host Linux operating  
system; unsupported calls cause simulation to stop. Registers are initialized according to Linux calling conventions.  
Application mode programs can’t access (simulated) I/O devices or privileged registers. Application mode programs can’t  
execute privileged instructions or receive interrupts; any interruptions cause Ski to stop simulation and generate an error  
message. Application-mode programs never see virtual memory page faults or TLB faults and therefore the sitand sdt  
simulator commands (see Section 6.3.3, “System-Mode TLB Simulation”) are disabled when simulating application-  
mode programs.  
6.2.2  
Application-Mode IA-32 Programs  
For IA-32 programs, Ski’s support is more limited. Ski provides a subset of MS-DOS “int 21” functions. Ski does not  
simulate Microsoft Windows. Loadable libraries (DLL’s), config.sys, and autoexec.batare not supported. Environ-  
ment variables are not available to MS-DOS programs. Registers and memory are initialized according to MS-DOS con-  
ventions.  
6.3  
Ski Support for System-Mode Programs  
A system-mode program is, as far as Ski is concerned, running on a “bare” IA-64 processor. No operating system emula-  
tion is provided and the system-mode program has complete access to the simulated IA-64 processor.  
Copyright © 2000 Hewlett-Packard Co.  
Program Simulation  
6-1  
Ski IA-64 Simulator Reference Manual 1.0L  
6.3.1  
System-Mode IA-64 Programs  
A system-mode IA-64 program “sees” a more complete simulated environment: writeable registers are initialized to zero,  
page and TLB faults are simulated and cause a transfer to the interruption vector table (IVT), privileged instructions can  
be executed, privileged registers can be accessed, and so on. A tricky issue for system-mode simulation is handling I/O  
because there are no real I/O devices to simulate! Instead, Ski provides a special interface using BREAK instructions to  
implement Simulator SystemCalls (SSC’s), which provide access to the console, keyboard, SCSI disk and Ethernet  
devices. A system-mode IA-64 program can’t access the underlying operating system; it “thinks” it’s running on a real IA-  
64 computer.  
A system-mode IA-64 program must provide interruption handlers. The program must create a valid Interruption Vector  
Table (IVT) and set the Interruption Vector Address (IVA) accordingly. You can test your interruption code by creating  
code that generates conditions corresponding to internal faults, traps, and interrupts, such as divide-by-zero and page-not-  
present. To test code for external interrupts, use the inter-processor interruption mechanism, as defined by the IA-64 archi-  
tecture manual. Example assembly code for this is shown in Figure 6-1. Timer interruptions can be simulated using the  
Simulator System Call mechanism.  
ssm 0x6000  
mov cr.lid=r0  
// Set psr.i and psr.ic to 1  
// For processor 0  
movl r4=0xfee00000 // Interrupt block base for proc 0  
mov r5=0x10  
st8 [r4]=r5  
// Interrupt vector 16  
// Code branches to iva+0x3000 (the external  
// interrupt handler). irr0{16} is set to 1,  
// ivr = 0x10  
Figure 6-1. Example Code to Simulate an External Interrupt  
6.3.2  
System-Mode IA-32 Programs  
Ski does not support IA-32 programs running in system-mode.  
6.3.3  
System-Mode TLB Simulation  
The simulator provides facilities for modeling the TLB’s (Translation Lookaside Buffers) for system-mode programs.  
6.3.3.1  
sit  
Summary of TLB Display Commands  
sdt  
When a system-mode IA-64 program is loaded, these commands display information from the Instruction Translation  
Lookaside Buffer (ITLB) and Data Translation Lookaside Buffer (DTLB), respectively. The simulator displays the  
entire selected TLB (Translation Registers and the Translation Cache) on the screen, as shown in Figure 6-2.  
The “V” and “RID” columns represent the V (valid) bit and Region Identifier, respectively, for each TLB entry. The  
Virtual Page” and “Physical Page” columns show the actual address translation handled by each TLB entry.  
The “PgSz”, “ED”, “AR”, “PL”, “D”, “A”, “MA”, and “P” columns represent the Page Size, Exception Deferral, Access  
Rights, Privilege Level, Dirty Bit, Accessed Bit, Memory Attribute, and Present fields, respectively, for each TLB  
entry. Finally, the “KEY” column represents the Protection Key for each TLB entry. A blank line separates the  
Translation Registers (TR’s) from the Translation Cache (TC). The number of TR’s and the size of the TC is  
implementation-dependent. Current versions of Ski provide 16 TR’s and 128 entries for the TC but this may change.  
If the precise value is important, check the release notes.  
6-2  
Program Simulation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 6-2. sdtCommand Output in xski  
6.4  
Misaligned Data Access Trap  
If the psr.ac bit is set, the IA-64 architecture requires alignment checks on memory accesses; i.e., when data accesses are  
made to items larger than a byte, the appropriate number of low-order address bits must be zero. If the bit is clear, the IA-  
64 implementation may choose whether or not to make such checks; Ski chooses to make the checks for references from  
IA-64 code. When an IA-64 program attempts an misaligned access, the behavior of the simulator depends on whether it  
is running in application-mode or system-mode (see Chapter 6, “Program Simulation”). In application-mode, the simula-  
tor stops the program and displays an error message. In system-mode, the simulator traps to the unaligned access vector.  
6.5  
Program Loading  
The Ski simulator supports loading IA-64 programs in the standard IA-64 ELF executable format and in MS-DOS .com  
and .exeformats. ELF files contain enough information to allow the simulator not only to load the program and its data,  
but also to build a symbol table, properly structure virtual memory, and initialize the screen and ipwith the proper values.  
For IA-64 Linux programs, the psr.be bit is always initialized to zero, indicating that the program will run with little-  
endian byte-order.  
The MS-DOS formats do not include symbol table information. Instead, you must supply the information in the form of a  
mapfile compatible with those created by Microsoft’s “ML” linker. If you don’t provide Ski with a mapfile, no program-  
defined symbols will be available. The MS-DOS formats do not specify where to place the program in memory. You must  
provide this information to Ski yourself. The .comformat is very basic and is supported with the ialoadand romload  
commands, described in Section 6.5.2, “Summary of Program Loading Commands”. The .exe format contains header  
information that is used by the ialoadcommand and ignored by the romloadcommand. For this reason, .exefiles are  
not useful in system-mode simulation. For IA-32 programs, only IA-32 (little-endian) byte ordering is supported.  
6.5.1  
How to Load a Program  
There are two ways to load a file. The first way is to run the simulator with a IA-64 (not IA-32) executable program file-  
name as an argument. The file will be loaded immediately after the simulator initializes itself and before any command file  
specified with the -iflag is executed. (See Chapter 9, “Command Files” and Section 2.5.1, “Command Line Flags”.) An  
Copyright © 2000 Hewlett-Packard Co.  
Program Simulation  
6-3  
Ski IA-64 Simulator Reference Manual 1.0L  
example is “xski my_program”. The second way is to use the load, iaload, or romload commands, which take the  
filename as the first argument, for example, “load my_program”.  
6.5.2  
Summary of Program Loading Commands  
loadfilename [args]+  
Prepare for IA-64 application-mode simulation: Load the file specified by filename and prepares to pass the program  
args encoded using the C-language argc/argv mechanism. The file must be an IA-64 ELF file.  
ialoadfilename address [mapfile [args]+]  
Prepare for IA-32 application-mode simulation: Load the IA-32 executable file specified by filename, which must be  
an MS-DOS .com or .exe file and prepare to pass the program args encoded using MS-DOS command line  
argument conventions. The address specifies where Ski should load the program. This should be a physical address;  
virtual addressing is only supported for system-mode programs. The value you provide is used, along with  
information from the .exefile or MS-DOS defaults for a .comfile, to setup the IA-32 execution environment, such  
as segment descriptors, the stack pointer, etc. The mapfile is an ASCII text file providing the mappings between  
symbols and addresses; it must be compatible in format with the mapfile produced by the Microsoft “ML” linker. The  
psr.is bit is set.  
romloadfilename address [mapfile]  
Prepare for IA-64, IA-32, or mixed system-mode simulation: Load the MS-DOS .com-format file specified by  
filename. (The MS-DOS .comformat is essentially raw binary.) Address and mapfile are as described for the iaload  
command above. The address can be physical or virtual, depending on the setting of the psr.it bit, as described in  
Section 4.4.1.3, “Addresses”.  
6.5.3  
Notes about Program Loading  
6.5.3.1  
Adding Information after Loading  
Sometimes, the load file doesn’t contain enough information. In this case, you can use a command file (see Chapter 9,  
“Command Files”) to add more information. You execute the command file at the appropriate time, generally after loading  
the program. For example, perhaps you want to test how an application program handles error conditions that are hard to  
create in a “real” hardware environment. You could load the program and use a command file to create the error condition.  
Then you would run the program and test its behavior.  
As another example, perhaps you want to simulate the transfer of control from a bootstrap program, an interrupt, or an  
application program to the operating system. You could load the operating system as a system-mode program and use a  
command file to set up memory and registers to their appropriate state at the instant of the control transfer.  
6.5.3.2  
Creating the argc, argv, and envp Parameters  
The first time an application-mode simulated program starts, it receives command line parameters and environment vari-  
ables using the C language argc/argv/envp mechanism. (IA-32 application-mode programs do not receive environment  
variables.) By default, the program receives the same command line parameters you gave to Ski when you started it. For  
example, if you invoked Ski as “xski my_program foo bar”, Ski would start up using the X Window System interface,  
load the executable IA-64 program my_program, and use “foo”, “bar”, and environment variables to initialize the argc,  
argv and envp parameters passed on the memory stack. The environment variables are a copy of the variables Ski received  
from the shell when it started.  
Instead of specifying the executable program on Ski’s invocation line as in the example above, you can use the loador  
ialoadcommands to load the executable program. You can add extra arguments to loadand iaload. Later, when you  
invoke the runcommand, Ski will pass the extra arguments to the simulated program as command line parameters. For  
example, you could issue the command “load my_program foo bar”. When you run the program, Ski would pass  
foo” and “bar” to the program as command line parameters using the argc/argv/envp mechanism. Note that IA-32 appli-  
cation-mode programs must be loaded with the ialoadcommand; they cannot be loaded from the Ski invocation line.  
6-4  
Program Simulation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
6.6  
Program Execution  
Programs may be run in their entirety without interruption, they may be stopped at appropriate places (see Section 8.3,  
“Program Breakpoints”) and continued, or they may be single-stepped for debugging purposes. The different program  
execution choices are described below.  
You can stop a running simulation in ski at any time with your interrupt character (usually ^C). The interrupt will be hon-  
ored at the beginning of simulation of the next instruction. xski and bski do not have interrupt handlers; if you use your  
interrupt character while they are running, they will be terminated by the operating system.  
6.6.1  
Summary of Program Execution Commands  
run  
Starts / restarts execution of a program at the current ipvalue. Generally used after a breakpoint is encountered.  
cont  
Same function as the runcommand. The mnemonic stands for “continue”.  
step[count]  
With no argument, executes a single instruction. If a count is specified, executes count instructions.  
step untilexpression  
Steps through your program until the specified expression has a non-zero value. Because the expression must be  
evaluated before each simulated instruction, you may notice a slowdown in Ski’s simulation speed. This command  
can be used to implement data write breakpoints, with the caveat that it won’t detect the case where the write doesn’t  
change the value. This can be useful when you are tracking down a memory corruption problem: you can use “step  
until r33!=r32”, for example. Another example of this command is breaking into a loop after a certain number of  
iterations: “step until r35<=30”. (See Section 4.4.1.2, “Expressions”.)  
Copyright © 2000 Hewlett-Packard Co.  
Program Simulation  
6-5  
Ski IA-64 Simulator Reference Manual 1.0L  
6-6  
Program Simulation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
7
Linux and MS-DOS ABI Emulation  
As discussed in Section 6.1, “Application-Mode and System-Mode Simulation”, Ski can provide application programs  
with a Linux-compatible or MS-DOS-compatible environment. The environments aren’t full-blown operating system  
emulations, however. The most common OS functions are provided, as described below.  
7.1  
Interruptions  
The IA-64 architecture defines a large set of interruption types, including faults, traps, and interrupts. Interruptions may  
happen asynchronously, during an instruction, or between instructions. Like application programs running on a “real”  
Linux machine, IA-64 application-mode programs in Ski never see interruptions. Instead, Ski translates interruptions into  
the signal that a real IA-64 Linux kernel would generate. For example, a memory access violation gets translated into the  
SIGSEGV signal. Similarly, if Ski receives a keyboard signal such as the SIGINT generated (usually) by control-C, it  
passes this signal on to the IA-64 application. Ski does not accurately simulate the siginfoand sigcontextstructures  
that a real IA-64 Linux kernel would pass to a signal handler. Thus, applications relying on either of these parameters can-  
not be simulated in Ski application mode.  
7.2  
Linux Application Environment  
Ski provides a commonly-used subset of the Linux environment to IA-64 application-mode programs. Both statically  
linked and dynamically linked programs are supported. The argc, argv, and envp parameters are created on the stack as  
described in Section 6.5.3.2, “Creating the argc, argv, and envp Parameters”. Ski initializes the IA-64 registers like this:  
sppoints to the top of the stack.  
bsp, and bspstoreare initialized in the same way the IA-64 version of Linux is likely to do.  
rsc.pl is initialized to 3.  
rsc.be and psr.be are cleared.  
Ski supports the Linux system calls shown in Table 7-1. This list is subject to change; consult the release notes for the lat-  
est information. The data passed between the application program and the simulated Linux environment is interpreted as  
64 bit (LP64) quantities.  
Copyright © 2000 Hewlett-Packard Co.  
Linux and MS-DOS ABI Emulation  
7-1  
Ski IA-64 Simulator Reference Manual 1.0L  
Table 7-1. Linux System Calls Supported by Ski  
accept  
access  
acct  
adjtimex  
chmod  
bind  
brk  
chdir  
chown  
chroot  
clone (fork & vfork)  
dup2  
close  
connect  
exit  
dup  
execve (IA-32 & IA-64)  
fchown  
fchdir  
fchmod  
fcntl  
fdatasync  
fsync  
flock  
fstat  
fstatfs  
ftruncate  
geteuid  
getcwd  
getdents  
getgroups  
getpgid  
getresgid  
getsid  
getegid  
getgid  
getitimer  
getpid  
getpagesize (4KB)  
getppid  
getpeername  
getpriority  
getrusage  
gettimeofday  
kill  
getresuid  
getsockname  
ioctl  
getrlimit  
getsockopt  
ioperm  
getuid  
lchown  
lstat  
link  
listen  
lseek  
mkdir  
mknod  
mmap  
mmap2  
msgget  
nanosleep  
poll  
mount  
mprotect  
msgsnd  
mremap  
msync  
msgrcv  
open  
personality  
pwrite (not atomic)  
reboot  
pipe  
pread (not atomic)  
readv (not atomic)  
recvmsg  
rt_sigpending  
sched_get_priority_min  
sched_setparam  
semget  
read  
readlink  
recvfrom  
rt_sigaction  
sched_get_priority_max  
sched_rr_get_interval  
select  
recv  
rename  
rmdir  
rt_sigprocmask  
sched_getparam  
sched_setscheduler  
semop  
rt_sigsuspend  
sched_getscheduler  
sched_yield  
send  
sendmsg  
setfsuid  
setitimer  
setresgid  
setsid  
sendto  
setdomainname  
setgroups  
setpriority  
setreuid  
setfsgid  
sethostname  
setregid  
setrlimit  
setuid  
setgid  
setpgid  
setresuid  
setsockopt  
shmdt  
settimeofday  
shmget  
shmat  
shutdown  
stat  
sigalstack  
statfs  
socket  
socketpair  
swapon  
swapoff  
syslog  
symlink  
truncate  
unlink  
sync  
times  
umask  
umount  
uname  
ustat  
utimes  
vhangup  
wait4  
write  
writev (not atomic)  
Ski accepts but ignores the system calls shown in Table 7-2. For those that return an error indication, the errno code is  
shown in parentheses. All other ignored system calls return with a success indication, having done nothing.  
Table 7-2. Linux System Calls Accepted but Ignored by Ski  
_sysctl (ENOSYS)  
create_module (ENOSYS)  
init_module (ENOSYS)  
prctl  
bdflush (ENOSYS)  
delete_module (ENOSYS)  
msgctl (ENOSYS)  
capget  
capset  
get_kernel_syms (ENOSYS)  
munlockall  
getpmsg  
nfsservctl  
ptrace (EOPNOTSUPP)  
rt_sigqueueinfo  
putpmsg  
query_module (ENOSYS)  
semctl (ENOSYS)  
sysinfo (ENOSYS)  
quotactl (ENOSYS)  
sendfile  
rt_sigtimedwait  
sysfs (ENOSYS)  
shmctl (ENOSYS)  
All other system calls are unsupported. When an IA-64 application-mode program makes an unsupported system call, the  
simulator stops the simulation and displays an error message.  
7-2  
Linux and MS-DOS ABI Emulation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
7.3  
MS-DOS Application Environment  
IA-32 application-mode programs “see” a limited MS-DOS environment. The MS-DOS environment is emulated by cre-  
ating and initializing an MS-DOS Program Segment Prefix (PSP) and by setting up the stack pointer (iasp) and segmen-  
tation registers. The arguments you gave with the ialoadcommand, such as “iaload my_program foo bar baz”, are  
placed in the PSP as if they were command line parameters.  
Ski supports the MS-DOS “INT 20” call to terminate the simulated program and the “INT 21” system calls shown in  
Table 7-3. When an IA-32 program makes an INT 21call that’s not supported, the simulator stops the simulation and dis-  
plays an error message.  
Table 7-3. MS-DOS System Calls (in Hexadecimal) Supported by Ski  
00: terminate program  
09: display string  
02: display character  
08: read keyboard without echo  
2c: get time  
2a: get date  
30: get version number  
3e: close file with handle  
44: device status control  
51: get PSP address  
3c: create file with handle  
3f: read file or device  
3d: open file with handle  
40: write file or device  
4c: end program  
44, sub-function 0: get device data  
62: get PSP address (same as 51)  
7.4  
Program I/O  
Your program may need to read from standard in (stdin: file descriptor 0) and write to standard out (stdout: file descriptor  
1) and standard err (stderr: file descriptor 2). As with all Linux programs, these file descriptors are connected, by default,  
to your keyboard and screen. You can redirect them in the usual way: when you invoke Ski, use the < and > operators rec-  
ognized by most Linux shells. For example, “bski -noconsole my_program foo bar baz < test_input  
>simulated_output” runs bski, loading the IA-64 program file my_programand passing it the arguments foo, bar  
and bazvia the argc/argv mechanism. Because no command file was provided via the -iflag (described in Section 2.5.1,  
“Command Line Flags”), bski internally generates a runcommand followed by a quitcommand. The (simulated) pro-  
gram reads on standard in from the file test_inputand writes on standard out to the file simulated_output. Having  
not been redirected, writes to standard err go to the default place, normally the terminal screen.  
Copyright © 2000 Hewlett-Packard Co.  
Linux and MS-DOS ABI Emulation  
7-3  
Ski IA-64 Simulator Reference Manual 1.0L  
7-4  
Linux and MS-DOS ABI Emulation  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
8
Debugging  
The simulator provides many facilities to help you debug your programs. You can modify the current state of the simu-  
lated processor, set program breakpoints, trace program execution, and dump a memory image into a file.  
8.1  
Changing Registers and Memory with Assignment Commands  
Use the =command to assign a value to a register. The =command takes two arguments: the first is the name of a register  
and the second is the value to be assigned.  
To change the contents of memory, you use one of five different commands, depending on whether you want to set a byte,  
two bytes, four bytes, eight bytes, or a C-language string (a sequence of bytes terminated by a byte with the value zero, the  
“null” byte). The commands are =1, =2, =4, =8, and =srespectively. Each command takes at least two arguments (some  
take more): an address or symbol or expression resolving to an address, and the new value you want placed there.  
8.1.1  
Summary of Assignment Commands  
= register_name value  
The value is assigned to the register specified by register_name. The old value is lost. Unless a modifying prefix such as  
0d, 0b, or 0ois used, value will be treated as a hexadecimal number. Floating point registers must be set piecewise, using  
the register name (f2through f127) followed by a .sto set the sign, .mto set the mantissa, or .eto set the exponent. The  
first general register, r0, is “hardwired” to 0 and any attempt to assign to it will be rejected. Similarly, floating registers f0  
and f1are “hardwired” to be 0.0 and 1.0, respectively, and predicate register p0is “hardwired” to 1 and they too cannot be  
changed. Some IA-64 registers are read-only according to the IA-64 architecture specification, but all non-hardwired reg-  
isters are writable with Ski’s =command to assist your debugging.  
=1 address value+  
=2 address value+  
=4 address value+  
=8 address value+  
The value is assigned to the specified location in memory. The old value at the location is lost. The location may be on  
any allocated page, including instruction pages, as discussed in Section 8.1.3.3, “Page Allocation”. Multiple values,  
separated by spaces, may be supplied; if so, they will be assigned to sequential memory addresses. Unless a  
modifying prefix such as 0d, 0b, or 0ois used, value will be treated as a hexadecimal number.  
The =1command truncates any extra high-order bytes of the value to make a single byte. The =2command truncates  
or pads (with zero) the high order bytes of the value as necessary to make a two-byte quantity. Similarly, the =4and  
=8commands truncate or pad high order bytes to make four- and eight-byte quantities, respectively.  
The =2, =4, and =8 commands respect the current value of the psr.be bit, which controls whether multi-byte data  
memory references are big-endian (if the bit is set) or little-endian (if the bit is clear). The bit also controls the format  
of data display in the Data Window (see Section 3.6, “The Data Window”). You can set the psr.be bit with the  
command “= psr.be 1” and you can clear it with “= psr.be 0”.  
Ski supports physical and virtual addressing. For more information, see Section 4.4.1.3, “Addresses”.  
=s address string_without_spaces+  
The string_without_spaces is assigned to memory locations starting at the location specified by address. A null byte  
is added to the end of the string automatically. The old value at the location is lost. The location may be on any  
allocated page, including instruction pages, as discussed in Section 8.1.3.3, “Page Allocation”. Multiple values may  
be supplied, separated by a space. The strings may not contain spaces and quoting it is not a workaround.  
8.1.2  
Examples of Assignment Commands  
= r1 1234  
Copyright © 2000 Hewlett-Packard Co.  
Debugging  
8-1  
Ski IA-64 Simulator Reference Manual 1.0L  
The hexadecimal value 0x1234 is assigned to general register 1. The six upper (more significant) bytes are padded  
with zeroes.  
= r1 ip+10  
The value in ipadded to 0x10 is assigned to general register 1.  
= f2.m 1234 ; = f2.s 1 ; = f2.e 10033  
The hexadecimal value 0x300330000000000001234 is assigned to floating register 2. The register now encodes the  
decimal value of -2.2754, approximately. The “= f2.m 1234” part sets the mantissa (the 64 low-order bits). The “=  
f2.s 1” part encodes the mantissa sign (the most significant of the 82 bits). The “= f2.e 10033” encodes the 17  
exponent bits (which fit between the sign bit and mantissa bits), using a bias of 65,535 (0xffff).  
=4 __data_start+30 0d10 13feffff b3  
The decimal value 10 is assigned to the four bytes starting 48 bytes past the location of the symbol “__data_start”.  
Because the value 10 occupies only one byte, three high-order zero bytes will be padded in, so the actual value  
assigned will be 0x0000000a. The value 13feffff is assigned to the four bytes starting 52 bytes past the location of  
__data_start. The lower four bytes of branch register 3 will be copied into the four bytes starting 56 bytes past the  
location of __data_start. (To assign the value 0xb3, use the 0xprefix.)  
=s main ThisProgramIsBroken  
The string “ThisProgramIsBroken” with a null byte appended is placed in memory overwriting the instructions at the  
start of the program, as shown in the “before” and “after” views of Figure 8-1 and Figure 8-2. (The symbol “main” tradi-  
tionally marks the first instruction of a user program written in the C language.) The instructions previously at that loca-  
tion are lost. If you attempt to run the program, it will almost certainly fail! Note that the string is not quoted and has no  
whitespace.  
Figure 8-1. The Original Program Loaded in ski  
8-2  
Debugging  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 8-2. The Program After Assigning a String in ski  
8.1.3  
Notes on Assignment  
8.1.3.1  
Address Alignment  
Ski aligns addresses on natural boundaries: two-byte quantities are aligned on addresses divisible by two, four-byte quan-  
tities are aligned on addresses divisible by four, and eight-byte quantities are aligned on addresses divisible by eight. For  
example, the command  
=4 __data_start+1 0x12345678  
results in the message  
Non word-aligned address. Aligned to 0x6000000000001000  
and the value is assigned starting one byte before the requested address. (“__data_start” is a program-defined symbol  
for 0x6000000000001000.)  
8.1.3.2  
Bit-encoded Registers  
Many registers are bit-encoded. You can assign to individual bits or to entire registers. For example, you can set the psr.it  
bit with this:  
= psr.it 1  
and you can set the entire Processor Status Register (psr) with this:  
= psr 1234567890abcdef  
A complete list of the registers and bits Ski recognizes is in Section B.1, “IA-64 Registers”.  
8.1.3.3  
Page Allocation  
Virtual memory is simulated only for system-mode programs. In system-mode, your program is responsible for page allo-  
cation. In application-mode, Ski handles page allocation for you. Either way, if you try to assign data to a non-existent  
page using the assignment commands, Ski will refuse, with an error message. The assignment commands never cause a  
TLB miss or replacement.  
Copyright © 2000 Hewlett-Packard Co.  
Debugging  
8-3  
Ski IA-64 Simulator Reference Manual 1.0L  
8.2  
Evaluating Formulas and Formatting Data  
The evalcommand evaluates one or more expressions and prints the result(s) in decimal and hexadecimal. An example  
of the evalcommand and a more complete discussion are in Section 4.4.1.2, “Expressions”.  
8.2.1  
Summary of The evalCommand  
eval expression+  
Evaluate the expression(s) and print the result(s) on the screen. If the expression is simply a register name, the value is  
display in the appropriate format: decimal, hexadecimal, or symbolically, depending on the kind of register. If the  
expression has any operators, the result is displayed in decimal and hexadecimal. For example, “eval ip” causes the  
current value of the ipregister to be displayed symbolically or in hexadecimal. But “eval +ip” causes the value to  
be printed out in hexadecimal and decimal.  
8.3  
Program Breakpoints  
Program breakpoints are “marks” within the executable code of a program that cause simulation to halt when they are  
encountered in the normal flow of a running program. When simulation stops because of a breakpoint, the instruction  
pointer (ip) is pointing to the instruction at which the breakpoint is set (before the instruction is executed) and control is  
returned to you.  
The simulator provides several commands to let you manipulate program breakpoints. These commands are explained in  
detail below.  
8.3.1  
Setting Program Breakpoints  
To set a breakpoint in IA-64 code, use the bscommand. For IA-32 code, use the iabscommand. If given with no argu-  
ments, these commands set a breakpoint at the instruction pointed to by the ipregister. If an address is given following the  
command, the breakpoint is set at that address. The address must be valid when Ski resumes simulation; Ski will refuse to  
simulate code if any breakpoints are set at non-existent addresses. You can set breakpoints in system-mode programs  
using physical or virtual addresses. See Section 6.1, “Application-Mode and System-Mode Simulation” for information  
about system-mode programming and Section 4.4.1.3, “Addresses” for information on physical vs. virtual addressing.  
Up to ten breakpoints may be set at any one time. They are indicated by the digits “0” through “9” in the first column of  
the program window, as the example in Figure 8-3 shows.  
8-4  
Debugging  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 8-3. Three Breakpoints, 0, 2, and 1, Visible in xski’s Program Window  
8.3.2  
Deleting Program Breakpoints  
Two commands delete program breakpoints. The bdcommand deletes a specified breakpoint. The bDcommand deletes all  
breakpoints currently set.  
8.3.3  
Listing Program Breakpoints  
The blcommand causes a list of currently set program breakpoints to be displayed on the screen, symbolically if possible,  
as shown in Figure 8-4. The first column of the display shows the breakpoint number, for use with the bdcommand. The  
second column displays a “P” for physically-addressed breakpoints and “V” for virtually-addressed breakpoints. The col-  
umn labelled “Address” is, of course, the breakpoint address. In the next column, “IA-64” indicates a breakpoint in IA-64  
code and “IA-32” indicates a breakpoint in IA-32 code. The “Command” column is currently unused.  
Copyright © 2000 Hewlett-Packard Co.  
Debugging  
8-5  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 8-4. xski’s Breakpoint List Window Showing IA-64 and IA-32 Breakpoints  
8.3.4  
Notes on Program Breakpoints  
8.3.4.1  
How Ski Implements Breakpoints  
Program breakpoints are implemented by replacing the instruction at the address of each breakpoint with an IA-64  
BREAK instruction or an IA-32 INT3 instruction. The replacement is done at the time the program is started or restarted  
(e.g., with cont) and the original instructions are replaced when the program halts. Thus, if your program reads the loca-  
tion where a breakpoint is set, it will retrieve the BREAK or INT3 instruction instead. Ski detects if your program attempts  
to write new data into the breakpoint location and automatically reinstalls the breakpoint after such an update.  
You need to tell Ski where to set your IA-64 breakpoints but the IA-64 architecture doesn’t provide for addressability of  
individual instructions. Instead, instructions are bundled. To work around this, Ski “pretends” that the slot 0 instruction of  
a bundle is in the first four bytes of the bundle’s location, the slot 1 instruction is in the second four bytes of the bundle,  
and the slot 2 instruction is in the third four bytes of the bundle. You can only set breakpoints at these “pretend” locations.  
For example, setting a breakpoint at “main”, “main+1”, “main+2”, and “main+3” all result in the breakpoint being set on  
the first instruction in the bundle at “main”. Similarly, “main+5”, “main+6”, and “main+7” all correspond to “main+4”,  
and “main+9”, “main+a”, and “main+b” all correspond to “main+8”, If you try to set a breakpoint at the remaining bytes  
in the bundle (“main+c”, “main+d”, “main+e”, and “main+f” in this example), Ski will generate the error message  
Illegal slot field in breakpoint address”. Ski can place IA-32 breakpoints at any byte address. If the break-  
point address doesn’t correspond to the beginning of an IA-32 instruction, Ski’s behavior is undefined.  
8.3.4.2  
Unexpected Breakpoints  
The IA-64 breakpoint mechanism uses BREAK.M 0, BREAK.I 0, BREAK.B 0, and BREAK.F 0, and BREAK.X 0 instructions.  
These are special cases and executing these instructions will not cause “BREAK instruction trap” interrupts for system-  
mode programs. The same is true for INT3 instructions in IA-32 code. However, if Ski finds BREAK or INT3 instruction at  
a location which doesn’t correspond to a breakpoint, Ski’s behavior depends on whether the program is simulating in  
application-mode or system-mode. Application-mode programs should never generate, or expect to receive, interrupts. If  
Ski reaches a BREAK or INT3 instruction in an application-mode program at a location which doesn’t correspond to a  
breakpoint, simulation halts and Ski displays an error message. System-mode IA-64 programs will receive the BREAK  
interrupt.  
8.3.5  
Summary of Program Breakpoint Commands  
bs[address]  
Sets an IA-64 breakpoint at the specified address or, if no address is given, at the location pointed to by ip.  
8-6  
Debugging  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
iabs[address]  
Sets an IA-32 breakpoint at the specified address or, if no address is given, at the location pointed to by ip.  
bdbreakpoint_number  
Deletes the breakpoint numbered by breakpoint_number.  
bD  
Deletes all breakpoints.  
bl  
Displays a list of currently set breakpoints.  
8.4  
Data Breakpoints  
Data breakpoints can be viewed as temporary access restrictions on an area of data. Access of a datum within the specified  
area causes a running program to halt at the instruction which attempted the access. Control is then returned to the user at  
command level.  
The simulator allows up to ten areas to be specified within which data breakpoints may be set. They may vary in size from  
one byte to an entire region. Further, the area may be specified to cause a break either only on reads, writes, or on both  
reads and writes. Several commands apply to the manipulation of these data breakpoints.  
8.4.1  
Setting Data Breakpoints  
The dbscommand sets data breakpoints. The command requires two arguments and accepts an optional third argument.  
The first argument is the starting address of the area which is associated with the break. The second argument specifies the  
length of the area (in bytes). The third argument, if present, is the string rw(default), which indicates that the break is to  
occur on both reads or writes, r, which indicates that only reads cause breaks, or w, which indicates that only writes cause  
breaks.  
8.4.2  
Deleting Data Breakpoints  
Two commands delete data breakpoints. The dbD command deletes all data breakpoints currently set. It takes no argu-  
ments and requires no verification from the user. The dbdcommand deletes the data breakpoint with the number specified  
by the argument.  
8.4.3  
Listing Data Breakpoints  
The dblcommand causes a list of currently set data breakpoints to be displayed on the screen, symbolically if possible.  
8.4.4  
Summary of Data Breakpoint Commands  
dbsaddress length [type]  
Sets a data breakpoint at the specified address. The length of the area (in bytes) is set to length. Type is the string rw  
(default) specifying breaks on reads or writes, r, specifying breaks on reads only, or w, specifying breaks on writes  
only.  
dbdnumber  
Deletes the data breakpoint numbered by number.  
dbD  
Deletes all data breakpoints.  
dbl  
Displays on the screen a list of currently set data breakpoints.  
Copyright © 2000 Hewlett-Packard Co.  
Debugging  
8-7  
Ski IA-64 Simulator Reference Manual 1.0L  
8.5  
Dumping Registers and Memory to a File  
You can dump the registers to a file with the “rd” command, described in Section 5.1, “Register Window Commands”.  
You can dump a block of memory into a file in two forms: in hexadecimal or in symbolic disassembled form, correspond-  
ing (roughly) to the formats in the Data Window and the Program Window, respectively. The commands to do this are  
dd” and “pd” and are described in Section 5.3.1, “Summary of Data Window Commands” and Section 5.2.1, “Summary  
of Program Window Commands”, respectively.  
8.6  
Saving and Restoring the Simulator State  
You may need to interrupt a simulation session and continue it later. For example, you might be tracking down a difficult  
bug and want to save the state of the simulator just before the bug occurs so you can replay the problem and try different  
strategies. The savecommand saves the state of the currently executing program to a named disk file. Later, you restore  
the saved file with the rest command or the -rest command line flag (described in Section 2.5.1, “Command Line  
Flags”).  
The savecommand saves the state of the simulated IA-64 processor, including the overlaid IA-32 registers, the symbol  
table for program-defined symbols, and memory. Certain simulator state information, in particular the values of internal  
variables and window-related information, is not saved. Linux and MS-DOS state information such as open file handles  
and fseekpointers is not currently saved; this will probably change, so you should check the release notes.  
8.6.1  
Summary of Save and Restore Commands  
save filename  
Saves an image of the machine state (IA-64 and IA-32) in the specified file.  
rest filename  
Restores an image of the machine state (IA-64 and IA-32) from the specified file.  
8.7  
Symbol Table Commands  
Ski supports two kinds of symbols: program-defined symbols, which are identifiers provided by a compiler, linker, or  
human programmer (see Section 4.4.2.1, “Program-Defined Symbols”), and internal symbols, which include register  
names and internal variables (see Section 4.4.2.2, “Registers” and Section 4.4.2.3, “Internal Variables”). Ski places pro-  
gram-defined symbols in one symbol table; you can see the contents with the symlistcommand. For IA-64 programs,  
the ELF executable file always contains symbols, regardless of whether you used your compiler’s debug symbols flag  
(typically -g), unless you stripped the symbols. Internal symbols are stored in a second symbol table along with the regis-  
ter names Ski recognizes, listed in Appendix B, “Register Names”. The isyms command displays the contents of this  
table.  
8.7.1  
Summary of Symbol Commands  
symlist[filename]  
Shows the list of program-defined symbols sorted by ascending address, as seen in Figure 8-5. If filename is given,  
the list is written to the named file, otherwise the list is written to the screen.  
8-8  
Debugging  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Figure 8-5. The symlistOutput from xski  
isyms[filename]  
Writes the list of internal variables to filename if given, otherwise to the screen.  
Copyright © 2000 Hewlett-Packard Co.  
Debugging  
8-9  
Ski IA-64 Simulator Reference Manual 1.0L  
8-10 Debugging  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
9
Command Files  
The dot (“.”) command temporarily redirects command input to the simulator so that input is taken from the file provided  
as an argument to the command. Into this file (a “command file”), you put commands as if you had typed them from the  
keyboard. Several commands are specifically applicable to command files and are described below. Command files may  
be nested; i.e., one command file may invoke another. The maximum nesting depth is operating-system-dependent.  
Some syntax rules that apply to keyboard input don’t make sense or would be cumbersome in command files. Most nota-  
bly, in ski, a shortcut for re-executing the previous command is to hit the enter/return key on an empty line. This rule is  
removed in command files, so you are free to put in blank lines for readability. You can also indent lines as necessary.  
The ability to assign values to registers and memory and the flow control features provide the simulator with a powerful  
Church-Turing-complete command language; i.e., tasks which can be accomplished in any programming language, sub-  
ject to memory constraints, can be accomplished in the command language of the simulator. Command files are particu-  
larly appropriate for initializing the state of the simulator and for implementing complex facilities on top of Ski’s native  
commands. For example, you can write command files to setup the machine state just before an I/O interrupt, to create  
sophisticated breakpointing, and to take complex performance measurements.  
9.1  
Initialization File  
If you start Ski with a -ioption followed by a filename, the named file will be executed as a command file before the first  
prompt (see Section 2.5.1, “Command Line Flags”). This feature is particularly important for bski, because without a  
command file to guide it, bski will only runyour program and then quit. If you want to do anything else, you need a  
command file. When you combine the -ioption with Ski’s ability to load a program on the command line, you can create  
a powerful debugging environment. For example, this command line:  
bski -i test.init -stats -icnt instruction_counts  
combined with this test.initcommand file:  
load ia_test 0x26c50  
romload test.com etext test.map  
uses the command file test.initto load an IA-64 Platform Support File named ia_test(filling in Ski’s symbol table  
for program-defined symbols), and then loads the IA-32 system-mode program test.com, putting it at the location corre-  
sponding to the symbol “etext” in ia_test. The command file finishes and bski automatically executes a run com-  
mand followed by a quitcommand. To start the run, the ia_testprogram receives 0x26c50 as its argv[1] value. This  
corresponds to the value of the symbol “etext” and tells ia_test where test.com was loaded. The IA-64 program  
completes its initialization and transfers control to the IA-32 program, setting the psr.is bit appropriately. When the IA-32  
program completes, bski prints out end-of-run performance statistics and writes an instruction frequency count to the file  
instruction_counts.  
9.2  
Labels and Control Flow in Command Files  
Command files are useful as macro sequences of simple commands and, more interestingly, to create small programs that  
do useful things for you: create formatted displays of data structures, create complete breakpoints, and gather run-time  
statistics, for example. Two commands provide the ability to change the flow of control in a command file: gotoand if.  
9.2.1  
The gotoCommand and Labels  
A label identifies a particular line in a command file. Labels are defined in Section 4.4.2.4, “Labels”. No other text can  
appear on a label line.  
The goto command takes a label as an argument and searches the command file for a line with that label. Execution  
resumes at the first command after the label. There is no good reason to have a label appear more than once in a particular  
command file; if this condition occurs, only the first occurrence of the label will be noticed and all subsequent occurrences  
will be ignored. The gotocommand can only be executed in a command file. A gotomay go forward or backward. An  
Copyright © 2000 Hewlett-Packard Co.  
Command Files  
9-1  
Ski IA-64 Simulator Reference Manual 1.0L  
example of using gotoand a label is:  
loop:  
... other commands ...  
goto loop  
9.2.2  
The ifCommand  
The if command allows for conditional execution. If the expression following the command evaluates to nonzero, the  
remainder of the line is executed; otherwise it is ignored. (No spaces are allowed in the expression.) For example, this  
command file steps through a IA-64 application-mode simulation 600 instructions at a time until the program finishes,  
printing the contents of general register 32 after each step:  
loop:  
step 600  
eval r32  
if !$exited$ goto loop  
quit  
If a colon surrounded by spaces is present on the line, the remainder of the line is taken to be an “else” clause. That is, if  
the ifexpression evaluates to nonzero, the remainder of the line up to but not including the colon is executed; if zero, that  
part of the line is ignored and execution continues immediately following the colon. For example, the following command  
file line sets the contents of general register 4 to zero or one depending on whether the sum of the contents of general inte-  
ger 1 and 2 are equal to the contents of the location pointed to by general register 13.  
if (r1+r2)==*r13 = r4 0 : = r4 1  
9.3  
Comments in Command Files  
To document command files, you can add comments– any characters following an octothorpe (also called a “pound sign”  
or “sharp sign” and shown, typically, as “#”) are ignored by the command interpreter. Examples of comments are in  
Figure 9-1.  
9.4  
An Example Command File  
Command files are easy to write. The command file in Figure 9-1 for computing Fibonacci numbers was written in less  
than five minutes and most of that time was spent making the comments correct.  
9-2  
Command Files  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
# Compute and print Fibonacci numbers from 1 to 50.  
# Initialize variables  
= r10 1  
= r11 1  
# Hold n-2’th value  
# Hold n-1’th value  
= r12 0  
= r13 0  
# Temporary holding place for n-1’th value  
# Loop counter  
# Print out first two Fibonacci numbers (initial values of r10 & r11)  
eval r10  
eval r11  
# Calculate and print the rest of the numbers. The last line has the  
# stopping value of the loop index. (This is a simple counting loop.)  
loop:  
eval +r11  
= r12 r11  
# “+” makes an expression: decimal and hex printing  
# Compute n’th Fibonacci term  
= r11 r11+r10  
= r10 r12  
= r13 r13+1  
# Increment loop counter  
if r13<0d50 goto loop # Loop again?  
Figure 9-1. An Example Command File to Compute Fibonacci Numbers  
9.5  
Summary of Command File Commands  
. filename  
Executes commands in the given command file. The file is opened and its contents are executed as if they were  
entered from the keyboard. When the contents of a non-nested command file are exhausted, xski and ski resume  
keyboard input and bski executes a runcommand followed by a quitcommand. When a nested command file is  
exhausted, control returns to the next-higher-level command file.  
if expression-without-spaces true-command  
if expression-without-spaces true-command : false-command  
In the first form, causes the rest of the line to be ignored if expression-without-spaces evaluates to zero. Otherwise,  
true-command is executed. In the second form, if expression-without-spaces evaluates to nonzero, the true-command  
is executed. Otherwise, the false-command is executed.  
The ifcommand may be executed from the keyboard. In combination with xski’s Command History (see Section  
3.7.1, “The xski Main Window”) or ski’s command repetition mechanism (see Section 3.7.2, “The ski Command  
Window”), this can be quite powerful.  
goto label  
In a command file (only), causes execution to continue following the first line in the file which contains the label.  
Goto’s may be forward or backward.  
#comment  
The “#” and all characters following it until the next newline are ignored.  
label:  
The colon (“:”) command marks a gotolabel. All characters following the “:” and preceding the next newline are  
ignored.  
Copyright © 2000 Hewlett-Packard Co.  
Command Files  
9-3  
Ski IA-64 Simulator Reference Manual 1.0L  
9-4  
Command Files  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
A
Command Reference  
In the command descriptions that follow, this faceindicates literal text you should type, this face indicates operand text  
you should modify, [bracketed text] indicates text you may choose to omit (never type the brackets), and the + symbol  
indicates items you may repeat. The syntax of the command language is described in Chapter 4, “Command Language”.  
The order in which commands appear here is the order in which they may be abbreviated: any command may be abbrevi-  
ated to as few letters as are needed to distinguish it from all commands preceding it in the list below. For example, the  
step” command may be spelled out in full or abbreviated as “ste”, “st”, or “s”. The “save” command can be spelled  
out in full or abbreviated as “sav” or “sa”. It can’t be abbreviated as “s” because it follows “step” in the list below.  
.filename  
Execute commands from the command file specified by filename. The file is opened and its contents are executed as  
if they were entered from the keyboard. When the contents are exhausted, ski and xski resume reading commands  
from the keyboard. bski, on the other hand, executes a runcommand and then a quitcommand (unless, of course,  
the command file already executed a quitcommand). Command files can be nested to a reasonable level. See Chap-  
ter 9, “Command Files”.  
#comment  
Comments may be used to help document the design and implementation of command files. A comment is any part  
of a line following an octothorpe (“#”). The octothorpe and everything following it on the line are ignored. See  
“Comments in Command Files” on page 9-2.  
label:  
Labels are targets for gotocommands and are valid only in command files. See “Labels and Control Flow in Com-  
mand Files” on page 9-1.  
=register_name value  
Assign value to the register specified by register_name. Unless a modifying prefix such as 0d, 0o, or 0b is used,  
value will be treated as a hexadecimal number. See “Changing Registers and Memory with Assignment Commands”  
on page 8-1. The register names recognized by Ski are listed in “IA-64 Registers” on page B-1.  
=1address value+  
=2address value+  
=4address value+  
=8address value+  
The value is assigned to the specified location in memory. The old value at the location is lost. The location may be  
on any allocated page, including instruction pages. Multiple values separated by whitespace may be supplied; if so,  
they will be assigned to sequential memory addresses. Unless a modifying prefix such as 0d, 0o, or 0bis used, value  
will be treated as a hexadecimal number. See “Changing Registers and Memory with Assignment Commands” on  
page 8-1.  
The =1command truncates any extra high-order bytes of the value to make a single byte. The =2command truncates  
or pads (with zero) the high order bytes of the value as necessary to make a two-byte quantity. Similarly, the =4and  
=8commands truncate or pad high order bytes to make four- and eight-byte quantities, respectively. The psr.be bit  
controls whether the data is stored in big-endian or little-endian format.  
=saddress string_without_spaces  
The string_without_spaces is assigned to memory locations starting at the location specified by address. A null byte  
is added to the end of the string automatically. The old value at the location is lost. The location may be on any allo-  
Copyright © 2000 Hewlett-Packard Co.  
Command Reference  
A-1  
Ski IA-64 Simulator Reference Manual 1.0L  
cated page, including instruction pages. Multiple values may not be supplied. The string may not contain spaces and  
quoting it is not a workaround. See “Changing Registers and Memory with Assignment Commands” on page 8-1.  
bs[address]  
Set breakpoint at the location specified by the current value of ipor at the specified address. (IA-64 code only) See  
“Setting Program Breakpoints” on page 8-4.  
bD  
Delete all breakpoints. See “Deleting Program Breakpoints” on page 8-5.  
bdbreakpoint_number  
Delete breakpoint breakpoint_number. Use the blcommand to get a list of all breakpoints and their corresponding  
numbers. See “Deleting Program Breakpoints” on page 8-5.  
bl  
Display a list of current breakpoints. See “Listing Program Breakpoints” on page 8-5.  
cont  
Continue simulating the program from the current ip value. Most commonly used after the simulator stops at a  
breakpoint. See “Program Execution” on page 6-5.  
dj[address]  
Jump the Data Window display to the specified address. If no address is given, the window display changes to the  
previous location, providing a handy way to swap the display between two different parts of memory. See “Data  
Window Commands” on page 5-5.  
db[count]  
Move the Data Window backward count lines or one windowful if no count is given. See “Data Window Com-  
mands” on page 5-5.  
dbndl  
Display the Data Window contents as instruction bundles. See “Data Window Commands” on page 5-5.  
dbs address length [r|w|rw]  
Set data breakpoint covering the memory area of length bytes starting at address. See “Setting Data Breakpoints” on  
page 8-7.  
dbD  
Delete all data breakpoints. See “Deleting Program Breakpoints” on page 8-5.  
dbd breakpoint_number  
Delete data breakpoint breakpoint_number. Use the dbl command to get a list of all breakpoints and their corre-  
sponding numbers. See “Deleting Program Breakpoints” on page 8-5.  
dbl  
Display a list of current data breakpoints. See “Listing Program Breakpoints” on page 8-5.  
dd starting_address ending_address [filename]  
Dump memory contents to the screen or to the file given by filename. The range dumped is between starting_address  
and ending_address inclusive. The dump is formatted as hexadecimal. See “Data Window Commands” on page 5-5.  
A-2  
Command Reference  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
df [count]  
Move the Data Window forward count lines or one windowful if no count is given. See “Data Window Commands”  
on page 5-5.  
dh  
Display Data Window contents in hexadecimal format. See “Data Window Commands” on page 5-5.  
eval expression_without_spaces+  
Evaluate one or more expression_without_spaces and print the result in an appropriate format, typically hexadecimal  
and/or decimal, or symbolically. An expression_without_spaces can include numbers, registers, internal variables,  
program-defined symbols, operators, and parentheses for grouping. See “Evaluating Formulas and Formatting Data”  
on page 8-4.  
fr  
ski: Show the floating point registers in the Register Window. See “Register Window Commands” on page 5-1.  
xski: Toggle the display of the floating point registers pane. See “Register Window Commands” on page 5-1.  
goto label  
Causes execution to continue following the first line in the file which contains the label. Goto’s may be forward or  
backward. Goto’s are valid only in command files. See “The goto Command and Labels” on page 9-1.  
gr  
ski: Show the general registers in the Register Window. See “Register Window Commands” on page 5-1.  
xski: Toggle the display of the general registers pane. See “Register Window Commands” on page 5-1.  
help[command_name]  
Display a list of the commands Ski recognizes, or, if a command_name is specified, a syntax description for that  
command. See “Command Entry” on page 4-1.  
iar  
ski: Show the IA-32 registers in the Register Window. See “Register Window Commands” on page 5-1.  
xski: Toggle the display of the IA-32 registers pane. See “Register Window Commands” on page 5-1.  
iabs[address]  
Set IA-32 breakpoint at address or at the current value of ipif address is omitted. (IA-32 code only) See “Setting  
Program Breakpoints” on page 8-4.  
ialoadfilename address [mapfile [args]+]  
Prepare for IA-32 application-mode simulation: Load an IA-32 executable file (.comor .exe) and prepare to pass  
the program args using the MS-DOS command line parameter mechanism. address specifies where to load the pro-  
gram. mapfile provides Ski with the mapping between program-defined symbols and their addresses and must spec-  
ify an ASCII text file exactly compatible with mapfiles produced by the Microsoft “ML” linker. See “How to Load a  
Program” on page 6-3.  
if expression_without_spaces true_command [: false_command]  
Execute true_command if the expression_without_spaces evaluates to a non-zero value, false_command if it evalu-  
ates to zero. See “The if Command” on page 9-2.  
Copyright © 2000 Hewlett-Packard Co.  
Command Reference  
A-3  
Ski IA-64 Simulator Reference Manual 1.0L  
isyms[filename]  
Write internal symbols to the screen or to the file given by filename. See “Symbol Table Commands” on page 8-8.  
load filename [args]+  
Prepare for IA-64 application-mode simulation: Load the IA-64 ELF executable program file given by filename and  
prepare to pass the program args using the C language argc/argv parameter mechanism. See “How to Load a Pro-  
gram” on page 6-3.  
pj[address]  
Jump the Program Window display to the specified address. If no address is given, the window display changes to  
the previous location, providing a handy way to swap the display between two different parts of the program. See  
“Summary of Program Window Commands” on page 5-2.  
pa  
Display the program in assembly language format only. (IA-64 only) See “Summary of Program Window Com-  
mands” on page 5-2.  
pb[count]  
Move the Program Window backward count IA-64 bundles or IA-32 instructions, or one windowful less one bundle  
or instruction if no count is given. See “Summary of Program Window Commands” on page 5-2.  
pdstarting_address ending_address [filename]  
Dump memory to the screen or to the file given by filename. The range dumped is between starting_address and  
ending_address inclusive. The dump is formatted as disassembled instructions, without source code. See “Summary  
of Program Window Commands” on page 5-2.  
pf[count]  
Move the Program Window forward count IA-64 bundles or IA-32 instructions, or one windowful less one bundle or  
instruction if no count is given. See “Summary of Program Window Commands” on page 5-2.  
pm  
Display an IA-64 program in both source and assembly form. The source code file must be available to the simulator  
in the location recorded in the executable file when this command is issued. The source code is displayed for conve-  
nience; it cannot be modified or interacted with. Mixed display may not be useful if a high degree of optimization  
was applied during compilation. (IA-64 only) See “Summary of Program Window Commands” on page 5-2.  
quit[return_value_for_shell]  
Quit the simulator. If no return_value_for_shell is given, a zero value is returned to the shell. Return values are use-  
ful in shell script programming. See “Quitting Ski” on page 2-6.  
run  
Simulate the program. Using the C language argc/argv mechanism, Ski will pass the program a copy of the com-  
mand line parameters Ski received on its command line, or, if specified, the command line parameters provided with  
the loadand ialoadcommands. See “Program Execution” on page 6-5.  
restfilename  
Restore the state of a simulated processor from the specified file and prepare to resume a suspended simulation. Only  
the registers and memory of the simulated processor are restored; state information private to the simulator such as  
cycle counts is not restored. See “Saving and Restoring the Simulator State” on page 8-8.  
rf[count]  
Moves the Register Window “forward” (scroll down) through the currently-displayed register set. The Register Win-  
dow is scrolled count lines. If count is omitted, the Register Window scrolls down one windowful less one line, i.e.  
A-4  
Command Reference  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
the last line of the old window is displayed as the first line of the new window. (ski only) See “ski Register Window  
Commands” on page 5-1.  
rb[count]  
Moves the Register Window “backward” (scroll up) through the currently-displayed register set. The Register Win-  
dow is scrolled count lines. If count is omitted, the Register Window scrolls up one windowful less one line, i.e. the  
first line of the old window is displayed as the last line of the new window. (ski only) See “ski Register Window  
Commands” on page 5-1.  
rd[filename]  
Dump the Register Window to the screen or to the file given by filename. See “Register Window Commands” on  
page 5-1.  
romloadfilename address [mapfile]  
Load an MS-DOS .com-format file for IA-64, IA-32, or mixed system-mode simulation. address specifies where to  
load the program. mapfile provides Ski with the mapping between program-defined symbols and their addresses and  
must specify an ASCII text file exactly compatible with mapfiles produced by the Microsoft “ML” linker. See “How  
to Load a Program” on page 6-3.  
step[count]  
Execute count instructions or, if no count is specified, one instruction. See “Program Execution” on page 6-5.  
stepuntilexpression_without_spaces  
Execute instructions until the expression_without_spaces has a non-zero value. See “Program Execution” on  
page 6-5.  
savefilename  
Save the state of a simulated processor in the file given by filename. Only the registers and memory of the simulated  
processor are saved; state information private to the simulator such as cycle counts is not saved. See “Saving and  
Restoring the Simulator State” on page 8-8.  
sdt  
Show the Data Translation Lookaside Buffer (DTLB) (system-mode only). See “System-Mode TLB Simulation” on  
page 6-2.  
sit  
Show Instruction Translation Lookaside Buffer (ITLB) (system-mode only). See “System-Mode TLB Simulation”  
on page 6-2.  
sr  
ski: Show the system registers (Control Registers, Region Registers, Debug Registers, Protection Key Registers,  
Data Breakpoint Registers, Instruction Breakpoint Registers, Performance Monitor Configuration Registers, Perfor-  
mance Monitor Data Registers) in the Register Window. See “Register Window Commands” on page 5-1.  
xski: Toggle the display of the system registers pane. See “Register Window Commands” on page 5-1.  
symlist[filename]  
Write program-defined symbols to the screen or to the file given by filename. See “Symbol Table Commands” on  
page 8-8.  
Copyright © 2000 Hewlett-Packard Co.  
Command Reference  
A-5  
Ski IA-64 Simulator Reference Manual 1.0L  
ur  
ski: Show the user registers (Predicate Registers, Branch Registers, Application Registers, Instruction Pointer, User  
Mask) in the Register Window. See “Register Window Commands” on page 5-1.  
xski: Toggle the display of the user registers pane. See “Register Window Commands” on page 5-1.  
A-6  
Command Reference  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
B
Register Names  
IA-64 registers are fully described in other documents. This appendix provides a list for convenience only. The register  
names are documented here as recognized by Ski and, in a few cases, don’t exactly match the names in other documents  
due to program limitations. For example, the floating point registers must be accessed in three pieces: the mantissa part,  
the sign part, and the (biased) exponent part. Similarly, the “Not a Thing” bits of the various registers are separate entities  
for Ski. Individual bits of complex registers such as the psrare documented here as well, corresponding to the names by  
which Ski recognizes them.  
B.1  
IA-64 Registers  
al, ah, ax, eax  
IA-32 Registers: al and ah are byte-wide, ax is al and ah taken together as two bytes, eax is four bytes  
wide with ax as the two least significant bytes.  
ar0 - ar127  
b0 - b7  
IA-64 Application Registers  
IA-64 Branch Registers  
bl, bh, bx, ebx IA-32 Registers: bl and bh are byte-wide, bx is bl and bh taken together as two bytes, ebx is four bytes  
wide with bx as the two least significant bytes.  
bp, ebp  
IA-32 Base Pointers: bp is two bytes wide, ebp is four bytes wide with bp as the two least significant  
bytes.  
bsp  
IA-64 Register Save Engine (RSE) Backing Store Pointer Register  
IA-64 Register Save Engine (RSE) Backing Store Pointer Register for memory stores  
IA-64 Compare and Exchange Value Register  
bspst  
ccv  
cl, ch, cx, ecx  
IA-32 Registers: cl and ch are byte-wide, cx is cl and ch taken together as two bytes, ecx is four bytes  
wide with cx as the two least significant bytes.  
cmcv  
IA-64 Corrected Machine Check Vector Register  
IA-64 Control Registers  
cr0 - cr127  
cs  
IA-32 Code Segment Register  
csd  
IA-32 Code Segment Register Descriptor  
IA-64 Data Breakpoint Registers  
IA-64 Default Control Register  
dbr0 - dbr15  
dcr  
dl, dh, dx, edx IA-32 Registers: dl and dh are byte-wide, dx is dl and dh taken together as two bytes, edx is four bytes  
wide with dx as the two least significant bytes.  
di, edi  
IA-32 Arithmetic Registers: di is two bytes wide, edi is four bytes wide with di as the two least  
significant bytes.  
ds  
IA-32 Data Segment Register  
dsd  
IA-32 Data Segment Register Descriptor  
IA-64 Epilog Count Register  
ec  
eflags  
eflags.ac  
eflags.af  
eflags.be  
eflags.cf  
IA-32 Flags Register  
IA-32 Alignment Check bit  
IA-32 Auxiliary Carry Flag bit, also called the IA-32 Adjust Flag bit  
IA-32 Below Equal Flag bit  
IA-32 Carry Flag bit  
Copyright © 2000 Hewlett-Packard Co.  
Register Names  
B-1  
Ski IA-64 Simulator Reference Manual 1.0L  
eflags.df  
eflags.id  
eflags.if  
eflags.iopl  
eflags.le  
eflags.lt  
eflags.nt  
eflags.of  
eflags.pf  
eflags.rf  
eflags.sf  
eflags.tf  
eflags.vm  
eflags.zf  
eoi  
IA-32 Direction Flag bit  
IA-32 ID Flag bit  
IA-32 Interruption Flag bit  
IA-32 I/O Privilege Level bit  
IA-32 Less Equal Flag bit  
IA-32 Less Than Flag bit  
IA-32 Nested Task bit  
IA-32 Overflow Flag bit  
IA-32 Parity Flag bit  
IA-32 Resume Flag bit  
IA-32 Sign Flag bit  
IA-32 Trap Flag bit  
IA-32 Virtual 8086 Mode bit  
IA-32 Zero Flag bit  
IA-64 End of Interrupt  
es  
IA-32 “Extra” Segment Register  
IA-32 “Extra” Segment Register Descriptor  
IA-32 four byte Stack Pointer; see “iasp” below  
esd  
esp  
f0.e, f1.e, … f127.e  
IA-64 Floating-point Register exponent parts  
f0.m, f1.m, … f127.m  
IA-64 Floating-point Register mantissa parts  
f0.s, f1.s, … f127.s  
IA-64 Floating-point Register sign bits  
fpsr  
IA-64 Floating-point Status Register  
IA-64 FPSR Trap Bits  
fpsr.traps  
fpsr.sf0  
IA-64 FPSR Status Field 0  
fpsr.sf0.ftz  
fpsr.sf0.wre  
fpsr.sf0.pc  
fpsr.sf0.rc  
fpsr.sf0.v  
fpsr.sf0.d  
fpsr.sf0.z  
fpsr.sf0.o  
fpsr.sf0.u  
fpsr.sf0.i  
fpsr.sf1  
IA-64 FPSR Status Field 0, Flush-to-Zero mode bit.  
IA-64 FPSR Status Field 0, Widest range exponent mode bit  
IA-64 FPSR Status Field 0, Precision control bits  
IA-64 FPSR Status Field 0, Rounding control bits  
IA-64 FPSR Status Field 0, IEEE Invalid Operation status bit  
IA-64 FPSR Status Field 0, Denormal/Unnormal Operand status bit  
IA-64 FPSR Status Field 0, IEEE Zero Divide status bit  
IA-64 FPSR Status Field 0, IEEE Overflow status bit  
IA-64 FPSR Status Field 0, IEEE Underflow status bit  
IA-64 FPSR Status Field 0, IEEE Inexact status bit  
IA-64 FPSR Status Field 1  
fpsr.sf2  
IA-64 FPSR Status Field 2  
B-2  
Register Names  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
fpsr.sf2.pc  
fpsr.sf2.rc  
fpsr.sf2.v  
fpsr.sf2.d  
fpsr.sf2.z  
fpsr.sf2.o  
fpsr.sf2.u  
fpsr.sf2.i  
fpsr.sf3  
fs  
IA-64 FPSR Status Field 2, Precision control bits  
IA-64 FPSR Status Field 2, Rounding control bits  
IA-64 FPSR Status Field 2, IEEE Invalid Operation status bit  
IA-64 FPSR Status Field 2, Denormal/Unnormal Operand status bit  
IA-64 FPSR Status Field 2, IEEE Zero Divide status bit  
IA-64 FPSR Status Field 2, IEEE Overflow status bit  
IA-64 FPSR Status Field 2, IEEE Underflow status bit  
IA-64 FPSR Status Field 2, IEEE Inexact status bit  
IA-64 FPSR Status Field 3  
IA-32 additional extra Segment Register  
fsd  
IA-32 additional extra Segment Register Descriptor  
IA-32 Global Descriptor Table Descriptor  
gdtd  
gp  
IA-64 Global Pointer, a synonym for r1  
gp.nat  
gs  
IA-64 Global Pointer Not-a-Thing bit, a synonym for r1.nat  
IA-32 additional extra Segment Register  
gsd  
IA-32 additional extra Segment Register Descriptor  
iasp, esp  
IA-32 Stack Pointer: iasp is two bytes wide, esp is four bytes wide with iasp as the two least significant  
bytes. (The x86 mnemonic for the iasp register is “sp” but that conflicts with the IA-64 Stack Pointer of  
the same name, hence the name change for IA-32.)  
ibr0 - ibr15  
ifa  
IA-64 Instruction Breakpoint Registers  
IA-64 Interruption Faulting Address Register  
IA-64 Interruption Function State  
IA-64 Interruption Hash Address  
IA-64 Interruption Immediate Register  
IA-64 Interruption Instruction Bundle Pointer  
IA-64 Interruption Instruction Previous Address  
IA-64 Instruction Pointer  
ifs  
iha  
iim  
iip  
iipa  
ip  
ipsr  
irr0-irr3  
isr  
IA-64 Interruption Processor Status Register  
IA-64 Interrupt Request Registers  
IA-64 Interruption Status Register  
IA-64 Interval Time Counter  
itc  
itir  
IA-64 Interruption TLB Insertion Register  
IA-64 Interval Timer Match Register  
IA-64 Interval Timer Vector  
itm  
itv  
iva  
IA-64 Interrupt Vector Address  
ivr  
IA-64 Interrupt Vector Register  
k0 - k7  
lc  
IA-64 Kernel Registers  
IA-64 Loop Count Register  
ldt  
IA-32 Local Descriptor Table  
Copyright © 2000 Hewlett-Packard Co.  
Register Names  
B-3  
Ski IA-64 Simulator Reference Manual 1.0L  
ldtd  
IA-32 Local Descriptor Table Descriptor  
IA-64 Local Interrupt ID  
lid  
lrr0-lrr1  
p0 - p63  
pfs  
IA-64 Local Redirection Registers  
IA-64 Predicate Registers  
IA-64 Previous Function State  
IA-64 Protection Key Registers  
pkr0 - pkr15  
pmc0 - pmc15 IA-64 Performance Monitor Configuration Registers  
pmd0 - pmd15 IA-64 Performance Monitor Data Registers  
pmv  
IA-64 Performance Monitoring Vector  
IA-64 Processor Status Register  
psr  
psr.ac  
psr.be  
psr.bn  
psr.cpl  
psr.da  
psr.db  
psr.dd  
psr.dfh  
psr.dfl  
psr.di  
psr.dt  
psr.ed  
psr.i  
IA-64 PSR Alignment Check bit  
IA-64 PSR Big-Endian bit  
IA-64 PSR Register Bank bit  
IA-64 PSR Current Privilege Level  
IA-64 PSR Disable Access and Dirty-bit faults bit  
IA-64 PSR Debug Breakpoint fault bit  
IA-64 PSR Data Debug fault disable bit  
IA-64 PSR Disabled Floating-point High bit  
IA-64 PSR Disabled Floating-point Low bit  
IA-64 PSR Disable Instruction set transition bit  
IA-64 PSR Data address Translation bit  
IA-64 PSR Exception Deferral bit  
IA-64 PSR Interrupt unmask bit  
psr.ic  
psr.id  
psr.is  
psr.it  
IA-64 PSR Interrupt Collection bit  
IA-64 PSR Instruction Debug fault disable bit  
IA-64 PSR Instruction Set bit  
IA-64 PSR Instruction address Translation bit  
IA-64 PSR Lower Privilege transfer trap bit  
IA-64 PSR Floating-point High modified bit  
IA-64 PSR Floating-point Low modified bit  
IA-64 PSR Machine Check abort mask bit  
IA-64 PSR Protection Key enable bit  
IA-64 PSR Privileged Performance monitor enable bit  
IA-64 PSR Restart Instruction slot number  
IA-64 PSR Register stack Translation bit  
IA-64 PSR Secure Interval timer bit  
IA-64 PSR Secure Performance monitors bit  
IA-64 PSR Single Step enable bit  
psr.lp  
psr.mfh  
psr.mfl  
psr.mc  
psr.pk  
psr.pp  
psr.ri  
psr.rt  
psr.si  
psr.sp  
psr.ss  
B-4  
Register Names  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
psr.tb  
psr.um  
psr.up  
pta  
IA-64 PSR Taken Branch trap bit  
IA-64 PSR User Mask bits  
IA-64 PSR User Performance monitor enable bit  
IA-64 Page Table Address  
r0, r1, … r127 IA-64 General Registers  
r0.nat, … r127.nat  
IA-64 General Register Not-a-Thing bits  
rnat  
IA-64 Register Save Engine (RSE) Not-a-Thing (NaT) Collection Register  
IA-64 Return Pointer, a synonym for b0  
rp  
rr0 - rr7  
rrbf  
IA-64 Region Registers  
IA-64 CFM Register Rename Base for floating-point registers  
IA-64 CFM Register Rename Base for general registers  
IA-64 CFM Register Rename Base for predicate registers  
IA-64 Register Stack Configuration Register  
rrbg  
rrbp  
rsc  
si, esi  
IA-32 Arithmetic Registers: si is two bytes wide, esi is four bytes wide with si as the two least  
significant bytes.  
sof  
sol  
sor  
sp  
IA-64 CFM Size of Stack frame  
IA-64 CFM Size of Locals Portion of Stack frame  
IA-64 CFM Size of Rotating Portion of Stack frame  
IA-64 Stack Pointer, a synonym for r12. For the IA-32 equivalent of the x86 “sp” register, see the  
description of “iasp” above.  
sp.nat  
ss  
IA-64 Stack Pointer Not-a-Thing bit, a synonym for r12.nat.  
IA-32 Stack Segment Register  
ssd  
IA-32 Stack Segment Register Descriptor  
IA-64 Task Priority Register  
tpr  
unat  
IA-64 User Not-a-Thing (NaT) Collection Register  
Copyright © 2000 Hewlett-Packard Co.  
Register Names  
B-5  
Ski IA-64 Simulator Reference Manual 1.0L  
B-6  
Register Names  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
C
Internal Variable Names  
Ski has one combined symbol table for registers and internal variables. (See Section 4.4.2.2, “Registers” and Section  
4.4.2.3, “Internal Variables”.) A separate symbol table describes program-defined symbols.  
C.1  
Internal Variables  
$cycles$  
$exited$  
$heap$  
$insts$  
Number of “virtual cycles” simulated.  
The value 0 until the simulated program exits. Then the variable takes the value 1.  
The address of the bottom of the simulated heap.  
The number of instructions simulated so far.  
Copyright © 2000 Hewlett-Packard Co.  
Internal Variable Names  
C-1  
Ski IA-64 Simulator Reference Manual 1.0L  
C-2  
Internal Variable Names  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
D
Simulator Status and Error Messages  
The following is a description of some of the status and error messages which can be produced by the simulator. “Fault”  
and “Trap” messages are usually the result of a program trying to do something that, under Linux, would cause a signal to  
be generated.  
The “%” constructs are printf() substitutions. Where “%s” appears, a string will be substituted in the error message at  
runtime. Where “%llx” appears, a 64-bit hexadecimal integer will be substituted in the error message at runtime. See the  
printf() man page for more information on % substitutions.  
All breakpoints deleted  
You executed the bDcommand. Ski is confirming that it has deleted all the breakpoints. This is a status message, not  
an error message. See “Deleting Program Breakpoints” on page 8-5.  
All breakpoints in use  
You tried to set a breakpoint but all ten are in use. Use the blcommand to list them and then the bdor bDcommands  
to free up some for you to use. See “Setting Program Breakpoints” on page 8-4.  
Assignment failed  
You tried to use the =1, =2, =4, =8, or =scommands to write data to an invalid location. Ski creates new pages of  
memory when the simulated program needs them; Ski will not create new pages in response to the assignment com-  
mands. See “Changing Registers and Memory with Assignment Commands” on page 8-1.  
Bad breakpoint number. (Use 0-9)  
You tried to specify a breakpoint but used an invalid specifier. There are ten breakpoints, numbered 0 through 9. See  
“Deleting Program Breakpoints” on page 8-5.  
Break instruction fault  
A non-Ski-breakpoint BREAK instruction was executed. One possible cause is a wild branch to page with all zeroes.  
This can only happen for application-mode programs; system-mode programs handle this fault through the interrup-  
tion mechanism. See “How Ski Implements Breakpoints” on page 8-6 and “Interruptions” on page 7-1.  
Breakpoint already set at that location  
You tried to set a breakpoint at an address where there already is a breakpoint. Your request is ignored; Ski will not  
set two breakpoints at one address. See “Setting Program Breakpoints” on page 8-4.  
Breakpoint #%d at %s (%s) deleted  
You used the bdcommand to delete a specific breakpoint. Ski is confirming that it has deleted the breakpoint. This is  
a status message, not an error message. See “Deleting Program Breakpoints” on page 8-5.  
Breakpoint (IA-64) at %s  
An IA-64 breakpoint has been reached. This is a status message, not an error message. See “Program Breakpoints”  
on page 8-4.  
Breakpoint (IA-32) at %s  
An IA-32 breakpoint has been reached. This is a status message, not an error message. See “Setting Program Break-  
points” on page 8-4.  
Copyright © 2000 Hewlett-Packard Co.  
Simulator Status and Error Messages  
D-1  
Ski IA-64 Simulator Reference Manual 1.0L  
Breakpoint #%d wasn’t set  
You used the bdcommand to delete a specific breakpoint but that breakpoint doesn’t exist. Did you specify the right  
breakpoint? Use the blcommand to list the breakpoints. See “Deleting Program Breakpoints” on page 8-5 and per-  
haps “Listing Program Breakpoints” on page 8-5.  
Cannot access registers outside current frame  
You tried to use the =command to assign a new value to a register that isn’t in the set of registers currently visible to  
your program. The only registers for which this can occur are the General Registers (gr) and their NaT bits. Ski  
faithfully implements IA-64 register stacking and rotation. Look at the most recent ALLOC instruction.  
Cannot open file %s (%s) for %s  
This generic error message indicates that Ski tried to open a file and failed. The first %s field is replaced with the file-  
name you provided, the second %s field is replaced with the filename Ski tried to use after tilde expansion, and the  
third %s field is replaced with the mode Ski tried to use, either “reading”, “writing”, or “appending”. Check that  
you typed the filename correctly and that the directories you specified are accessible. Is there a permissions problem  
or a network failure, perhaps? See “Filenames” on page 4-5.  
Construct DWARF image: can’t find .debug_info section  
You told Ski to load a program. Ski couldn’t find the part of the executable file containing source code line number  
information. As a result, Ski won’t be able to show source code in the Program Window. See “Program Window  
Commands” on page 5-2.  
Could not open %s for reading  
You told Ski to load a program but Ski couldn’t open the file you specified. Perhaps you specified a file that is  
doesn’t exist or a pathname that includes non-existent or inaccessible directories? See “Program Loading” on  
page 6-3.  
couldn’t find label %s  
A command file tried to use the gotocommand but Ski can’t find the label to which the gotorefers. The %s field is  
replaced with the label. Perhaps the label is spelled incorrectly? See “The goto Command and Labels” on page 9-1.  
Couldn’t open file ‘%s’. Was ski started in the right directory?  
Ski loaded a program to simulate, per your request, and tried to access source code pointed to by that program. But,  
for some reason, Ski couldn’t open the specified file. This can happen, for example, if files have been moved after  
compilation. See “Summary of Program Window Commands” on page 5-2.  
Couldn’t open instruction count file  
You started bski with the -icntoption but bski couldn’t open the file you specified. Perhaps you specified a file  
that is write-protected or a pathname that includes non-existent or inaccessible directories? See “Using bski for  
Batch Simulations” on page 2-2 and “Command Line Flags” on page 2-4.  
Data larger than a %s. Truncated to 0x%llx  
You used the =, =1, =2, =4, or =8commands to write data to a register or to memory. You provided more data than  
would fit, so Ski truncated the excess most significant part away and used the least significant part. The %s field on  
the left is how many bytes Ski needed. The %llx field on the right is the value after truncation. See “Changing Reg-  
isters and Memory with Assignment Commands” on page 8-1.  
Error reading ‘%s’ line: %d  
Ski tried to display the source code corresponding to an IA-64 program you loaded. For some reason, it failed to read  
a line from the file represented by the %s field, at the line number represented by the %d field. Perhaps the file per-  
D-2  
Simulator Status and Error Messages  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
missions are wrong or a remote file has suddenly become inaccessible? See “The Program Window” on page 3-6 and  
the discussion of the pmcommand in “Program Window Commands” on page 5-2.  
Error: unrecognized restore file tag: %s  
You are trying to restore a saved simulator state and either the save file is corrupt or Ski is broken. See “Saving and  
Restoring the Simulator State” on page 8-8.  
Expression aligned to (mod %lld) boundary  
You tried to assign an address to a register that requires an address on a specific boundary, but the address you spec-  
ified isn’t on that boundary. Ski has adjusted the address for you, but you should check to make sure the adjustment  
matches your intent. See “Changing Registers and Memory with Assignment Commands” on page 8-1.  
Expression > 47  
You tried to assign a value greater than 47 to the rrbpregister.  
Expression > 95  
You tried to assign a value greater than 95 to the rrbfor rrbfregister.  
File size > Memory size  
You tried to load an IA-64 program but the library Ski uses to parse ELF files can’t make sense of the file. Are you  
sure it’s an IA-64 program and not an IA-32 program, an object file, or something completely different? See “Pro-  
gram Loading” on page 6-3.  
Following values could not be assigned:  
You supplied multiple values in an =1, =2, =4, or =8command. Some of the values overflowed on to the next page of  
memory but that page hasn’t been allocated. Ski creates new pages of memory when the simulated program needs  
them; Ski will not create new pages in response to assignment commands. See “Changing Registers and Memory  
with Assignment Commands” on page 8-1.  
FP exception fault  
An IA-64 application-mode program attempted to execute a floating point operation that doesn’t make sense, such as  
divide by zero or square root of a negative number. This can only happen for IA-64 application-mode programs; IA-  
64 system-mode programs handle this fault through the interruption mechanism. See Chapter 6, “Program Simula-  
tion” and “Interruptions” on page 7-1.  
FP exception trap  
An IA-64 application-mode program caused a floating-point trap. This trap, like all traps, stops simulation of appli-  
cation-mode programs. A trap is different from a fault: faults are detected before the machine state is changed, for  
example when an attempt is made to divide by zero. Traps are detected after the machine state is changed, for exam-  
ple, when numeric overflow occurs. This can only happen for application-mode programs; system-mode programs  
handle this trap through the interruption mechanism. See Chapter 6, “Program Simulation” and Chapter 7.1, “Inter-  
ruptions”.  
goto only allowed inside a command file  
You tried to execute the gotocommand from the keyboard. The command is only legal within command files. See  
“The goto Command and Labels” on page 9-1.  
Halting Simulation  
Your IA-64 system-mode program executed a BREAK 0 instruction at a place where there is no Ski breakpoint. See  
Chapter 8.3.4.1, “How Ski Implements Breakpoints” and “System-Mode IA-64 Programs” on page 6-2.  
Copyright © 2000 Hewlett-Packard Co.  
Simulator Status and Error Messages  
D-3  
Ski IA-64 Simulator Reference Manual 1.0L  
help: Unknown command: %s  
You asked Ski to tell you about a particular command but the command you asked for doesn’t exist. Try the help  
command alone to get a list of all of the commands Ski understands. See “Command Entry” on page 4-1.  
IA-32 program terminated  
An IA-32 application-mode program finished executing and invoked an MS-DOS system function to terminate itself.  
The function it used doesn’t provide a way for the program to return a completion status. See “Application-Mode IA-  
32 Programs” on page 6-1.  
IA-32 program terminated with status %d  
Your IA-32 application-mode program finished execution in the normal fashion and invoked an MS-DOS system  
function to terminate itself and indicate a completion status. See “Application-Mode IA-32 Programs” on page 6-1.  
Ignored attempt to write a Read-Only symbol  
Some registers and symbols recognized by Ski are read-only. You tried to modify one of them. See “Symbolic Argu-  
ments” on page 4-4 and “Changing Registers and Memory with Assignment Commands” on page 8-1.  
Illegal expression: %s  
You used an expression that can’t be parsed. Check parentheses, variable names, and the matching of operands and  
operators. See “Expressions” on page 4-2.  
%s: Illegal number of arguments < %d >:  
You passed too few or too many operands with a Ski command. The command appears in the %s field on the left and  
the number of operands you passed appears in the %d field on the right. Use the help command for information  
about the command of interest or see Appendix A, “Command Reference”.  
Illegal operation fault  
An attempt was made to execute an invalid instruction; probably a wild pointer in a jump table caused a wild branch.  
This can only happen for application-mode programs; system-mode programs handle this fault through the interrup-  
tion mechanism. See Chapter 6, “Program Simulation”.  
Illegal slot field in breakpoint address  
You used the bscommand to set an IA-64 breakpoint, but you specified an address in the last four bytes of a bundle.  
Because the IA-64 architecture provides for bundle-level, but not instruction-level, addressing, Ski “pretends” that  
the first instruction of the bundle is in the first four bytes, the second instruction is in the second four bytes, and the  
third instruction is in the third four bytes. You specified a location in the fourth four bytes of a bundle and that isn’t  
allowed by Ski. See “Setting Program Breakpoints” on page 8-4 and “How Ski Implements Breakpoints” on  
page 8-6.  
Interrupting simulation  
Ski received a SIGINT signal while simulating, probably because you hit control-C (or whatever key you have con-  
figured to interrupt a running program.) This is a status message, not an error message. See “Interruptions” on  
page 7-1 and the first few paragraphs of Chapter 9, “Command Files”.  
missing command  
You used the “ifexpression true_command :false_command” command. Either you left the true_command blank  
and the expression evaluated to a non-zero value, or you left the false_command blank and the expression evaluated  
to zero. See “The if Command” on page 9-2.  
D-4  
Simulator Status and Error Messages  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Missing ELF header  
See “File size > Memory size” on page D-3.  
Missing file version number  
You are trying to restore a saved simulator state and the first non-blank, non-comment line of the file doesn’t begin  
with “file_ver”, the file version string. Is the file a Ski simulator state save file? See “Saving and Restoring the  
Simulator State” on page 8-8.  
missing value for option %s  
You specified a command line option that requires an argument. See “Command Line Flags” on page 2-4.  
More than %d characters in expression: %s  
You gave Ski an expression that is too long for it to parse. Try a shorter expression. See “Expressions” on page 4-2.  
Nesting overflow  
You invoked a command file from within another command file, and another command file from within there, and  
again and again... and you did it too much. Do you have an recursive loop, where a command file invokes itself? See  
Chapter 9, “Command Files”.  
No breakpoints set  
You tried to list all breakpoints with the blcommand but there aren’t any. See “Listing Program Breakpoints” on  
page 8-5.  
No breakpoints to delete  
You tried to delete all breakpoints with the bDcommand but there aren’t any. See “Deleting Program Breakpoints”  
on page 8-5.  
No previous command  
You tried to re-run the previous command in ski but you haven’t executed any commands yet– there is nothing to re-  
run. See “The ski Command Window” on page 3-13.  
No such command  
You typed a command to Ski that Ski doesn’t understand. Either you mis-typed, or Ski is broken, or the rules that  
underpin the basic functioning of our universe have ceased to operate properly. In the first case, try typing your com-  
mand correctly; use the “help” command or see Appendix A, “Command Reference” to find out what the com-  
mands are. In the third case, you’re on your own; bring film.  
No such user %s  
You specified a filename with a leading tilde (“~”), causing Ski to try to expand the first word into the home directory  
for the corresponding user. Ski wasn’t able to the find the user. Perhaps you mis-typed the filename or specified a  
user that doesn’t exist? See “Filenames” on page 4-5.  
Non %s-aligned address. Aligned to 0x%llx  
You used the =2, =4, or =8commands to write data to memory but you specified an improperly-aligned address. The  
%s field on the left tells what kind of alignment was needed and the %llx field on the right is the address that Ski  
used. This may not be the address you want! See “Changing Registers and Memory with Assignment Commands”  
on page 8-1.  
Not an ELF file  
Copyright © 2000 Hewlett-Packard Co.  
Simulator Status and Error Messages  
D-5  
Ski IA-64 Simulator Reference Manual 1.0L  
Not an IA-64 file  
See “File size > Memory size” on page D-3.  
Nothing to run  
No program has been loaded. Use the load, iaload, or romloadcommand, depending on what kind of program  
you want to simulate or load an IA-64 program by naming it on Ski’s command line. See “Program Loading” on  
page 6-3.  
Out of memory  
Ski needed to get more memory to run but couldn’t get it. You need more virtual memory swap space or you’ve  
found a Ski defect. See your local Linux specialist.  
Page not allocated  
When Ski loads an IA-64 application-mode program, Ski allocates pages for the fixed-size parts of the program and  
allocates a small stack. As the program runs, Ski allows the stack to grow. If the program tries to access a page which  
isn’t in one of those areas, Ski detects the error and prints the message. The most likely cause is a wild pointer. See  
“Application-Mode IA-64 Programs” on page 6-1.  
Pager %s not found  
You executed a ski command that sends output through a pager and there was a problem. Did you set the PAGER  
environment variable to point to a program that’s not reachable through your PATH shell variable? Did you set the  
PAGER variable to point to a non-executable program? If your pager is on a remote file system, is there a problem  
with accessing that system? Did your pager program return a failure status for some reason? If none of these reasons  
is applicable, you may have found a Ski defect. See “Other Windows” on page 3-14.  
popen failed  
A call to the Linux system routine popen() failed, that is, a -1 was returned from the call. This is unusual and, while  
it doesn’t indicate an internal Ski error, it may suggest that your Linux operating system is corrupt, perhaps due to  
some other program. ski uses popen() when it needs to invoke a pager to display a large amount of text to you, for  
example, when you use the helpand symlistcommands. The popen() function might fail if you have the maxi-  
mum allowed number of processes running on your computer or if you have run out of swap space.  
Privileged operation fault  
Your IA-64 application-mode program tried to execute a privileged instruction. This can only happen for applica-  
tion-mode programs; system-mode programs handle this fault through the interruption mechanism. See Chapter 6,  
“Program Simulation” and “Interruptions” on page 7-1.  
Privileged register fault  
Your IA-64 application-mode program tried to access a privileged register. This can only happen for application-  
mode programs; system-mode programs handle this fault through the interruption mechanism. See Chapter 6, “Pro-  
gram Simulation” and “Interruptions” on page 7-1.  
program exited with status %d  
Your IA-64 program finished execution in the normal fashion. This is a status message, not an error message.  
Register NaT Consumption fault  
Your IA-64 application-mode program tried to reference the contents of a register that didn’t contain a valid value.  
This can only happen for application-mode programs; system-mode programs handle this fault through the interrup-  
tion mechanism. See Chapter 6, “Program Simulation” and “Interruptions” on page 7-1.  
D-6  
Simulator Status and Error Messages  
Copyright © 2000 Hewlett-Packard Co.  
Ski IA-64 Simulator Reference Manual 1.0L  
Reserved register/field fault  
Your IA-64 application-mode program tried to access a reserved register or portion of a register. This can only hap-  
pen for application-mode programs; system-mode programs handle this fault through the interruption mechanism.  
See Chapter 6, “Program Simulation” and “Interruptions” on page 7-1.  
screen size is %dx%d -- minimum is %dx%d  
ski uses the curses package to create a multi-window interface on a terminal. Curses requires a terminal of the spec-  
ified minimum size but your terminal is smaller than that. See “Ski Variations” on page 2-2.  
Starting address > ending address  
You used the ddor pdcommand to dump data or program code to a file but the starting address you passed is greater  
than the ending address. Perhaps you have them reversed? Are you are using symbolic addresses that don’t bind to  
the locations you think they bind to? See “Program Window Commands” on page 5-2 and “Data Window Com-  
mands” on page 5-5.  
Stopping at %s due to IA-32 halt instruction  
An IA-32 HALT instruction was reached; simulation has stopped. This is a status message, not an error message. See  
“Application-Mode IA-32 Programs” on page 6-1 and “System-Mode IA-32 Programs” on page 6-2.  
Stopping at %s due to reserved IA-32 instruction  
An attempt was made to execute an IA-32 instruction whose encoding has been reserved by Intel. Ski recognizes the  
encoding but doesn’t know what to do with it. See “Application-Mode IA-32 Programs” on page 6-1 and “System-  
Mode IA-32 Programs” on page 6-2.  
Stopping at %s due to unimplemented IA-32 instruction  
An attempt was made to execute an IA-32 instruction that isn’t implemented by Ski. See “Application-Mode IA-32  
Programs” on page 6-1 and “System-Mode IA-32 Programs” on page 6-2.  
Stopping at %s due to unimplemented instruction  
Your program tried to execute an IA-64 instruction that isn’t implemented by Ski.  
Symbol ‘%s’ not found  
You referred to a symbol that Ski doesn’t know about. Did you spell the symbol correctly, with leading underscores  
as needed? Is the symbol a C++ mangled name? Have you loaded the right program? See the section “Argument  
Specification” on page 4-2, particularly “Symbolic Arguments” on page 4-4.  
%s: Too many arguments (> %d)  
You passed too many operands with a Ski command. Ski’s internal parser can handle a maximum number of argu-  
ments (currently 64) and you tried to pass more than that number. This could happen with the =1, =2, =4, and =8  
assignment commands, the eval and if commands, and the load and iaload program loading commands. See  
“Changing Registers and Memory with Assignment Commands” on page 8-1, “Evaluating Formulas and Formatting  
Data” on page 8-4, “The if Command” on page 9-2, and the section “Program Loading” on page 6-3, particularly  
“Creating the argc, argv, and envp Parameters” on page 6-4.  
Too many commands in a line (> %d)  
You can type multiple commands on a line by separating them with semicolons. But there’s a limit, as shown, to the  
number of commands you can do this to... and you exceeded it. See “Command Sequences, Repetition, and Abbrevi-  
ation” on page 4-1.  
Copyright © 2000 Hewlett-Packard Co.  
Simulator Status and Error Messages  
D-7  
Ski IA-64 Simulator Reference Manual 1.0L  
Unable to open console window  
Your system-mode program tried to open a console with the appropriate Simulator System Call but Ski wasn’t able  
to spawn the corresponding xterm program. First, verify that environment variable DISPLAY is set to the proper  
hostname:displaynumber string. If this does not help, perhaps there is no xterm available via your PATH environ-  
ment variable? Perhaps you have hit the process limit or used all the pseudo-tty devices on your Linux system? See  
“System-Mode IA-64 Programs” on page 6-2.  
Unaligned Data fault  
An attempt was made to access data on an unnatural boundary. Two-byte quantities must be on addresses evenly  
divisible by two; four-byte quantities must be on addresses evenly divisible by four, and so on. See “Misaligned Data  
Access Trap” on page 6-3 and “Interruptions” on page 7-1.  
Unexpected end of file  
You are trying to restore a saved simulator state and either the save file is corrupt or Ski is broken. See “Saving and  
Restoring the Simulator State” on page 8-8.  
unrecognized option %s  
You specified a command line option that Ski doesn’t understand. Different varieties of Ski (xski, ski, and bski)  
understand different flags. See “Command Line Flags” on page 2-4.  
Unrecognized symbol name: %s  
You tried to refer to a symbol in an expression but Ski doesn’t know about that symbol. Perhaps you mis-typed it? Or  
perhaps it is a program-defined symbol in a file that wasn’t compiled with debugging symbol generation enabled (the  
-gflag on many compilers)? Or perhaps you referred to an IA-64 register using a mnemonic that Ski doesn’t recog-  
nize? See “Symbolic Arguments” on page 4-4, “Symbol Table Commands” on page 8-8, and Appendix B, “Register  
Names”.  
unsupported DOS int 21 function %02x%02x  
Your IA-32 application-mode program tried to invoke an MS-DOS function that Ski doesn’t emulate. The first hexa-  
decimal number is the MS-DOS function code and the second number is the sub-function code. See “Application-  
Mode IA-32 Programs” on page 6-1 and “MS-DOS Application Environment” on page 7-3.  
Unsupported SSC: %d  
Your IA-64 system-mode program invoked a Simulator System Call that Ski doesn’t support. Either your program  
has a bug or Ski is broken. See “System-Mode IA-64 Programs” on page 6-2.  
unsupported system call %d  
Your IA-64 application-mode program tried to invoke an Linux system call that Ski doesn’t emulate. See “Linux  
Application Environment” on page 7-1 and “Application-Mode IA-64 Programs” on page 6-1.  
Usage: %s [options] [file [args]]  
Ski’s generic command line help message.  
D-8  
Simulator Status and Error Messages  
Copyright © 2000 Hewlett-Packard Co.  

Nespresso Coffee Maker AEROCINNO 3190 User Manual
Motorola i425 User Manual
LG Electronics GSA H54LI User Manual
Kenwood DP 7010 User Manual
GE 68113168965 User Manual
Follett VERSION 600 User Manual
DeLonghi Coffeemaker ICM40T User Manual
Capresso Impressa J5 User Manual
Bunn SRUA User Manual
Aiwa XP ER800N User Manual