Make ARM64 detection consistent in chromium.

This is to uniform ARM64 detection code in chromium.
Use only __aarch64__ and don't look for __arm64__ at all.

Patch by Primiano Tucci <primiano@chromium.org>

BUG=chromium:354405, chromium:358092

Review URL: https://breakpad.appspot.com/1304002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1293 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
mark@chromium.org 2014-04-01 18:20:36 +00:00
parent 3e12c58449
commit 0decfdb042
4 changed files with 7 additions and 7 deletions

View file

@ -285,7 +285,7 @@ class DynamicImages {
return CPU_TYPE_POWERPC64; return CPU_TYPE_POWERPC64;
#elif defined(__arm__) #elif defined(__arm__)
return CPU_TYPE_ARM; return CPU_TYPE_ARM;
#elif defined(__arm64__) #elif defined(__aarch64__)
return CPU_TYPE_ARM64; return CPU_TYPE_ARM64;
#else #else
#error "GetNativeCPUType not implemented for this architecture" #error "GetNativeCPUType not implemented for this architecture"

View file

@ -326,7 +326,7 @@ bool ExceptionHandler::WriteMinidumpForChild(mach_port_t child,
EXC_I386_BPT, EXC_I386_BPT,
#elif defined(__ppc__) || defined(__ppc64__) #elif defined(__ppc__) || defined(__ppc64__)
EXC_PPC_BREAKPOINT, EXC_PPC_BREAKPOINT,
#elif defined(__arm__) || defined(__arm64__) #elif defined(__arm__) || defined(__aarch64__)
EXC_ARM_BREAKPOINT, EXC_ARM_BREAKPOINT,
#else #else
#error architecture not supported #error architecture not supported
@ -522,7 +522,7 @@ void* ExceptionHandler::WaitForMessage(void* exception_handler_class) {
exception_code = EXC_I386_BPT; exception_code = EXC_I386_BPT;
#elif defined(__ppc__) || defined(__ppc64__) #elif defined(__ppc__) || defined(__ppc64__)
exception_code = EXC_PPC_BREAKPOINT; exception_code = EXC_PPC_BREAKPOINT;
#elif defined(__arm__) || defined(__arm64__) #elif defined(__arm__) || defined(__aarch64__)
exception_code = EXC_ARM_BREAKPOINT; exception_code = EXC_ARM_BREAKPOINT;
#else #else
#error architecture not supported #error architecture not supported

View file

@ -51,7 +51,7 @@
#endif #endif
#if defined(__arm__) #if defined(__arm__)
#define HAS_ARM_SUPPORT #define HAS_ARM_SUPPORT
#elif defined(__arm64__) #elif defined(__aarch64__)
#define HAS_ARM64_SUPPORT #define HAS_ARM64_SUPPORT
#elif defined(__i386__) || defined(__x86_64__) #elif defined(__i386__) || defined(__x86_64__)
#define HAS_X86_SUPPORT #define HAS_X86_SUPPORT

View file

@ -34,7 +34,7 @@
// The purpose of this file is to work around the fact that ucontext_t's // The purpose of this file is to work around the fact that ucontext_t's
// uc_mcontext member is an mcontext_t rather than an mcontext64_t on ARM64. // uc_mcontext member is an mcontext_t rather than an mcontext64_t on ARM64.
#if defined(__arm64__) #if defined(__aarch64__)
// <sys/ucontext.h> doesn't include the below file. // <sys/ucontext.h> doesn't include the below file.
#include <sys/_types/_ucontext64.h> #include <sys/_types/_ucontext64.h>
typedef ucontext64_t breakpad_ucontext_t; typedef ucontext64_t breakpad_ucontext_t;
@ -42,6 +42,6 @@ typedef ucontext64_t breakpad_ucontext_t;
#else #else
typedef ucontext_t breakpad_ucontext_t; typedef ucontext_t breakpad_ucontext_t;
#define breakpad_uc_mcontext uc_mcontext #define breakpad_uc_mcontext uc_mcontext
#endif // defined(__arm64__) #endif // defined(__aarch64__)
#endif // CLIENT_MAC_HANDLER_UCONTEXT_COMPAT_H_ #endif // CLIENT_MAC_HANDLER_UCONTEXT_COMPAT_H_