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

Unified Diff: runtime/vm/intrinsifier_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/intrinsifier_arm64.cc
diff --git a/runtime/vm/intrinsifier_arm64.cc b/runtime/vm/intrinsifier_arm64.cc
index 0ca8c25fa63444e7ed7c22ef53c10ea12ec625b6..382f90d8d8b5d00b48e270b16d8731281fa87d4b 100644
--- a/runtime/vm/intrinsifier_arm64.cc
+++ b/runtime/vm/intrinsifier_arm64.cc
@@ -33,9 +33,18 @@ intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; }
void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) {
+ COMPILE_ASSERT((1 << CODE_REG) & kAbiPreservedCpuRegs);
+ COMPILE_ASSERT(((1 << ARGS_DESC_REG) & kAbiPreservedCpuRegs) == 0);
+ COMPILE_ASSERT((1 << CALLEE_SAVED_TEMP) & kAbiPreservedCpuRegs);
+ COMPILE_ASSERT((1 << CALLEE_SAVED_TEMP2) & kAbiPreservedCpuRegs);
+ COMPILE_ASSERT(CALLEE_SAVED_TEMP != CODE_REG);
+ COMPILE_ASSERT(CALLEE_SAVED_TEMP != ARGS_DESC_REG);
+ COMPILE_ASSERT(CALLEE_SAVED_TEMP2 != CODE_REG);
+ COMPILE_ASSERT(CALLEE_SAVED_TEMP2 != ARGS_DESC_REG);
+
assembler->Comment("IntrinsicCallPrologue");
assembler->mov(CALLEE_SAVED_TEMP, LR);
- assembler->mov(CALLEE_SAVED_TEMP2, R4);
+ assembler->mov(CALLEE_SAVED_TEMP2, ARGS_DESC_REG);
}

Powered by Google App Engine
This is Rietveld 408576698