summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2003-05-20 22:13:34 +0000
committerWolfgang Bangerth <bangerth@gcc.gnu.org>2003-05-20 16:13:34 -0600
commit5d34c8e946a9df8f7c48739046418b28201077df (patch)
treefca75c3443f240e7da77528540e3e61d193772f2
parenta63996f10f6f3cc5b728849f8afc47e0ae2efedf (diff)
downloadgcc-5d34c8e946a9df8f7c48739046418b28201077df.tar.gz
doc/extend.texi: Put warning into documentation of attribute regparm.
Co-Authored-By: Wolfgang Bangerth <bangerth@dealii.org> From-SVN: r67037
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/doc/extend.texi11
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4ec04bfffd4..c99a4fdaa48 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2003-05-20 Kevin Ryde <user42@zip.com.au>
+ Wolfgang Bangerth <bangerth@dealii.org>
+
+ PR/10355
+ * doc/extend.texi: Put a warning into the documentation
+ of attribute regparm.
+
2003-05-20 Jason Merrill <jason@redhat.com>
* tree.c (expr_last): New fn.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 6006f04f574..dc9646ac5b5 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2368,6 +2368,7 @@ since it is known that the calling function loaded the correct value.
Not all ELF targets support this attribute.
@item regparm (@var{number})
+@cindex @code{regparm} attribute
@cindex functions that are passed arguments in registers on the 386
On the Intel 386, the @code{regparm} attribute causes the compiler to
pass up to @var{number} integer arguments in registers EAX,
@@ -2375,6 +2376,16 @@ EDX, and ECX instead of on the stack. Functions that take a
variable number of arguments will continue to be passed all of their
arguments on the stack.
+Beware that on some ELF systems this attribute is unsuitable for
+global functions in shared libraries with lazy binding (which is the
+default). Lazy binding will send the first call via resolving code in
+the loader, which might assume EAX, EDX and ECX can be clobbered, as
+per the standard calling conventions. Solaris 8 is affected by this.
+GNU systems with GLIBC 2.1 or higher, and FreeBSD, are believed to be
+safe since the loaders there save all registers. (Lazy binding can be
+disabled with the linker or the loader if desired, to avoid the
+problem.)
+
@item stdcall
@cindex functions that pop the argument stack on the 386
On the Intel 386, the @code{stdcall} attribute causes the compiler to