Skip to content

Commit 15e9129

Browse files
authored
Merge branch 'master' into no-unique-address
2 parents 37ee702 + 72e84eb commit 15e9129

File tree

2 files changed

+45
-38
lines changed

2 files changed

+45
-38
lines changed

abi-eh.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h3> Introduction </h3>
7171

7272
<p>
7373
This specification is based on the general model described roughly in the
74-
<a href="http://download.intel.com/design/Itanium/Downloads/245358.pdf">
74+
<a href="https://www.intel.com/content/dam/www/public/us/en/documents/guides/itanium-software-runtime-architecture-guide.pdf">
7575
Itanium Software Conventions and Runtime Architecture Guide</a>.
7676
However, the Level I (base ABI) specification here contradicts that
7777
document in some particulars,
@@ -160,7 +160,7 @@ <h3> Level I. Base ABI </h3>
160160
facilities are built.
161161
We assume as a basis the unwind descriptor tables described in the base
162162
<a
163-
href="http://www.intel.com/design/itanium/downloads/245358.htm">Itanium
163+
href="https://www.intel.com/content/dam/www/public/us/en/documents/guides/itanium-software-runtime-architecture-guide.pdf">Itanium
164164
Software Conventions &amp; Runtime Architecture Guide</a>.
165165
Our focus here will on the APIs for accessing those structures.
166166

abi.html

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ <h3><a href="#definitions"> 1.1 Definitions </a></h3>
163163
<p>
164164
<dt> <i>empty class</i> </dt>
165165
<dd>
166-
A class with no non-static data members other than zero-width bitfields
167-
and empty data members,
166+
A class with no non-static data members,
167+
no unnamed bit-fields other than zero-width bit-fields and empty data members,
168168
no virtual functions, no virtual base classes,
169169
and no non-empty non-virtual proper base classes.
170170

@@ -237,7 +237,7 @@ <h3><a href="#definitions"> 1.1 Definitions </a></h3>
237237
A class that contains a virtual pointer, but no other data except
238238
(possibly) virtual bases. In particular, it:
239239
<ul>
240-
<li> has no non-static data members other than zero-width bitfields,
240+
<li> has no non-static data members and no non-zero-width unnamed bit-fields,
241241
<li> has no direct base classes that are not either empty, nearly empty,
242242
or virtual,
243243
<li> has at most one non-virtual, nearly empty direct base class, and
@@ -273,20 +273,18 @@ <h3><a href="#definitions"> 1.1 Definitions </a></h3>
273273
<dd>
274274
<p>
275275
In general, a type is considered a POD for the purposes of layout if
276-
it is a POD type (in the sense of ISO C++ [basic.types]).
277-
However, a type is not considered to be a POD for the purpose of layout
278-
if it is:
276+
it is a POD type (in the sense of ISO C++ [basic.types]). However, a
277+
type is not considered to be a POD for the purpose of layout if it is:
279278
<ul>
280279
<li>a POD-struct or POD-union (in the sense of ISO C++ [class]) with a
281-
bitfield member whose declared width is wider than the declared type
282-
of the bitfield, or
280+
bit-field whose declared width is wider than the declared type
281+
of the bit-field, or
283282
<li>an array type whose element type is not a POD for the purpose of layout, or
284283
<li>a POD-struct with one or more potentially-overlapping non-static
285284
data members.
286285
</ul>
287-
Where references
288-
to the ISO C++ are made in this paragraph, the Technical Corrigendum 1
289-
version of the standard is intended.
286+
Where references to the ISO C++ are made in this paragraph, the Technical
287+
Corrigendum 1 version of the standard is intended.
290288
</p>
291289

292290
<p>
@@ -564,8 +562,8 @@ <h3><a href="#docs"> 1.5 Base Documents </a></h3>
564562
notably including register usage, subprogram calling conventions, and
565563
stack unwind facilities, under all systems.
566564
Available from the Intel Itanium software developer website,
567-
<a href="http://download.intel.com/design/Itanium/Downloads/245358.pdf">
568-
http://download.intel.com/design/Itanium/Downloads/245358.pdf</a>.
565+
<a href="https://www.intel.com/content/dam/www/public/us/en/documents/guides/itanium-software-runtime-architecture-guide.pdf">
566+
https://www.intel.com/content/dam/www/public/us/en/documents/guides/itanium-software-runtime-architecture-guide.pdf</a>.
569567
Included by reference in this ABI.
570568

