diff mbox

[RFA] Fix REGNO_OK_FOR_BASE_P doc

Message ID 11867423-1C72-4B84-BB0B-D1153412E060@dell.com
State New
Headers show

Commit Message

Paul Koning Oct. 25, 2010, 9:19 p.m. UTC
Ian mentioned that REGNO_OK_FOR_BASE_P only applies in strict settings, so the documentation is wrong.  I assume the same goes for the various other macros just like it.

The attached patch fixes this documentation issue.  I moved the description of REG_OK_STRICT to the section for GO_IF_LEGITIMATE_ADDRESS since that is now the only place where it is referenced.

Ok to commit?

	paul

ChangeLog:

2010-10-25  Paul Koning  <ni1d@arrl.net>

	* doc/tm.texi.in (REGNO_OK_FOR_BASE_P, REGNO_MODE_OK_FOR_BASE_P,
	REGNO_MODE_OK_FOR_REG_BASE, REGNO_MODE_CODE_OK_FOR_BASE_P,
	REGNO_OK_FOR_INDEX_P): Delete non-strict variant.
	(REG_OK_STRICT): Move description.
	* doc/tm.texi: Regenerate.

Comments

Ian Lance Taylor Oct. 29, 2010, 9:27 p.m. UTC | #1
Paul Koning <paul_koning@Dell.com> writes:

> 2010-10-25  Paul Koning  <ni1d@arrl.net>
>
> 	* doc/tm.texi.in (REGNO_OK_FOR_BASE_P, REGNO_MODE_OK_FOR_BASE_P,
> 	REGNO_MODE_OK_FOR_REG_BASE, REGNO_MODE_CODE_OK_FOR_BASE_P,
> 	REGNO_OK_FOR_INDEX_P): Delete non-strict variant.
> 	(REG_OK_STRICT): Move description.
> 	* doc/tm.texi: Regenerate.

This is OK.

Thanks.

Ian
Paul Koning Oct. 29, 2010, 9:34 p.m. UTC | #2
Thanks!  Committed.

	paul

On Oct 29, 2010, at 5:27 PM, Ian Lance Taylor wrote:

> Paul Koning <paul_koning@Dell.com> writes:
> 
>> 2010-10-25  Paul Koning  <ni1d@arrl.net>
>> 
>> 	* doc/tm.texi.in (REGNO_OK_FOR_BASE_P, REGNO_MODE_OK_FOR_BASE_P,
>> 	REGNO_MODE_OK_FOR_REG_BASE, REGNO_MODE_CODE_OK_FOR_BASE_P,
>> 	REGNO_OK_FOR_INDEX_P): Delete non-strict variant.
>> 	(REG_OK_STRICT): Move description.
>> 	* doc/tm.texi: Regenerate.
> 
> This is OK.
> 
> Thanks.
> 
> Ian
diff mbox

Patch

Index: doc/tm.texi.in
===================================================================
--- doc/tm.texi.in	(revision 165842)
+++ doc/tm.texi.in	(working copy)
@@ -2502,17 +2502,6 @@ 
 @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.
-Like @code{TARGET_LEGITIMATE_ADDRESS_P}, this macro should also
-define a strict and a non-strict variant.  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})
@@ -2524,8 +2513,6 @@ 
 @code{REGNO_OK_FOR_BASE_P}.  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_MODE_OK_FOR_REG_BASE_P (@var{num}, @var{mode})
@@ -2538,8 +2525,6 @@ 
 
 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})
@@ -2552,8 +2537,6 @@ 
 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})
@@ -2570,8 +2553,6 @@ 
 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
 
 @hook TARGET_PREFERRED_RELOAD_CLASS
@@ -5499,8 +5480,13 @@ 
 @noindent
 and should @code{goto @var{label}} if the address @var{x} is a valid
 address on the target machine for a memory operand of mode @var{mode}.
-Whether the strict or non-strict variants are desired is defined by
-the @code{REG_OK_STRICT} macro introduced earlier in this section.
+
+@findex REG_OK_STRICT
+Compiler source files that want to use the strict variant of this
+macro 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.
+
 Using the hook is usually simpler because it limits the number of
 files that are recompiled when changes are made.
 @end deftypefn