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: Powerpc64 long double support


On Sat, Mar 06, 2004 at 11:30:23PM -0800, Richard Henderson wrote:
> On Sun, Mar 07, 2004 at 05:07:08PM +1030, Alan Modra wrote:
> > -  operands[2] = CONST0_RTX (DFmode);
> > +  REAL_VALUE_TYPE rv;
> > +  /* Make a -0.0 */
> > +  memset (&rv, 0, sizeof (rv));
> > +  rv.sign = 1;
> > +  operands[2] = CONST_DOUBLE_FROM_REAL_VALUE (rv, DFmode);
> 
> How about 
> 
>   REAL_VALUE_TYPE rv = REAL_VALUE_NEGATE (dconst0);

Well, it's nicer to hide the details of REAL_VALUE_TYPE, but..
REAL_VALUE_NEGATE needs NEGATE_EXPR.  ie. you need to arrange for
tree.h to be included in insn-emit.c.  An easy patch to genemit.c,
but is it a good idea?  Also, real_arithmetic2 is slower than memset.

Hmm, I suppose I could roll my own dconstm0 or even dfmode_m0_rtx.
Doesn't seem worth it though.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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