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

Unified Diff: runtime/vm/stub_code_arm64.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_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm64.cc
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index 3f9663cac2dbbf399902a304b42b1375320e5aaf..f550777f342d2d3d90986871b092db5b0baae185 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -2183,6 +2183,50 @@ void StubCode::GenerateICCallThroughCodeStub(Assembler* assembler) {
}
+// Called from switchable IC calls.
+// R0: receiver
+// R5: SingleTargetCache
+// Passed to target:
+// CODE_REG: target Code object
+void StubCode::GenerateSingleTargetCallStub(Assembler* assembler) {
+ __ NoMonomorphicCheckedEntry();
+
+ Label miss;
+
+ __ LoadClassIdMayBeSmi(R1, R0);
+ __ ldr(R2, FieldAddress(R5, SingleTargetCache::lower_limit_offset()),
+ kUnsignedWord);
+ __ ldr(R3, FieldAddress(R5, SingleTargetCache::upper_limit_offset()),
+ kUnsignedWord);
+
+ __ cmp(R1, Operand(R2));
+ __ b(&miss, LT);
+ __ cmp(R1, Operand(R3));
+ __ b(&miss, GT);
+
+ __ ldr(R1, FieldAddress(R5, SingleTargetCache::entry_point_offset()));
+ __ ldr(CODE_REG, FieldAddress(R5, SingleTargetCache::target_offset()));
+ __ br(R1);
+
+ __ Bind(&miss);
+ __ EnterStubFrame();
+ __ Push(R0); // Preserve receiver.
+
+ __ PushObject(Object::null_object()); // Result.
+ __ Push(R0); // Arg0: Receiver
+ __ CallRuntime(kSingleTargetMissRuntimeEntry, 1);
+ __ Drop(1);
+ __ Pop(R5); // 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()));
+ __ br(R1);
+}
+
+
// Called from the monomorphic checked entry.
// R0: receiver
void StubCode::GenerateMonomorphicMissStub(Assembler* assembler) {
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698