aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/extend.texi
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r--gcc/doc/extend.texi83
1 files changed, 52 insertions, 31 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 7427825..616e05e 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -31,7 +31,6 @@ extensions, accepted by GCC in C90 mode and in C++.
* Thread-Local:: Per-thread variables.
* OpenMP:: Multiprocessing extensions.
* OpenACC:: Extensions for offloading code to accelerator devices.
-* _Countof:: The number of elements of arrays.
* Inline:: Defining inline functions (as fast as macros).
* Volatiles:: What constitutes an access to a volatile object.
* Using Assembly Language with C:: Instructions and extensions for interfacing C with assembler.
@@ -3971,6 +3970,27 @@ threads, such as the POSIX @code{swapcontext} function. This attribute
adds a @code{BTI J} instruction when BTI is enabled e.g. via
@option{-mbranch-protection}.
+@cindex @code{preserve_none} function attribute, AArch64
+@item preserve_none
+Use this attribute to change the procedure call standard of the specified
+function to the preserve-none variant.
+
+The preserve-none ABI variant modifies the AAPCS such that has no callee-saved
+registers (including SIMD and floating-point registers). That is, with the
+exception of the stack register, link register (r30), and frame pointer (r29),
+all registers are caller saved, and can be used as scratch registers by the
+callee.
+
+Additionally, registers r20--r28, r0--r7, r10--r14, r9 and r15 are used for
+argument passing, in that order. For Microsoft Windows targets
+r15 is not used for argument passing.
+
+The return value registers remain r0 and r1 in both cases.
+
+All other details are the same as for the AAPCS ABI.
+
+This ABI has not been stabilized, and may be subject to change in future
+versions.
@end table
The above target attributes can be specified as follows:
@@ -10890,36 +10910,6 @@ library.
@xref{OpenMP and OpenACC Options}, for additional options useful with
@option{-fopenacc}.
-@node _Countof
-@section Determining the Number of Elements of Arrays
-@cindex _Countof
-@cindex number of elements
-
-The keyword @code{_Countof} determines
-the number of elements of an array operand.
-Its syntax is similar to @code{sizeof}.
-The operand must be
-a parenthesized complete array type name
-or an expression of such a type.
-For example:
-
-@smallexample
-int a[n];
-_Countof (a); // returns n
-_Countof (int [7][3]); // returns 7
-@end smallexample
-
-The result of this operator is an integer constant expression,
-unless the array has a variable number of elements.
-The operand is only evaluated
-if the array has a variable number of elements.
-For example:
-
-@smallexample
-_Countof (int [7][n++]); // integer constant expression
-_Countof (int [n++][7]); // run-time value; n++ is evaluated
-@end smallexample
-
@node Inline
@section An Inline Function is As Fast As a Macro
@cindex inline functions
@@ -13341,6 +13331,7 @@ C and/or C++ standards, while others remain specific to GNU C.
* Labels as Values:: Getting pointers to labels, and computed gotos.
* Nested Functions:: Nested functions in GNU C.
* Typeof:: @code{typeof}: referring to the type of an expression.
+* _Countof:: Determining the number of elements of arrays
* Offsetof:: Special syntax for @code{offsetof}.
* Alignment:: Determining the alignment of a function, type or variable.
* Enum Extensions:: Forward declarations and specifying the underlying type.
@@ -13977,6 +13968,36 @@ evaluated only once when using @code{__auto_type}, but twice if
@code{typeof} is used.
@end itemize
+@node _Countof
+@subsection Determining the Number of Elements of Arrays
+@findex _Countof
+@findex number of elements
+
+The keyword @code{_Countof} determines
+the number of elements of an array operand.
+Its syntax is similar to @code{sizeof}.
+The operand must be
+a parenthesized complete array type name
+or an expression of such a type.
+For example:
+
+@smallexample
+int a[n];
+_Countof (a); // returns n
+_Countof (int [7][3]); // returns 7
+@end smallexample
+
+The result of this operator is an integer constant expression,
+unless the array has a variable number of elements.
+The operand is only evaluated
+if the array has a variable number of elements.
+For example:
+
+@smallexample
+_Countof (int [7][n++]); // integer constant expression
+_Countof (int [n++][7]); // run-time value; n++ is evaluated
+@end smallexample
+
@node Offsetof
@subsection Support for @code{offsetof}
@findex __builtin_offsetof