AArch64: Define FP_TRAPPING_EXCEPTIONS.
authorMarcus Shawcroft <marcus.shawcroft@arm.com>
Tue, 4 Dec 2012 15:51:55 +0000 (15:51 +0000)
committerMarcus Shawcroft <mshawcroft@gcc.gnu.org>
Tue, 4 Dec 2012 15:51:55 +0000 (15:51 +0000)
2012-12-04  Marcus Shawcroft <marcus.shawcroft@arm.com>

        * config/aarch64/sfp-machine.h (FP_EX_ALL): Define.
(FP_EX_SHIFT): Define.
(FP_TRAPPING_EXCEPTIONS): Define.

From-SVN: r194151

libgcc/ChangeLog
libgcc/config/aarch64/sfp-machine.h

index a120f08b406b6118ed27910d442f270dbc3c705b..8e030f96c3796d6978c1e13a295b1dd1b85faf41 100644 (file)
@@ -1,3 +1,9 @@
+2012-12-04  Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+        * config/aarch64/sfp-machine.h (FP_EX_ALL): Define.
+       (FP_EX_SHIFT): Define.
+       (FP_TRAPPING_EXCEPTIONS): Define.
+
 2012-12-04  Marcus Shawcroft <marcus.shawcroft@arm.com>
 
        * config/aarch64/sfp-machine.h (FP_RND_MASK): Define.
index 6c56a92c4f1d8473618e918fdd47b74077872cef..52b6fb2c446b860114fe18f6d3ec8359e5dd4977 100644 (file)
@@ -69,6 +69,10 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #define FP_EX_OVERFLOW 0x04
 #define FP_EX_UNDERFLOW        0x08
 #define FP_EX_INEXACT  0x10
+#define FP_EX_SHIFT 8
+#define FP_EX_ALL \
+       (FP_EX_INVALID | FP_EX_DIVZERO | FP_EX_OVERFLOW | FP_EX_UNDERFLOW \
+        | FP_EX_INEXACT)
 
 void __sfp_handle_exceptions (int);
 
@@ -78,6 +82,8 @@ void __sfp_handle_exceptions (int);
       __sfp_handle_exceptions (_fex);          \
   } while (0);
 
+#define FP_TRAPPING_EXCEPTIONS ((_fpcr >> FP_EX_SHIFT) & FP_EX_ALL)
+
 #define FP_RND_NEAREST         0x000000
 #define FP_RND_PINF            0x400000
 #define FP_RND_MINF            0x800000