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

Unified Diff: runtime/vm/assembler_x64.cc

Issue 10641018: - Remove extra jumps from store barrier on x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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/assembler_x64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64.cc
===================================================================
--- runtime/vm/assembler_x64.cc (revision 9013)
+++ runtime/vm/assembler_x64.cc (working copy)
@@ -879,6 +879,15 @@
}
+void Assembler::adcl(Register dst, Register src) {
Vyacheslav Egorov (Google) 2012/06/22 10:36:28 please add a test for this instruction in assemble
+ AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+ Operand operand(src);
+ EmitOperandREX(dst, operand, REX_NONE);
+ EmitUint8(0x13);
+ EmitOperand(dst & 7, operand);
+}
+
+
void Assembler::subl(Register dst, Register src) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
Operand operand(src);
@@ -1405,14 +1414,11 @@
void Assembler::StoreIntoObjectFilter(Register object,
Register value,
Label* no_update) {
- // Check that 'value' is a new object. Store buffer updates are not
- // required when storing a smi or an old object.
- testl(value, Immediate(kNewObjectAlignmentOffset | kHeapObjectTag));
- j(PARITY_ODD, no_update, Assembler::kNearJump);
- j(ZERO, no_update, Assembler::kNearJump);
- // Check that 'object' is an old object. A store buffer update is
- // not required when storing into a new object.
- testl(object, Immediate(kNewObjectAlignmentOffset));
+ andl(value, Immediate(0x5));
+ shrl(value, Immediate(1));
+ adcl(value, object);
+ andl(value, Immediate(0x7));
+ cmpl(value, Immediate(0x4));
j(NOT_ZERO, no_update, Assembler::kNearJump);
}
@@ -1423,13 +1429,15 @@
movq(dest, value);
Label done;
+ pushq(value);
StoreIntoObjectFilter(object, value, &done);
// A store buffer update is required.
- pushq(RAX);
+ if (value != RAX) pushq(RAX);
leaq(RAX, dest);
call(&StubCode::UpdateStoreBufferLabel());
- popq(RAX);
+ if (value != RAX) popq(RAX);
Bind(&done);
+ popq(value);
}
@@ -1439,9 +1447,11 @@
movq(dest, value);
#if defined(DEBUG)
Label done;
+ pushq(value);
StoreIntoObjectFilter(object, value, &done);
Stop("Store buffer update is required");
Bind(&done);
+ popq(value);
#endif // defined(DEBUG)
// No store buffer update.
}
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698