Patchwork correct TARGET_ADDR_SPACE_SUBSET_P documentation.

login
register
mail settings
Submitter Bingfeng Mei
Date Sept. 26, 2011, 11:59 a.m.
Message ID <7FB04A5C213E9943A72EE127DB74F0ADD15FD2FA93@SJEXCHCCR02.corp.ad.broadcom.com>
Download mbox | patch
Permalink /patch/116410/
State New
Headers show

Comments

Bingfeng Mei - Sept. 26, 2011, 11:59 a.m.
Richard,
Here are updated patches. tm.texi.in doesn't need any change as the 
description of the hook is correct, just the order of parameters needs
change.

Thanks,
Bingfeng



2011-09-26  Bingfeng Mei <bmei@broad.com>
	* doc/tm.texi: Correct documentation for TARGET_ADDR_SPACE_SUBSET_P.
	* target.def: (subset_p): Likewise.




> -----Original Message-----
> From: Richard Guenther [mailto:richard.guenther@gmail.com]
> Sent: 26 September 2011 12:03
> To: Bingfeng Mei
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH] correct TARGET_ADDR_SPACE_SUBSET_P documentation.
> 
> On Mon, Sep 26, 2011 at 11:20 AM, Bingfeng Mei <bmei@broadcom.com>
> wrote:
> > 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?
> 
> Please also adjust target.def and tm.texi.in.
> 
> >
> > Cheers,
> > Bingfeng Mei
> >
> > 2011-09-26  Bingfeng Mei <bmei@broad.com>
> >        * 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
> >
> >
Richard Guenther - Sept. 26, 2011, 12:37 p.m.
On Mon, Sep 26, 2011 at 1:59 PM, Bingfeng Mei <bmei@broadcom.com> wrote:
> Richard,
> Here are updated patches. tm.texi.in doesn't need any change as the
> description of the hook is correct, just the order of parameters needs
> change.

Ok.

Thanks,
Richard.

> Thanks,
> Bingfeng
>
>
>
> 2011-09-26  Bingfeng Mei <bmei@broad.com>
>        * doc/tm.texi: Correct documentation for TARGET_ADDR_SPACE_SUBSET_P.
>        * target.def: (subset_p): Likewise.
>
>
> Index: target.def
> ===================================================================
> --- target.def  (revision 178972)
> +++ target.def  (working copy)
> @@ -1546,7 +1546,7 @@ DEFHOOK
>  DEFHOOK
>  (subset_p,
>  "",
> - bool, (addr_space_t superset, addr_space_t subset),
> + bool, (addr_space_t subset, addr_space_t superset),
>  default_addr_space_subset_p)
>
>  /* Function to convert an rtl expression from one address space to another.  */
> 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
>
>
>> -----Original Message-----
>> From: Richard Guenther [mailto:richard.guenther@gmail.com]
>> Sent: 26 September 2011 12:03
>> To: Bingfeng Mei
>> Cc: gcc-patches@gcc.gnu.org
>> Subject: Re: [PATCH] correct TARGET_ADDR_SPACE_SUBSET_P documentation.
>>
>> On Mon, Sep 26, 2011 at 11:20 AM, Bingfeng Mei <bmei@broadcom.com>
>> wrote:
>> > 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?
>>
>> Please also adjust target.def and tm.texi.in.
>>
>> >
>> > Cheers,
>> > Bingfeng Mei
>> >
>> > 2011-09-26  Bingfeng Mei <bmei@broad.com>
>> >        * 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
>> >
>> >
>
>
>

Patch

Index: target.def
===================================================================
--- target.def  (revision 178972)
+++ target.def  (working copy)
@@ -1546,7 +1546,7 @@  DEFHOOK
 DEFHOOK
 (subset_p,
  "",
- bool, (addr_space_t superset, addr_space_t subset),
+ bool, (addr_space_t subset, addr_space_t superset),
  default_addr_space_subset_p)

 /* Function to convert an rtl expression from one address space to another.  */
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