]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
[AArch64] Fix FP_ROUNDMODE.
authorMarcus Shawcroft <marcus.shawcroft@linaro.org>
Tue, 7 Jan 2014 16:16:35 +0000 (16:16 +0000)
committerMarcus Shawcroft <marcus.shawcroft@linaro.org>
Tue, 7 Jan 2014 16:35:11 +0000 (16:35 +0000)
[BZ #16387] Fix FP_ROUNDMODE to extract the correct bits from FPCR.

Conflicts:
NEWS

NEWS
ports/ChangeLog.aarch64
ports/sysdeps/aarch64/fpu/fpu_control.h
ports/sysdeps/aarch64/soft-fp/sfp-machine.h

diff --git a/NEWS b/NEWS
index 29856cc046fe64955c481c472eb579b88cc68653..2e8bb1684e3fb2047968cc139630aa144222a4cd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.18.1
 
 * The following bugs are resolved with this release:
 
-  15073, 15128, 15909, 15996, 16150.
+  15073, 15128, 15909, 15996, 16150, 16387.
 \f
 Version 2.18
 
index 89cc504fe4506ef5bd28499ac679e150756d5441..ce2fd5cf5e0b39c5b996201e80b0c45463d980a9 100644 (file)
@@ -1,3 +1,10 @@
+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/dl-trampoline.S (_dl_runtime_resolve): Correct
index 89ff7e129d16b3e280c77a31ebd34465f0bc35cd..37059261f721a3e6a09774c53c679ef639aa7dda 100644 (file)
@@ -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
index d21d00a934451dd8e6b72ea32961a4917f5b093a..9bb94e5ccc76895087fe17c22f5e0b2aaf012e0c 100644 (file)
@@ -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