This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, RS6000] Fix __builtin_{pack,unpack}_longdouble and __builtin_{pack,unpack}_dec128 builtins
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- Date: Sun, 04 May 2014 21:20:08 -0500
- Subject: Re: [PATCH, RS6000] Fix __builtin_{pack,unpack}_longdouble and __builtin_{pack,unpack}_dec128 builtins
- Authentication-results: sourceware.org; auth=none
- References: <1399073674 dot 30798 dot 4 dot camel at otta> <CAGWvny=dbD-dVsQ3Ddzd08RNSFxh2ifdRRSmc9y6ug-BmbJDPA at mail dot gmail dot com>
On Sun, 2014-05-04 at 17:39 -0400, David Edelsohn wrote:
> On Fri, May 2, 2014 at 7:34 PM, Peter Bergner <bergner@vnet.ibm.com> wrote:
> > @@ -2517,6 +2518,7 @@ extern int frame_pointer_needed;
> > #define RS6000_BTM_POPCNTD MASK_POPCNTD /* Target supports ISA 2.06. */
> > #define RS6000_BTM_CELL MASK_FPRND /* Target is cell powerpc. */
> > #define RS6000_BTM_DFP MASK_DFP /* Decimal floating point. */
> > +#define RS6000_BTM_HARD_FLOAT MASK_SOFT_FLOAT /* Hardware floating point. */
>
> It's a little confusing that the use reverses the polarity of the mask meaning.
Agreed, but since there is no MASK_HARD_FLOAT, we're stuck with that.
However, the use of the MASK here is only used to define which bit within
the builtin bitmask corresponds to hard float. The actual setting of
the builtin bitmask occurs below in rs6000_builtin_mask_calculate and
there we use the BTM mask we defined above.
> > Index: gcc/config/rs6000/rs6000.c
> > ===================================================================
> > --- gcc/config/rs6000/rs6000.c (revision 209990)
> > +++ gcc/config/rs6000/rs6000.c (working copy)
> > @@ -3039,7 +3039,8 @@ rs6000_builtin_mask_calculate (void)
> > | ((TARGET_P8_VECTOR) ? RS6000_BTM_P8_VECTOR : 0)
> > | ((TARGET_CRYPTO) ? RS6000_BTM_CRYPTO : 0)
> > | ((TARGET_HTM) ? RS6000_BTM_HTM : 0)
> > - | ((TARGET_DFP) ? RS6000_BTM_DFP : 0));
> > + | ((TARGET_DFP) ? RS6000_BTM_DFP : 0)
> > + | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT: 0));
>
> This is missing a space between RS6000_BTM_HARD_FLOAT and ":".
Fixed.
> This is okay on trunk and all branches.
Thanks, committed to trunk as revision 210054, 4.9 as revision 210055
and to 4.8 as revision 210056.
Peter