From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91544 invoked by alias); 4 Jan 2018 18:57:52 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 91530 invoked by uid 89); 4 Jan 2018 18:57:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=H*Ad:U*rth, states X-HELO: mail-pl0-f45.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tE0GVAXcIE6AdgAtbIz5s4rh8nL2Ves5NmaHvo2A2JE=; b=VgOBrids6igkq27I1heXhKqbZMEm4NLxhI0jzZ1LzoNoBfInu76h2pSY/wfLw3F6/k m2B7yb+e7+DlwUKif8JibEq38bILBn7QGFIv5bilVYU7h8Bn7fXJt4+W4qnUwxn/IQQo i54KQ3m8+uQx8g+HDYLFXEwxJu9vxRQs4WgQEC+esieFL6X4t5ljU6Js6L3vXpML03eE QIvPjxLvIsd3UK7hR9C2HYdLNtktfEJfwxN7HDeITUKOkoMTv6vo2/6f/LtcHSoVXWiN BbXx5ipBjJvKp7LmoZ1i3GfBiMoYuUx+3YQUi3RZBnFeVsztVSJW69qA3R8ci0SZUTKB zRwQ== X-Gm-Message-State: AKGB3mKJ80ykwqVXK2/VoI1r66ZUOJwFaHf1Xecxin/sFzyhfbg7VdjE 2uRE85dHqsy8K8HeFzOPcEWHGHmX X-Google-Smtp-Source: ACJfBotwwHUg1N0akqDazYjKQIBfwkVeqCB8eCkUbNa+OVkOe98725jklFMYG/LMJ4DMFAdqdvEkYg== X-Received: by 10.84.246.130 with SMTP id m2mr480193pll.394.1515092268336; Thu, 04 Jan 2018 10:57:48 -0800 (PST) Subject: Re: [PATCH] alpha: Remove s_ceil{f} and s_floor{f} implementation (BZ#22665) To: Adhemerval Zanella , libc-alpha@sourceware.org References: <1515002624-26820-1-git-send-email-adhemerval.zanella@linaro.org> From: Richard Henderson Message-ID: <1cbb6661-9d94-ee0d-e8bb-d886bbe96fe5@twiddle.net> Date: Thu, 04 Jan 2018 18:57:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1515002624-26820-1-git-send-email-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-01/txt/msg00147.txt.bz2 On 01/03/2018 10:03 AM, Adhemerval Zanella wrote: > As discussed in libc-alpha [1], alpha ceil{f} and floor{f} > implementation uses cvttq/svm and although the Alpha Architecture > Handbook version 3 states that that CVTfi OUTPUT Exceptions > (B.3 Mapping to IEEE Standard) should not generate Inexact if INE > bit is set on fpcr, the Alpha 21264 [1] chip manual (A.8 IEEE > Floating-Point Conformance) states that CVTfi and CVTif OUTPUT > does generate inexact exception for inexact result regardless. > > As Joseph noted [2] to correctly fix it on alpha we need to either > avoid the instruction or avoid any inexact bit from it being set > on return from the function (while preserving the inexact bit that > might be set on the entry to the function). The later will result > mf_fpcr followed by a mt_fpcr to get and set the fpcr which will > defeat the optimization itself. > > So the patch just remove the alpha optimized and rely on generic > implementation. It fixes the math/test-*-{ceil,floor} on alpha. > > [BZ #15479] > [BZ #22665] > * sysdeps/alpha/fpu/s_ceil.c: Remove file. > * sysdeps/alpha/fpu/s_ceilf.c: Likewise. > * sysdeps/alpha/fpu/s_floor.c: Likewise. > * sysdeps/alpha/fpu/s_floorf.c: Likewise. ACK. r~