This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFA:] docs: FUNCTION_ARG_CALLEE_COPIES vs. FUNCTION_ARG_PASS_BY_REFERENCE.
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 10 Nov 2002 02:38:34 -0500 (EST)
- Subject: [RFA:] docs: FUNCTION_ARG_CALLEE_COPIES vs. FUNCTION_ARG_PASS_BY_REFERENCE.
I thought the user of FUNCTION_ARG_CALLEE_COPIES would check
FUNCTION_ARG_PASS_BY_REFERENCE so I could just set the former
to 1 for MMIX. No other target agrees, and fixing that, fixes
the majority of the C++ testsuite failures for MMIX mentioned at
<URL:http://gcc.gnu.org/ml/gcc-testresults/2002-11/msg00142.html>.
(See next message for the MMIX fix.)
So I thought maybe time to clarify the docs. Did "make info &&
make dvi", checked overfull messages and output for gccint.{dvi,info*}.
Ok?
* doc/tm.texi (Register Arguments) <FUNCTION_ARG_CALLEE_COPIES>:
Mention connection to FUNCTION_ARG_PASS_BY_REFERENCE.
Index: tm.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/tm.texi,v
retrieving revision 1.180
diff -p -c -r1.180 tm.texi
*** tm.texi 4 Nov 2002 16:57:11 -0000 1.180
--- tm.texi 10 Nov 2002 06:52:14 -0000
*************** definition of this macro might be
*** 3577,3588 ****
@item FUNCTION_ARG_CALLEE_COPIES (@var{cum}, @var{mode}, @var{type}, @var{named})
If defined, a C expression that indicates when it is the called function's
responsibility to make a copy of arguments passed by invisible reference.
! Normally, the caller makes a copy and passes the address of the copy to the
! routine being called. When @code{FUNCTION_ARG_CALLEE_COPIES} is defined and is
! nonzero, the caller does not make a copy. Instead, it passes a pointer to the
! ``live'' value. The called function must not modify this value. If it can be
! determined that the value won't be modified, it need not make a copy;
! otherwise a copy must be made.
@findex FUNCTION_ARG_REG_LITTLE_ENDIAN
@item FUNCTION_ARG_REG_LITTLE_ENDIAN
--- 3577,3590 ----
@item FUNCTION_ARG_CALLEE_COPIES (@var{cum}, @var{mode}, @var{type}, @var{named})
If defined, a C expression that indicates when it is the called function's
responsibility to make a copy of arguments passed by invisible reference.
! When nonzero, @code{FUNCTION_ARG_PASS_BY_REFERENCE} must also return
! nonzero for the same arguments. Normally, the caller makes a copy and
! passes the address of the copy to the routine being called. When
! @code{FUNCTION_ARG_CALLEE_COPIES} is defined and is nonzero, the caller
! does not make a copy. Instead, it passes a pointer to the ``live'' value.
! The called function must not modify this value. If it can be determined
! that the value won't be modified, it need not make a copy; otherwise a
! copy must be made.
@findex FUNCTION_ARG_REG_LITTLE_ENDIAN
@item FUNCTION_ARG_REG_LITTLE_ENDIAN
brgds, H-P