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()) { |