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

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

Issue 25679008: Revert "Add support to load/store byte fields." and "MIPS: Add support to load/store byte fields.". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 | « src/property-details.h ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index 0e98746af64151fbaac0c265d08765ca8f15ce88..45240595346a4859eebd9db29ae901a0c33837d6 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -2725,13 +2725,14 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
int offset = access.offset();
if (access.IsExternalMemory()) {
+ ASSERT(!access.representation().IsInteger32());
Register result = ToRegister(instr->result());
if (instr->object()->IsConstantOperand()) {
ASSERT(result.is(rax));
__ load_rax(ToExternalReference(LConstantOperand::cast(instr->object())));
} else {
Register object = ToRegister(instr->object());
- __ Load(result, MemOperand(object, offset), access.representation());
+ __ movq(result, MemOperand(object, offset));
}
return;
}
@@ -2745,11 +2746,20 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
}
Register result = ToRegister(instr->result());
- if (!access.IsInobject()) {
+ if (access.IsInobject()) {
+ if (access.representation().IsInteger32()) {
+ __ movl(result, FieldOperand(object, offset));
+ } else {
+ __ movq(result, FieldOperand(object, offset));
+ }
+ } else {
__ movq(result, FieldOperand(object, JSObject::kPropertiesOffset));
- object = result;
+ if (access.representation().IsInteger32()) {
+ __ movl(result, FieldOperand(result, offset));
+ } else {
+ __ movq(result, FieldOperand(result, offset));
+ }
}
- __ Load(result, FieldOperand(object, offset), access.representation());
}
@@ -3871,16 +3881,16 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
int offset = access.offset();
if (access.IsExternalMemory()) {
+ ASSERT(!access.representation().IsInteger32());
ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
Register value = ToRegister(instr->value());
if (instr->object()->IsConstantOperand()) {
ASSERT(value.is(rax));
- ASSERT(!access.representation().IsSpecialization());
LConstantOperand* object = LConstantOperand::cast(instr->object());
__ store_rax(ToExternalReference(object));
} else {
Register object = ToRegister(instr->object());
- __ Store(MemOperand(object, offset), value, representation);
+ __ movq(MemOperand(object, offset), value);
}
return;
}
@@ -3949,16 +3959,24 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
if (instr->value()->IsConstantOperand()) {
LConstantOperand* operand_value = LConstantOperand::cast(instr->value());
if (operand_value->IsRegister()) {
- Register value = ToRegister(operand_value);
- __ Store(FieldOperand(write_register, offset), value, representation);
+ if (access.representation().IsInteger32()) {
+ __ movl(FieldOperand(write_register, offset),
+ ToRegister(operand_value));
+ } else {
+ __ movq(FieldOperand(write_register, offset),
+ ToRegister(operand_value));
+ }
} else {
Handle<Object> handle_value = ToHandle(operand_value);
ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
__ Move(FieldOperand(write_register, offset), handle_value);
}
} else {
- Register value = ToRegister(instr->value());
- __ Store(FieldOperand(write_register, offset), value, representation);
+ if (access.representation().IsInteger32()) {
+ __ movl(FieldOperand(write_register, offset), ToRegister(instr->value()));
+ } else {
+ __ movq(FieldOperand(write_register, offset), ToRegister(instr->value()));
+ }
}
if (instr->hydrogen()->NeedsWriteBarrier()) {
« no previous file with comments | « src/property-details.h ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698