Use soft-fp fma for MicroBlaze (bug 13304)

Message ID alpine.DEB.2.10.1509151532510.31079@digraph.polyomino.org.uk
State Committed
Headers

Commit Message

Joseph Myers Sept. 15, 2015, 3:34 p.m. UTC
  Systems without floating-point exceptions and rounding modes should
use the soft-fp versions of fmaf and fma, not the sysdeps/ieee754
versions that rely on setting rounding to zero and testing for the
"inexact" exception; this has been noted on
<https://sourceware.org/glibc/wiki/PortStatus> for some time.  This
patch makes MicroBlaze use the soft-fp files; sfp-machine.h is made to
include the nios2 version of sfp-machine.h which seems sufficiently
generic for 32-bit systems.

Untested.

2015-09-15  Joseph Myers  <joseph@codesourcery.com>

	[BZ #13304]
	* sysdeps/microblaze/s_fma.c: New file.
	* sysdeps/microblaze/s_fmaf.c: Likewise.
	* sysdeps/microblaze/sfp-machine.h: Likewise.
  

Comments

Joseph Myers Sept. 23, 2015, 6:17 p.m. UTC | #1
Any architecture maintainer comments on this patch 
<https://sourceware.org/ml/libc-alpha/2015-09/msg00351.html>?
  
Joseph Myers Sept. 25, 2015, 5:30 p.m. UTC | #2
Committed in the absence of any architecture maintainer comments.
  

Patch

diff --git a/sysdeps/microblaze/s_fma.c b/sysdeps/microblaze/s_fma.c
new file mode 100644
index 0000000..d9613fa
--- /dev/null
+++ b/sysdeps/microblaze/s_fma.c
@@ -0,0 +1 @@ 
+#include <soft-fp/fmadf4.c>
diff --git a/sysdeps/microblaze/s_fmaf.c b/sysdeps/microblaze/s_fmaf.c
new file mode 100644
index 0000000..aa5c9b2
--- /dev/null
+++ b/sysdeps/microblaze/s_fmaf.c
@@ -0,0 +1 @@ 
+#include <soft-fp/fmasf4.c>
diff --git a/sysdeps/microblaze/sfp-machine.h b/sysdeps/microblaze/sfp-machine.h
new file mode 100644
index 0000000..e4ad79e
--- /dev/null
+++ b/sysdeps/microblaze/sfp-machine.h
@@ -0,0 +1 @@ 
+#include <sysdeps/nios2/sfp-machine.h>