This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH], PR target/78597, Fix PowerPC fp-int-convert-{float128-ieee,float64x}
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Tue, 31 Jan 2017 05:07:40 -0600
- Subject: Re: [PATCH], PR target/78597, Fix PowerPC fp-int-convert-{float128-ieee,float64x}
- Authentication-results: sourceware.org; auth=none
- References: <20170131012100.GA28913@ibm-tiger.the-meissners.org>
On Mon, Jan 30, 2017 at 08:21:00PM -0500, Michael Meissner wrote:
> This patch fixes PR target/78597 on PowerPC. The basic problem is conversion
> between unsigned int and _Float128 fails for 0x80000000. Both power{7,8} using
> simulated IEEE 128-bit floating point and power9 using hardware IEEE 128-bit
> failed in the same test.
>
> I cut down the patches I had developed for 79038 that are waiting for GCC 8 to
> open up to include the patches that fix the problem, but don't do additional
> improvements (optimizing conversions between char/short and _Float128, and
> optimizing converting _Float128 to int/short/char and storing the result).
>
> This patch is a little on the big side, because I deleted the two functions
> (convert_float128_to_int and (convert_int_to_float128) that were doing the
> integer/_Float128 conversions, and instead implemented them directly. I also
> deleted the various insns that those two functions called. It only affects
> _Float128/__float128 conversions.
Yes, it looks quite safe like this. Thanks for the rework.
Just two very very minor things:
> (define_expand "floatsi<mode>2"
> + rtx op1 = operands[1];
Trailing space here.
> +;; Conersion between IEEE 128-bit and integer types
> +(define_insn "fix_<mode>di2_hw"
Typo (conversion).
Okay for trunk with those fixed. Thanks!
Segher