public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Piotr Kubaj <pkubaj@anongoth.pl>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
	gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: Re: [PATCH V2] powerpc: properly check for feenableexcept() on FreeBSD
Date: Fri, 13 May 2022 12:34:05 +0200	[thread overview]
Message-ID: <Yn40HQyWk5+Vr2jz@KGPE-D16> (raw)
In-Reply-To: <56585bab-71b3-1713-d8ed-bed80cfe5ec4@linux.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1834 bytes --]

On 22-05-13 10:59:59, Kewen.Lin wrote:
> on 2022/5/13 04:16, Segher Boessenkool wrote:
> > Hi Piotr,
> > 
> > On Tue, May 03, 2022 at 12:21:12PM +0200, pkubaj@FreeBSD.org wrote:
> >> FreeBSD/powerpc* has feenableexcept() defined in fenv.h header.
> > 
> > Declared, not defined.  These are required to be real functions (on all
> > platforms that have these functions), not macros or inlines or whatever.
> > 
> 
> Piotr's reply "FreeBSD doesn't have this function in libm, it's
> implemented in /usr/include/fenv.h." from [1] made me feel like
> it's a definition instead of declaration.  So I thought the check
> should use AC_LINK_IFELSE instead, since one fenv.h which doesn't
> have the definition can still pass the proposed AC_COMPILE_IFELSE
> check.
> 
> I just did a further search, the powerpc fenv.h [2] does include
> the definition of feenableexcept.  By comparison, the x86 fenv.h [3]
> doesn't.  But I'm not sure if it's the same as what Piotr's
> environments have.  Hope it's similar. :-)
> 
> [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593193.html
> [2] https://github.com/freebsd/freebsd-src/blob/main/lib/msun/powerpc/fenv.h
> [3] https://github.com/freebsd/freebsd-src/blob/main/lib/msun/x86/fenv.h

Yes, it's a definition and thanks for confirming that. As for why it's not in libm, I asked a developer about that:
03:04 <@adalava> It shouldn't be difficulted but I moved to other thing after months looking at FPE in kernel, bugs in context switch and msun test cases failing :-P

As far as I know, there are currently no plans to move it to libm on powerpc. riscv, arm and arm64 are in the same boat.

I will follow with a next patch that will check for feenableexcept() in fenv.h if libm check is unsuccessful.

Thanks,
Piotr Kubaj.

> 
> BR,
> Kewen
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-05-13 10:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 10:21 pkubaj
2022-05-03 10:33 ` Piotr Kubaj
2022-05-10 23:32   ` Piotr Kubaj
2022-05-12  7:20     ` Kewen.Lin
2022-05-12 20:16 ` Segher Boessenkool
2022-05-13  2:59   ` Kewen.Lin
2022-05-13 10:34     ` Piotr Kubaj [this message]
2022-05-13 12:53       ` Segher Boessenkool
2022-05-14  5:46     ` Piotr Kubaj

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=Yn40HQyWk5+Vr2jz@KGPE-D16 \
    --to=pkubaj@anongoth.pl \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@linux.ibm.com \
    --cc=segher@kernel.crashing.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).