mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
relay on HWCAP_SB definition
This commit is contained in:
parent
5304ab5460
commit
d1bb7c6ba7
2 changed files with 2 additions and 5 deletions
|
|
@ -11,6 +11,7 @@ void detect_arm_sb_support(void);
|
|||
/* Use SB instruction if available, otherwise ISB */
|
||||
static inline void
|
||||
spin_delay_arm(void) {
|
||||
#ifdef HWCAP_SB
|
||||
if (__builtin_expect(arm_has_sb_instruction == 1, 1)) {
|
||||
/* SB instruction encoding */
|
||||
asm volatile(".inst 0xd50330ff \n");
|
||||
|
|
@ -18,4 +19,5 @@ spin_delay_arm(void) {
|
|||
/* ISB instruction */
|
||||
asm volatile("isb; \n");
|
||||
}
|
||||
#endif // HWCAP_SB
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,6 @@
|
|||
|
||||
#if defined(__linux__) && (defined(__aarch64__) || defined(__arm64__))
|
||||
#include <sys/auxv.h>
|
||||
|
||||
/* Define HWCAP_SB if not already defined in system headers */
|
||||
#ifndef HWCAP_SB
|
||||
#define HWCAP_SB (1ULL << 56) /* Speculation Barrier */
|
||||
#endif // HWCAP_SB
|
||||
#endif // __linux__ && (defined(__aarch64__) || defined(__arm64__))
|
||||
|
||||
/* Global variable to track SB support, defined here to avoid multiple definitions */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue