| 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 289730cabaafa82c137347630123d4eea757c9c7..82f66dbaf24ecf3982afd43c3bb61c7dcc976c20 100644
|
| --- a/src/compiler/x64/code-generator-x64.cc
|
| +++ b/src/compiler/x64/code-generator-x64.cc
|
| @@ -41,7 +41,8 @@ class X64OperandConverter : public InstructionOperandConverter {
|
| return Immediate(0);
|
| }
|
| if (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE ||
|
| - constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) {
|
| + constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE ||
|
| + constant.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE) {
|
| return Immediate(constant.ToInt32(), constant.rmode());
|
| }
|
| return Immediate(constant.ToInt32());
|
| @@ -2164,7 +2165,8 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
|
| : kScratchRegister;
|
| switch (src.type()) {
|
| case Constant::kInt32: {
|
| - if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
|
| + if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE ||
|
| + src.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE) {
|
| __ movq(dst, src.ToInt64(), src.rmode());
|
| } else {
|
| // TODO(dcarney): don't need scratch in this case.
|
| @@ -2178,7 +2180,8 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
|
| break;
|
| }
|
| case Constant::kInt64:
|
| - if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
|
| + if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE ||
|
| + src.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE) {
|
| __ movq(dst, src.ToInt64(), src.rmode());
|
| } else {
|
| DCHECK(src.rmode() != RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
|
|
|