assembly.h (81ad626541db97eb356e2c1d4a20eb2a26a766ab) assembly.h (62987288060ff68c817b7056815aa9fb8ba8ecd7)
1/* ===-- assembly.h - libUnwind assembler support macros -------------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 * ===----------------------------------------------------------------------===
8 *

--- 68 unchanged lines hidden (view full) ---

77 .quad 0 SEPARATOR \
78 .text SEPARATOR \
79.Lfunc_begin0:
80#else
81#define PPC64_OPD1
82#define PPC64_OPD2
83#endif
84
1/* ===-- assembly.h - libUnwind assembler support macros -------------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 * ===----------------------------------------------------------------------===
8 *

--- 68 unchanged lines hidden (view full) ---

77 .quad 0 SEPARATOR \
78 .text SEPARATOR \
79.Lfunc_begin0:
80#else
81#define PPC64_OPD1
82#define PPC64_OPD2
83#endif
84
85#if defined(__aarch64__) && defined(__ARM_FEATURE_BTI_DEFAULT)
85#if defined(__aarch64__)
86#if defined(__ARM_FEATURE_GCS_DEFAULT) && defined(__ARM_FEATURE_BTI_DEFAULT)
87// Set BTI, PAC, and GCS gnu property bits
88#define GNU_PROPERTY 7
89// We indirectly branch to __libunwind_Registers_arm64_jumpto from
90// __unw_phase2_resume, so we need to use bti jc.
91#define AARCH64_BTI bti jc
92#elif defined(__ARM_FEATURE_GCS_DEFAULT)
93// Set GCS gnu property bit
94#define GNU_PROPERTY 4
95#elif defined(__ARM_FEATURE_BTI_DEFAULT)
96// Set BTI and PAC gnu property bits
97#define GNU_PROPERTY 3
98#define AARCH64_BTI bti c
99#endif
100#ifdef GNU_PROPERTY
86 .pushsection ".note.gnu.property", "a" SEPARATOR \
87 .balign 8 SEPARATOR \
88 .long 4 SEPARATOR \
89 .long 0x10 SEPARATOR \
90 .long 0x5 SEPARATOR \
91 .asciz "GNU" SEPARATOR \
92 .long 0xc0000000 SEPARATOR /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */ \
93 .long 4 SEPARATOR \
101 .pushsection ".note.gnu.property", "a" SEPARATOR \
102 .balign 8 SEPARATOR \
103 .long 4 SEPARATOR \
104 .long 0x10 SEPARATOR \
105 .long 0x5 SEPARATOR \
106 .asciz "GNU" SEPARATOR \
107 .long 0xc0000000 SEPARATOR /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */ \
108 .long 4 SEPARATOR \
94 .long 3 SEPARATOR /* GNU_PROPERTY_AARCH64_FEATURE_1_BTI AND */ \
95 /* GNU_PROPERTY_AARCH64_FEATURE_1_PAC */ \
109 .long GNU_PROPERTY SEPARATOR \
96 .long 0 SEPARATOR \
97 .popsection SEPARATOR
110 .long 0 SEPARATOR \
111 .popsection SEPARATOR
98#define AARCH64_BTI bti c
99#else
112#endif
113#endif
114#if !defined(AARCH64_BTI)
100#define AARCH64_BTI
101#endif
102
103#if !defined(__aarch64__)
104#ifdef __ARM_FEATURE_PAC_DEFAULT
105 .eabi_attribute Tag_PAC_extension, 2
106 .eabi_attribute Tag_PACRET_use, 1
107#endif

--- 181 unchanged lines hidden ---
115#define AARCH64_BTI
116#endif
117
118#if !defined(__aarch64__)
119#ifdef __ARM_FEATURE_PAC_DEFAULT
120 .eabi_attribute Tag_PAC_extension, 2
121 .eabi_attribute Tag_PACRET_use, 1
122#endif

--- 181 unchanged lines hidden ---