public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	libc-alpha@sourceware.org
Subject: Re: [PATCH] alpha: Remove s_ceil{f} and s_floor{f} implementation (BZ#22665)
Date: Thu, 04 Jan 2018 18:57:00 -0000	[thread overview]
Message-ID: <1cbb6661-9d94-ee0d-e8bb-d886bbe96fe5@twiddle.net> (raw)
In-Reply-To: <1515002624-26820-1-git-send-email-adhemerval.zanella@linaro.org>

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~

      reply	other threads:[~2018-01-04 18:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-03 18:03 Adhemerval Zanella
2018-01-04 18:57 ` Richard Henderson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1cbb6661-9d94-ee0d-e8bb-d886bbe96fe5@twiddle.net \
    --to=rth@twiddle.net \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).