public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [PATCH, i386]: Do not compile crtfastmath.c and crtprec.c for soft-float targets
Date: Sun, 03 Nov 2013 10:14:00 -0000	[thread overview]
Message-ID: <CAFULd4Y7apz-tPa5NsLZgk1Rw04BKhHG-NSxFZExqwCRaXp=Eg@mail.gmail.com> (raw)

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

Hello!

There is no point to access FP hardware for soft-float targets.

2013-11-03  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/crtfastmath.c: Compile only for !_SOFT_FLOAT.
    * config/i386/crtprec.c: Ditto.

Tested on x86_64-pc-linux-gnu, committed to mainline SVN.

Uros.

[-- Attachment #2: l.diff.txt --]
[-- Type: text/plain, Size: 915 bytes --]

Index: config/i386/crtfastmath.c
===================================================================
--- config/i386/crtfastmath.c	(revision 204324)
+++ config/i386/crtfastmath.c	(working copy)
@@ -21,6 +21,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#ifndef _SOFT_FLOAT
 #define MXCSR_DAZ (1 << 6)	/* Enable denormals are zero mode */
 #define MXCSR_FTZ (1 << 15)	/* Enable flush to zero mode */
 
@@ -134,3 +135,4 @@
   __builtin_ia32_ldmxcsr (mxcsr);
 #endif
 }
+#endif
Index: config/i386/crtprec.c
===================================================================
--- config/i386/crtprec.c	(revision 204324)
+++ config/i386/crtprec.c	(working copy)
@@ -21,6 +21,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#ifndef _SOFT_FLOAT
 #if __PREC == 32
  #define X87CW		(0 << 8)	/* Single precision (24 bits) */
 #elif __PREC == 64
@@ -45,3 +46,4 @@
 
   asm volatile ("fldcw\t%0" : : "m" (cwd));
 }
+#endif

                 reply	other threads:[~2013-11-03 10:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAFULd4Y7apz-tPa5NsLZgk1Rw04BKhHG-NSxFZExqwCRaXp=Eg@mail.gmail.com' \
    --to=ubizjak@gmail.com \
    --cc=gcc-patches@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).