ebook img

SC100 Application Binary Interface PDF

82 Pages·2002·1.02 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview SC100 Application Binary Interface

MNSC100ABI/D Rev. 2.0, 06/2002 SC100 Application Binary Interface MNSC100ABI/D Rev. 2.0, 06/2002 SC100 Application Binary Interface This document contains information on a new product. Specifications and information herein are subject to change without notice. © Copyright Agere Systems Inc., 2002. All rights reserved. © Copyright Motorola Inc., 2002. All rights reserved. LICENSOR is defined as either Motorola, Inc. or Agere Systems Inc., whichever company distributed this document to LICENSEE. LICENSOR reserves the right to make changes without further notice to any products included and covered hereby. LICENSOR makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does LICENSOR assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation incidental, consequential, reliance, exemplary, or any other similar such damages, by way of illustration but not limitation, such as, loss of profits and loss of business opportunity. “Typical” parameters which may be provided in LICENSOR data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals” must be validated for each customer application by customer's technical experts. LICENSOR does not convey any license under its patent rights nor the rights of others. LICENSOR products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support life, or for any other application in which the failure of the LICENSOR product could create a situation where personal injury or death may occur. Should Buyer purchase or use LICENSOR products for any such unintended or unauthorized application, Buyer shall indemnify and hold LICENSOR and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that LICENSOR was negligent regarding the design or manufacture of the part. Motorola and the Motorola DigitalDNA insignia are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer. Agere, Agere Systems, and the Agere Systems insignia are trademarks of Agere Systems Inc. Agere Systems Inc. is an Equal Opportunity/Affirmative Action Employer. StarCore is a registered trademark of Motorola, Inc. It is used by Agere Systems with the authorization of Motorola. All other trade names, trademarks, and registered trademarks are the property of their respective owners. Table of Contents Chapter 1 Introduction 1.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-1 1.2 Conformance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 1.3 References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 1.4 Revision History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-3 1.5 Acknowledgements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-4 Chapter 2 Low-Level Binary Interface 2.1 Core Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1 2.2 Endian Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 2.3 Fundamental Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 2.4 Aggregates and Unions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-6 2.5 Bit Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-8 2.6 Function Calling Sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-10 2.6.1 Argument Passing and Return Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-10 2.6.2 Variable Argument Lists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-12 2.6.3 Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-12 2.6.4 Stack Frame Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-13 2.6.5 Stack Unwinding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-14 2.6.6 Register Saving and Restoring Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . .2-16 2.6.7 setjmp and longjmp Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17 2.6.8 Frame and Global Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17 2.6.9 Dynamic Memory Allocation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17 2.6.10 Hardware Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17 2.7 Function Call Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-18 2.8 Address Modifier Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-18 2.9 Saturation Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-18 2.10 Data Addressing Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-18 Chapter 3 High-Level Languages Issues 3.1 C Preprocessor Predefines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-1 3.2 C Name Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-1 3.3 C System Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-2 3.4 Fractional Arithmetic Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-2 SC100 Application Binary Interface iii 3.5 Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-4 3.5.1 Compiler Assist Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-4 3.5.2 Floating-Point Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-4 3.5.3 Integer Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-10 3.5.4 Optional Integer Routines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-11 3.6 Function Argument and Return Type Checking in C. . . . . . . . . . . . . . . . . . . . . .3-12 3.6.1 Signature Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-12 3.6.2 Return Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-13 3.6.3 Using Signature Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-13 3.7 Access to Architectural Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-14 Chapter 4 Object File Format 4.1 Interface Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-1 4.2 The ELF Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2 4.3 Sections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-3 4.4 Special Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-5 4.5 Relocation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-6 4.5.1 Relocation Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-7 4.5.2 Relocation Stack. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-17 4.5.3 Instruction Address vs. VLES Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-18 4.6 NOTE Section. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-19 4.7 Program Headers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-21 4.8 Debugging Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-22 4.8.1 DWARF Register Number Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-22 Chapter 5 Assembler Syntax and Directives 5.1 Assembler Significant Characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-1 5.2 Assembler Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-2 5.3 Assembler Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-3 5.3.1 Symbol Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-3 5.3.2 Strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-3 5.3.3 Source Statement Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-4 5.3.3.1 Instruction Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-5 5.3.3.2 Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-5 5.3.3.3 Operation Field. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-5 5.3.3.4 Operand Field. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6 5.3.3.5 Comment Field. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6 5.4 Rule Checking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6 iv SC100 Application Binary Interface List of Tables 2-1 Mapping of C Data Types to SC100. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 2-2 Mapping of C Fractional Types to SC100 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 2-3 C Bit Field Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8 2-4 Register Usage in the Calling Convention . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 3-1 Predefined Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 3-2 Required Intrinsics for Fractional Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 3-3 Floating-Point Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5 3-4 Integer Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10 3-5 Optional Integer Routines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11 3-6 Italicized Fields in the Symbol Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 3-7 Basetype Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13 3-8 Intrinsics for Access to Architectural Features. . . . . . . . . . . . . . . . . . . . . . . . . 3-14 4-1 SC100 ELF Sections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 4-2 Relocation Type Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 4-3 Relocation Stack Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17 4-4 SC100 Register Number Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22 5-1 Assembler Significant Characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 5-2 Assembler Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 SC100 Application Binary Interface v vi SC100 Application Binary Interface List of Figures 2-1 Stack Frame Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13 4-1 Object File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 4-2 Vendor Identification Note Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20 4-3 User (Application-Specific) Note Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20 5-1 Basic Source Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4 SC100 Application Binary Interface vii viii SC100 Application Binary Interface

Description:
Agere, Agere Systems, and the Agere Systems insignia are trademarks of .. SC100 Application Binary Interface v. 2-1. Mapping of C Data Types to Beyond these requirements, a function is free to manage its stack frame in any
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.