From e2cd2f7d08ce4391f19c0ce5c4ea63bb9a985fcf Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 12 Mar 2021 11:15:17 +0000 Subject: [PATCH] [builtins] Fix value of ARM_INEXACT The existing value of 0x1000 sets the IXE bit (Inexact floating-point exception trap enable), but we really want to be setting IXC, bit 4: Inexact cumulative floating-point exception bit. This bit is set to 1 to indicate that the Inexact floating-point exception has occurred since 0 was last written to this bit. Reviewed By: kongyi, peter.smith Differential Revision: https://reviews.llvm.org/D98353 --- compiler-rt/lib/builtins/arm/fp_mode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/builtins/arm/fp_mode.c b/compiler-rt/lib/builtins/arm/fp_mode.c index 300b71935ad4..c0ca9095142e 100644 --- a/compiler-rt/lib/builtins/arm/fp_mode.c +++ b/compiler-rt/lib/builtins/arm/fp_mode.c @@ -18,7 +18,7 @@ ARM_DOWNWARD | ARM_TOWARDZERO) #define ARM_RMODE_SHIFT 22 -#define ARM_INEXACT 0x1000 +#define ARM_INEXACT 0x10 #ifndef __ARM_FP // For soft float targets, allow changing rounding mode by overriding the weak