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
#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
#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>
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;
#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
#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
}
#undef FB_DOBTS
-#elif FOLLY_A64
+#elif FOLLY_AARCH64
ret =
!(__atomic_fetch_or(&lock_, kLockBitMask_, __ATOMIC_SEQ_CST) &
kLockBitMask_);
}
#undef FB_DOBTR
-#elif FOLLY_A64
+#elif FOLLY_AARCH64
__atomic_fetch_and(&lock_, ~kLockBitMask_, __ATOMIC_SEQ_CST);
#elif FOLLY_PPC64
#define FB_DOBTR(size) \
#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__)
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;
}
#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
::_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");