On 3/1/23 05:32, Jakub Jelinek via Gcc-patches wrote:
Hi!

On Wed, Nov 16, 2022 at 12:51:14PM +0100, Jakub Jelinek via Gcc-patches wrote:
On Wed, Nov 16, 2022 at 10:06:17AM +0100, Jakub Jelinek via Gcc-patches wrote:
Thoughts on this?  I guess my preference would be the BF -> SF -> TI
path because we won't need to waste
     32: 0000000000015e10   321 FUNC    GLOBAL DEFAULT   13 
__fixbfti@@GCC_13.0.0
     89: 0000000000015f60   299 FUNC    GLOBAL DEFAULT   13 
__fixunsbfti@@GCC_13.0.0
If so, I'd need to cut the fix parts of the patch below and
do something in the middle-end.

Here is adjusted patch that does that.

2022-11-16  Jakub Jelinek  <ja...@redhat.com>

        PR target/107703
        * optabs.cc (expand_fix): For conversions from BFmode to integral,
        use shifts to convert it to SFmode first and then convert SFmode
        to integral.

        * soft-fp/floattibf.c: New file.
        * soft-fp/floatuntibf.c: New file.
        * config/i386/libgcc-glibc.ver: Export __float{,un}tibf @ GCC_13.0.0.
        * config/i386/64/t-softfp (softfp_extras): Add floattibf and
        floatuntibf.
        (CFLAGS-floattibf.c, CFLAGS-floatunstibf.c): Add -msse2.

I'd like to ping the libgcc non-i386 part of this patch, Uros said the i386
part is ok but that one depends on the generic libgcc changes.
I'll ping the optabs.cc change separately.

https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606398.html
with more info in
https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606382.html
The optab changes are OK too.
jeff

Reply via email to