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 736d5638d8edddb63ade5e5c4bf5c1e2d67675c4..2307d034e60509ca8adef91c2908d4b6a7e60ff6 100644 |
--- a/src/compiler/arm64/code-generator-arm64.cc |
+++ b/src/compiler/arm64/code-generator-arm64.cc |
@@ -420,6 +420,23 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
__ Jump(x10); |
break; |
} |
+ case kArchPrepareCallCFunction: |
+ // We don't need kArchPrepareCallCFunction on arm64 as the instruction |
+ // selector already perform a Claim to reserve space on the stack and |
+ // guarantee correct alignment of stack pointer. |
+ UNREACHABLE(); |
+ break; |
+ case kArchCallCFunction: { |
+ int const num_parameters = MiscField::decode(instr->opcode()); |
+ if (instr->InputAt(0)->IsImmediate()) { |
+ ExternalReference ref = i.InputExternalReference(0); |
+ __ CallCFunction(ref, num_parameters, 0); |
+ } else { |
+ Register func = i.InputRegister(0); |
+ __ CallCFunction(func, num_parameters, 0); |
+ } |
+ break; |
+ } |
case kArchJmp: |
AssembleArchJump(i.InputRpo(0)); |
break; |