From patchwork Mon Sep 26 09:20:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bingfeng Mei X-Patchwork-Id: 116394 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 81521B6F64 for ; Mon, 26 Sep 2011 19:31:30 +1000 (EST) Received: (qmail 25299 invoked by alias); 26 Sep 2011 09:30:02 -0000 Received: (qmail 20783 invoked by uid 22791); 26 Sep 2011 09:20:32 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mms1.broadcom.com (HELO mms1.broadcom.com) (216.31.210.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Sep 2011 09:20:18 +0000 Received: from [10.16.192.232] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Mon, 26 Sep 2011 02:26:50 -0700 X-Server-Uuid: 02CED230-5797-4B57-9875-D5D2FEE4708A Received: from SJEXCHCCR02.corp.ad.broadcom.com ([10.16.192.130]) by SJEXCHHUB02.corp.ad.broadcom.com ([10.16.192.232]) with mapi; Mon, 26 Sep 2011 02:20:04 -0700 From: "Bingfeng Mei" To: "gcc-patches@gcc.gnu.org" cc: "Richard Guenther" Date: Mon, 26 Sep 2011 02:20:00 -0700 Subject: [PATCH] correct TARGET_ADDR_SPACE_SUBSET_P documentation. Message-ID: <7FB04A5C213E9943A72EE127DB74F0ADD15FD2FA10@SJEXCHCCR02.corp.ad.broadcom.com> MIME-Version: 1.0 X-IsSubscribed: yes 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 Hi, I notice the following description is different from how spu & m32c use it. In internal manual: bool TARGET_ADDR_SPACE_SUBSET_P (addr space t superset, [Target Hook] addr space t subset) Define this to return whether the subset named address space is contained within the superset named address space. Pointers to a named address space that is a subset of another named address space will be converted automatically without a cast if used together in arithmetic operations. Pointers to a superset address space can be converted to pointers to a subset address space via explicit casts. In spu & m32c ports: m32c_addr_space_subset_p (addr_space_t subset, addr_space_t superset) spu_addr_space_subset_p (addr_space_t subset, addr_space_t superset) I believe the document is wrong. The first argument is subset and the second one is superset. I attached the patch below. OK for trunk? Cheers, Bingfeng Mei 2011-09-26 Bingfeng Mei * doc/tm.texi: Correct documentation for TARGET_ADDR_SPACE_SUBSET_P. Index: doc/tm.texi =================================================================== --- doc/tm.texi (revision 178972) +++ doc/tm.texi (working copy) @@ -10256,7 +10256,7 @@ hook is the same as the @code{TARGET_LEG except that it includes explicit named address space support. @end deftypefn -@deftypefn {Target Hook} bool TARGET_ADDR_SPACE_SUBSET_P (addr_space_t @var{superset}, addr_space_t @var{subset}) +@deftypefn {Target Hook} bool TARGET_ADDR_SPACE_SUBSET_P (addr_space_t @var{subset}, addr_space_t @var{superset}) Define this to return whether the @var{subset} named address space is contained within the @var{superset} named address space. Pointers to a named address space that is a subset of another named address space