This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA:] Improve "asm-reg in asm" documentation (was: Re: [m68k]asm regression with 3.3/3.4/3.5)


On Mon, 13 Sep 2004, Hans-Peter Nilsson wrote:

> (BTW, I noticed there's a duplicate
> named-operands blurb right before it.  I'll remove that as obvious because
> the first copy is better placed.)

Like follows (only for reference; don't apply this patch).
For the record, I was wrong:

Index: extend.texi
===================================================================
RCS file: /mnt/auto/localgcccvs/gcc/gcc/doc/extend.texi,v
retrieving revision 1.215
diff -u -p -r1.215 extend.texi
--- extend.texi	10 Sep 2004 11:26:20 -0000	1.215
+++ extend.texi	13 Sep 2004 05:05:35 -0000
@@ -3551,15 +3551,6 @@ register (copying it afterward to @code{
 since the register for operand 1 is not even mentioned in the assembler
 code, the result will not work, but GCC can't tell that.

-As of GCC version 3.1, one may write @code{[@var{name}]} instead of
-the operand number for a matching constraint.  For example:
-
-@smallexample
-asm ("cmoveq %1,%2,%[result]"
-     : [result] "=r"(result)
-     : "r" (test), "r"(new), "[result]"(old));
-@end smallexample
-
 Some instructions clobber specific hard registers.  To describe this,
 write a third colon after the input operands, followed by the names of
 the clobbered hard registers (given as strings).  Here is a realistic

This (non-)copy specifies the equivalent of "0" as a constraint
using named operands.  I think there's improvement for the
wording or example there to make the matchingness point clear,
but I don't have any.

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]