| Index: src/x64/lithium-gap-resolver-x64.cc
|
| diff --git a/src/x64/lithium-gap-resolver-x64.cc b/src/x64/lithium-gap-resolver-x64.cc
|
| index 22183a2f8d781df32de5d25b217448149c583c0b..fd74e0aacd9ed0562daea799d6baacabc8661cef 100644
|
| --- a/src/x64/lithium-gap-resolver-x64.cc
|
| +++ b/src/x64/lithium-gap-resolver-x64.cc
|
| @@ -195,7 +195,9 @@ void LGapResolver::EmitMove(int index) {
|
| LConstantOperand* constant_source = LConstantOperand::cast(source);
|
| if (destination->IsRegister()) {
|
| Register dst = cgen_->ToRegister(destination);
|
| - if (cgen_->IsInteger32Constant(constant_source)) {
|
| + if (cgen_->IsSmiConstant(constant_source)) {
|
| + __ Move(dst, cgen_->ToSmi(constant_source));
|
| + } else if (cgen_->IsInteger32Constant(constant_source)) {
|
| __ movl(dst, Immediate(cgen_->ToInteger32(constant_source)));
|
| } else {
|
| __ LoadObject(dst, cgen_->ToHandle(constant_source));
|
| @@ -203,7 +205,9 @@ void LGapResolver::EmitMove(int index) {
|
| } else {
|
| ASSERT(destination->IsStackSlot());
|
| Operand dst = cgen_->ToOperand(destination);
|
| - if (cgen_->IsInteger32Constant(constant_source)) {
|
| + if (cgen_->IsSmiConstant(constant_source)) {
|
| + __ Move(dst, cgen_->ToSmi(constant_source));
|
| + } else if (cgen_->IsInteger32Constant(constant_source)) {
|
| // Zero top 32 bits of a 64 bit spill slot that holds a 32 bit untagged
|
| // value.
|
| __ movq(dst, Immediate(cgen_->ToInteger32(constant_source)));
|
|
|