Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index a5f24c211f174dbcbce07e1da1342ea2eb30fd04..ab192d683daf74329c1377ce7e90afd2982da1c7 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -2726,14 +2726,13 @@ 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()); |
- __ movq(result, MemOperand(object, offset)); |
+ __ Load(result, MemOperand(object, offset), access.representation()); |
} |
return; |
} |
@@ -2747,20 +2746,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
} |
Register result = ToRegister(instr->result()); |
- if (access.IsInobject()) { |
- if (access.representation().IsInteger32()) { |
- __ movl(result, FieldOperand(object, offset)); |
- } else { |
- __ movq(result, FieldOperand(object, offset)); |
- } |
- } else { |
+ if (!access.IsInobject()) { |
__ movq(result, FieldOperand(object, JSObject::kPropertiesOffset)); |
- if (access.representation().IsInteger32()) { |
- __ movl(result, FieldOperand(result, offset)); |
- } else { |
- __ movq(result, FieldOperand(result, offset)); |
- } |
+ object = result; |
} |
+ __ Load(result, FieldOperand(object, offset), access.representation()); |
} |
@@ -3878,16 +3868,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()); |
- __ movq(MemOperand(object, offset), value); |
+ __ Store(MemOperand(object, offset), value, representation); |
} |
return; |
} |
@@ -3956,24 +3946,16 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
if (instr->value()->IsConstantOperand()) { |
LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); |
if (operand_value->IsRegister()) { |
- if (access.representation().IsInteger32()) { |
- __ movl(FieldOperand(write_register, offset), |
- ToRegister(operand_value)); |
- } else { |
- __ movq(FieldOperand(write_register, offset), |
- ToRegister(operand_value)); |
- } |
+ Register value = ToRegister(operand_value); |
+ __ Store(FieldOperand(write_register, offset), value, representation); |
} else { |
Handle<Object> handle_value = ToHandle(operand_value); |
ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
__ Move(FieldOperand(write_register, offset), handle_value); |
} |
} else { |
- if (access.representation().IsInteger32()) { |
- __ movl(FieldOperand(write_register, offset), ToRegister(instr->value())); |
- } else { |
- __ movq(FieldOperand(write_register, offset), ToRegister(instr->value())); |
- } |
+ Register value = ToRegister(instr->value()); |
+ __ Store(FieldOperand(write_register, offset), value, representation); |
} |
if (instr->hydrogen()->NeedsWriteBarrier()) { |