From: Marcus Shawcroft <marcus.shawcroft@linaro.org>
To: libc-ports@sourceware.org
Cc: Marcus Shawcroft <marcus.shawcroft@linaro.org>
Subject: [PATCH] [AArch64] Fix FP_ROUNDMODE.
Date: Tue, 07 Jan 2014 16:23:00 -0000 [thread overview]
Message-ID: <1389111810-10851-1-git-send-email-marcus.shawcroft@linaro.org> (raw)
[BZ #16387] Fix FP_ROUNDMODE to extract the correct bits from FPCR. Committed.
/Marcus
---
NEWS | 2 +-
ports/ChangeLog.aarch64 | 7 +++++++
ports/sysdeps/aarch64/fpu/fpu_control.h | 3 +++
ports/sysdeps/aarch64/soft-fp/sfp-machine.h | 2 +-
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index a3030eb..d674772 100644
--- a/NEWS
+++ b/NEWS
@@ -24,7 +24,7 @@ Version 2.19
16103, 16112, 16143, 16144, 16146, 16150, 16151, 16153, 16167, 16172,
16195, 16214, 16245, 16271, 16274, 16283, 16289, 16293, 16314, 16316,
16330, 16337, 16338, 16356, 16365, 16366, 16369, 16372, 16375, 16379,
- 16384, 16385, 16386, 16390, 16400.
+ 16384, 16385, 16386, 16387, 16390, 16400.
* Slovenian translations for glibc messages have been contributed by the
Translation Project's Slovenian team of translators.
diff --git a/ports/ChangeLog.aarch64 b/ports/ChangeLog.aarch64
index 53ec535..3867810 100644
--- a/ports/ChangeLog.aarch64
+++ b/ports/ChangeLog.aarch64
@@ -1,5 +1,12 @@
2014-01-07 Marcus Shawcroft <marcus.shawcroft@linaro.org>
+ [BZ #16387]
+ * sysdeps/aarch64/fpu/fpu_control.h (_FPU_FPCR_RM_MASK): Define.
+ * sysdeps/aarch64/soft-fp/sfp-machine.h (FP_ROUNDMODE): Adjust
+ rounding mode mask.
+
+2014-01-07 Marcus Shawcroft <marcus.shawcroft@linaro.org>
+
* sysdeps/aarch64/libm-test-ulps: Drop sqrt ULPs.
2014-01-07 Marcus Shawcroft <marcus.shawcroft@linaro.org>
diff --git a/ports/sysdeps/aarch64/fpu/fpu_control.h b/ports/sysdeps/aarch64/fpu/fpu_control.h
index 79ab5fb..6a265e8 100644
--- a/ports/sysdeps/aarch64/fpu/fpu_control.h
+++ b/ports/sysdeps/aarch64/fpu/fpu_control.h
@@ -59,6 +59,9 @@
E E D D
E E
*/
+
+#define _FPU_FPCR_RM_MASK 0xc00000
+
#define _FPU_FPCR_MASK_IXE 0x1000
#define _FPU_FPCR_MASK_UFE 0x0800
#define _FPU_FPCR_MASK_OFE 0x0400
diff --git a/ports/sysdeps/aarch64/soft-fp/sfp-machine.h b/ports/sysdeps/aarch64/soft-fp/sfp-machine.h
index d21d00a..9bb94e5 100644
--- a/ports/sysdeps/aarch64/soft-fp/sfp-machine.h
+++ b/ports/sysdeps/aarch64/soft-fp/sfp-machine.h
@@ -47,7 +47,7 @@
#define _FP_DECL_EX fpu_control_t _fcw
-#define FP_ROUNDMODE (_fcw & 0x3)
+#define FP_ROUNDMODE (_fcw & _FPU_FPCR_RM_MASK)
#define FP_RND_NEAREST FE_TONEAREST
#define FP_RND_ZERO FE_TOWARDZERO
--
1.8.3.2
next reply other threads:[~2014-01-07 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 16:23 Marcus Shawcroft [this message]
2014-01-07 16:38 ` Marcus Shawcroft
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389111810-10851-1-git-send-email-marcus.shawcroft@linaro.org \
--to=marcus.shawcroft@linaro.org \
--cc=libc-ports@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).