| Index: src/compiler/x64/code-generator-x64.cc
 | 
| diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
 | 
| index d9c5d60fb9b06f16431adb208cb648e4ec4da32f..30b0f9dce62343a590dd93225800537e24460013 100644
 | 
| --- a/src/compiler/x64/code-generator-x64.cc
 | 
| +++ b/src/compiler/x64/code-generator-x64.cc
 | 
| @@ -2078,17 +2078,25 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
 | 
|                                                 : kScratchRegister;
 | 
|        switch (src.type()) {
 | 
|          case Constant::kInt32: {
 | 
| -          // TODO(dcarney): don't need scratch in this case.
 | 
| -          int32_t value = src.ToInt32();
 | 
| -          if (value == 0) {
 | 
| -            __ xorl(dst, dst);
 | 
| +          if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
 | 
| +            __ movq(dst, src.ToInt64(), src.rmode());
 | 
|            } else {
 | 
| -            __ movl(dst, Immediate(value));
 | 
| +            // TODO(dcarney): don't need scratch in this case.
 | 
| +            int32_t value = src.ToInt32();
 | 
| +            if (value == 0) {
 | 
| +              __ xorl(dst, dst);
 | 
| +            } else {
 | 
| +              __ movl(dst, Immediate(value));
 | 
| +            }
 | 
|            }
 | 
|            break;
 | 
|          }
 | 
|          case Constant::kInt64:
 | 
| -          __ Set(dst, src.ToInt64());
 | 
| +          if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
 | 
| +            __ movq(dst, src.ToInt64(), src.rmode());
 | 
| +          } else {
 | 
| +            __ Set(dst, src.ToInt64());
 | 
| +          }
 | 
|            break;
 | 
|          case Constant::kFloat32:
 | 
|            __ Move(dst,
 | 
| 
 |