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 18ac9f9f3215b848d3a532098e8f577b909d0860..99a61623be8180de2117f5fdac3032e1904fb9f4 100644 |
--- a/src/compiler/x64/code-generator-x64.cc |
+++ b/src/compiler/x64/code-generator-x64.cc |
@@ -44,6 +44,10 @@ class X64OperandConverter : public InstructionOperandConverter { |
DCHECK_EQ(0, bit_cast<int64_t>(constant.ToFloat64())); |
return Immediate(0); |
} |
+ if (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || |
+ constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { |
+ return Immediate(constant.ToInt32(), constant.rmode()); |
+ } |
return Immediate(constant.ToInt32()); |
} |
@@ -2129,6 +2133,7 @@ void CodeGenerator::AssembleMove(InstructionOperand* source, |
if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { |
__ movq(dst, src.ToInt64(), src.rmode()); |
} else { |
+ DCHECK(src.rmode() != RelocInfo::WASM_MEMORY_SIZE_REFERENCE); |
__ Set(dst, src.ToInt64()); |
} |
break; |