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

Unified Diff: src/arm64/lithium-codegen-arm64.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: Rebasing Created 6 years, 1 month 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 | « src/arm64/lithium-arm64.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698