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

Unified Diff: runtime/vm/runtime_entry_arm64.cc

Issue 2003403003: ARM/ARM64: Fix smashed CODE_REG in intrinsics with InvokeMathCFunctionInstrs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
Index: runtime/vm/runtime_entry_arm64.cc
diff --git a/runtime/vm/runtime_entry_arm64.cc b/runtime/vm/runtime_entry_arm64.cc
index f9cd8c2d1fdf444e6753bd0ee6c75f3a2f4133ae..3f1c27bcf7cee5a64621e5123a42fe2895e65142 100644
--- a/runtime/vm/runtime_entry_arm64.cc
+++ b/runtime/vm/runtime_entry_arm64.cc
@@ -52,14 +52,16 @@ void RuntimeEntry::Call(Assembler* assembler, intptr_t argument_count) const {
// We cache the Dart stack pointer and the stack limit in callee-saved
// registers, then align and call, restoring CSP and SP on return from the
// call.
- __ mov(R24, CSP);
+ COMPILE_ASSERT(R23 != CODE_REG);
Vyacheslav Egorov (Google) 2016/05/25 11:15:31 It might be good to add a comment here why this ma
rmacnak 2016/05/25 16:58:51 Done.
+ COMPILE_ASSERT(R25 != CODE_REG);
+ __ mov(R23, CSP);
__ mov(R25, SP);
__ ReserveAlignedFrameSpace(0);
__ mov(CSP, SP);
__ ldr(TMP, Address(THR, Thread::OffsetFromThread(this)));
__ blr(TMP);
__ mov(SP, R25);
- __ mov(CSP, R24);
+ __ mov(CSP, R23);
} else {
// Argument count is not checked here, but in the runtime entry for a more
// informative error message.

Powered by Google App Engine
This is Rietveld 408576698