This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, RS6000] Fix __builtin_{pack,unpack}_longdouble and __builtin_{pack,unpack}_dec128 builtins


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]