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

Unified Diff: runtime/vm/stub_code_arm.cc

Issue 2279563002: AOT: Single target stub. (Closed)
Patch Set: add offset assertions Created 4 years, 4 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/stub_code.h ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm.cc
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index 4faf29e0107c2a425bdbda29bffb431a3af1838c..82c50a1efc8063ec95d161602081438133cfa4cc 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -2123,6 +2123,48 @@ void StubCode::GenerateICCallThroughCodeStub(Assembler* assembler) {
}
+// Called from switchable IC calls.
+// R0: receiver
+// R9: SingleTargetCache
+// Passed to target:
+// CODE_REG: target Code object
+void StubCode::GenerateSingleTargetCallStub(Assembler* assembler) {
+ __ NoMonomorphicCheckedEntry();
+
+ Label miss;
+
+ __ LoadClassIdMayBeSmi(R1, R0);
+ __ ldrh(R2, FieldAddress(R9, SingleTargetCache::lower_limit_offset()));
+ __ ldrh(R3, FieldAddress(R9, SingleTargetCache::upper_limit_offset()));
+
+ __ cmp(R1, Operand(R2));
+ __ b(&miss, LT);
+ __ cmp(R1, Operand(R3));
+ __ b(&miss, GT);
+
+ __ ldr(R1, FieldAddress(R9, SingleTargetCache::entry_point_offset()));
+ __ ldr(CODE_REG, FieldAddress(R9, SingleTargetCache::target_offset()));
+ __ bx(R1);
+
+ __ Bind(&miss);
+ __ EnterStubFrame();
+ __ Push(R0); // Preserve receiver.
+
+ __ PushObject(Object::null_object()); // Result.
+ __ Push(R0); // Arg0: Receiver
+ __ CallRuntime(kSingleTargetMissRuntimeEntry, 1);
+ __ Drop(1);
+ __ Pop(R9); // result = IC
+
+ __ Pop(R0); // Restore receiver.
+ __ LeaveStubFrame();
+
+ __ ldr(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset()));
+ __ ldr(R1, FieldAddress(CODE_REG, Code::checked_entry_point_offset()));
+ __ bx(R1);
+}
+
+
// Called from the monomorphic checked entry.
// R0: receiver
void StubCode::GenerateMonomorphicMissStub(Assembler* assembler) {
« no previous file with comments | « runtime/vm/stub_code.h ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698