From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11778 invoked by alias); 31 May 2011 12:48:57 -0000 Received: (qmail 11763 invoked by uid 22791); 31 May 2011 12:48:56 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_MX,TW_XC X-Spam-Check-By: sourceware.org Received: from mail-pw0-f47.google.com (HELO mail-pw0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 May 2011 12:48:22 +0000 Received: by pwj9 with SMTP id 9so2170653pwj.20 for ; Tue, 31 May 2011 05:48:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.186.13 with SMTP id j13mr1080716wff.25.1306846102080; Tue, 31 May 2011 05:48:22 -0700 (PDT) Received: by 10.142.78.4 with HTTP; Tue, 31 May 2011 05:48:21 -0700 (PDT) In-Reply-To: References: Date: Tue, 31 May 2011 14:23:00 -0000 Message-ID: Subject: Re: Use i386/crtfastmath.c on Solaris 2/x86 From: Uros Bizjak To: Rainer Orth Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg02424.txt.bz2 On Tue, May 31, 2011 at 2:25 PM, Rainer Orth 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? > > =A0 =A0 =A0 =A0Rainer > > > 2011-05-28 =A0Rainer Orth =A0 > > =A0 =A0 =A0 =A0gcc: > =A0 =A0 =A0 =A0* config/i386/crtfastmath.c [!__x86_64__ && __sun__ && __s= vr4__]: > =A0 =A0 =A0 =A0Include , . > =A0 =A0 =A0 =A0(sigill_caught): Define. > =A0 =A0 =A0 =A0(sigill_hdlr): New function. > =A0 =A0 =A0 =A0(set_fast_math) [!__x86_64__ && __sun__ && __svr4__]: Chec= k if SSE > =A0 =A0 =A0 =A0insns can be executed. > =A0 =A0 =A0 =A0* config/sol2.h (ENDFILE_SPEC): Use crtfastmath.o if -ffas= t-math > =A0 =A0 =A0 =A0etc. > =A0 =A0 =A0 =A0* config/sparc/sol2.h (ENDFILE_SPEC): Remove. > > =A0 =A0 =A0 =A0libgcc: > =A0 =A0 =A0 =A0* config.host (i[34567]86-*-solaris2*): Add i386/t-crtfm to > =A0 =A0 =A0 =A0tmake_file. > =A0 =A0 =A0 =A0Add 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.