Commit 8b02e720 by Uros Bizjak Committed by Uros Bizjak

sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE instructions when __TARGET_SSE__ is defined.

libgcc/ChangeLog:

2013-12-09  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE
	instructions when __TARGET_SSE__ is defined.

libatomic/ChangeLog:

2013-12-09  Uros Bizjak  <ubizjak@gmail.com>

	* config/x86/fenv.c (__atomic_feraiseexcept): Emit SSE
	instructions when __TARGET_SSE__ is defined.

From-SVN: r205811
parent c3811407
2013-12-09 Uros Bizjak <ubizjak@gmail.com>
* config/x86/fenv.c (__atomic_feraiseexcept): Emit SSE
instructions when __TARGET_SSE__ is defined.
2013-11-18 Joseph Myers <joseph@codesourcery.com> 2013-11-18 Joseph Myers <joseph@codesourcery.com>
* testsuite/libatomic.c/atomic-compare-exchange-1.c, * testsuite/libatomic.c/atomic-compare-exchange-1.c,
......
...@@ -56,7 +56,7 @@ __atomic_feraiseexcept (int excepts) ...@@ -56,7 +56,7 @@ __atomic_feraiseexcept (int excepts)
if (excepts & FE_INVALID) if (excepts & FE_INVALID)
{ {
float f = 0.0f; float f = 0.0f;
#ifdef __x86_64__ #ifdef __SSE_MATH__
volatile float r __attribute__ ((unused)); volatile float r __attribute__ ((unused));
asm volatile ("%vdivss\t{%0, %d0|%d0, %0}" : "+x" (f)); asm volatile ("%vdivss\t{%0, %d0|%d0, %0}" : "+x" (f));
r = f; /* Needed to trigger exception. */ r = f; /* Needed to trigger exception. */
...@@ -76,7 +76,7 @@ __atomic_feraiseexcept (int excepts) ...@@ -76,7 +76,7 @@ __atomic_feraiseexcept (int excepts)
if (excepts & FE_DIVBYZERO) if (excepts & FE_DIVBYZERO)
{ {
float f = 1.0f, g = 0.0f; float f = 1.0f, g = 0.0f;
#ifdef __x86_64__ #ifdef __SSE_MATH__
volatile float r __attribute__ ((unused)); volatile float r __attribute__ ((unused));
asm volatile ("%vdivss\t{%1, %d0|%d0, %1}" : "+x" (f) : "xm" (g)); asm volatile ("%vdivss\t{%1, %d0|%d0, %1}" : "+x" (f) : "xm" (g));
r = f; /* Needed to trigger exception. */ r = f; /* Needed to trigger exception. */
...@@ -104,7 +104,7 @@ __atomic_feraiseexcept (int excepts) ...@@ -104,7 +104,7 @@ __atomic_feraiseexcept (int excepts)
if (excepts & FE_INEXACT) if (excepts & FE_INEXACT)
{ {
float f = 1.0f, g = 3.0f; float f = 1.0f, g = 3.0f;
#ifdef __x86_64__ #ifdef __SSE_MATH__
volatile float r __attribute__ ((unused)); volatile float r __attribute__ ((unused));
asm volatile ("%vdivss\t{%1, %d0|%d0, %1}" : "+x" (f) : "xm" (g)); asm volatile ("%vdivss\t{%1, %d0|%d0, %1}" : "+x" (f) : "xm" (g));
r = f; /* Needed to trigger exception. */ r = f; /* Needed to trigger exception. */
......
2013-12-09 Uros Bizjak <ubizjak@gmail.com>
* config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE
instructions when __TARGET_SSE__ is defined.
2013-12-06 Ralf Corsépius <ralf.corsepius@rtems.org> 2013-12-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* config.host (microblaze-*-rtems*): New. * config.host (microblaze-*-rtems*): New.
......
...@@ -47,7 +47,7 @@ __sfp_handle_exceptions (int _fex) ...@@ -47,7 +47,7 @@ __sfp_handle_exceptions (int _fex)
if (_fex & FP_EX_INVALID) if (_fex & FP_EX_INVALID)
{ {
float f = 0.0f; float f = 0.0f;
#ifdef __x86_64__ #ifdef __SSE_MATH__
volatile float r __attribute__ ((unused)); volatile float r __attribute__ ((unused));
asm volatile ("%vdivss\t{%0, %d0|%d0, %0}" : "+x" (f)); asm volatile ("%vdivss\t{%0, %d0|%d0, %0}" : "+x" (f));
r = f; /* Needed to trigger exception. */ r = f; /* Needed to trigger exception. */
...@@ -67,7 +67,7 @@ __sfp_handle_exceptions (int _fex) ...@@ -67,7 +67,7 @@ __sfp_handle_exceptions (int _fex)
if (_fex & FP_EX_DIVZERO) if (_fex & FP_EX_DIVZERO)
{ {
float f = 1.0f, g = 0.0f; float f = 1.0f, g = 0.0f;
#ifdef __x86_64__ #ifdef __SSE_MATH__
volatile float r __attribute__ ((unused)); volatile float r __attribute__ ((unused));
asm volatile ("%vdivss\t{%1, %d0|%d0, %1}" : "+x" (f) : "xm" (g)); asm volatile ("%vdivss\t{%1, %d0|%d0, %1}" : "+x" (f) : "xm" (g));
r = f; /* Needed to trigger exception. */ r = f; /* Needed to trigger exception. */
...@@ -95,7 +95,7 @@ __sfp_handle_exceptions (int _fex) ...@@ -95,7 +95,7 @@ __sfp_handle_exceptions (int _fex)
if (_fex & FP_EX_INEXACT) if (_fex & FP_EX_INEXACT)
{ {
float f = 1.0f, g = 3.0f; float f = 1.0f, g = 3.0f;
#ifdef __x86_64__ #ifdef __SSE_MATH__
volatile float r __attribute__ ((unused)); volatile float r __attribute__ ((unused));
asm volatile ("%vdivss\t{%1, %d0|%d0, %1}" : "+x" (f) : "xm" (g)); asm volatile ("%vdivss\t{%1, %d0|%d0, %1}" : "+x" (f) : "xm" (g));
r = f; /* Needed to trigger exception. */ r = f; /* Needed to trigger exception. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment