aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2013-12-11 20:50:56 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2013-12-11 20:50:56 +0100
commit711df88d24be13cfb2be62905db08994ffbe9a2d (patch)
tree616c7233ee1ce5d5f32e62d991dd9e454dcff515
parent12893402ec1718a978e540eb1f6bd9c32a4555ab (diff)
downloadgcc-711df88d24be13cfb2be62905db08994ffbe9a2d.zip
gcc-711df88d24be13cfb2be62905db08994ffbe9a2d.tar.gz
gcc-711df88d24be13cfb2be62905db08994ffbe9a2d.tar.bz2
fpu-387.h (sigill_hdlr, [...]): Emit
2013-12-11 Tobias Burnus <burnus@net-b.de> * config/fpu-387.h (sigill_hdlr, get_fpu_rounding_mode): Emit * SSE instructions when __SSE_MATH__ is defined. From-SVN: r205903
-rw-r--r--libgfortran/ChangeLog5
-rw-r--r--libgfortran/config/fpu-387.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 02524ad..ec2be14 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-11 Tobias Burnus <burnus@net-b.de>
+
+ * config/fpu-387.h (sigill_hdlr, get_fpu_rounding_mode): Emit SSE
+ instructions when __SSE_MATH__ is defined.
+
2013-12-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* intrinsics/erfc_scaled.c (_M_2_SQRTPI): Define if missing.
diff --git a/libgfortran/config/fpu-387.h b/libgfortran/config/fpu-387.h
index b35c315..0317ef1 100644
--- a/libgfortran/config/fpu-387.h
+++ b/libgfortran/config/fpu-387.h
@@ -23,7 +23,7 @@ a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
-#ifndef __x86_64__
+#ifndef __SSE_MATH__
#include "cpuid.h"
#endif
@@ -50,7 +50,7 @@ sigill_hdlr (int sig __attribute((unused)),
static int
has_sse (void)
{
-#ifndef __x86_64__
+#ifndef __SSE_MATH__
unsigned int eax, ebx, ecx, edx;
if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
@@ -227,7 +227,7 @@ get_fpu_rounding_mode (void)
{
int round_mode;
-#ifdef __x86_64__
+#ifdef __SSE_MATH__
unsigned int cw;
__asm__ __volatile__ ("%vstmxcsr\t%0" : "=m" (cw));