8.5. Coding Examples

8.5.1. Introduction

LSB-conforming applications may implement fundamental operations using the Coding Examples as shown below.

Sample code sequences and coding conventions can be found in Itanium ™ Software Conventions and Runtime Guide, Chapter 9.

8.5.2. Code Model Overview/Architecture Constraints

As defined in Intel® Itanium ™ Processor-specific Application Binary Interface, relocatable files, executable files, and shared object files that are supplied as part of an application shall use Position Independent Code, as described in Itanium ™ Software Conventions and Runtime Guide, Chapter 12.

8.5.3. Position-Independent Function Prologue

See Itanium ™ Software Conventions and Runtime Guide, Chapter 8.4.

8.5.4. Data Objects

See Intel® Itanium ™ Processor-specific Application Binary Interface, Chapter 5.3.4, and Itanium ™ Software Conventions and Runtime Guide, Chapter 12.3.

8.5.4.1. Absolute Load & Store

Conforming applications shall not use absolute addressing.

8.5.5. Function Calls

See Itanium ™ Software Conventions and Runtime Guide, Chapter 8.4.

Four types of procedure call are defined in Itanium ™ Software Conventions and Runtime Guide, Chapter 8.3. Although special calling conventions are permitted, provided that the compiler and runtime library agree on these conventions, none are defined for this standard. Consequently, no application shall depend on a type of procedure call other than Direct Calls, Direct Dynamically Linked Calls, or Indirect Calls, as defined in Itanium ™ Software Conventions and Runtime Guide, Chapter 8.3.

8.5.5.1. Absolute Direct Function Call

Conforming applications shall not use absolute addressing.

8.5.5.2. Absolute Indirect Function Call

Conforming applications shall not use absolute addressing.

8.5.6. Branching

Branching is described in Itanium ™ Architecture Software Developer's Manual Volume 4, Chapter 4.5.

8.5.6.2. Absolute switch() code

Conforming applications shall not use absolute addressing.

8.5.6.3. Position-Independent switch() code

Where there are several possible targets for a branch, the compiler may use a number of different code generation strategies. See Itanium ™ Software Conventions and Runtime Guide, Chapter 9.1.7.