public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bugdal at aerifal dot cx" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/60138] superh single/double precision fpu mode setting is backwards and unusable
Date: Thu, 13 Mar 2014 20:56:00 -0000	[thread overview]
Message-ID: <bug-60138-4-lV7jRwSPgg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-60138-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60138

--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> ---
> No need to move it to TLS, since the FPSCR register is usually already part of
> an execution context (i.e. thread) and will be saved and restored accordingly.

This does not help. The compiler constantly clobbers the FPSCR with the values
read from __fpscr_values[]. If you want to affect a change to the fpu behavior,
you'd have to modify the values in this array, and they are global, not
thread-local, which is wrong.

If use of __fpscr_values is eliminated, of course this will not matter.

Right now this is a blocking issue for musl libc having properly a working sh
port (floating point tests fail because fenv is not honored). We could treat sh
as a no-fenv port, but I'd rather not do that since the hardware does have
working fenv and it's just gcc messing it up; also we don't really support
no-fenv targets in a conforming way (we don't provide errno for math functions)
so I'd much rather have fenv.


      parent reply	other threads:[~2014-03-13 20:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-10 21:16 [Bug target/60138] New: " bugdal at aerifal dot cx
2014-03-13 20:48 ` [Bug target/60138] " olegendo at gcc dot gnu.org
2014-03-13 20:56 ` bugdal at aerifal dot cx [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=bug-60138-4-lV7jRwSPgg@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).