Itanium Software Runtime Architecture Guide

Click here to load reader

  • date post

    15-Dec-2015
  • Category

    Documents

  • view

    3
  • download

    0

Embed Size (px)

description

itanium software runtime architecture guide

Transcript of Itanium Software Runtime Architecture Guide

  • Itanium Software Conventions and Runtime Architecture Guide

    May 2001

    Document Number: 245358-003

  • Information in this document is provided in connection with Intel products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. Except as provided in Intel's Terms and Conditions of Sale for such products, Intel assumes no liability whatsoever, and Intel disclaims any express or implied warranty, relating to sale and/or use of Intel products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. Intel products are not intended for use in medical, life saving, or life sustaining applications. Intel may make changes to specifications and product descriptions at any time, without notice.Designers must not rely on the absence or characteristics of any features or instructions marked reserved or undefined. Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them.The Itanium processor may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request.Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling1-800-548-4725, or by visiting Intels website at http://developer.intel.com/design/litcentr.Itanium is a trademark or registered trademark of Intel Corporation or its subsidiaries in the United States and other countries.*Other brands and names may be claimed as the property of others.Copyright 2001, Intel Corporation.

  • Contents1 Introduction......................................................................................................................1-1

    1.1 Objectives of the Runtime Architecture ..............................................................1-11.2 About the Conventions .......................................................................................1-11.3 Overview of the Itanium Software Conventions and Runtime

    Architecture Guide..............................................................................................1-21.4 Terminology........................................................................................................1-2

    2 Processor Architecture ....................................................................................................2-12.1 Application State and Programming Model ........................................................2-12.2 Floating-point Programming Model ....................................................................2-22.3 System State and Programming Model..............................................................2-22.4 Addressing and Protection .................................................................................2-32.5 Interruptions .......................................................................................................2-3

    3 Memory Model.................................................................................................................3-13.1 Program Segments ............................................................................................3-13.2 Protection Areas.................................................................................................3-23.3 Data Allocation ...................................................................................................3-4

    3.3.1 Global Variables ................................................................................3-43.3.2 Local Static Data ...............................................................................3-43.3.3 Constants and Literals.......................................................................3-43.3.4 Local Memory Stack Variables..........................................................3-4

    4 Data Representation .......................................................................................................4-14.1 Fundamental Types............................................................................................4-14.2 Aggregate Types ................................................................................................4-24.3 Bit Fields.............................................................................................................4-44.4 Fortran Data Types ............................................................................................4-7

    5 Register Usage................................................................................................................5-15.1 Partitioning .........................................................................................................5-15.2 General Registers ..............................................................................................5-15.3 Floating-point Registers .....................................................................................5-25.4 Predicate Registers ............................................................................................5-35.5 Branch Registers................................................................................................5-35.6 Application Registers..........................................................................................5-45.7 User Mask ..........................................................................................................5-5

    6 Register Stack .................................................................................................................6-16.1 Input and Local Registers...................................................................................6-16.2 Output Registers ................................................................................................6-16.3 Rotating Registers..............................................................................................6-26.4 Frame Markers ...................................................................................................6-26.5 Backing Store for Register Stack .......................................................................6-2

    7 Memory Stack .................................................................................................................7-17.1 Procedure Frames..............................................................................................7-1Itanium Software Conventions and Runtime Architecture Guide iii

  • 8 Procedure Linkage ..........................................................................................................8-18.1 External Naming Conventions............................................................................8-18.2 The gp Register..................................................................................................8-18.3 Types of Calls ....................................................................................................8-18.4 Calling Sequence ...............................................................................................8-2

    8.4.1 Direct Calls ........................................................................................8-28.4.2 Indirect Calls......................................................................................8-4

    8.5 Parameter Passing.............................................................................................8-58.5.1 Allocation of Parameter Slots ............................................................8-68.5.2 Register Parameters .........................................................................8-78.5.3 Memory Stack Parameters..............................................................8-108.5.4 Variable Argument Lists ..................................................................8-108.5.5 Pointers to Formal Parameters .......................................................8-108.5.6 Languages Other than C.................................................................8-108.5.7 Rounding Floating-point Values ......................................................8-118.5.8 Examples.........................................................................................8-11

    8.6 Return Values ..................................................................................................8-138.7 Requirements for Unwinding the Stack............................................................8-14

    9 Coding Conventions........................................................................................................9-19.1 Sample Code Sequences ..................................................................................9-1

    9.1.1 Addressing own Data in the Short Data Area .................................9-19.1.2 Addressing External Data or Data in a Long Data Area....................9-19.1.3 Addressing Literals in the Text Segment...........................................9-29.1.4 Materializing Function Pointers .........................................................9-29.1.5 Direct Procedure Calls ......................................................................9-29.1.6 Indirect Procedure Calls ....................................................................9-29.1.7 Jump Tables......................................................................................9-3

    9.2 Speculation ........................................................................................................9-39.3 Multi-threaded Code...............................