https://gcc.gnu.org/g:0a4490a1ad3f73d546f53d0940dbc9f217d12922

commit r15-5947-g0a4490a1ad3f73d546f53d0940dbc9f217d12922
Author: Richard Sandiford <richard.sandif...@arm.com>
Date:   Thu Dec 5 15:33:10 2024 +0000

    aarch64: Reintroduce FLAG_AUTO_FP
    
    The flag now known as FLAG_QUIET is an odd-one-out in that it
    removes side-effects rather than adding them.  This patch inverts
    it and gives it the old name FLAG_AUTO_FP.  FLAG_QUIET now means
    "no flags" instead.
    
    gcc/
            * config/aarch64/aarch64-builtins.cc (FLAG_QUIET): Redefine to 0,
            replacing the old flag with...
            (FLAG_AUTO_FP): ...this.
            (FLAG_DEFAULT): Redefine to FLAG_AUTO_FP.
            (aarch64_call_properties): Update accordingly.

Diff:
---
 gcc/config/aarch64/aarch64-builtins.cc | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/gcc/config/aarch64/aarch64-builtins.cc 
b/gcc/config/aarch64/aarch64-builtins.cc
index eb44580bd9cb..f528592a17d8 100644
--- a/gcc/config/aarch64/aarch64-builtins.cc
+++ b/gcc/config/aarch64/aarch64-builtins.cc
@@ -193,22 +193,23 @@ using namespace aarch64;
 #define SIMD_MAX_BUILTIN_ARGS 5
 
 /* Flags that describe what a function might do.  */
-const unsigned int FLAG_DEFAULT = 0U;
 const unsigned int FLAG_READ_FPCR = 1U << 0;
 const unsigned int FLAG_RAISE_FP_EXCEPTIONS = 1U << 1;
 const unsigned int FLAG_READ_MEMORY = 1U << 2;
 const unsigned int FLAG_PREFETCH_MEMORY = 1U << 3;
 const unsigned int FLAG_WRITE_MEMORY = 1U << 4;
 
-/* Not all FP intrinsics raise FP exceptions or read FPCR register,
-   use this flag to suppress it.  */
-const unsigned int FLAG_QUIET = 1U << 5;
+/* Indicates that READ_FPCR and RAISE_FP_EXCEPTIONS should be set for
+   floating-point modes but not for integer modes.  */
+const unsigned int FLAG_AUTO_FP = 1U << 5;
 
+const unsigned int FLAG_QUIET = 0;
+const unsigned int FLAG_DEFAULT = FLAG_AUTO_FP;
 const unsigned int FLAG_FP = FLAG_READ_FPCR | FLAG_RAISE_FP_EXCEPTIONS;
 const unsigned int FLAG_ALL = FLAG_READ_FPCR | FLAG_RAISE_FP_EXCEPTIONS
   | FLAG_READ_MEMORY | FLAG_PREFETCH_MEMORY | FLAG_WRITE_MEMORY;
-const unsigned int FLAG_STORE = FLAG_WRITE_MEMORY | FLAG_QUIET;
-const unsigned int FLAG_LOAD = FLAG_READ_MEMORY | FLAG_QUIET;
+const unsigned int FLAG_STORE = FLAG_WRITE_MEMORY;
+const unsigned int FLAG_LOAD = FLAG_READ_MEMORY;
 
 typedef struct
 {
@@ -1322,7 +1323,7 @@ aarch64_init_simd_builtin_scalar_types (void)
 static unsigned int
 aarch64_call_properties (unsigned int flags, machine_mode mode)
 {
-  if (!(flags & FLAG_QUIET) && FLOAT_MODE_P (mode))
+  if ((flags & FLAG_AUTO_FP) && FLOAT_MODE_P (mode))
     flags |= FLAG_FP;
 
   /* -fno-trapping-math means that we can assume any FP exceptions

Reply via email to