This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Enable TFmode for x86
- From: "Uros Bizjak" <ubizjak at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, "Ian Lance Taylor" <ian at airs dot com>, "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 2 Jul 2008 09:15:16 +0200
- Subject: Re: PATCH: Enable TFmode for x86
- References: <20080629191054.GA2797@lucon.org> <6dc9ffc80806291357w40e70638ie5e19fa799438cf5@mail.gmail.com> <Pine.LNX.4.64.0806292153200.17773@digraph.polyomino.org.uk> <20080630000955.GA26829@lucon.org> <5787cf470806300547p435c4ae7o84ad9c880a09761@mail.gmail.com> <20080630140746.GA1108@lucon.org> <486924EE.10706@gmail.com> <6dc9ffc80807011443k731bdff8h7b51cdb20c7e3dcf@mail.gmail.com> <Pine.LNX.4.64.0807012154050.5121@digraph.polyomino.org.uk> <20080702031402.GA4693@lucon.org>
On Wed, Jul 2, 2008 at 5:14 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Jul 01, 2008 at 09:57:01PM +0000, Joseph S. Myers wrote:
>> On Tue, 1 Jul 2008, H.J. Lu wrote:
>>
>> > while keeping the old version. It turns out that mkmap-symver.awk only
>> > supports one version per symbol. My patch extends to multiple versions.
>> > Since symbol version is only needed for shared library. I need to a way to
>> > tell if we are compiling for shared library. I added -DSHARED to
>> > shared-object.mk and provided backward compatibility for x86-64.
>>
>> This requires specific testing:
>>
>> * A binary (64-bit) built with current 4.3 branch with references to the
>> symbols in question at GCC_3.0 in shared libgcc should continue to run
>> with libgcc built with the patched compiler.
>>
>> * Such a binary built with the patched compiler should request the symbols
>> in question at version GCC_4.3.0 and not GCC_3.0 (and so not work if run
>> against the old libgcc).
>>
>> If that works and the patch is approved for trunk then the 4.3.0 version
>> should also be added on 4.3 branch.
>>
>
> I noticed a few issues:
>
> 1. __divtc3 and __multc3 should have GCC_4.3.0.
> 2. config/libgcc-glibc.ver should use %exclude before redefining
> version.
>
> This patch fixes those issues. There are no regressions on Linux/ia32,
> Linux/ia64 and Linux/x86-64. I will post 4.4 vs. 4.3 results at
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36669
>
> OK for trunk.
386 backend (modulo library) parts are OK with a few nits below,
however libgcc parts should be approved by Ian, since I have no deep
knowledge in this area.
> +#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
> + __asm__ ("sub{l} {%11,%3|%3,%11}\n\t" \
> + "sbb{l} {%9,%2|%2,%9}\n\t" \
> + "sbb{l} {%7,%1|%1,%7}\n\t" \
> + "sbb{l} {%5,%0|%0,%5}" \
> + : "=r" ((USItype) (r3)), \
> + "=&r" ((USItype) (r2)), \
> + "=&r" ((USItype) (r1)), \
> + "=&r" ((USItype) (r0)) \
> + : "0" ((USItype) (x3)), \
> + "g" ((USItype) (y3)), \
> + "1" ((USItype) (x2)), \
> + "g" ((USItype) (y2)), \
> + "2" ((USItype) (x1)), \
> + "g" ((USItype) (y1)), \
> + "3" ((USItype) (x0)), \
> + "im" ((USItype) (y0)))
Please add a %%% comment that "im" constraint is due to reload
problems in the asm above. The correct constraint is "g".
> --- gcc/libgcc/config/i386/32/t-fprules-softfp.quad 2008-07-01 09:30:35.000000000 -0700
> +++ gcc/libgcc/config/i386/32/t-fprules-softfp 2008-07-01 14:12:51.000000000 -0700
> @@ -0,0 +1,8 @@
> +# Filter out TImode functions
> +tifunctions = fixtfti.c fixunstfti.c floattitf.c floatuntitf.c
> +tifunctions := $(addprefix $(gcc_srcdir)/config/soft-fp/, $(tifunctions))
> +
> +LIB2ADD := $(filter-out $(tifunctions), $(LIB2ADD))
> +
> +# Provide fallbacks for __builtin_copysignq nor __builtin_fabsq.
__builtin_copysignq _and_ __builtin_fabsq.
Thanks,
Uros.