Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index ab959726776a31fc84785daea221615f79adc5ec..1a8b996e8594293fb0d78fe2064b412502a64c8b 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -3273,7 +3273,12 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
? MemOperand::StaticVariable(ToExternalReference( |
LConstantOperand::cast(instr->object()))) |
: MemOperand(ToRegister(instr->object()), offset); |
- __ Load(result, operand, access.representation()); |
+ if (access.representation().IsByte()) { |
+ ASSERT(instr->hydrogen()->representation().IsInteger32()); |
+ __ movzx_b(result, operand); |
+ } else { |
+ __ mov(result, operand); |
+ } |
return; |
} |
@@ -3295,7 +3300,12 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
__ mov(result, FieldOperand(object, JSObject::kPropertiesOffset)); |
object = result; |
} |
- __ Load(result, FieldOperand(object, offset), access.representation()); |
+ if (access.representation().IsByte()) { |
+ ASSERT(instr->hydrogen()->representation().IsInteger32()); |
+ __ movzx_b(result, FieldOperand(object, offset)); |
+ } else { |
+ __ mov(result, FieldOperand(object, offset)); |
+ } |
} |
@@ -4468,11 +4478,16 @@ 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()); |
- __ Store(value, operand, representation); |
+ if (representation.IsByte()) { |
+ __ mov_b(operand, value); |
+ } else { |
+ __ mov(operand, value); |
+ } |
} |
return; |
} |
@@ -4550,7 +4565,11 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); |
if (operand_value->IsRegister()) { |
Register value = ToRegister(operand_value); |
- __ Store(value, operand, representation); |
+ if (representation.IsByte()) { |
+ __ mov_b(operand, value); |
+ } else { |
+ __ mov(operand, value); |
+ } |
} else { |
Handle<Object> handle_value = ToHandle(operand_value); |
ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
@@ -4558,7 +4577,11 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
} |
} else { |
Register value = ToRegister(instr->value()); |
- __ Store(value, operand, representation); |
+ if (representation.IsByte()) { |
+ __ mov_b(operand, value); |
+ } else { |
+ __ mov(operand, value); |
+ } |
} |
if (instr->hydrogen()->NeedsWriteBarrier()) { |