Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 4e1cc2f7a58bce915542263d8f182b8058f34463..a89d5d9c88428c0b8c1207b94ff821364c723686 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -4170,7 +4170,13 @@ void LCodeGen::DoStoreCodeEntry(LStoreCodeEntry* instr) { |
void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { |
Register result = ToRegister(instr->result()); |
Register base = ToRegister(instr->base_object()); |
- __ add(result, base, Operand(instr->offset())); |
+ if (instr->offset()->IsConstantOperand()) { |
+ LConstantOperand* offset = LConstantOperand::cast(instr->offset()); |
+ __ add(result, base, Operand(ToInteger32(offset))); |
+ } else { |
+ Register offset = ToRegister(instr->offset()); |
+ __ add(result, base, offset); |
+ } |
} |