Commit 25626181 by Marcus Shawcroft Committed by Marcus Shawcroft

AArch64: Define FP_TRAPPING_EXCEPTIONS.

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
parent 408d2995
2012-12-04 Marcus Shawcroft <marcus.shawcroft@arm.com> 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. * config/aarch64/sfp-machine.h (FP_RND_MASK): Define.
(FP_ROUNDMODE): Use FP_RND_MASK. (FP_ROUNDMODE): Use FP_RND_MASK.
* config/aarch64/sfp-exceptions.c: New. * config/aarch64/sfp-exceptions.c: New.
......
...@@ -69,6 +69,10 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); ...@@ -69,6 +69,10 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
#define FP_EX_OVERFLOW 0x04 #define FP_EX_OVERFLOW 0x04
#define FP_EX_UNDERFLOW 0x08 #define FP_EX_UNDERFLOW 0x08
#define FP_EX_INEXACT 0x10 #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); void __sfp_handle_exceptions (int);
...@@ -78,6 +82,8 @@ void __sfp_handle_exceptions (int); ...@@ -78,6 +82,8 @@ void __sfp_handle_exceptions (int);
__sfp_handle_exceptions (_fex); \ __sfp_handle_exceptions (_fex); \
} while (0); } while (0);
#define FP_TRAPPING_EXCEPTIONS ((_fpcr >> FP_EX_SHIFT) & FP_EX_ALL)
#define FP_RND_NEAREST 0x000000 #define FP_RND_NEAREST 0x000000
#define FP_RND_PINF 0x400000 #define FP_RND_PINF 0x400000
#define FP_RND_MINF 0x800000 #define FP_RND_MINF 0x800000
......
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