571569
<p>
@@ -796,13 +794,13 @@ <h3><a href="#class-types"> 2.4 Non-POD Class Types </a></h3>
796794
<p>
797795
For each data component D (first the primary base of C, if any, then
798796
the non-primary, non-virtual direct base classes in declaration order,
799-
then the non-static data members and unnamed bitfields in declaration
797+
then the non-static data members and unnamed bit-fields in declaration
800798
order), allocate as follows:
801799

802800
<ol type=1>
803801

804802
<p>
805-
<li> If D is a (possibly unnamed) bitfield whose declared type is
803+
<li> If D is a (possibly unnamed) bit-field whose declared type is
806804
<code>T</code> and whose declared width is <code>n</code> bits:
807805

808806
<p>
@@ -813,13 +811,13 @@ <h3><a href="#class-types"> 2.4 Non-POD Class Types </a></h3>
813811
<p>
814812
<li>
815813
If <code>sizeof(T)*8 >= n</code>,
816-
the bitfield is allocated as required by the underlying C psABI,
817-
subject to the constraint that a bitfield is never placed in the
814+
the bit-field is allocated as required by the underlying C psABI,
815+
subject to the constraint that a bit-field is never placed in the
818816
tail padding of a base class of C.
819817

820818
<p>
821819
If dsize(C) > 0, and the byte at offset dsize(C) - 1 is
822-
partially filled by a bitfield, and that bitfield is also a
820+
partially filled by a bit-field, and that bit-field is also a
823821
data member declared in C (but not in one of C's proper base
824822
classes), the next available bits are the unfilled bits at
825823
offset dsize(C) - 1. Otherwise, the next available bits are at
@@ -833,10 +831,10 @@ <h3><a href="#class-types"> 2.4 Non-POD Class Types </a></h3>
833831
If <code>sizeof(T)*8 < n</code>,
834832
let T' be the largest integral POD type with
835833
<code>sizeof(T')*8 <= n</code>.
836-
The bitfield is allocated starting at the next offset aligned
834+
The bit-field is allocated starting at the next offset aligned
837835
appropriately for T', with length n bits.
838836
The first <code>sizeof(T)*8</code> bits are used to hold the
839-
value of the bitfield,
837+
value of the bit-field,
840838
followed by <code>n - sizeof(T)*8</code> bits of padding.
841839
<p>
842840
Update align(C) to max (align(C), align(T')).
@@ -845,7 +843,7 @@ <h3><a href="#class-types"> 2.4 Non-POD Class Types </a></h3>
845843
<p>
846844
In either case,
847845
update dsize(C) to include the last byte
848-
containing (part of) the bitfield,
846+
containing (part of) the bit-field,
849847
and update sizeof(C) to max(sizeof(C),dsize(C)).
850848

851849
<p>
@@ -4085,8 +4083,9 @@ <h4><a href="#mangling-general"> 5.1.1 General </a></h4>
40854083
or <code>Type?</code> for an unknown data type.
40864084

40874085
<p>
4088-
Grammar productions beginning with '$' are reserved for private implementation
4089-
use. Names produced using such extensions are inherently non-portable.
4086+
Mangled names containing '<tt>$</tt>' or '<tt>.</tt>' are reserved for
4087+
private implementation use. Names produced using such extensions are
4088+
inherently non-portable and should be given internal linkage where possible.
40904089

40914090
<p>
40924091
<a name="mangling-structure">
@@ -4097,6 +4096,7 @@ <h4><a href="#mangling-structure"> 5.1.2 General Structure </a></h4>
40974096
Mangled names have the general structure:
40984097
<pre><font color=blue><code>
40994098
&lt;<a name="mangle.mangled-name">mangled-name</a>&gt; ::= _Z &lt;<a href="#mangle.encoding">encoding</a>&gt;
4099+
::= _Z &lt;<a href="#mangle.encoding">encoding</a>&gt; . &lt;vendor-specific suffix&gt;
41004100
&lt;<a name="mangle.encoding">encoding</a>&gt; ::= &lt;<i>function</i> <a href="#mangle.name">name</a>&gt; &lt;<a href="#mangle.bare-function-type">bare-function-type</a>&gt;
41014101
::= &lt;<i>data</i> <a href="#mangle.name">name</a>&gt;
41024102
::= &lt;<a href="#mangle.special-name">special-name</a>&gt;
@@ -4114,6 +4114,13 @@ <h4><a href="#mangling-structure"> 5.1.2 General Structure </a></h4>
41144114
parameters).
41154115
The type is omitted for variables and static data members.
41164116

4117+
<p>
4118+
A <code>&lt;<a href="#mangle.mangled-name">mangled-name</a>&gt;</code>
4119+
containing a period represents a vendor-specific version or portion
4120+
of the entity named by the <code>&lt;<a href="#mangle.encoding">encoding</a>&gt;</code>
4121+
prior to the first period. There is no restriction on the characters
4122+
that may be used in the suffix following the period.
4123+
41174124
<a name="mangle.anonymous">
41184125
<h5><a href="#mangling.anonymous">Anonymous entities</a></h5>
41194126

@@ -5200,7 +5207,7 @@ <h4><a href="#expressions">5.1.6 Expressions</a></h4>
52005207
::= L &lt;<i>nullptr</i> <a href="#mangle.type">type</a>&gt; E # nullptr literal (i.e., "LDnE")
52015208
::= L &lt;<i>pointer</i> <a href="#mangle.type">type</a>&gt; 0 E # null pointer template argument
52025209
::= L &lt;<a href="#mangle.type">type</a>&gt; &lt;<i>real-part</i> <a href="#mangle.float">float</a>&gt; _ &lt;<i>imag-part</i> <a href="#mangle.float">float</a>&gt; E # complex floating point literal (C 2000)
5203-
::= L &lt;<a href="#mangle.mangled-name">mangled-name</a>&gt; E # external name
5210+
::= L _Z &lt;<a href="#mangle.encoding">encoding</a>&gt; E # external name
52045211

52055212
&lt;<a name="mangle.braced-expression">braced-expression</a>&gt; ::= &lt;<a href="#mangle.expression">expression</a>&gt;
52065213
::= di &lt;<i>field</i> <a href="#mangle.source-name">source-name</a>&gt; &lt;<a href="#mangle.braced-expression">braced-expression</a>&gt; # .name = expr
@@ -5238,7 +5245,7 @@ <h5><a href="#mangling.literal">5.1.6.1 Literals</a></h5>
52385245
Floating-point literals are encoded using a fixed-length lowercase
52395246
hexadecimal string corresponding to the internal representation,
52405247
high-order bytes first. For example: "Lf bf800000 E" is -1.0f on
5241-
platforms conforming to IEEE 758.
5248+
platforms conforming to IEEE 754.
52425249

52435250
<p>
52445251
The encoding for a literal of an enumerated type is the encoding of the
@@ -5286,7 +5293,7 @@ <h5><a href="#mangling.declaration-reference">5.1.6.2 References to declared ent
52865293
<p>
52875294
When encoding template signatures, a name appearing in the source code
52885295
cannot always be resolved to a specific entity: In such cases the
5289-
<code>&lt;<a href="#mangle.mangled-name">mangled-name</a>&gt;</code> production (via
5296+
<code>&lt;<a href="#mangle.encoding">encoding</a>&gt;</code> production (via
52905297
<code>&lt;<a href="#mangle.expr-primary">expr-primary</a>&gt;</code>) does not apply, and instead the
52915298
<code>&lt;<a href="#mangle.unresolved-name">unresolved-name</a>&gt;</code> encoding is used. For example:
52925299
<code><pre>
@@ -5356,11 +5363,11 @@ <h4><a href="#mangling-scope">5.1.7 Scope Encoding</a></h4>
53565363
relative to the function, and an optional discriminator within the
53575364
function:
53585365

5359-
<code><pre><font color=blue> &lt;<a name="mangle.local-name">local-name</a>&gt; := Z &lt;<i>function</i> <a href="#mangle.encoding">encoding</a>&gt; E &lt;<i>entity</i> <a href="#mangle.name">name</a>&gt; [&lt;<a href="#mangle.discriminator">discriminator</a>&gt;]
5360-
:= Z &lt;<i>function</i> <a href="#mangle.encoding">encoding</a>&gt; E s [&lt;<a href="#mangle.discriminator">discriminator</a>&gt;]
5366+
<code><pre><font color=blue> &lt;<a name="mangle.local-name">local-name</a>&gt; ::= Z &lt;<i>function</i> <a href="#mangle.encoding">encoding</a>&gt; E &lt;<i>entity</i> <a href="#mangle.name">name</a>&gt; [&lt;<a href="#mangle.discriminator">discriminator</a>&gt;]
5367+
::= Z &lt;<i>function</i> <a href="#mangle.encoding">encoding</a>&gt; E s [&lt;<a href="#mangle.discriminator">discriminator</a>&gt;]
53615368

5362-
&lt;<a name="mangle.discriminator">discriminator</a>&gt; := _ &lt;<i>non-negative</i> <a href="#mangle.number">number</a>&gt; # when number < 10
5363-
:= __ &lt;<i>non-negative</i> <a href="#mangle.number">number</a>&gt; _ # when number >= 10
5369+
&lt;<a name="mangle.discriminator">discriminator</a>&gt; ::= _ &lt;<i>non-negative</i> <a href="#mangle.number">number</a>&gt; # when number < 10
5370+
::= __ &lt;<i>non-negative</i> <a href="#mangle.number">number</a>&gt; _ # when number >= 10
53645371
</font></pre></code>
53655372

53665373
<p>The enclosing function is the closest function enclosing the
@@ -5556,7 +5563,7 @@ <h4><a href="#closure-types">5.1.8 Closure Types (Lambdas)</a></h4>
55565563
<p>
55575564
If the context is a default argument (of a member function parameter)
55585565
appearing in a class definition, the closure class and its members are encoded as follows:
5559-
<code><pre><font color=blue> &lt;<a href="#mangle.local-name">local-name</a>&gt; := Z &lt;<i>function</i> <a href="#mangle.encoding">encoding</a>&gt; Ed [ &lt;<i>parameter</i> <a href="#mangle.number">number</a>&gt; ] _ &lt;<i>entity</i> <a href="#mangle.name">name</a>&gt;
5566+
<code><pre><font color=blue> &lt;<a href="#mangle.local-name">local-name</a>&gt; ::= Z &lt;<i>function</i> <a href="#mangle.encoding">encoding</a>&gt; Ed [ &lt;<i>parameter</i> <a href="#mangle.number">number</a>&gt; ] _ &lt;<i>entity</i> <a href="#mangle.name">name</a>&gt;
55605567
</font></pre></code>
55615568
The parameter number is omitted for the last parameter, 0 for the second-to-last parameter, 1 for the third-to-last parameter, etc.
55625569
The <code>&lt;<i>entity</i> <a href="#mangle.name">name</a>&gt;</code> will of course contain a
@@ -5584,7 +5591,7 @@ <h4><a href="#closure-types">5.1.8 Closure Types (Lambdas)</a></h4>
55845591
member (static or nonstatic), inline variable, or variable template,
55855592
it is encoded in a qualified name with a
55865593
final <code>&lt;<a href="#mangle.prefix">prefix</a>&gt;</code> of the form:
5587-
<code><pre><font color=blue> &lt;data-member-prefix&gt; := &lt;<i>member</i> <a href="#mangle.source-name">source-name</a>&gt; [&lt;<a href="#mangle.template-args">template-args</a>&gt;] M
5594+
<code><pre><font color=blue> &lt;data-member-prefix&gt; ::= &lt;<i>member</i> <a href="#mangle.source-name">source-name</a>&gt; [&lt;<a href="#mangle.template-args">template-args</a>&gt;] M
55885595
</font></pre></code>
55895596
where the <code>&lt;<a href="#mangle.template-args">template-args</a>&gt;</code>
55905597
is present for a closure type within a variable template specialization
@@ -6118,7 +6125,7 @@ <h2><a name="revisions">Appendix R: Revision History</a></h2>
61186125
Reverse treatment of ambiguous arguments to __cxa_demangle (3.4).</p>
61196126

61206127
<p class="revision"><span class="date">[041118]</span>
6121-
Clarify the layout of bitfields.</p>
6128+
Clarify the layout of bit-fields.</p>
61226129

61236130
<p class="revision"><span class="date">[041025]</span>
61246131
Indicate that the TC1 definition of POD is intended in the section
@@ -6361,20 +6368,20 @@ <h2><a name="revisions">Appendix R: Revision History</a></h2>
63616368
Add thunk definition.
63626369
Revise inheritance graph order definition.
63636370
Fix member function pointer description (no division by two).
6364-
Move bitfield allocation description (much modified)
6371+
Move bit-field allocation description (much modified)
63656372
to the non-virtual-base allocation description.
63666373
Replace virtual function calling convention description.</p>
63676374

63686375
<p class="revision"><span class="date">[000228]</span>
63696376
Add thunk definition.
63706377
Revise inheritance graph order definition.
63716378
Fix member function pointer description (no division by two).
6372-
Move bitfield allocation description (much modified)
6379+
Move bit-field allocation description (much modified)
63736380
to the non-virtual-base allocation description.
63746381
Replace virtual function calling convention description.</p>
63756382

63766383
<p class="revision"><span class="date">[000217]</span>
6377-
Add excess-size bitfield specification.
6384+
Add excess-size bit-field specification.
63786385
Add namespace/header section.
63796386
Touch up array new cookies.
63806387
Remove construction vtable example to new file.

0 commit comments

Comments
 (0)