Revise stubs for ARCH_{K8,PPC,ARM}.

* ARCH_K8 and ARCH_ARM now work correctly on MSVC.
* ARCH_PPC now uses the same macro as tcmalloc.

Microsoft documentation:
https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019

PowerPC documentation:
http://openpowerfoundation.org/wp-content/uploads/resources/leabi/content/dbdoclet.50655243_75216.html

PiperOrigin-RevId: 310160787
This commit is contained in:
Victor Costan 2020-05-06 15:55:59 +00:00
parent e1353b9fa8
commit 837f38b3e0
1 changed files with 4 additions and 10 deletions

View File

@ -69,19 +69,13 @@
#include "snappy-stubs-public.h"
#if defined(__x86_64__)
// Enable 64-bit optimized versions of some routines.
// Used to enable 64-bit optimized versions of some routines.
#if defined(__x86_64__) || defined(_M_X64)
#define ARCH_K8 1
#elif defined(__ppc64__)
#elif defined(__PPC64__) || defined(__powerpc64__)
#define ARCH_PPC 1
#elif defined(__aarch64__)
#elif defined(__aarch64__) || defined(_M_ARM64)
#define ARCH_ARM 1
#endif
// Needed by OS X, among others.