Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index ecf738f913d2d2ea35a6b44f30a010055dc8ee6b..5c2d636d0dd43b45272834059bf22c4881dc49d9 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -2921,11 +2921,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
if (access.IsExternalMemory()) { |
Register result = ToRegister(instr->result()); |
MemOperand operand = MemOperand(object, offset); |
- if (access.representation().IsByte()) { |
- __ lb(result, operand); |
- } else { |
- __ lw(result, operand); |
- } |
+ __ Load(result, operand, access.representation()); |
return; |
} |
@@ -2941,11 +2937,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
object = result; |
} |
MemOperand operand = FieldMemOperand(object, offset); |
- if (access.representation().IsByte()) { |
- __ lb(result, operand); |
- } else { |
- __ lw(result, operand); |
- } |
+ __ Load(result, operand, access.representation()); |
} |
@@ -4106,11 +4098,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
if (access.IsExternalMemory()) { |
Register value = ToRegister(instr->value()); |
MemOperand operand = MemOperand(object, offset); |
- if (representation.IsByte()) { |
- __ sb(value, operand); |
- } else { |
- __ sw(value, operand); |
- } |
+ __ Store(value, operand, representation); |
return; |
} |
@@ -4156,11 +4144,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
if (access.IsInobject()) { |
MemOperand operand = FieldMemOperand(object, offset); |
- if (representation.IsByte()) { |
- __ sb(value, operand); |
- } else { |
- __ sw(value, operand); |
- } |
+ __ Store(value, operand, representation); |
if (instr->hydrogen()->NeedsWriteBarrier()) { |
// Update the write barrier for the object for in-object properties. |
__ RecordWriteField(object, |
@@ -4175,11 +4159,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
} else { |
__ lw(scratch, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
MemOperand operand = FieldMemOperand(scratch, offset); |
- if (representation.IsByte()) { |
- __ sb(value, operand); |
- } else { |
- __ sw(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. |