| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 29e01b9182a5216e2119c6ebb413713f0f9d37e0..ebda302e3049d880ff41f3aeb9e785aa23cf8b3d 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -5473,7 +5473,6 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
|
|
|
|
|
| void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
|
| - Register size = ToRegister(instr->size());
|
| Register result = ToRegister(instr->result());
|
|
|
| // TODO(3095996): Get rid of this. For now, we need to make the
|
| @@ -5482,8 +5481,16 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
|
| __ mov(result, Operand(Smi::FromInt(0)));
|
|
|
| PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
|
| - __ SmiTag(size, size);
|
| - __ push(size);
|
| + if (instr->size()->IsRegister()) {
|
| + Register size = ToRegister(instr->size());
|
| + ASSERT(!size.is(result));
|
| + __ SmiTag(size);
|
| + __ push(size);
|
| + } else {
|
| + int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
| + __ Push(Smi::FromInt(size));
|
| + }
|
| +
|
| if (instr->hydrogen()->CanAllocateInOldPointerSpace()) {
|
| CallRuntimeFromDeferred(
|
| Runtime::kAllocateInOldPointerSpace, 1, instr);
|
|
|