Index: src/compiler/arm/code-generator-arm.cc |
diff --git a/src/compiler/arm/code-generator-arm.cc b/src/compiler/arm/code-generator-arm.cc |
index cef16c2faa09ad8085c9110d7e34aae5a7000a8d..a98fe51c2bcd66e029532fd61646c4b94ddfbddb 100644 |
--- a/src/compiler/arm/code-generator-arm.cc |
+++ b/src/compiler/arm/code-generator-arm.cc |
@@ -473,8 +473,14 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
case kArchCallCodeObject: { |
titzer
2016/06/02 13:17:08
We should add another enum case here and not overl
Mircea Trofin
2016/06/02 14:46:21
Happy to.
I intend to do the same thing for impor
|
EnsureSpaceForLazyDeopt(); |
if (instr->InputAt(0)->IsImmediate()) { |
- __ Call(Handle<Code>::cast(i.InputHeapObject(0)), |
- RelocInfo::CODE_TARGET); |
+ Constant callee_operand = i.ToConstant(instr->InputAt(0)); |
+ if (callee_operand.type() == Constant::Type::kInt32) { |
+ __ Call(reinterpret_cast<Address>(callee_operand.ToInt32()), |
+ RelocInfo::WASM_DIRECT_CALL); |
+ } else { |
+ __ Call(Handle<Code>::cast(i.InputHeapObject(0)), |
+ RelocInfo::CODE_TARGET); |
+ } |
} else { |
__ add(ip, i.InputRegister(0), |
Operand(Code::kHeaderSize - kHeapObjectTag)); |