From: Jakub Jelinek <jakub@redhat.com>
To: Steven Munroe <munroesj@us.ibm.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>,
Ulrich Drepper <drepper@redhat.com>,
Peter Eberlein <eberlein@us.ibm.com>
Subject: Re: [PATCH] PPC fenv fixes. 3rd update
Date: Sat, 14 Apr 2007 17:32:00 -0000 [thread overview]
Message-ID: <20070414173839.GL1826@sunsite.mff.cuni.cz> (raw)
In-Reply-To: <46157538.5050407@us.ibm.com>
On Thu, Apr 05, 2007 at 05:16:24PM -0500, Steven Munroe wrote:
> > You should be using magic numbers, like in the i386 port.
> >
> >
> Upated the patch to define FE_NOMASK_ENV as FE_ENABLED_ENV and
> FE_MASK_ENV as FE_DFL_ENV. On PPC we can't use magic numbers because
> fesetenv takes (fenc_t *envp).
Hm, why can't you use the magic numbers? fesetenv takes (fenv_t *envp)
on all arches, yet all but ppc manage to handle magic numbers.
> + GLIBC_2.4 {
> + # symbols used in macros from sysdeps/powerpc/bits/fenv.h
> + __fe_mask_env;
> + }
Current glibc development uses GLIBC_2.6. But I don't think you
want to export this at all.
> + /* If the old env has no eabled exceptions and the new env has any enabled
> + exceptions, then unmask SIGFPE in the MSR FE0/FE1 bits. This will put
> + the hardware into "precise mode" and may cause the FPU to run slower on
> + some hardware. */
> + if ((old.l[1] & 0x000000F8) == 0 && (new.l[1] & 0x000000F8) != 0)
> + __fe_nomask_env;
I thought __fe_nomask_env is a function, so __fe_nomask_env just evaluates
to the address of that function and is being thrown away immediately, i.e.
a nop.
> + /* If the old env had any eabled exceptions and the new env has no enabled
> + exceptions, then mask SIGFPE in the MSR FE0/FE1 bits. This may allow the
> + FPU to run faster because it always takes the default action and can not
> + generate SIGFPE. */
> + if ((old.l[1] & 0x000000F8) != 0 && (new.l[1] & 0x000000F8) == 0)
> + __fe_mask_env;
Here too and in several other places as well.
Jakub
next prev parent reply other threads:[~2007-04-14 17:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-22 14:49 [PATCH] fenv fixes for x86_64/i386/ia64 Jakub Jelinek
2007-03-22 21:46 ` Steven Munroe
2007-03-27 15:53 ` [PATCH] PPC fenv fixes Steven Munroe
[not found] ` <20070327160708.GA355@devserv.devel.redhat.com>
2007-03-27 18:07 ` Steven Munroe
2007-03-28 15:29 ` Steven Munroe
2007-04-05 2:27 ` Richard Henderson
2007-04-05 22:00 ` [PATCH] PPC fenv fixes. 3rd update Steven Munroe
2007-04-14 17:32 ` Jakub Jelinek [this message]
2007-04-17 0:09 ` Richard Henderson
[not found] ` <20070417002157.GI355@devserv.devel.redhat.com>
2007-04-30 21:45 ` Steven Munroe
2007-04-02 16:43 ` [PATCH] [PORTS] PPC fenv fixes for soft-fp Steven Munroe
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=20070414173839.GL1826@sunsite.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=eberlein@us.ibm.com \
--cc=libc-hacker@sources.redhat.com \
--cc=munroesj@us.ibm.com \
/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).