| Index: runtime/vm/flow_graph_compiler_ia32.cc
|
| diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
|
| index 5705373aaa6ee1ad7664aaddc71c16ecca5dffdd..a00e8b99efe1c8f7d2133a56aadf0abce5920843 100644
|
| --- a/runtime/vm/flow_graph_compiler_ia32.cc
|
| +++ b/runtime/vm/flow_graph_compiler_ia32.cc
|
| @@ -1576,6 +1576,9 @@ void ParallelMoveResolver::EmitMove(int index) {
|
| const Object& constant = source.constant();
|
| if (constant.IsSmi() && (Smi::Cast(constant).Value() == 0)) {
|
| __ xorl(destination.reg(), destination.reg());
|
| + } else if (constant.IsSmi() &&
|
| + source.constant_instruction()->representation() == kUnboxedInt32) {
|
| + __ movl(destination.reg(), Immediate(Smi::Cast(constant).Value()));
|
| } else {
|
| __ LoadObjectSafely(destination.reg(), constant);
|
| }
|
| @@ -1609,7 +1612,14 @@ void ParallelMoveResolver::EmitMove(int index) {
|
| __ movsd(destination.ToStackSlotAddress(), XMM0);
|
| } else {
|
| ASSERT(destination.IsStackSlot());
|
| - StoreObject(destination.ToStackSlotAddress(), source.constant());
|
| + const Object& constant = source.constant();
|
| + if (constant.IsSmi() &&
|
| + source.constant_instruction()->representation() == kUnboxedInt32) {
|
| + __ movl(destination.ToStackSlotAddress(),
|
| + Immediate(Smi::Cast(constant).Value()));
|
| + } else {
|
| + StoreObject(destination.ToStackSlotAddress(), source.constant());
|
| + }
|
| }
|
| }
|
|
|
|
|