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

Unified Diff: src/x64/lithium-codegen-x64.cc

Issue 391693002: In-object double fields unboxing (for 64-bit only). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index 426673afc55f79dd094c1be3a1911928a991845e..85b795e4f067e1df65c797296e5ad0ce69b74edb 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -2957,6 +2957,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
Register object = ToRegister(instr->object());
if (instr->hydrogen()->representation().IsDouble()) {
+ ASSERT(access.IsInobject());
XMMRegister result = ToDoubleRegister(instr->result());
__ movsd(result, FieldOperand(object, offset));
return;
@@ -4084,7 +4085,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
ASSERT(!representation.IsSmi() ||
!instr->value()->IsConstantOperand() ||
IsInteger32Constant(LConstantOperand::cast(instr->value())));
- if (representation.IsDouble()) {
+ if (!FLAG_unbox_double_fields && representation.IsDouble()) {
ASSERT(access.IsInobject());
ASSERT(!hinstr->has_transition());
ASSERT(!hinstr->NeedsWriteBarrier());
@@ -4134,7 +4135,12 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
Operand operand = FieldOperand(write_register, offset);
- if (instr->value()->IsRegister()) {
+ if (FLAG_unbox_double_fields && representation.IsDouble()) {
+ ASSERT(access.IsInobject());
+ XMMRegister value = ToDoubleRegister(instr->value());
+ __ movsd(operand, value);
+
+ } else if (instr->value()->IsRegister()) {
Register value = ToRegister(instr->value());
__ Store(operand, value, representation);
} else {

Powered by Google App Engine
This is Rietveld 408576698