没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Procedure Call Standard for the ARM Architecture
Procedure Call Standard for the
ARM
®
Architecture
Document number: ARM IHI 0042C, current through ABI release 2.07
Date of Issue: 10
th
October, 2008
Abstract
This document describes the Procedure Call Standard use by the Application Binary Interface (ABI) for the
ARM architecture.
Keywords
Procedure call function call, calling conventions, data layout
How to find the latest release of this specification or report a defect in it
Please check the ARM Information Center (http://infocenter.arm.com/) for a later release if your copy is more than one year old
(navigate to the Software Development Tools section, Application Binary Interface for the ARM Architecture subsection).
Please report defects in this specification to arm dot eabi at arm dot com.
Licence
THE TERMS OF YOUR ROYALTY FREE LIMITED LICENCE TO USE THIS ABI SPECIFICATION ARE GIVEN IN SECTION
1.4, Your licence to use this specification (ARM contract reference
LEC-ELA-00081 V2.0). PLEASE READ THEM
CAREFULLY.
BY DOWNLOADING OR OTHERWISE USING THIS SPECIFICATION, YOU AGREE TO BE BOUND BY ALL OF ITS
TERMS. IF YOU DO NOT AGREE TO THIS, DO NOT DOWNLOAD OR USE THIS SPECIFICATION.
THIS
ABI SPECIFICATION IS PROVIDED “AS IS” WITH NO WARRANTIES (SEE SECTION 1.4 FOR DETAILS).
Proprietary notice
ARM, Thumb, RealView, ARM7TDMI and ARM9TDMI are registered trademarks of ARM Limited. The ARM logo
is a trademark of ARM Limited. ARM9, ARM926EJ-S, ARM946E-S, ARM1136J-S ARM1156T2F-S ARM1176JZ-S
Cortex, and Neon are trademarks of ARM Limited. All other products or services mentioned herein may be
trademarks of their respective owners.
ARM IHI 0042C
Copyright © 2003-2008 ARM Limited. All rights reserved. Page 1 of 34
Procedure Call Standard for the ARM Architecture
Contents
1 ABOUT THIS DOCUMENT 5
1.1 Change Control 5
1.1.1 Current Status and Anticipated Changes 5
1.1.2 Change History 5
1.2 References 5
1.3 Terms and Abbreviations 6
1.4 Your Licence to Use This Specification 7
1.5 Acknowledgements 8
2 SCOPE 9
3 INTRODUCTION 10
3.1 Design Goals 10
3.2 Conformance 10
4 DATA TYPES AND ALIGNMENT 11
4.1 Fundamental Data Types 11
4.1.1 Half-precision Floating Point 11
4.1.2 Containerized Vectors 12
4.2 Endianness and Byte Ordering 12
4.3 Composite Types 13
4.3.1 Aggregates 13
4.3.2 Unions 13
4.3.3 Arrays 13
4.3.4 Bit-fields 13
4.3.5 Homogeneous Aggregates 14
5 THE BASE PROCEDURE CALL STANDARD 15
5.1 Machine Registers 15
5.1.1 Core registers 15
5.1.1.1 Handling values larger than 32 bits 16
5.1.2 Co-processor Registers 16
5.1.2.1 VFP register usage conventions (VFP v2, v3 and the Advanced SIMD Extension) 17
5.2 Processes, Memory and the Stack 17
5.2.1 The Stack 18
5.2.1.1 Universal stack constraints 18
ARM IHI 0042C
Copyright © 2003-2008 ARM Limited. All rights reserved. Page 2 of 34
Procedure Call Standard for the ARM Architecture
5.2.1.2 Stack constraints at a public interface 18
5.3 Subroutine Calls 18
5.3.1.1 Use of IP by the linker 19
5.4 Result Return 19
5.5 Parameter Passing 19
5.6 Interworking 21
6 THE STANDARD VARIANTS 23
6.1 VFP and Advanced SIMD Register Arguments 23
6.1.1 Mapping between registers and memory format 23
6.1.2 Procedure Calling 23
6.1.2.1 VFP co-processor register candidates 23
6.1.2.2 Result return 23
6.1.2.3 Parameter passing 24
6.2 Alternative Format Half-precision Floating Point values 24
6.3 Read-Write Position Independence (RWPI) 24
6.4 Variant Compatibility 24
6.4.1 VFP and Base Standard Compatibility 24
6.4.2 RWPI and Base Standard Compatibility 25
6.4.3 VFP and RWPI Standard Compatibility 25
6.4.4 Half-precision Format Compatibility 25
7 ARM C AND C++ LANGUAGE MAPPINGS 26
7.1 Data Types 26
7.1.1 Arithmetic Types 26
7.1.2 Pointer Types 27
7.1.3 Enumerated Types 27
7.1.4 Additional Types 28
7.1.5 Volatile Data Types 28
7.1.6 Structure, Union and Class Layout 29
7.1.7 Bit-fields 29
7.1.7.1 Bit-fields no larger than their container 29
7.1.7.2 Bit-field extraction expressions 30
7.1.7.3 Over-sized bit-fields 31
7.1.7.4 Combining bit-field and non-bit-field members 31
7.1.7.5 Volatile bit-fields⎯preserving number and width of container accesses 31
7.2 Argument Passing Conventions 32
APPENDIX A SUPPORT FOR ADVANCED SIMD EXTENSIONS 33
A.1 Introduction 33
ARM IHI 0042C
Copyright © 2003-2008 ARM Limited. All rights reserved. Page 3 of 34
Procedure Call Standard for the ARM Architecture
ARM IHI 0042C
Copyright © 2003-2008 ARM Limited. All rights reserved. Page 5 of 34
1 ABOUT THIS DOCUMENT
1.1 Change Control
1.1.1 Current Status and Anticipated Changes
This document has been released publicly. Anticipated changes to this document include:
Typographical corrections.
Clarifications.
Compatible extensions.
1.1.2 Change History
Issue Date By Change
1.0
30
th
October 2003 LS First public release.
2.0
24
th
March 2005 LS Second public release.
2.01
5
th
July 2005 LS Added clarifying remark following Table 5 – word-sized enumeration
contains are
int if possible.
2.02
4
th
August 2005 RE Clarify that a callee may modify stack space used for incoming
parameters.
2.03
7
th
October 2005 LS Added notes concerning VFPv3 D16-D31 (§5.1.2.1); retracted
requirement that plain bit-fields be unsigned by default (§7.1.7)
2.04
4
th
May 2006 RE Clarified when linking may insert veneers that corrupt r12 and the
condition codes (§5.3.1.1).
2.05
19
th
January 2007 RE Update for the Advanced SIMD Extension.
2.06
2
nd
October 2007 RE Add support for half-precision floating point.
A
25
th
October 2007 LS Document renumbered (formerly GENC-003534 v2.06).
B
2
nd
April 2008 RE Simplify duplicated text relating to VFP calling and clarify that
homogeneous aggregates of containerized vectors are limited to four
members in calling convention (§6.1.2.1).
C
10
th
October 2008 RE Clarify that __va_list is in namespace std. Specify containers for
oversized enums. State truth values for _Bool/bool. Clarify some
wording with respect to homogeneous aggregates and argument
marshalling of VFP CPRCs
1.2 References
This document refers to, or is referred to by, the following documents.
Ref URL or other reference Title
AAPCS
This document
Procedure Call Standard for the ARM Architecture
AAELF
ELF for the ARM Architecture
剩余33页未读,继续阅读
资源评论
- softrain9172012-10-19很好,初步介绍了arm系统下子函数相关内容
yangkehai1234
- 粉丝: 1
- 资源: 27
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功