From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.2 required=3.0 tests=AWL,BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 2F2921F463 for ; Mon, 23 Sep 2019 17:54:17 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=mFI3GoZMMpUpJvYY l355CMy3xsvDAZ/ajZq89mWoJmj4uLk4I/3iwSFWkrmwKU04cgU58bortGiBzio+ 93HkIelRAuduCUBNuSTnbGY9Xt8IJFVaR4cN/IFdBrsEsZ3NFYKZAOKBVfzicD+5 dc9NtB8F6hqaPBjRMIQQi/YjK8g= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=jjgYzcuL2EI4+4ZdyF4xGn BrPVY=; b=NvNgBHzkAS0UEDzd9mH6qBdfrChDtX2qIfXuqK3O8KT+5EcP8mzHl8 p/kiIZ0SwJk7XXklS8Thzm4qP/bZWbSHlnvRQkDZoYVjPytJal6cTACgn1fko/th araILovZrSph94qFiaG3/ekzZ34jA8L0iqpspyzvN/JiiNRXuUGPA= Received: (qmail 57319 invoked by alias); 23 Sep 2019 17:54:15 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 57310 invoked by uid 89); 23 Sep 2019 17:54:14 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx0a-001b2d01.pphosted.com Subject: Re: [PATCH v2 4/6] [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write To: Paul E Murphy , libc-alpha@sourceware.org Cc: tuliom@ascii.art.br References: <1568918810-20393-1-git-send-email-pc@us.ibm.com> <1568918810-20393-5-git-send-email-pc@us.ibm.com> <943be10e-497d-1066-42cf-12164c71ed28@linux.ibm.com> From: Paul Clarke Message-ID: <5651ac5e-8b7e-3596-b7c9-617cae7dea3f@us.ibm.com> Date: Mon, 23 Sep 2019 12:54:05 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <943be10e-497d-1066-42cf-12164c71ed28@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Thanks for the review, Paul! Question... On 9/23/19 10:54 AM, Paul E Murphy wrote: > On 9/19/19 1:46 PM, Paul A. Clarke wrote: >> libc_feholdsetround_noex_ppc_ctx currently does, basically: > The listing reads awkwardly for me. I suggest a little cleanup. There is no need to post a new patch against my suggestion. Here you say "listing", and there is a list (1-2-3) immediately below this text, and below you say "commit message", . Where would you like to see improvement? Happy to change, but it's hard for me to see what you're seeing. (And, of course, it's all perfectly clear to me since I wrote it! ;-) >> 1. Read FPSCR, save to context. >> 2. Create new FPSCR value: clear enables and set new rounding mode. >> 3. Write new value to FPSCR. >> >> Since other bits just pass through, there is no need to write them. >> >> Instead, write just the changed values (enables and rounding mode), >> which can be a bit more efficient. >> >> 2019-09-19  Paul A. Clarke  >> >>     * sysdeps/powerpc/fpu/fenv_private.h >>     (libc_feholdsetround_noex_ppc_ctx): Call fesetenv_mode instead >>     of fesetenv_register. >> --- >> v2: No change. >> >>   sysdeps/powerpc/fpu/fenv_private.h | 2 +- >>   1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/sysdeps/powerpc/fpu/fenv_private.h b/sysdeps/powerpc/fpu/fenv_private.h >> index 9496026..ade0bfa 100644 >> --- a/sysdeps/powerpc/fpu/fenv_private.h >> +++ b/sysdeps/powerpc/fpu/fenv_private.h >> @@ -142,7 +142,7 @@ libc_feholdsetround_noex_ppc_ctx (struct rm_ctx *ctx, int r) >>     if (__glibc_unlikely (new.l != old.l)) >>       { >>         __TEST_AND_ENTER_NON_STOP (old.l, 0ULL); >> -      fesetenv_register (new.fenv); >> +      fesetenv_mode (new.fenv); >>         ctx->updated_status = true; >>       } >>     else >> > > OK, with suggested cleanup to commit message. > > Reviewed-By: Paul E Murphy PC