@@ -1943,8 +1943,7 @@ aarch64_init_data_intrinsics (void)
void
handle_arm_acle_h (void)
{
- if (TARGET_LS64)
- aarch64_init_ls64_builtins ();
+ aarch64_init_ls64_builtins ();
}
/* Initialize fpsr fpcr getters and setters. */
@@ -2148,6 +2147,13 @@ bool aarch64_check_general_builtin_call (location_t location,
return aarch64_check_required_extensions (location, fndecl,
AARCH64_FL_TME, false);
+ case AARCH64_LS64_BUILTIN_LD64B:
+ case AARCH64_LS64_BUILTIN_ST64B:
+ case AARCH64_LS64_BUILTIN_ST64BV:
+ case AARCH64_LS64_BUILTIN_ST64BV0:
+ return aarch64_check_required_extensions (location, fndecl,
+ AARCH64_FL_LS64, false);
+
default:
break;
}
@@ -2630,6 +2636,11 @@ aarch64_expand_builtin_ls64 (int fcode, tree exp, rtx target)
{
expand_operand ops[3];
+ tree fndecl = aarch64_builtin_decls[fcode];
+ if (!aarch64_check_required_extensions (EXPR_LOCATION (exp), fndecl,
+ AARCH64_FL_LS64, false))
+ return target;
+
switch (fcode)
{
case AARCH64_LS64_BUILTIN_LD64B:
@@ -235,9 +235,7 @@ __crc32d (uint32_t __a, uint64_t __b)
#define _TMFAILURE_INT 0x00800000u
#define _TMFAILURE_TRIVIAL 0x01000000u
-#ifdef __ARM_FEATURE_LS64
typedef __arm_data512_t data512_t;
-#endif
#pragma GCC push_options
#pragma GCC target ("+nothing+rng")
new file mode 100644
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-march=armv8.6-a" } */
+
+#include <arm_acle.h>
+
+data512_t foo (void * p)
+{
+ return __arm_ld64b (p); /* { dg-error {ACLE function '__arm_ld64b' requires ISA extension 'ls64'} } */
+}
new file mode 100644
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-march=armv8.6-a" } */
+
+#include <arm_acle.h>
+
+#pragma GCC target("arch=armv8-a+ls64")
+data512_t foo (void * p)
+{
+ return __arm_ld64b (p);
+}
new file mode 100644
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-march=armv8-a+ls64 -mgeneral-regs-only" } */
+
+#include <arm_acle.h>
+
+data512_t foo (void * p)
+{
+ return __arm_ld64b (p);
+}
new file mode 100644
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-march=armv8-a+ls64" } */
+
+#include <arm_acle.h>
+
+#pragma GCC target("arch=armv8.6-a")
+data512_t foo (void * p)
+{
+ return __arm_ld64b (p); /* { dg-error {ACLE function '__arm_ld64b' requires ISA extension 'ls64'} } */
+}