These targets are regularly used for embedded applications for
portions of code where the Advanced SIMD registers may not be
preserved, such as interrupt handlers.

Disabling the use of SIMD registers for memset/memcpy operations by
default ensures that code which doesn't overtly perform FPU or SIMD
operations won't end up using those registers unintentially.

Signed-off-by: Keith Packard <kei...@keithp.com>
---
 gcc/config/aarch64/aarch64-elf.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/config/aarch64/aarch64-elf.h b/gcc/config/aarch64/aarch64-elf.h
index f6ebb723715..b42f0374248 100644
--- a/gcc/config/aarch64/aarch64-elf.h
+++ b/gcc/config/aarch64/aarch64-elf.h
@@ -143,4 +143,7 @@ ASM_MABI_SPEC
 #undef TYPE_OPERAND_FMT
 #define TYPE_OPERAND_FMT       "%%%s"
 
+#undef AARCH64_SIMD_MEMOPS_DEFAULT
+#define AARCH64_SIMD_MEMOPS_DEFAULT 0
+
 #endif /* GCC_AARCH64_ELF_H */
-- 
2.49.0

Reply via email to