Commit 5d34c8e9 by Kevin Ryde Committed by Wolfgang Bangerth

doc/extend.texi: Put warning into documentation of attribute regparm.

Co-Authored-By: Wolfgang Bangerth <bangerth@dealii.org>

From-SVN: r67037
parent a63996f1
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.
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment