The LS64 intrinsics used a machinery that's not safe to use unless being
called from a pragma instantiation.
This moves the initialization code to a new pragma for arm_acle.h.
gcc/ChangeLog:
PR target/104409
* config/aarch64/aarch64-builtins.cc (handle_arm_acle_h): New.
(aarch64_general_init_builtins): Move LS64 code.
* config/aarch64/aarch64-c.cc (aarch64_pragma_aarch64): Support
arm_acle.h
* config/aarch64/aarch64-protos.h (handle_arm_acle_h): New.
* config/aarch64/arm_acle.h: Add pragma GCC aarch64 "arm_acle.h".
= aarch64_general_add_builtin (data[i].name, data[i].type, data[i].code);
}
+/* Implement #pragma GCC aarch64 "arm_acle.h". */
+void
+handle_arm_acle_h (void)
+{
+ if (TARGET_LS64)
+ aarch64_init_ls64_builtins ();
+}
+
/* Initialize fpsr fpcr getters and setters. */
static void
if (TARGET_MEMTAG)
aarch64_init_memtag_builtins ();
-
- if (TARGET_LS64)
- aarch64_init_ls64_builtins ();
}
/* Implement TARGET_BUILTIN_DECL for the AARCH64_BUILTIN_GENERAL group. */
aarch64_sve::handle_arm_sve_h ();
else if (strcmp (name, "arm_neon.h") == 0)
handle_arm_neon_h ();
+ else if (strcmp (name, "arm_acle.h") == 0)
+ handle_arm_acle_h ();
else
error ("unknown %<#pragma GCC aarch64%> option %qs", name);
}
tree aarch64_general_builtin_decl (unsigned, bool);
tree aarch64_general_builtin_rsqrt (unsigned int);
tree aarch64_builtin_vectorized_function (unsigned int, tree, tree);
+void handle_arm_acle_h (void);
void handle_arm_neon_h (void);
namespace aarch64_sve {
#include <stdint.h>
+#pragma GCC aarch64 "arm_acle.h"
+
#ifdef __cplusplus
extern "C" {
#endif