Skip to content

Commit

Permalink
Fix compilation of base for arm64
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sdefresne@chromium.org committed Feb 6, 2014
1 parent 2b7a6d3 commit 70d3625
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/debug/debugger_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions build/build_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70d3625

Please sign in to comment.