From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2477 invoked by alias); 14 Jul 2014 08:05:40 -0000 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 Received: (qmail 2462 invoked by uid 89); 14 Jul 2014 08:05:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Jul 2014 08:05:36 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 14 Jul 2014 09:05:29 +0100 Received: from [10.1.208.24] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Jul 2014 09:05:28 +0100 Message-ID: <53C38F48.6000200@arm.com> Date: Mon, 14 Jul 2014 08:05:00 -0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Uros Bizjak , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH, i386]: Optimize ix86_atomic_assign_expand_fenv a bit References: In-Reply-To: X-MC-Unique: 114071409053000101 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00945.txt.bz2 On 12/07/14 10:07, Uros Bizjak wrote: > Hello! > > Attached patch optimizes ix86_atomic_assign_expand_fenv by using > register form of "fnstsw %ax" instead of "fnstsw ". This way a > memory RW cycle is removed for a temporary. Hi Uros, The patch you attached seems to be the hook implementation for alpha... Kyrill > 2014-07-12 Uros Bizjak > > * config/i386/i386-builtin-types.def: Add USHORT_FTYPE_VOID. > Remove VOID_FTYPE_PUSHORT. > * config/i386/i386.c (bdesc_special_args) <__builtin_ia32_fnstsw>: > Change code to USHORT_FTYPE_VOID. > (ix86_expand_special_args_builtin): Handle USHORT_FTYPE_VOID. > (ix86_expand_builtin): Remove IX86_BUILTIN_FNSTSW handling. > (ix86_atomic_assign_expand_fenv): Update for > __builtin_ia32_fnstsw changes. > * config/i386/i386.md (x86_fnstsw_1): Set length unconditionally to = 2. > (fnstsw): Change operand 0 to nonimmediate operand. > > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32} and > committed to mainline SVN. > > Uros.