[Index]


Table of Contents


Title and Copyright Pages

About This Manual
Audience
New and Changed Features
Organization
Related Documents
Reader's Comments
Conventions

1    Architecture-Based Considerations
1.1    Registers
1.1.1    Integer Registers
1.1.2    Floating-Point Registers
1.2    Bit and Byte Ordering
1.3    Addressing
1.3.1    Aligned Data Operations
1.3.2    Unaligned Data Operations
1.4    Exceptions
1.4.1    Main Processor Exceptions
1.4.2    Floating-Point Processor Exceptions

2    Lexical Conventions
2.1    Blank and Tab Characters
2.2    Comments
2.3    Identifiers
2.4    Constants
2.4.1    Scalar Constants
2.4.2    Floating-Point Constants
2.4.3    String Constants
2.5    Multiple Lines Per Physical Line
2.6    Statements
2.6.1    Labels
2.6.2    Null Statements
2.6.3    Keyword Statements
2.6.4    Relocation Operands
2.7    Expressions
2.7.1    Expression Operators
2.7.2    Expression Operator Precedence Rules
2.7.3    Data Types
2.7.4    Type Propagation in Expressions
2.8    Address Formats

3    Main Instruction Set
3.1    Load and Store Instructions
3.1.1    Load Instruction Descriptions
3.1.2    Store Instruction Descriptions
3.2    Arithmetic Instructions
3.3    Logical and Shift Instructions
3.4    Relational Instructions
3.5    Move Instructions
3.6    Control Instructions
3.7    Byte-Manipulation Instructions
3.8    Special-Purpose Instructions

4    Floating-Point Instruction Set
4.1    Background Information on Floating-Point Operations
4.1.1    Floating-Point Data Types
4.1.2    Floating-Point Control Register
4.1.3    Floating-Point Exceptions
4.1.4    Floating-Point Rounding Modes
4.1.5    Floating-Point Instruction Qualifiers
4.2    Floating-Point Load and Store Instructions
4.3    Floating-Point Arithmetic Instructions
4.4    Floating-Point Relational Instructions
4.5    Floating-Point Move Instructions
4.6    Floating-Point Control Instructions
4.7    Floating-Point Special-Purpose Instructions

5    Assembler Directives

6    Programming Considerations
6.1    Calling Conventions
6.2    Program Model
6.3    General Coding Concerns
6.3.1    Register Use
6.3.2    Using Directives to Control Sections and Location Counters
6.3.3    The Stack Frame
6.3.4    Examples
6.4    Developing Code for Procedure Calls
6.4.1    Calling a High-Level Language Procedure
6.4.2    Calling an Assembly-Language Procedure
6.5    Memory Allocation

7    Object Files
7.1    Object File Overview
7.2    Object File Sections
7.2.1    File Header
7.2.2    Optional Header
7.2.3    Section Headers
7.2.4    Section Data
7.2.5    Section Relocation Information
7.2.5.1    Relocation Table Entry
7.2.5.2    Assembler and Linker Processing of Relocation Entries
7.3    Object-File Formats (OMAGIC, NMAGIC, ZMAGIC)
7.3.1    Impure Format (OMAGIC) Files
7.3.2    Shared Text (NMAGIC) Files
7.3.3    Demand Paged (ZMAGIC) Files
7.3.4    Ucode Objects
7.4    Loading Object Files
7.5    Archive Files
7.6    Linker Defined Symbols

8    Symbol Table
8.1    Symbol Table Overview
8.2    Format of Symbol Table Entries
8.2.1    Symbolic Header
8.2.2    Line Number Table
8.2.3    Procedure Descriptor Table
8.2.4    Local Symbol Table
8.2.4.1    Symbol Type (st) Constants
8.2.4.2    Storage Class (sc) Constants
8.2.5    Auxiliary Symbol Table
8.2.6    File Descriptor Table
8.2.7    External Symbol Table

9    Program Loading and Dynamic Linking
9.1    Object File Considerations
9.1.1    Structures
9.1.2    Base Addresses
9.1.3    Segment Access Permissions
9.1.4    Segment Contents
9.2    Program Loading
9.3    Dynamic Linking
9.3.1    Dynamic Loader
9.3.2    Dynamic Section (.dynamic)
9.3.2.1    Shared Object Dependencies
9.3.3    Global Offset Table (.got)
9.3.3.1    Resolving Calls to Position-Independent Functions
9.3.4    Dynamic Symbol Section (.dynsym)
9.3.5    Dynamic Relocation Section (.rel.dyn)
9.3.6    Msym Section (.msym)
9.3.7    Hash Table Section (.hash)
9.3.8    Dynamic String Section (.dynstr)
9.3.9    Initialization and Termination Functions
9.3.10    Quickstart
9.3.10.1    Shared Object List (.liblist)
9.3.10.2    Conflict Section (.conflict)
9.3.10.3    Ordering of Sections

A    Instruction Summaries

