]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: add ACLE macro _CHKFEAT_GCS
authorYury Khrustalev <yury.khrustalev@arm.com>
Thu, 21 Nov 2024 15:43:39 +0000 (15:43 +0000)
committerYury Khrustalev <yury.khrustalev@arm.com>
Fri, 29 Nov 2024 10:20:45 +0000 (10:20 +0000)
gcc/ChangeLog:
* config/aarch64/arm_acle.h (_CHKFEAT_GCS): New.

libgcc/ChangeLog:

* config/aarch64/aarch64-unwind.h (_Unwind_Frames_Extra): Update.
(_Unwind_Frames_Increment): Update

Reviewed-by: Richard Sandiford <richard.sandiford@arm.com>
gcc/config/aarch64/arm_acle.h
libgcc/config/aarch64/aarch64-unwind.h

index 7fe61c736ed859e081a35928128e05412d2d0075..7351d1de70b1d39862ba36e3dd16b6a996bc129c 100644 (file)
@@ -194,6 +194,9 @@ __rint64x (double __a)
 #pragma GCC push_options
 #pragma GCC target ("+nothing")
 
+/* Feature constants for CHKFEAT operation.  */
+#define _CHKFEAT_GCS 1
+
 __extension__ extern __inline uint64_t
 __attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
 __chkfeat (uint64_t __feat)
index cf4ec749c0552412409133fa225c9fb59252211d..85468f9685e0660a914ede9e09eb9c92c25586c3 100644 (file)
@@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 
 #include "ansidecl.h"
 #include <stdbool.h>
+#include <arm_acle.h>
 
 #define AARCH64_DWARF_REGNUM_RA_STATE 34
 #define AARCH64_DWARF_RA_STATE_MASK   0x1
@@ -179,7 +180,6 @@ aarch64_demangle_return_addr (struct _Unwind_Context *context,
 }
 
 /* GCS enable flag for chkfeat instruction.  */
-#define CHKFEAT_GCS 1
 
 /* SME runtime function local to libgcc, streaming compatible
    and preserves more registers than the base PCS requires, but
@@ -194,7 +194,7 @@ void __libgcc_arm_za_disable (void);
   do                                                   \
     {                                                  \
       __libgcc_arm_za_disable ();                      \
-      if (__builtin_aarch64_chkfeat (CHKFEAT_GCS) == 0)        \
+      if (__builtin_aarch64_chkfeat (_CHKFEAT_GCS) == 0)       \
        {                                               \
          for (_Unwind_Word n = (x); n != 0; n--)       \
            __builtin_aarch64_gcspopm ();               \
@@ -233,7 +233,7 @@ void __libgcc_arm_za_disable (void);
   do                                                   \
     {                                                  \
       frames++;                                                \
-      if (__builtin_aarch64_chkfeat (CHKFEAT_GCS) != 0 \
+      if (__builtin_aarch64_chkfeat (_CHKFEAT_GCS) != 0        \
          || exc->exception_class == 0                  \
          || _Unwind_GetIP (context) == 0)              \
        break;                                          \