Commit aa86aa27 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

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
parent a901072c
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/detail/DiscriminatedPtrDetail.h> #include <folly/detail/DiscriminatedPtrDetail.h>
#if !FOLLY_X64 && !FOLLY_A64 && !FOLLY_PPC64 #if !FOLLY_X64 && !FOLLY_AARCH64 && !FOLLY_PPC64
# error "DiscriminatedPtr is x64, arm64 and ppc64 specific code." # error "DiscriminatedPtr is x64, arm64 and ppc64 specific code."
#endif #endif
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <folly/Portability.h> #include <folly/Portability.h>
#if FOLLY_X64 || defined(__i386__) || FOLLY_PPC64 || FOLLY_A64 #if FOLLY_X64 || defined(__i386__) || FOLLY_PPC64 || FOLLY_AARCH64
#define HAVE_GROUP_VARINT 1 #define HAVE_GROUP_VARINT 1
#include <folly/Bits.h> #include <folly/Bits.h>
......
...@@ -106,7 +106,7 @@ using IdivResultType = typename std::enable_if< ...@@ -106,7 +106,7 @@ using IdivResultType = typename std::enable_if<
decltype(N{1} / D{1})>::type; decltype(N{1} / D{1})>::type;
} }
#if defined(__arm__) && !FOLLY_A64 #if defined(__arm__) && !FOLLY_AARCH64
constexpr auto kIntegerDivisionGivesRemainder = false; constexpr auto kIntegerDivisionGivesRemainder = false;
#else #else
constexpr auto kIntegerDivisionGivesRemainder = true; constexpr auto kIntegerDivisionGivesRemainder = true;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/SmallLocks.h> #include <folly/SmallLocks.h>
#if !FOLLY_X64 && !FOLLY_PPC64 && !FOLLY_A64 #if !FOLLY_X64 && !FOLLY_PPC64 && !FOLLY_AARCH64
#error "PackedSyncPtr is x64, ppc64 or aarch64 specific code." #error "PackedSyncPtr is x64, ppc64 or aarch64 specific code."
#endif #endif
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/detail/Sleeper.h> #include <folly/detail/Sleeper.h>
#if !FOLLY_X64 && !FOLLY_A64 && !FOLLY_PPC64 #if !FOLLY_X64 && !FOLLY_AARCH64 && !FOLLY_PPC64
#error "PicoSpinLock.h is currently x64, aarch64 and ppc64 only." #error "PicoSpinLock.h is currently x64, aarch64 and ppc64 only."
#endif #endif
...@@ -171,7 +171,7 @@ struct PicoSpinLock { ...@@ -171,7 +171,7 @@ struct PicoSpinLock {
} }
#undef FB_DOBTS #undef FB_DOBTS
#elif FOLLY_A64 #elif FOLLY_AARCH64
ret = ret =
!(__atomic_fetch_or(&lock_, kLockBitMask_, __ATOMIC_SEQ_CST) & !(__atomic_fetch_or(&lock_, kLockBitMask_, __ATOMIC_SEQ_CST) &
kLockBitMask_); kLockBitMask_);
...@@ -254,7 +254,7 @@ struct PicoSpinLock { ...@@ -254,7 +254,7 @@ struct PicoSpinLock {
} }
#undef FB_DOBTR #undef FB_DOBTR
#elif FOLLY_A64 #elif FOLLY_AARCH64
__atomic_fetch_and(&lock_, ~kLockBitMask_, __ATOMIC_SEQ_CST); __atomic_fetch_and(&lock_, ~kLockBitMask_, __ATOMIC_SEQ_CST);
#elif FOLLY_PPC64 #elif FOLLY_PPC64
#define FB_DOBTR(size) \ #define FB_DOBTR(size) \
......
...@@ -169,9 +169,9 @@ struct alignas(max_align_v) max_align_t {}; ...@@ -169,9 +169,9 @@ struct alignas(max_align_v) max_align_t {};
#endif #endif
#if defined(__aarch64__) #if defined(__aarch64__)
# define FOLLY_A64 1 # define FOLLY_AARCH64 1
#else #else
# define FOLLY_A64 0 # define FOLLY_AARCH64 0
#endif #endif
#if defined (__powerpc64__) #if defined (__powerpc64__)
...@@ -182,7 +182,7 @@ struct alignas(max_align_v) max_align_t {}; ...@@ -182,7 +182,7 @@ struct alignas(max_align_v) max_align_t {};
namespace folly { namespace folly {
constexpr bool kIsArchAmd64 = FOLLY_X64 == 1; constexpr bool kIsArchAmd64 = FOLLY_X64 == 1;
constexpr bool kIsArchAArch64 = FOLLY_A64 == 1; constexpr bool kIsArchAArch64 = FOLLY_AARCH64 == 1;
constexpr bool kIsArchPPC64 = FOLLY_PPC64 == 1; constexpr bool kIsArchPPC64 = FOLLY_PPC64 == 1;
} }
......
...@@ -37,6 +37,6 @@ ...@@ -37,6 +37,6 @@
#include <folly/MicroSpinLock.h> #include <folly/MicroSpinLock.h>
#include <folly/Portability.h> #include <folly/Portability.h>
#if FOLLY_X64 || FOLLY_A64 || FOLLY_PPC64 #if FOLLY_X64 || FOLLY_AARCH64 || FOLLY_PPC64
#include <folly/PicoSpinLock.h> #include <folly/PicoSpinLock.h>
#endif #endif
...@@ -36,7 +36,7 @@ inline void asm_volatile_pause() { ...@@ -36,7 +36,7 @@ inline void asm_volatile_pause() {
::_mm_pause(); ::_mm_pause();
#elif defined(__i386__) || FOLLY_X64 #elif defined(__i386__) || FOLLY_X64
asm volatile("pause"); asm volatile("pause");
#elif FOLLY_A64 || defined(__arm__) #elif FOLLY_AARCH64 || defined(__arm__)
asm volatile("yield"); asm volatile("yield");
#elif FOLLY_PPC64 #elif FOLLY_PPC64
asm volatile("or 27,27,27"); asm volatile("or 27,27,27");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment