diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2024-12-05 15:33:10 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2024-12-05 15:33:10 +0000 |
commit | 0a4490a1ad3f73d546f53d0940dbc9f217d12922 (patch) | |
tree | 4cc40e3af70b1d77c40533fdfcecd12c72c0c3bf /gcc | |
parent | 1e181536ba5c39d987bf394d346f49982e6df83a (diff) | |
download | gcc-0a4490a1ad3f73d546f53d0940dbc9f217d12922.zip gcc-0a4490a1ad3f73d546f53d0940dbc9f217d12922.tar.gz gcc-0a4490a1ad3f73d546f53d0940dbc9f217d12922.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/aarch64/aarch64-builtins.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc index eb44580..f528592 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 |