]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* doc/extend.texi (pcs): Document new attribute for ARM.
authorRichard Earnshaw <rearnsha@arm.com>
Thu, 6 Aug 2009 16:47:57 +0000 (16:47 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Thu, 6 Aug 2009 16:47:57 +0000 (16:47 +0000)
From-SVN: r150531

gcc/ChangeLog
gcc/doc/extend.texi

index eb457ba8e1be85a94cfef3690f84f54ca0dc1654..578b682403eb44ce8311bcce26c489cdfbabc8c2 100644 (file)
@@ -1,3 +1,7 @@
+2009-08-06  Richard Earnshaw  <rearnsha@arm.com>
+
+       * doc/extend.texi (pcs): Document new attribute for ARM.
+
 2009-08-06  Richard Earnshaw  <rearnsha@arm.com>
 
        * arm.c (pcs_attribute_args): Comment out unsupported attribute
index b545c328e2cb2051c2cac57b867f2688f71ef8c5..3435e2c108799f63e5fa90d81c2a00a9fa76f21d 100644 (file)
@@ -2830,6 +2830,28 @@ compiled with more aggressive optimization options that produce faster
 and larger code, while other functions can be called with less
 aggressive options.
 
+@item pcs
+@cindex @code{pcs} function attribute
+
+The @code{pcs} attribute can be used to control the calling convention
+used for a function on ARM.  The attribute takes an argument that specifies
+the calling convention to use.
+
+When compiling using the AAPCS ABI (or a variant of that) then valid
+values for the argument are @code{"aapcs"} and @code{"aapcs-vfp"}.  In
+order to use a variant other than @code{"aapcs"} then the compiler must
+be permitted to use the appropriate co-processor registers (i.e., the
+VFP registers must be available in order to use @code{"aapcs-vfp"}).
+For example,
+
+@smallexample
+/* Argument passed in r0, and result returned in r0+r1.  */
+double f2d (float) __attribute__((pcs("aapcs")));
+@end smallexample
+
+Variadic functions always use the @code{"aapcs"} calling convention and
+the compiler will reject attempts to specify an alternative.
+
 @item pure
 @cindex @code{pure} function attribute
 Many functions have no effects except the return value and their