diff options
author | sdefresne@chromium.org <sdefresne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-06 02:51:01 +0000 |
---|---|---|
committer | sdefresne@chromium.org <sdefresne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-06 02:51:01 +0000 |
commit | 70d3625ff942cf6e707d5d438d62d80324dacf71 (patch) | |
tree | 75abe5fff581ded493f85ff40d205c2ffbc4c73b | |
parent | 2b7a6d39afde5917e8ccb341afdccb0a931b2636 (diff) | |
download | chromium_src-70d3625ff942cf6e707d5d438d62d80324dacf71.zip chromium_src-70d3625ff942cf6e707d5d438d62d80324dacf71.tar.gz chromium_src-70d3625ff942cf6e707d5d438d62d80324dacf71.tar.bz2 |
Fix compilation of base for arm64
Add support for the architecture to build/build_config.h (define
new macro ARCH_CPU_ARM64 to identify the CPU architecture and
set the other appropriate macros to 1).
Fix DEBUG_BREAK_ASM() macro to expand to the correct instruction
on arm64 cpu (as instruction set is not compatible with previous
version of ARM instruction sets).
BUG=339477
R=mark@chromium.org
Review URL: https://codereview.chromium.org/145273028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249246 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/debug/debugger_posix.cc | 4 | ||||
-rw-r--r-- | build/build_config.h | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/base/debug/debugger_posix.cc b/base/debug/debugger_posix.cc index 60ad521..6554f3f 100644 --- a/base/debug/debugger_posix.cc +++ b/base/debug/debugger_posix.cc @@ -199,8 +199,10 @@ bool BeingDebugged() { // SIGABRT // Mac: Always send SIGTRAP. -#if defined(ARCH_CPU_ARM_FAMILY) +#if defined(ARCH_CPU_ARMEL) #define DEBUG_BREAK_ASM() asm("bkpt 0") +#elif defined(ARCH_CPU_ARM64) +#define DEBUG_BREAK_ASM() asm("brk 0") #elif defined(ARCH_CPU_MIPS_FAMILY) #define DEBUG_BREAK_ASM() asm("break 2") #elif defined(ARCH_CPU_X86_FAMILY) diff --git a/build/build_config.h b/build/build_config.h index 143cf3e..3784512 100644 --- a/build/build_config.h +++ b/build/build_config.h @@ -106,6 +106,11 @@ #define ARCH_CPU_ARMEL 1 #define ARCH_CPU_32_BITS 1 #define ARCH_CPU_LITTLE_ENDIAN 1 +#elif defined(__arm64__) +#define ARCH_CPU_ARM_FAMILY 1 +#define ARCH_CPU_ARM64 1 +#define ARCH_CPU_64_BITS 1 +#define ARCH_CPU_LITTLE_ENDIAN 1 #elif defined(__pnacl__) #define ARCH_CPU_32_BITS 1 #define ARCH_CPU_LITTLE_ENDIAN 1 |