@@ -61,40 +61,64 @@ <h2> Contents </h2>
61
61
< h2 > < a href ="#acknowledgements "> Acknowledgements</ a > </ h2 >
62
62
< p > < hr > < p >
63
63
64
- < p > This document was developed jointly by an informal industry
65
- coalition consisting of (in alphabetical order) CodeSourcery, Compaq,
66
- EDG, HP, IBM, Intel, Red Hat, and SGI. Additional contributions were
67
- provided by a variety of individuals.</ p >
64
+ < p > This document was originally developed jointly by an informal
65
+ industry coalition consisting of (in alphabetical order) CodeSourcery,
66
+ Compaq, EDG, HP, IBM, Intel, Red Hat, and SGI. Additional contributions
67
+ were provided by a variety of individuals. It is now developed as an
68
+ open-source project with contributions from a variety of individuals
69
+ and companies.</ p >
68
70
69
71
< p > < hr > < p >
70
72
< a name ="intro ">
71
73
< h2 > < a href ="#intro "> Chapter 1: Introduction </ a > </ h2 >
72
74
< p > < hr > < p >
73
75
74
- In this document, we specify the Application Binary Interface for
75
- C++ programs,
76
- that is, the object code interfaces between user C++ code and the
77
- implementation-provided system and libraries.
78
- This includes the memory layout for C++ data objects,
79
- including both predefined and user-defined data types,
80
- as well as internal compiler generated objects such as virtual tables.
81
- It also includes function calling interfaces,
82
- exception handling interfaces,
83
- global naming,
84
- and various object code conventions.
85
-
86
- < p >
87
- In general, this document is written as a generic specification,
88
- to be usable by C++ implementations on a variety of architectures.
89
- However, it does contain processor-specific material for the Itanium
90
- 64-bit ABI, identified as such.
91
- Where structured data layout is described,
92
- we generally assume Itanium psABI member sizes.
93
- An implementation for a 32-bit ABI would typically just change the
94
- sizes of members as appropriate
95
- (i.e. pointers and long ints would become 32 bits),
96
- but sometimes an order change would be required for compactness,
97
- and we note more substantive changes.
76
+ In this document, we specify the Application Binary Interface (ABI)
77
+ for C++ programs: that is, the object code interfaces between different
78
+ user-provided C++ program fragments and between those fragments and
79
+ the implementation-provided runtime and libraries. This includes the
80
+ memory layout for C++ data objects, including both predefined and
81
+ user-defined data types, as well as internal compiler generated
82
+ objects such as virtual tables. It also includes function calling
83
+ interfaces, exception handling interfaces, global naming, and various
84
+ object code conventions.
85
+
86
+ < p >
87
+ In general, this document is meant to serve as a generic specification
88
+ which can be used by C++ implementations on a variety of platforms.
89
+ It does this by layering on top of a platform's base C ABI. However,
90
+ it was originally written for the Itanium architecture, and some parts
91
+ still directly make Itanium-specific or 64-bit-specific assumptions.
92
+ There is an ongoing project to restate the entire C++ ABI specification
93
+ in terms of portable C concepts that are defined in the C ABI. In
94
+ the meantime, it is usually straightforward to recognize these
95
+ unportable assumptions and translate them appropriately, e.g. by
96
+ replacing a 64-bit pointer with a 32-bit pointer.
97
+
98
+ < p >
99
+ This document is not an authoritative definition of the C++ ABI for
100
+ any particular platform. Platform vendors retain the ultimate power
101
+ to define the C++ ABI for their platform. Platforms using this ABI
102
+ for C++ should declare that they do so, either unmodified or with a
103
+ certain set of changes.
104
+
105
+ < p >
106
+ While this ABI has generally stood up well, there are some parts of it
107
+ that are now seen as mistakes. This document includes several
108
+ recommendations for platforms adopting this ABI with no need to
109
+ interoperate with existing C++ object code. These recommendations
110
+ appear as follows:
111
+
112
+ < blockquote >
113
+ < span class ="future-abi "> Recommendation for new platforms: consider
114
+ forbidding the use of function templates on your platform so that
115
+ the ABI can remove these expression-mangling rules.</ span >
116
+ </ blockquote >
117
+
118
+ < p >
119
+ Platforms adopting any of these recommendations should describe the
120
+ exact changes they've made in their platform ABI documentation,
121
+ as the set of recommendations in this document may change over time.
98
122
99
123
< p > < hr > < p >
100
124
< a name ="definitions ">
@@ -262,7 +286,7 @@ <h3><a href="#definitions"> 1.1 Definitions </a></h3>
262
286
complement of the definition in [class.temporary]p3 of types for which
263
287
an extra temporary is allowed when passing or returning a type. A type
264
288
which is trivial for the purposes of the ABI will be passed and returned
265
- according to the rules of the underlying C ABI, e.g. in registers; often
289
+ according to the rules of the base C ABI, e.g. in registers; often
266
290
this has the effect of performing a trivial copy of the type.
267
291
</ p >
268
292
</ dd >
@@ -630,7 +654,7 @@ <h3><a href="#pod"> 2.2 POD Data Types </a></h3>
630
654
631
655
< p >
632
656
The size and alignment of a type which is a < a href ="#POD "> POD for the
633
- purpose of layout< a > is as specified by the base (C) ABI, with the
657
+ purpose of layout< a > is as specified by the base C ABI, with the
634
658
following provisos:
635
659
</ p >
636
660
@@ -811,7 +835,7 @@ <h3><a href="#class-types"> 2.4 Non-POD Class Types </a></h3>
811
835
< p >
812
836
< li >
813
837
If < code > sizeof(T)*8 > = n</ code > ,
814
- the bit-field is allocated as required by the underlying C psABI ,
838
+ the bit-field is allocated as required by the base C ABI ,
815
839
subject to the constraint that a bit-field is never placed in the
816
840
tail padding of a base class of C.
817
841
0 commit comments