B    32-Bit Considerations
B.1    Canonical Form
B.2    Longword Instructions
B.3    Quadword Instructions for Longword Operations
B.4    Logical Shift Instructions
B.5    Conversions to Quadword
B.6    Conversions to Longword

C    Basic Machine Definition
C.1    Implicit Register Use
C.2    Addresses
C.3    Immediate Values
C.4    Load and Store Instructions
C.5    Integer Arithmetic Instructions
C.6    Floating-Point Load Immediate Instructions
C.7    One-to-One Instruction Mappings

D    PALcode Instruction Summaries
D.1    Unprivileged PALcode Instructions
D.2    Privileged PALcode Instructions

Examples

6-1    Nonleaf Procedure
6-2    Leaf Procedure Without Stack Space for Local Variables
6-3    Leaf Procedure With Stack Space for Local Variables

Figures

1-1    Byte Ordering
4-1    Floating-Point Data Formats
4-2    Floating-Point Control Register
6-1    Sections and Location Counters for Nonshared Object Files
6-2    Stack Organization
6-3    Default Layout of Memory (User Program View)
7-1    Object File Format
7-2    Organization of Section Data
7-3    Relocation Table Entry for Undefined External Symbols
7-4    Relocation Table Entry for a Local Relocation Entry
7-5    Layout of OMAGIC Files in Virtual Memory
7-6    Layout of NMAGIC Files in Virtual Memory
7-7    Layout of ZMAGIC Files
8-1    Symbol Table Overview
8-2    Functional Overview of the Symbolic Header
8-3    Logical Relationship Between the File Descriptor Table and Local Symbols
8-4    Physical Relationship of a File Descriptor Entry to Other Tables
8-5    Logical Relationship Between the File Descriptor Table and Other Tables
8-6    Layout of Line Number Entries
8-7    Layout of Extended Line Number Entries
9-1    Text and Data Segments of Object Files
9-2    Relationship Between .dynsym and .got
9-3    Hash Table Section

Tables

2-1    Backslash Conventions
2-2    Expression Operators
2-3    Operator Precedence
2-4    Data Types
2-5    Address Formats
3-1    Load and Store Formats
3-2    Load Instruction Descriptions
3-3    Store Instruction Descriptions
3-4    Arithmetic Instruction Formats
3-5    Arithmetic Instruction Descriptions
3-6    Logical and Shift Instruction Formats
3-7    Logical and Shift Instruction Descriptions
3-8    Relational Instruction Formats
3-9    Relational Instruction Descriptions
3-10    Move Instruction Formats
3-11    Move Instruction Descriptions
3-12    Control Instruction Formats
3-13    Control Instruction Descriptions
3-14    Byte-Manipulation Instruction Formats
3-15    Byte-Manipulation Instruction Descriptions
3-16    Special-Purpose Instruction Formats
3-17    Special-Purpose Instruction Descriptions
4-1    Qualifier Combinations for Floating-Point Instructions
4-2    Load and Store Instruction Formats
4-3    Load and Store Instruction Descriptions
4-4    Arithmetic Instruction Formats
4-5    Arithmetic Instruction Descriptions
4-6    Relational Instruction Formats
4-7    Relational Instruction Descriptions
4-8    Move Instruction Formats
4-9    Move Instruction Descriptions
4-10    Control Instruction Formats
4-11    Control Instruction Descriptions
4-12    Special-Purpose Instruction Formats
4-13    Control Register Instruction Descriptions
5-1    Summary of Assembler Directives
6-1    Integer Registers
6-2    Floating-Point Registers
6-3    Argument Locations
7-1    File Header Format
7-2    File Header Magic Numbers
7-3    File Header Flags
7-4    Optional Header Definitions
7-5    Optional Header Magic Numbers
7-6    Section Header Format
7-7    Section Header Constants for Section Names
7-8    Format of s_flags Section Header Entry
7-9    Format of a Relocation Table Entry
7-10    Section Numbers for Local Relocation Entries
7-11    Relocation Types
7-12    Literal Usage Types
7-13    Linker Defined Symbols
8-1    Format of the Symbolic Header
8-2    Format of a Line Number Entry
8-3    Format of a Procedure Descriptor Table Entry
8-4    Format of a Local Symbol Table Entry
8-5    Index and Value as a Function of Symbol Type and Storage Class
8-6    Symbol Type (st) Constants
8-7    Storage Class Constants
8-8    Auxiliary Symbol Table Entries
8-9    Format of a Type Information Record Entry
8-10    Basic Type (bt) Constants
8-11    Type Qualifier (tq) Constants
8-12    Format of File Descriptor Entry
8-13    External Symbol Table Entries
9-1    Segment Access Permissions
9-2    Dynamic Array Tags (d_tag)
9-3    Processor-Specific Dynamic Array Tags (d_tag)
A-1    Main Instruction Set Summary
A-2    Floating-Point Instruction Set Summary
A-3    Rounding and Trapping Modes
D-1    Unprivileged PALcode Instructions
D-2    Privileged PALcode Instructions