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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 574843002: Fix x64 patching of asllocation stub: the pool pointer must be set-up before patching jump is execu… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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/flow_graph_compiler_x64.cc
===================================================================
--- runtime/vm/flow_graph_compiler_x64.cc (revision 40325)
+++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
@@ -986,24 +986,8 @@
new_pp = R13;
new_pc = R12;
- Label next;
- __ nop(4); // Need a fixed size sequence on frame entry.
- __ call(&next);
- __ Bind(&next);
+ __ SetupPP(new_pp, new_pc);
- const intptr_t object_pool_pc_dist =
- Instructions::HeaderSize() - Instructions::object_pool_offset() +
- __ CodeSize();
- const intptr_t offset =
- Assembler::EntryPointToPcMarkerOffset() - __ CodeSize();
- __ popq(new_pc);
- if (offset != 0) {
- __ addq(new_pc, Immediate(offset));
- }
-
- // Load callee's pool pointer.
- __ movq(new_pp, Address(new_pc, -object_pool_pc_dist - offset));
-
// Load function object using the callee's pool pointer.
__ LoadObject(function_reg, function, new_pp);
@@ -1026,24 +1010,8 @@
new_pp = R13;
new_pc = R12;
- Label next;
- __ nop(4); // Need a fixed size sequence on frame entry.
- __ call(&next);
- __ Bind(&next);
+ __ SetupPP(new_pp, new_pc);
- const intptr_t object_pool_pc_dist =
- Instructions::HeaderSize() - Instructions::object_pool_offset() +
- __ CodeSize();
- const intptr_t offset =
- Assembler::EntryPointToPcMarkerOffset() - __ CodeSize();
- __ popq(new_pc);
- if (offset != 0) {
- __ addq(new_pc, Immediate(offset));
- }
-
- // Load callee's pool pointer.
- __ movq(new_pp, Address(new_pc, -object_pool_pc_dist - offset));
-
entry_patch_pc_offset_ = assembler()->CodeSize();
}
__ Comment("Enter frame");
« no previous file with comments | « runtime/vm/compiler_test.cc ('k') | runtime/vm/stub_code.h » ('j') | runtime/vm/stub_code_x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698