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

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

Issue 61623004: Add signed/unsigned 8-bit and 16-bit Representations (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review feedback and prepare to land Created 7 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/hydrogen-load-elimination.cc ('k') | src/ia32/lithium-ia32.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 a69ef12f9c808e8703174948aaa0ded7ecedb53a..1aac92ea2e1d8d783a664815d5d1bea82003f8cb 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -3215,12 +3215,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
? 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);
- } else {
- __ mov(result, operand);
- }
+ __ Load(result, operand, access.representation());
return;
}
@@ -3242,12 +3237,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
__ mov(result, FieldOperand(object, JSObject::kPropertiesOffset));
object = result;
}
- if (access.representation().IsByte()) {
- ASSERT(instr->hydrogen()->representation().IsInteger32());
- __ movzx_b(result, FieldOperand(object, offset));
- } else {
- __ mov(result, FieldOperand(object, offset));
- }
+ __ Load(result, FieldOperand(object, offset), access.representation());
}
@@ -4416,16 +4406,11 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
ToExternalReference(LConstantOperand::cast(instr->object())))
: MemOperand(ToRegister(instr->object()), offset);
if (instr->value()->IsConstantOperand()) {
- ASSERT(!representation.IsByte());
LConstantOperand* operand_value = LConstantOperand::cast(instr->value());
__ mov(operand, Immediate(ToInteger32(operand_value)));
} else {
Register value = ToRegister(instr->value());
- if (representation.IsByte()) {
- __ mov_b(operand, value);
- } else {
- __ mov(operand, value);
- }
+ __ Store(value, operand, representation);
}
return;
}
@@ -4503,11 +4488,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
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);
- }
+ __ Store(value, operand, representation);
} else {
Handle<Object> handle_value = ToHandle(operand_value);
ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
@@ -4515,11 +4496,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
}
} else {
Register value = ToRegister(instr->value());
- if (representation.IsByte()) {
- __ mov_b(operand, value);
- } else {
- __ mov(operand, value);
- }
+ __ Store(value, operand, representation);
}
if (instr->hydrogen()->NeedsWriteBarrier()) {
« no previous file with comments | « src/hydrogen-load-elimination.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698