This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH version 2, rs6000] Add builtins to convert from float/double to int/long using current rounding mode
On Wed, Sep 13, 2017 at 06:08:45PM -0500, Segher Boessenkool wrote:
> On Tue, Sep 12, 2017 at 07:17:07PM -0400, Michael Meissner wrote:
> > On Tue, Sep 12, 2017 at 05:41:34PM -0500, Segher Boessenkool wrote:
> > > This needs "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT" I think? Which
> > > is the same as "TARGET_DF_FPR". "lrint<mode>di2" also has "TARGET_FPRND"
> > > but that is a mistake I think. Cc:ing Mike for that.
> >
> > TARGET_FPRND is for ISA 2.02 (power5+) which added the various round to integer
> > instructions. So, unless we are going to stop supporting older machines, it is
> > needed.
>
> I think you have this a bit wrong?
>
> ISA 2.02 added fri*, but that's round to integer, not convert.
>
> ISA 2.06 added some fc[ft]i* instructions, but most are in base PowerPC
> already.
>
> And FPRND is enabled at ISA 2.04 and later?
Perhaps, I wasn't paying close attention of the exact instructions.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797