Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index fbe8e171fa596967a65aff143823863b4570dca8..46d4d49dc4314a42e17e9cd46d69a719b70625e6 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -3016,11 +3016,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
if (access.IsExternalMemory()) { |
Register result = ToRegister(instr->result()); |
MemOperand operand = MemOperand(object, offset); |
- if (access.representation().IsByte()) { |
- __ ldrb(result, operand); |
- } else { |
- __ ldr(result, operand); |
- } |
+ __ Load(result, operand, access.representation()); |
return; |
} |
@@ -3036,11 +3032,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
object = result; |
} |
MemOperand operand = FieldMemOperand(object, offset); |
- if (access.representation().IsByte()) { |
- __ ldrb(result, operand); |
- } else { |
- __ ldr(result, operand); |
- } |
+ __ Load(result, operand, access.representation()); |
} |
@@ -4143,11 +4135,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
if (access.IsExternalMemory()) { |
Register value = ToRegister(instr->value()); |
MemOperand operand = MemOperand(object, offset); |
- if (representation.IsByte()) { |
- __ strb(value, operand); |
- } else { |
- __ str(value, operand); |
- } |
+ __ Store(value, operand, representation); |
return; |
} |
@@ -4193,11 +4181,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
if (access.IsInobject()) { |
MemOperand operand = FieldMemOperand(object, offset); |
- if (representation.IsByte()) { |
- __ strb(value, operand); |
- } else { |
- __ str(value, operand); |
- } |
+ __ Store(value, operand, representation); |
if (instr->hydrogen()->NeedsWriteBarrier()) { |
// Update the write barrier for the object for in-object properties. |
__ RecordWriteField(object, |
@@ -4212,11 +4196,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
} else { |
__ ldr(scratch, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
MemOperand operand = FieldMemOperand(scratch, offset); |
- if (representation.IsByte()) { |
- __ strb(value, operand); |
- } else { |
- __ str(value, operand); |
- } |
+ __ Store(value, operand, representation); |
if (instr->hydrogen()->NeedsWriteBarrier()) { |
// Update the write barrier for the properties array. |
// object is used as a scratch register. |