Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 8ec1af59b6e7ed353a0c29fd205d3f34d77c4e4a..4904360bb3dae41070e940a41523e868057204fc 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -2976,6 +2976,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
Register object = ToRegister(instr->object()); |
if (instr->hydrogen()->representation().IsDouble()) { |
+ DCHECK(access.IsInobject()); |
XMMRegister result = ToDoubleRegister(instr->result()); |
__ movsd(result, FieldOperand(object, offset)); |
return; |
@@ -4122,7 +4123,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
DCHECK(!representation.IsSmi() || |
!instr->value()->IsConstantOperand() || |
IsInteger32Constant(LConstantOperand::cast(instr->value()))); |
- if (representation.IsDouble()) { |
+ if (!FLAG_unbox_double_fields && representation.IsDouble()) { |
DCHECK(access.IsInobject()); |
DCHECK(!hinstr->has_transition()); |
DCHECK(!hinstr->NeedsWriteBarrier()); |
@@ -4172,7 +4173,12 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
Operand operand = FieldOperand(write_register, offset); |
- if (instr->value()->IsRegister()) { |
+ if (FLAG_unbox_double_fields && representation.IsDouble()) { |
+ DCHECK(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 { |