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

Unified Diff: runtime/vm/intrinsifier_arm.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
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_arm.cc
diff --git a/runtime/vm/intrinsifier_arm.cc b/runtime/vm/intrinsifier_arm.cc
index 119fd7aa1f9d73ab536a6b99429b57060eda72fd..e17abcb149f0de61c9058a3553ae74905f279b51 100644
--- a/runtime/vm/intrinsifier_arm.cc
+++ b/runtime/vm/intrinsifier_arm.cc
@@ -33,7 +33,16 @@ namespace dart {
intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; }
+static bool IsABIPreservedRegister(Register reg) {
+ return ((1 << reg) & kAbiPreservedCpuRegs) != 0;
+}
+
+
void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) {
+ ASSERT(IsABIPreservedRegister(CODE_REG));
+ ASSERT(IsABIPreservedRegister(ARGS_DESC_REG));
+ ASSERT(IsABIPreservedRegister(CALLEE_SAVED_TEMP));
+
// Save LR by moving it to a callee saved temporary register.
assembler->Comment("IntrinsicCallPrologue");
assembler->mov(CALLEE_SAVED_TEMP, Operand(LR));
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698