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 @@
#include <folly/Portability.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."
#endif
......
......@@ -27,7 +27,7 @@
#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
#include <folly/Bits.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;
......
......@@ -23,7 +23,7 @@
#include <folly/Portability.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."
#endif
......
......@@ -50,7 +50,7 @@
#include <folly/Portability.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."
#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) \
......
......@@ -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;
}
......
......@@ -37,6 +37,6 @@
#include <folly/MicroSpinLock.h>
#include <folly/Portability.h>
#if FOLLY_X64 || FOLLY_A64 || FOLLY_PPC64
#if FOLLY_X64 || FOLLY_AARCH64 || FOLLY_PPC64
#include <folly/PicoSpinLock.h>
#endif
......@@ -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");
......
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