JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
SPARC Assembly Language Reference Manual     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  SPARC Assembler Syntax

2.  Executable and Linking Format

3.  Directives and Pseudo-Operations

4.  Creating Data in Assembler

5.  SPARC Code Models

6.  Writing Functions -- The SPARC ABI

6.1 Anatomy of a C Function

6.2 Register Usage

6.3 Parameter Passing

6.4 Functions Returning Values

6.4.1 Limitations for 32-Bit Code

6.4.2 Limitations for Both 32-Bit and 64-Bit Code

6.4.3 Additional Information

7.  Assembler Inline Functions and __asm Code

A.  Using the Assembler Command Line

B.  A Sample Assembler Program

C.  SPARC Instruction Sets and Mnemonics

Index

Chapter 6

Writing Functions — The SPARC ABI

This chapter outlines the basic design of an assembly language function that can be called from a C program. In order for an assembly language program to interoperate with a C program or the C library functions or the operating system calls, certain conventions about register usage, stack usage, parameter passing, and returning values must be followed. These agreed-to conventions are referred to as the Application Binary Interface, the ABI.