* [PATCH, i386]: Do not compile crtfastmath.c and crtprec.c for soft-float targets
@ 2013-11-03 10:14 Uros Bizjak
0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2013-11-03 10:14 UTC (permalink / raw)
To: gcc-patches
[-- 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-03 10:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-03 10:14 [PATCH, i386]: Do not compile crtfastmath.c and crtprec.c for soft-float targets Uros Bizjak
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).