Index: src/arm/lithium-gap-resolver-arm.cc |
diff --git a/src/arm/lithium-gap-resolver-arm.cc b/src/arm/lithium-gap-resolver-arm.cc |
index 596d58f470c5b10947d24f6f0249648899b5216a..352fbb90ca3c1c5894ffbfd96111be9be964d143 100644 |
--- a/src/arm/lithium-gap-resolver-arm.cc |
+++ b/src/arm/lithium-gap-resolver-arm.cc |
@@ -248,7 +248,9 @@ void LGapResolver::EmitMove(int index) { |
LConstantOperand* constant_source = LConstantOperand::cast(source); |
if (destination->IsRegister()) { |
Register dst = cgen_->ToRegister(destination); |
- if (cgen_->IsInteger32(constant_source)) { |
+ if (cgen_->IsSmi(constant_source)) { |
+ __ mov(dst, Operand(cgen_->ToSmi(constant_source))); |
+ } else if (cgen_->IsInteger32(constant_source)) { |
__ mov(dst, Operand(cgen_->ToInteger32(constant_source))); |
} else { |
__ LoadObject(dst, cgen_->ToHandle(constant_source)); |
@@ -256,7 +258,9 @@ void LGapResolver::EmitMove(int index) { |
} else { |
ASSERT(destination->IsStackSlot()); |
ASSERT(!in_cycle_); // Constant moves happen after all cycles are gone. |
- if (cgen_->IsInteger32(constant_source)) { |
+ if (cgen_->IsSmi(constant_source)) { |
+ __ mov(kSavedValueRegister, Operand(cgen_->ToSmi(constant_source))); |
+ } else if (cgen_->IsInteger32(constant_source)) { |
__ mov(kSavedValueRegister, |
Operand(cgen_->ToInteger32(constant_source))); |
} else { |