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)); |