Yury Khrustalev <[email protected]> writes:
> 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
OK, thanks. (We discussed getting commit access off-list.)
Richard
> ---
> gcc/config/aarch64/arm_acle.h | 3 +++
> libgcc/config/aarch64/aarch64-unwind.h | 6 +++---
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/config/aarch64/arm_acle.h b/gcc/config/aarch64/arm_acle.h
> index 7fe61c736ed..7351d1de70b 100644
> --- a/gcc/config/aarch64/arm_acle.h
> +++ b/gcc/config/aarch64/arm_acle.h
> @@ -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)
> diff --git a/libgcc/config/aarch64/aarch64-unwind.h
> b/libgcc/config/aarch64/aarch64-unwind.h
> index cf4ec749c05..85468f9685e 100644
> --- a/libgcc/config/aarch64/aarch64-unwind.h
> +++ b/libgcc/config/aarch64/aarch64-unwind.h
> @@ -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; \