From aa86aa272abff08c186edee58561ec19abb70f6e Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Wed, 23 Aug 2017 22:51:43 -0700 Subject: [PATCH] Rename FOLLY_A64 to FOLLY_AARCH64 Summary: `FOLLY_AARCH64` is more descriptive. (searching for A64 tells you nothing, searching for aarch64 tells you a lot) Reviewed By: yfeldblum, andrewjcg Differential Revision: D5663075 fbshipit-source-id: 8f31fde4aa394f5452305929541af6d38e4d8a37 --- folly/DiscriminatedPtr.h | 2 +- folly/GroupVarint.h | 2 +- folly/Math.h | 2 +- folly/PackedSyncPtr.h | 2 +- folly/PicoSpinLock.h | 6 +++--- folly/Portability.h | 6 +++--- folly/SmallLocks.h | 2 +- folly/portability/Asm.h | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/folly/DiscriminatedPtr.h b/folly/DiscriminatedPtr.h index b773bec8..2c57fb6e 100644 --- a/folly/DiscriminatedPtr.h +++ b/folly/DiscriminatedPtr.h @@ -35,7 +35,7 @@ #include #include -#if !FOLLY_X64 && !FOLLY_A64 && !FOLLY_PPC64 +#if !FOLLY_X64 && !FOLLY_AARCH64 && !FOLLY_PPC64 # error "DiscriminatedPtr is x64, arm64 and ppc64 specific code." #endif diff --git a/folly/GroupVarint.h b/folly/GroupVarint.h index 8780f04e..6f1807d2 100644 --- a/folly/GroupVarint.h +++ b/folly/GroupVarint.h @@ -27,7 +27,7 @@ #include -#if FOLLY_X64 || defined(__i386__) || FOLLY_PPC64 || FOLLY_A64 +#if FOLLY_X64 || defined(__i386__) || FOLLY_PPC64 || FOLLY_AARCH64 #define HAVE_GROUP_VARINT 1 #include diff --git a/folly/Math.h b/folly/Math.h index e31335a1..6d4eee53 100644 --- a/folly/Math.h +++ b/folly/Math.h @@ -106,7 +106,7 @@ using IdivResultType = typename std::enable_if< decltype(N{1} / D{1})>::type; } -#if defined(__arm__) && !FOLLY_A64 +#if defined(__arm__) && !FOLLY_AARCH64 constexpr auto kIntegerDivisionGivesRemainder = false; #else constexpr auto kIntegerDivisionGivesRemainder = true; diff --git a/folly/PackedSyncPtr.h b/folly/PackedSyncPtr.h index 44d3f557..a5dd5184 100644 --- a/folly/PackedSyncPtr.h +++ b/folly/PackedSyncPtr.h @@ -23,7 +23,7 @@ #include #include -#if !FOLLY_X64 && !FOLLY_PPC64 && !FOLLY_A64 +#if !FOLLY_X64 && !FOLLY_PPC64 && !FOLLY_AARCH64 #error "PackedSyncPtr is x64, ppc64 or aarch64 specific code." #endif diff --git a/folly/PicoSpinLock.h b/folly/PicoSpinLock.h index 4280e653..070f1fbe 100644 --- a/folly/PicoSpinLock.h +++ b/folly/PicoSpinLock.h @@ -50,7 +50,7 @@ #include #include -#if !FOLLY_X64 && !FOLLY_A64 && !FOLLY_PPC64 +#if !FOLLY_X64 && !FOLLY_AARCH64 && !FOLLY_PPC64 #error "PicoSpinLock.h is currently x64, aarch64 and ppc64 only." #endif @@ -171,7 +171,7 @@ struct PicoSpinLock { } #undef FB_DOBTS -#elif FOLLY_A64 +#elif FOLLY_AARCH64 ret = !(__atomic_fetch_or(&lock_, kLockBitMask_, __ATOMIC_SEQ_CST) & kLockBitMask_); @@ -254,7 +254,7 @@ struct PicoSpinLock { } #undef FB_DOBTR -#elif FOLLY_A64 +#elif FOLLY_AARCH64 __atomic_fetch_and(&lock_, ~kLockBitMask_, __ATOMIC_SEQ_CST); #elif FOLLY_PPC64 #define FB_DOBTR(size) \ diff --git a/folly/Portability.h b/folly/Portability.h index cf2c8d32..a180bea4 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -169,9 +169,9 @@ struct alignas(max_align_v) max_align_t {}; #endif #if defined(__aarch64__) -# define FOLLY_A64 1 +# define FOLLY_AARCH64 1 #else -# define FOLLY_A64 0 +# define FOLLY_AARCH64 0 #endif #if defined (__powerpc64__) @@ -182,7 +182,7 @@ struct alignas(max_align_v) max_align_t {}; namespace folly { constexpr bool kIsArchAmd64 = FOLLY_X64 == 1; -constexpr bool kIsArchAArch64 = FOLLY_A64 == 1; +constexpr bool kIsArchAArch64 = FOLLY_AARCH64 == 1; constexpr bool kIsArchPPC64 = FOLLY_PPC64 == 1; } diff --git a/folly/SmallLocks.h b/folly/SmallLocks.h index c6ef54ac..b0939802 100644 --- a/folly/SmallLocks.h +++ b/folly/SmallLocks.h @@ -37,6 +37,6 @@ #include #include -#if FOLLY_X64 || FOLLY_A64 || FOLLY_PPC64 +#if FOLLY_X64 || FOLLY_AARCH64 || FOLLY_PPC64 #include #endif diff --git a/folly/portability/Asm.h b/folly/portability/Asm.h index f7b7ebba..2ed0f051 100644 --- a/folly/portability/Asm.h +++ b/folly/portability/Asm.h @@ -36,7 +36,7 @@ inline void asm_volatile_pause() { ::_mm_pause(); #elif defined(__i386__) || FOLLY_X64 asm volatile("pause"); -#elif FOLLY_A64 || defined(__arm__) +#elif FOLLY_AARCH64 || defined(__arm__) asm volatile("yield"); #elif FOLLY_PPC64 asm volatile("or 27,27,27"); -- 2.34.1