This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Use i386/crtfastmath.c on Solaris 2/x86
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 31 May 2011 14:48:21 +0200
- Subject: Re: Use i386/crtfastmath.c on Solaris 2/x86
- References: <yddaae3rra6.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
On Tue, May 31, 2011 at 2:25 PM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> The only complication is that I need to make sure that SSE insns are only
> used if the host supports them.
>
> Bootstrapped without regressions on i386-pc-solaris2.8,
> i386-pc-solaris2.9, i386-pc-solaris2.11, and sparc-sun-solaris2.11.
>
> The libgcc part depends on the toplevel libgcc patch, so actually
> applying this patch will have to wait until that one is in.
>
> Ok for mainline?
>
> ? ? ? ?Rainer
>
>
> 2011-05-28 ?Rainer Orth ?<ro@CeBiTec.Uni-Bielefeld.DE>
>
> ? ? ? ?gcc:
> ? ? ? ?* config/i386/crtfastmath.c [!__x86_64__ && __sun__ && __svr4__]:
> ? ? ? ?Include <signal.h>, <ucontext.h>.
> ? ? ? ?(sigill_caught): Define.
> ? ? ? ?(sigill_hdlr): New function.
> ? ? ? ?(set_fast_math) [!__x86_64__ && __sun__ && __svr4__]: Check if SSE
> ? ? ? ?insns can be executed.
> ? ? ? ?* config/sol2.h (ENDFILE_SPEC): Use crtfastmath.o if -ffast-math
> ? ? ? ?etc.
> ? ? ? ?* config/sparc/sol2.h (ENDFILE_SPEC): Remove.
>
> ? ? ? ?libgcc:
> ? ? ? ?* config.host (i[34567]86-*-solaris2*): Add i386/t-crtfm to
> ? ? ? ?tmake_file.
> ? ? ? ?Add crtfastmath.o to extra_parts.
Please just put "if (edx & bit_SSE)" part inside existing check. You
will need to split assignment of mxcsr from the declaration, though.
OK with this change.
Thanks,
Uros.