Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Unified Diff: runtime/vm/signal_handler_android.cc

Issue 1761953002: Fix x86-64 Android build. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« runtime/bin/directory_android.cc ('K') | « runtime/bin/directory_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/signal_handler_android.cc
diff --git a/runtime/vm/signal_handler_android.cc b/runtime/vm/signal_handler_android.cc
index a85dbb78a4d31dc1f867008bbac8675b36d7d77b..d41eb594ad86fb7b106ad2d0e959032c4c3283ab 100644
--- a/runtime/vm/signal_handler_android.cc
+++ b/runtime/vm/signal_handler_android.cc
@@ -14,6 +14,8 @@ uintptr_t SignalHandler::GetProgramCounter(const mcontext_t& mcontext) {
#if defined(HOST_ARCH_IA32)
pc = static_cast<uintptr_t>(mcontext.gregs[REG_EIP]);
+#elif defined(HOST_ARCH_X64)
+ pc = static_cast<uintptr_t>(mcontext.gregs[REG_RIP]);
#elif defined(HOST_ARCH_ARM)
pc = static_cast<uintptr_t>(mcontext.arm_pc);
#elif defined(HOST_ARCH_ARM64)
@@ -30,6 +32,8 @@ uintptr_t SignalHandler::GetFramePointer(const mcontext_t& mcontext) {
#if defined(HOST_ARCH_IA32)
fp = static_cast<uintptr_t>(mcontext.gregs[REG_EBP]);
+#elif defined(HOST_ARCH_X64)
+ fp = static_cast<uintptr_t>(mcontext.gregs[REG_RBP]);
#elif defined(HOST_ARCH_ARM)
fp = static_cast<uintptr_t>(mcontext.arm_fp);
#elif defined(HOST_ARCH_ARM64)
@@ -47,6 +51,8 @@ uintptr_t SignalHandler::GetCStackPointer(const mcontext_t& mcontext) {
#if defined(HOST_ARCH_IA32)
sp = static_cast<uintptr_t>(mcontext.gregs[REG_ESP]);
+#elif defined(HOST_ARCH_X64)
+ sp = static_cast<uintptr_t>(mcontext.gregs[REG_RSP]);
#elif defined(HOST_ARCH_ARM)
sp = static_cast<uintptr_t>(mcontext.arm_sp);
#elif defined(HOST_ARCH_ARM64)
@@ -63,6 +69,8 @@ uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) {
#if defined(HOST_ARCH_IA32)
sp = static_cast<uintptr_t>(mcontext.gregs[REG_ESP]);
+#elif defined(HOST_ARCH_X64)
+ sp = static_cast<uintptr_t>(mcontext.gregs[REG_RSP]);
#elif defined(HOST_ARCH_ARM)
sp = static_cast<uintptr_t>(mcontext.arm_sp);
#elif defined(HOST_ARCH_ARM64)
@@ -79,6 +87,8 @@ uintptr_t SignalHandler::GetLinkRegister(const mcontext_t& mcontext) {
#if defined(HOST_ARCH_IA32)
lr = 0;
+#elif defined(HOST_ARCH_X64)
+ lr = 0;
#elif defined(HOST_ARCH_ARM)
lr = static_cast<uintptr_t>(mcontext.arm_lr);
#elif defined(HOST_ARCH_ARM64)
« runtime/bin/directory_android.cc ('K') | « runtime/bin/directory_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698