diff --git a/js/src/jit/ABIFunctionList-inl.h b/js/src/jit/ABIFunctionList-inl.h index dbbf8b34fae9..437aa8206e86 100644 --- a/js/src/jit/ABIFunctionList-inl.h +++ b/js/src/jit/ABIFunctionList-inl.h @@ -105,6 +105,8 @@ namespace jit { _(js::jit::GetNativeDataPropertyByValuePure) \ _(js::jit::GetNativeDataPropertyPure) \ _(js::jit::GetNativeDataPropertyPure) \ + _(js::jit::HandleCodeCoverageAtPC) \ + _(js::jit::HandleCodeCoverageAtPrologue) \ _(js::jit::HandleException) \ _(js::jit::HasNativeDataPropertyPure) \ _(js::jit::HasNativeDataPropertyPure) \ diff --git a/js/src/jit/BaselineCodeGen.cpp b/js/src/jit/BaselineCodeGen.cpp index f50a67b69c60..624e6b25d7f0 100644 --- a/js/src/jit/BaselineCodeGen.cpp +++ b/js/src/jit/BaselineCodeGen.cpp @@ -8,6 +8,7 @@ #include "mozilla/Casting.h" +#include "jit/ABIFunctions.h" #include "jit/BaselineIC.h" #include "jit/BaselineJIT.h" #include "jit/FixedList.h" @@ -35,6 +36,7 @@ #endif #include "debugger/DebugAPI-inl.h" +#include "jit/ABIFunctionList-inl.h" #include "jit/BaselineFrameInfo-inl.h" #include "jit/MacroAssembler-inl.h" #include "jit/SharedICHelpers-inl.h" @@ -7002,11 +7004,11 @@ void BaselineInterpreterGenerator::emitOutOfLineCodeCoverageInstrumentation() { saveInterpreterPCReg(); + using Fn1 = void (*)(BaselineFrame * frame); masm.setupUnalignedABICall(R0.scratchReg()); masm.loadBaselineFramePtr(BaselineFrameReg, R0.scratchReg()); masm.passABIArg(R0.scratchReg()); - masm.callWithABI( - JS_FUNC_TO_DATA_PTR(void*, jit::HandleCodeCoverageAtPrologue)); + masm.callWithABI(); restoreInterpreterPCReg(); masm.ret(); @@ -7018,12 +7020,13 @@ void BaselineInterpreterGenerator::emitOutOfLineCodeCoverageInstrumentation() { saveInterpreterPCReg(); + using Fn2 = void (*)(BaselineFrame * frame, jsbytecode * pc); masm.setupUnalignedABICall(R0.scratchReg()); masm.loadBaselineFramePtr(BaselineFrameReg, R0.scratchReg()); masm.passABIArg(R0.scratchReg()); Register pcReg = LoadBytecodePC(masm, R2.scratchReg()); masm.passABIArg(pcReg); - masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, jit::HandleCodeCoverageAtPC)); + masm.callWithABI(); restoreInterpreterPCReg(); masm.ret();