From patchwork Mon Oct 25 21:19:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Koning X-Patchwork-Id: 69141 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 4440CB70A9 for ; Tue, 26 Oct 2010 08:19:50 +1100 (EST) Received: (qmail 30140 invoked by alias); 25 Oct 2010 21:19:49 -0000 Received: (qmail 30129 invoked by uid 22791); 25 Oct 2010 21:19:47 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausxippc101.us.dell.com (HELO ausxippc101.us.dell.com) (143.166.85.207) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Oct 2010 21:19:43 +0000 X-Loopcount0: from 10.152.240.141 Subject: [RFA] Fix REGNO_OK_FOR_BASE_P doc Mime-Version: 1.0 (Apple Message framework v1081) From: Paul Koning In-Reply-To: Date: Mon, 25 Oct 2010 17:19:40 -0400 Cc: Ian Lance Taylor Message-Id: <11867423-1C72-4B84-BB0B-D1153412E060@dell.com> References: To: gcc-patches Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 * 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. 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