[PATCH] generate power6 DFP instructions

Janis Johnson janis187@us.ibm.com
Thu Sep 6 00:30:00 GMT 2007


On Thu, 2007-09-06 at 02:11 +0200, Jan Hubicka wrote:
> > This patch adds support for generating POWER6 decimal floating point
> > instructions for existing options -mcpu=power6 or -mdfp.  It doesn't
> > support using DFP instructions for SDmode (decimal32), which will be
> > added when GCC can follow the PowerPC ELF ABIs to put SDmode in floating
> > point registers; Peter Bergner is working on that.  It doesn't provide a
> > conversion from TDmode to DDmode, which I will submit separately because
> > I have questions about how it ought to be done.
> > 
> > Conversions between decimal float types and unsigned integer types are
> > done a bit differently from binary float conversions to preserve
> > accuracy for very large integers that are powers of ten.
> > 
> > Tested on powerpc64-linux with -m32/-m64, with some testing on POWER6
> > hardware for DFP tests; OK for trunk?
> > 
> > 2007-08-17  Janis Johnson  <janis187@us.ibm.com>
> > 
> > gcc/
> > 	* optabs.c (expand_float): Convert unsigned integer as signed only
> > 	if it provides sufficient accuracy; add mode argument to real_2expN.
> > 	(expand_fix): Fix comment typos; extend binary float into mode
> > 	wider than destination for converion to unsigned integer; add mode
> > 	argument to real_2expN.
> > 	* real.c (real_2expN): Add mode argument to special-case decimal
> > 	float values.
> > 	* real.h (real_2expN): Ditto.
> 
> This changes need updating in i386 backend. I've checked in the
> following obvious patch that lets me to bootstrap.

Oh dear, real_2expN is also called from the following:

  ada/trans.c
  config/m68k/m68k.c
  config/mips/mips.md
  config/s390/s390.md

Janis



More information about the Gcc-patches mailing list