From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28223 invoked by alias); 1 Jun 2011 17:29:39 -0000 Received: (qmail 28213 invoked by uid 22791); 1 Jun 2011 17:29:38 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_MX,TW_TM,TW_XC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Jun 2011 17:29:25 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 335899A5; Wed, 1 Jun 2011 19:29:24 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id h88bJlZv2AVI; Wed, 1 Jun 2011 19:29:22 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id A2D589A4; Wed, 1 Jun 2011 19:29:22 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p51HTLSC022984; Wed, 1 Jun 2011 19:29:21 +0200 (MEST) From: Rainer Orth To: Richard Henderson Cc: Uros Bizjak , gcc-patches@gcc.gnu.org Subject: Re: Use i386/crtfastmath.c on Solaris 2/x86 References: <4DE675B4.5040801@redhat.com> Date: Wed, 01 Jun 2011 17:29:00 -0000 In-Reply-To: <4DE675B4.5040801@redhat.com> (Richard Henderson's message of "Wed, 01 Jun 2011 10:24:04 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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-06/txt/msg00074.txt.bz2 Richard Henderson writes: > On 06/01/2011 07:51 AM, Rainer Orth wrote: >> + /* Set PC to the instruction after the faulting one to skip over it, >> + otherwise we enter an infinite loop. 4 is the size of the stmxcsr >> + instruction. */ > ... >> + /* We need a single SSE instruction here so the handler can safely skip >> + over it. */ >> + __asm__ volatile ("movss %xmm2,%xmm1"); > > The comment referencing stmxcsr doesn't match the movss code. > It's still a 4 byte opcode, so the code still works. Copy-and-paste error ;-( We already have the same code in libgfortran/config/fpu-387.h and (without the comment) in gcc/testsuite/lib/target-supports.exp. I still mean to fix driver-i386.c to correcly handle -march=native on Solaris 8 and 9 which cannot in general execute SSE insns. I wonder if there's a better place to share this code? > I do wonder if using "movaps %xmm0,%xmm0" might be cleaner, > to avoid clobbering a register, even if that register is > surely dead anyway. That's a 3 byte opcode though, so the > handler would need updating. I'll give it a try. Thanks. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University