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

Unified Diff: src/ia32/lithium-codegen-ia32.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/hydrogen-instructions.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
index 3662d21c04772572c30f9f428cb2e685626c1ee7..14d16c018e0f8ceac3cf0ddaa1646bb06f4e48db 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -3225,15 +3225,12 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
if (access.IsExternalMemory()) {
Register result = ToRegister(instr->result());
- MemOperand operand = instr->object()->IsConstantOperand()
- ? MemOperand::StaticVariable(ToExternalReference(
- LConstantOperand::cast(instr->object())))
- : MemOperand(ToRegister(instr->object()), offset);
- if (access.representation().IsByte()) {
- ASSERT(instr->hydrogen()->representation().IsInteger32());
- __ movzx_b(result, operand);
+ if (instr->object()->IsConstantOperand()) {
+ ExternalReference external_reference = ToExternalReference(
+ LConstantOperand::cast(instr->object()));
+ __ mov(result, MemOperand::StaticVariable(external_reference));
} else {
- __ mov(result, operand);
+ __ mov(result, MemOperand(ToRegister(instr->object()), offset));
}
return;
}
@@ -3252,15 +3249,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
}
Register result = ToRegister(instr->result());
- if (!access.IsInobject()) {
- __ mov(result, FieldOperand(object, JSObject::kPropertiesOffset));
- object = result;
- }
- if (access.representation().IsByte()) {
- ASSERT(instr->hydrogen()->representation().IsInteger32());
- __ movzx_b(result, FieldOperand(object, offset));
- } else {
+ if (access.IsInobject()) {
__ mov(result, FieldOperand(object, offset));
+ } else {
+ __ mov(result, FieldOperand(object, JSObject::kPropertiesOffset));
+ __ mov(result, FieldOperand(result, offset));
}
}
@@ -4436,18 +4429,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
: MemOperand(ToRegister(instr->object()), offset);
if (instr->value()->IsConstantOperand()) {
LConstantOperand* operand_value = LConstantOperand::cast(instr->value());
- if (representation.IsByte()) {
- __ mov_b(operand, ToInteger32(operand_value));
- } else {
- __ mov(operand, Immediate(ToInteger32(operand_value)));
- }
+ __ mov(operand, Immediate(ToInteger32(operand_value)));
} else {
Register value = ToRegister(instr->value());
- if (representation.IsByte()) {
- __ mov_b(operand, value);
- } else {
- __ mov(operand, value);
- }
+ __ mov(operand, value);
}
return;
}
@@ -4520,28 +4505,17 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
__ mov(write_register, FieldOperand(object, JSObject::kPropertiesOffset));
}
- MemOperand operand = FieldOperand(write_register, offset);
if (instr->value()->IsConstantOperand()) {
LConstantOperand* operand_value = LConstantOperand::cast(instr->value());
if (operand_value->IsRegister()) {
- Register value = ToRegister(operand_value);
- if (representation.IsByte()) {
- __ mov_b(operand, value);
- } else {
- __ mov(operand, value);
- }
+ __ mov(FieldOperand(write_register, offset), ToRegister(operand_value));
} else {
Handle<Object> handle_value = ToHandle(operand_value);
ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
- __ mov(operand, handle_value);
+ __ mov(FieldOperand(write_register, offset), handle_value);
}
} else {
- Register value = ToRegister(instr->value());
- if (representation.IsByte()) {
- __ mov_b(operand, value);
- } else {
- __ mov(operand, value);
- }
+ __ mov(FieldOperand(write_register, offset), ToRegister(instr->value()));
}
if (instr->hydrogen()->NeedsWriteBarrier()) {
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698