This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is there an error in GCC Internals Manual, chapter 16.4?
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Panu-Kristian Poiksalo <poiksalo at gmail dot com>
- Cc: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sun, 19 Oct 2014 19:47:51 +0200
- Subject: Re: Is there an error in GCC Internals Manual, chapter 16.4?
- Authentication-results: sourceware.org; auth=none
- References: <CAE3UJgxGOonOu8LvUd6dD=9nCFBOuASimDDF9N-bg3C-Wmnh5g at mail dot gmail dot com>
Panu-Kristian Poiksalo <poiksalo@gmail.com> writes:
> Chapter 16.4, "RTL Template" in GCC Internals Manual, found at
> https://gcc.gnu.org/onlinedocs/gccint/RTL-Template.html#RTL-Template
> has this to say about match_scratch:
>
> "
> (match_scratch:m n constraint)
> This expression is also a placeholder for operand number n and
> indicates that operand must be a scratch or reg expression.
>
> When matching patterns, this is equivalent to
>
> (match_operand:m n "scratch_operand" pred)
> "
> I'm wondering what is "pred" in this context?
I think it is supposed to be "constraint". This error is already
present in the first revision of the file. I have installed this patch
in trunk as obvious. Thanks for the report.
Andreas.
* doc/md.texi (RTL Template) [match_scratch]: Correct equivalent
match_operand expression.
Index: doc/md.texi
===================================================================
--- doc/md.texi (revision 216440)
+++ doc/md.texi (working copy)
@@ -297,7 +297,7 @@
When matching patterns, this is equivalent to
@smallexample
-(match_operand:@var{m} @var{n} "scratch_operand" @var{pred})
+(match_operand:@var{m} @var{n} "scratch_operand" @var{constraint})
@end smallexample
but, when generating RTL, it produces a (@code{scratch}:@var{m})
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."