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

Unified Diff: runtime/vm/simulator_arm64.cc

Issue 1417433002: Don't touch x18 on ARM64 - it is globally reserved on iOS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/stack_frame_arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_arm64.cc
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index ac6fe18793d7ac90b766cb5dfc224e8604cf30a6..cdbf5ce4128aae196e7dcf15a177c87ef1dbb49a 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -900,6 +900,7 @@ void Simulator::set_register(
Instr* instr, Register reg, int64_t value, R31Type r31t) {
// Register is in range.
ASSERT((reg >= 0) && (reg < kNumberOfCpuRegisters));
+ ASSERT(instr == NULL || reg != R18); // R18 is globally reserved on iOS.
if ((reg != R31) || (r31t != R31IsZR)) {
registers_[reg] = value;
// If we're setting CSP, make sure it is 16-byte aligned. In truth, CSP
@@ -1650,24 +1651,24 @@ void Simulator::DoRedirectedCall(Instr* instr) {
// Zap caller-saved registers, since the actual runtime call could have
// used them.
- set_register(instr, R2, icount_);
- set_register(instr, R3, icount_);
- set_register(instr, R4, icount_);
- set_register(instr, R5, icount_);
- set_register(instr, R6, icount_);
- set_register(instr, R7, icount_);
- set_register(instr, R8, icount_);
- set_register(instr, R9, icount_);
- set_register(instr, R10, icount_);
- set_register(instr, R11, icount_);
- set_register(instr, R12, icount_);
- set_register(instr, R13, icount_);
- set_register(instr, R14, icount_);
- set_register(instr, R15, icount_);
- set_register(instr, IP0, icount_);
- set_register(instr, IP1, icount_);
- set_register(instr, R18, icount_);
- set_register(instr, LR, icount_);
+ set_register(NULL, R2, icount_);
+ set_register(NULL, R3, icount_);
+ set_register(NULL, R4, icount_);
+ set_register(NULL, R5, icount_);
+ set_register(NULL, R6, icount_);
+ set_register(NULL, R7, icount_);
+ set_register(NULL, R8, icount_);
+ set_register(NULL, R9, icount_);
+ set_register(NULL, R10, icount_);
+ set_register(NULL, R11, icount_);
+ set_register(NULL, R12, icount_);
+ set_register(NULL, R13, icount_);
+ set_register(NULL, R14, icount_);
+ set_register(NULL, R15, icount_);
+ set_register(NULL, IP0, icount_);
+ set_register(NULL, IP1, icount_);
+ set_register(NULL, R18, icount_);
+ set_register(NULL, LR, icount_);
// TODO(zra): Zap caller-saved fpu registers.
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/stack_frame_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698