Skip to content

Commit d0306c7

Browse files
committed
Added default null address space value specification in Data Layout string
1 parent dfe826e commit d0306c7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

llvm/docs/LangRef.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3061,6 +3061,14 @@ as follows:
30613061
``n32:64`` for PowerPC 64, or ``n8:16:32:64`` for X86-64. Elements of
30623062
this set are considered to support most general arithmetic operations
30633063
efficiently.
3064+
``z[n]:<value>``
3065+
This specifies the default null value for an address space. ``n`` denotes
3066+
the address space number, and if not specified, it is considered to be
3067+
for the unlisted address space. For unlisted address space, the default
3068+
null value is ``0``. ``value`` denotes the default null value for an
3069+
address space ``n``. To represent negatives values, prefix ``neg`` is
3070+
added to ``value``. for e.g., ``z0:neg1`` represents for ``0`` address
3071+
space ``-1`` is the default null value.
30643072
``ni:<address space0>:<address space1>:<address space2>...``
30653073
This specifies pointer types with the specified address spaces
30663074
as :ref:`Non-Integral Pointer Type <nointptrtype>` s. The ``0``
@@ -3093,6 +3101,7 @@ specifications are given in this list:
30933101
- ``v64:64:64`` - 64-bit vector is 64-bit aligned
30943102
- ``v128:128:128`` - 128-bit vector is 128-bit aligned
30953103
- ``a:0:64`` - aggregates are 64-bit aligned
3104+
- ``z:0`` - default null value of 0 for unlisted(INT_MAX) address space
30963105

30973106
When LLVM is determining the alignment for a given type, it uses the
30983107
following rules:

0 commit comments

Comments
 (0)