Index: src/compiler/arm64/code-generator-arm64.cc |
diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc |
index ec130076ad9f8f0aaeb0deb8d1f69753bc13d888..1313c4f877187018d2f1326a0873615059568b9b 100644 |
--- a/src/compiler/arm64/code-generator-arm64.cc |
+++ b/src/compiler/arm64/code-generator-arm64.cc |
@@ -573,6 +573,28 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
InstructionCode opcode = instr->opcode(); |
ArchOpcode arch_opcode = ArchOpcodeField::decode(opcode); |
switch (arch_opcode) { |
+ case kArchCallWasmFunction: { |
+ DCHECK(instr->InputAt(0)->IsImmediate()); |
+ Constant callee_operand = i.ToConstant(instr->InputAt(0)); |
+ DCHECK(callee_operand.type() == Constant::Type::kInt32); |
+ __ Call(reinterpret_cast<Address>(callee_operand.ToInt32()), |
+ callee_operand.rmode()); |
+ RecordCallPosition(instr); |
+ // TODO(titzer): this is ugly. JSSP should be a caller-save register |
+ // in this case, but it is not possible to express in the register |
+ // allocator. |
+ CallDescriptor::Flags flags(MiscField::decode(opcode)); |
+ if (flags & CallDescriptor::kRestoreJSSP) { |
+ __ Ldr(jssp, MemOperand(csp)); |
+ __ Mov(csp, jssp); |
+ } |
+ if (flags & CallDescriptor::kRestoreCSP) { |
+ __ Mov(csp, jssp); |
+ __ AssertCspAligned(); |
+ } |
+ frame_access_state()->ClearSPDelta(); |
+ break; |
+ } |
case kArchCallCodeObject: { |
EnsureSpaceForLazyDeopt(); |
if (instr->InputAt(0)->IsImmediate()) { |