Index: src/arm64/lithium-codegen-arm64.cc |
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc |
index 9fe311c939277109a7348a5b7ff48cc4770f31c1..8129470e158cfa719501209d5fa601f20646e56b 100644 |
--- a/src/arm64/lithium-codegen-arm64.cc |
+++ b/src/arm64/lithium-codegen-arm64.cc |
@@ -3660,6 +3660,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
} |
if (instr->hydrogen()->representation().IsDouble()) { |
+ DCHECK(access.IsInobject()); |
FPRegister result = ToDoubleRegister(instr->result()); |
__ Ldr(result, FieldMemOperand(object, offset)); |
return; |
@@ -5350,7 +5351,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
__ AssertNotSmi(object); |
- if (representation.IsDouble()) { |
+ if (!FLAG_unbox_double_fields && representation.IsDouble()) { |
DCHECK(access.IsInobject()); |
DCHECK(!instr->hydrogen()->has_transition()); |
DCHECK(!instr->hydrogen()->NeedsWriteBarrier()); |
@@ -5359,8 +5360,6 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
return; |
} |
- Register value = ToRegister(instr->value()); |
- |
DCHECK(!representation.IsSmi() || |
!instr->value()->IsConstantOperand() || |
IsInteger32Constant(LConstantOperand::cast(instr->value()))); |
@@ -5392,8 +5391,12 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
destination = temp0; |
} |
- if (representation.IsSmi() && |
- instr->hydrogen()->value()->representation().IsInteger32()) { |
+ if (FLAG_unbox_double_fields && representation.IsDouble()) { |
+ DCHECK(access.IsInobject()); |
+ FPRegister value = ToDoubleRegister(instr->value()); |
+ __ Str(value, FieldMemOperand(object, offset)); |
+ } else if (representation.IsSmi() && |
+ instr->hydrogen()->value()->representation().IsInteger32()) { |
DCHECK(instr->hydrogen()->store_mode() == STORE_TO_INITIALIZED_ENTRY); |
#ifdef DEBUG |
Register temp0 = ToRegister(instr->temp0()); |
@@ -5408,12 +5411,15 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
#endif |
STATIC_ASSERT(static_cast<unsigned>(kSmiValueSize) == kWRegSizeInBits); |
STATIC_ASSERT(kSmiTag == 0); |
+ Register value = ToRegister(instr->value()); |
__ Store(value, UntagSmiFieldMemOperand(destination, offset), |
Representation::Integer32()); |
} else { |
+ Register value = ToRegister(instr->value()); |
__ Store(value, FieldMemOperand(destination, offset), representation); |
} |
if (instr->hydrogen()->NeedsWriteBarrier()) { |
+ Register value = ToRegister(instr->value()); |
__ RecordWriteField(destination, |
offset, |
value, // Clobbered. |