Index: src/compiler/mips/code-generator-mips.cc |
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc |
index 3afb86af45556328c1af7f805c3cf578e4eb216a..f7c1e01f80153325ded7c75424b1ab1f737790b9 100644 |
--- a/src/compiler/mips/code-generator-mips.cc |
+++ b/src/compiler/mips/code-generator-mips.cc |
@@ -463,6 +463,22 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
__ Jump(at); |
break; |
} |
+ case kArchPrepareCallCFunction: { |
+ int const num_parameters = MiscField::decode(instr->opcode()); |
+ __ PrepareCallCFunction(num_parameters, kScratchReg); |
+ 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); |
+ } else { |
+ Register func = i.InputRegister(0); |
+ __ CallCFunction(func, num_parameters); |
+ } |
+ break; |
+ } |
case kArchJmp: |
AssembleArchJump(i.InputRpo(0)); |
break; |