From: Paolo Bonzini <bonzini@gnu.org>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH doc] Always mention existence of both strict and nonstrict versions of macros
Date: Tue, 21 Apr 2009 11:16:00 -0000 [thread overview]
Message-ID: <gsk9su$t00$1@ger.gmane.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 27 bytes --]
As per the subject.
Paolo
[-- Attachment #2: fff --]
[-- Type: text/plain, Size: 2836 bytes --]
2009-04-21 Paolo Bonzini <bonzini@gnu.org>
* doc/tm.texi (REGNO_OK_FOR_BASE_P, REGNO_MODE_OK_FOR_BASE_P,
REGNO_MODE_OK_FOR_REG_BASE_P, REGNO_MODE_CODE_OK_FOR_BASE_P,
REGNO_OK_FOR_INDEX_P): Mention strict/nonstrict difference.
Index: gcc/doc/tm.texi
===================================================================
--- gcc/doc/tm.texi (branch legitimate-address-p)
+++ gcc/doc/tm.texi (working copy)
@@ -2466,9 +2466,18 @@ added to another register (as well as ad
@defmac REGNO_OK_FOR_BASE_P (@var{num})
A C expression which is nonzero if register number @var{num} is
-suitable for use as a base register in operand addresses. It may be
-either a suitable hard register or a pseudo register that has been
-allocated such a hard register.
+suitable for use as a base register in operand addresses.
+Like @code{GO_IF_LEGITIMATE_ADDRESS}, this macro should also
+exist in strict or non-strict variants. Both variants behave
+the same for hard register; for pseudos, the strict variant will
+pass only those that have been allocated to a valid hard registers,
+while the non-strict variant will pass all pseudos.
+
+@findex REG_OK_STRICT
+Compiler source files that want to use the strict variant of this and
+other macros define the macro @code{REG_OK_STRICT}. You should use an
+@code{#ifdef REG_OK_STRICT} conditional to define the strict variant in
+that case and the non-strict variant otherwise.
@end defmac
@defmac REGNO_MODE_OK_FOR_BASE_P (@var{num}, @var{mode})
@@ -2481,6 +2490,7 @@ you define this macro, the compiler will
addresses that appear outside a @code{MEM}, i.e., as an
@code{address_operand}.
+This macro also has strict and non-strict variants.
@end defmac
@defmac REGNO_MODE_OK_FOR_REG_BASE_P (@var{num}, @var{mode})
@@ -2493,6 +2503,8 @@ than other base register uses.
Use of this macro is deprecated; please use the more general
@code{REGNO_MODE_CODE_OK_FOR_BASE_P}.
+
+This macro also has strict and non-strict variants.
@end defmac
@defmac REGNO_MODE_CODE_OK_FOR_BASE_P (@var{num}, @var{mode}, @var{outer_code}, @var{index_code})
@@ -2505,6 +2517,8 @@ address, @code{ADDRESS} for something th
corresponding index expression if @var{outer_code} is @code{PLUS};
@code{SCRATCH} otherwise. The mode may be @code{VOIDmode} for addresses
that appear outside a @code{MEM}, i.e., as an @code{address_operand}.
+
+This macro also has strict and non-strict variants.
@end defmac
@defmac REGNO_OK_FOR_INDEX_P (@var{num})
@@ -2521,6 +2535,8 @@ labeling is used must fit the machine's
may serve in each capacity. The compiler will try both labelings,
looking for one that is valid, and will reload one or both registers
only if neither labeling works.
+
+This macro also has strict and non-strict variants.
@end defmac
@defmac PREFERRED_RELOAD_CLASS (@var{x}, @var{class})
next reply other threads:[~2009-04-21 11:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-21 11:16 Paolo Bonzini [this message]
2009-04-24 23:15 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='gsk9su$t00$1@ger.gmane.org' \
--to=bonzini@gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).