From patchwork Wed Nov 14 15:31:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2] Update soft-fp from GLIBC From: Marcus Shawcroft X-Patchwork-Id: 198947 Message-Id: <50A3B942.3020004@arm.com> To: "gcc-patches@gcc.gnu.org" Date: Wed, 14 Nov 2012 15:31:14 +0000 This patch provides a definition of FP_TRAPPING_EXCEPTION for aarch64. /Marcus 2012-11-14 Marcus Shawcroft * config/aarch64/sfp-machine.h (FP_EX_ALL): Define. (FP_EX_SHIFT): Define. (FP_TRAPPING_EXCEPTIONS): Define. diff --git a/libgcc/config/aarch64/sfp-machine.h b/libgcc/config/aarch64/sfp-machine.h index 6c56a92..52b6fb2 100644 --- a/libgcc/config/aarch64/sfp-machine.h +++ b/libgcc/config/aarch64/sfp-machine.h @@ -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