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], PR target/78597, Fix PowerPC fp-int-convert-{float128-ieee,float64x}


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


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