summaryrefslogtreecommitdiffstats
path: root/gnu/gcc/0002-4.7.2-ffast-math.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/gcc/0002-4.7.2-ffast-math.patch')
-rw-r--r--gnu/gcc/0002-4.7.2-ffast-math.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/gnu/gcc/0002-4.7.2-ffast-math.patch b/gnu/gcc/0002-4.7.2-ffast-math.patch
new file mode 100644
index 0000000000..47c5d40fe8
--- /dev/null
+++ b/gnu/gcc/0002-4.7.2-ffast-math.patch
@@ -0,0 +1,63 @@
+From e655b07e077e8f458c35e3515f50ca8e3ba72753 Mon Sep 17 00:00:00 2001
+From: Florian Franzmann <siflfran@hawo.stw.uni-erlangen.de>
+Date: Sun, 24 Feb 2013 11:56:29 +0100
+Subject: [PATCH 2/3] 4.7.2 ffast-math
+
+---
+ libgcc/config/i386/crtfastmath.c | 33 +++++++++++++++++----------------
+ 1 file changed, 17 insertions(+), 16 deletions(-)
+
+diff --git a/libgcc/config/i386/crtfastmath.c b/libgcc/config/i386/crtfastmath.c
+index 7abe500..392086e 100644
+--- a/libgcc/config/i386/crtfastmath.c
++++ b/libgcc/config/i386/crtfastmath.c
+@@ -50,6 +50,23 @@ sigill_hdlr (int sig __attribute((unused)),
+ }
+ #endif
+
++struct
++{
++ unsigned short int cwd;
++ unsigned short int swd;
++ unsigned short int twd;
++ unsigned short int fop;
++ long int fip;
++ long int fcs;
++ long int foo;
++ long int fos;
++ long int mxcsr;
++ long int mxcsr_mask;
++ long int st_space[32];
++ long int xmm_space[32];
++ long int padding[56];
++} __attribute__ ((aligned (16))) fxsave;
++
+ static void __attribute__((constructor))
+ #ifndef __x86_64__
+ /* The i386 ABI only requires 4-byte stack alignment, so this is necessary
+@@ -96,22 +113,6 @@ set_fast_math (void)
+ if (edx & bit_FXSAVE)
+ {
+ /* Check if DAZ is available. */
+- struct
+- {
+- unsigned short int cwd;
+- unsigned short int swd;
+- unsigned short int twd;
+- unsigned short int fop;
+- long int fip;
+- long int fcs;
+- long int foo;
+- long int fos;
+- long int mxcsr;
+- long int mxcsr_mask;
+- long int st_space[32];
+- long int xmm_space[32];
+- long int padding[56];
+- } __attribute__ ((aligned (16))) fxsave;
+
+ __builtin_memset (&fxsave, 0, sizeof (fxsave));
+
+--
+1.8.1.3
+