From: Steven Munroe <munroesj@us.ibm.com>
To: Jakub Jelinek <jakub@redhat.com>,
Glibc hackers <libc-hacker@sources.redhat.com>,
Richard Henderson <rth@twiddle.net>
Cc: Ulrich Drepper <drepper@redhat.com>,
Peter Eberlein <eberlein@us.ibm.com>
Subject: Re: [PATCH] PPC fenv fixes. 3rd update
Date: Mon, 30 Apr 2007 21:45:00 -0000 [thread overview]
Message-ID: <46366787.2070202@us.ibm.com> (raw)
In-Reply-To: <20070417002157.GI355@devserv.devel.redhat.com>
Jakub Jelinek wrote:
> On Mon, Apr 16, 2007 at 05:07:25PM -0700, Richard Henderson wrote:
>
>> On Sat, Apr 14, 2007 at 07:38:39PM +0200, Jakub Jelinek wrote:
>>
>>> 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.
>>>
>> Assuming a userland has all bits available for user mapping,
>> there may be no easy space to reserve. In which case I'd export
>> some dummy variables from libc, and compare vs their addresses.
>>
>
> Even then, as fenv_t is 64-bit on ppc (double), values
> (const fenv_t *)-7 through (const fenv_t *)-1 can be safely used
> as magic numbers - a valid fenv_t object can't cross the end of
> the address space.
>
>
Sorry for the delayed responce, I was on vacation.
Actually the problem is the FPSCR is floating point register and can
only be transfer to/from a FPR. That is why fenv_t is defined as double
*. Also with Power6 the FPSCR contains DFP rounding bits in the high
32-bits of the double.
So passing a magic number that is not a double or a pointer to double
would require an extra GPR store just to reload it as an FPR for
transfer to the FPSCR. This would only complicate things.
Also FE_ENABLED_ENV and FE_DFL_ENV are #defines to the addresses of
existing static doubles which already contain the appropriate magic
numbers. So why shouldn't I use them?
next prev parent reply other threads:[~2007-04-30 21:45 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
2007-04-17 0:09 ` Richard Henderson
[not found] ` <20070417002157.GI355@devserv.devel.redhat.com>
2007-04-30 21:45 ` Steven Munroe [this message]
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=46366787.2070202@us.ibm.com \
--to=munroesj@us.ibm.com \
--cc=drepper@redhat.com \
--cc=eberlein@us.ibm.com \
--cc=jakub@redhat.com \
--cc=libc-hacker@sources.redhat.com \
--cc=rth@twiddle.net \
/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).