Skip to content

Commit 1a09f8f

Browse files
author
git apple-llvm automerger
committed
Merge commit 'eb70253fcbe5' from llvm.org/main into next
2 parents ad92d6b + eb70253 commit 1a09f8f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

llvm/docs/LangRef.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3109,8 +3109,7 @@ as follows:
31093109
``S<size>``
31103110
Specifies the natural alignment of the stack in bits. Alignment
31113111
promotion of stack variables is limited to the natural stack
3112-
alignment to avoid dynamic stack realignment. The stack alignment
3113-
must be a multiple of 8-bits. If omitted, the natural stack
3112+
alignment to avoid dynamic stack realignment. If omitted, the natural stack
31143113
alignment defaults to "unspecified", which does not prevent any
31153114
alignment promotions.
31163115
``P<address space>``
@@ -3136,8 +3135,8 @@ as follows:
31363135
Defaults to the default address space of 0.
31373136
``p[n]:<size>:<abi>[:<pref>][:<idx>]``
31383137
This specifies the *size* of a pointer and its ``<abi>`` and
3139-
``<pref>``\erred alignments for address space ``n``. ``<pref>`` is optional
3140-
and defaults to ``<abi>``. The fourth parameter ``<idx>`` is the size of the
3138+
``<pref>``\erred alignments for address space ``n``.
3139+
The fourth parameter ``<idx>`` is the size of the
31413140
index that used for address calculation, which must be less than or equal
31423141
to the pointer size. If not
31433142
specified, the default index size is equal to the pointer size. All sizes
@@ -3147,23 +3146,21 @@ as follows:
31473146
``i<size>:<abi>[:<pref>]``
31483147
This specifies the alignment for an integer type of a given bit
31493148
``<size>``. The value of ``<size>`` must be in the range [1,2^24).
3150-
``<pref>`` is optional and defaults to ``<abi>``.
31513149
For ``i8``, the ``<abi>`` value must equal 8,
31523150
that is, ``i8`` must be naturally aligned.
31533151
``v<size>:<abi>[:<pref>]``
31543152
This specifies the alignment for a vector type of a given bit
31553153
``<size>``. The value of ``<size>`` must be in the range [1,2^24).
3156-
``<pref>`` is optional and defaults to ``<abi>``.
31573154
``f<size>:<abi>[:<pref>]``
31583155
This specifies the alignment for a floating-point type of a given bit
31593156
``<size>``. Only values of ``<size>`` that are supported by the target
31603157
will work. 32 (float) and 64 (double) are supported on all targets; 80
31613158
or 128 (different flavors of long double) are also supported on some
31623159
targets. The value of ``<size>`` must be in the range [1,2^24).
3163-
``<pref>`` is optional and defaults to ``<abi>``.
31643160
``a:<abi>[:<pref>]``
31653161
This specifies the alignment for an object of aggregate type.
3166-
``<pref>`` is optional and defaults to ``<abi>``.
3162+
In addition to the usual requirements for alignment values,
3163+
the value of ``<abi>`` can also be zero, which means one byte alignment.
31673164
``F<type><abi>``
31683165
This specifies the alignment for function pointers.
31693166
The options for ``<type>`` are:
@@ -3202,6 +3199,9 @@ as follows:
32023199
as :ref:`Non-Integral Pointer Type <nointptrtype>` s. The ``0``
32033200
address space cannot be specified as non-integral.
32043201

3202+
Unless explicitly stated otherwise, on every specification that specifies
3203+
an alignment, the value of the alignment must be in the range [1,2^16)
3204+
and must be a power of two times the width of a byte.
32053205
On every specification that takes a ``<abi>:<pref>``, specifying the
32063206
``<pref>`` alignment is optional. If omitted, the preceding ``:``
32073207
should be omitted too and ``<pref>`` will be equal to ``<abi>``.

0 commit comments

Comments
 (0)