Ignore:
Timestamp:
Sep 29, 2020, 11:12:28 AM (5 years ago)
Author:
[email protected]
Message:

[JSC] Annotate JIT operation functions called from B3 etc.
https://bugs.webkit.org/show_bug.cgi?id=217082

Reviewed by Saam Barati.

There are many math functions that are called from B3 etc. We should make them JIT operations to complete JIT-caging.

  • b3/B3LowerMacros.cpp:
  • b3/B3LowerMacrosAfterOptimizations.cpp:
  • b3/B3MathExtras.cpp:
  • b3/B3ReduceLoopStrength.cpp:

(JSC::B3::JSC_DEFINE_JIT_OPERATION):
(JSC::B3::ReduceLoopStrength::reduceByteCopyLoopsToMemcpy):
(JSC::B3::fastForwardCopy32): Deleted.

  • b3/B3ReduceLoopStrength.h:

(JSC::B3::fastForwardCopy32):

  • b3/B3ReduceStrength.cpp:
  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGArithMode.cpp:

(JSC::DFG::arithUnaryFunction):
(JSC::DFG::arithUnaryOperation):
(WTF::printInternal):

  • dfg/DFGArithMode.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArithMod):
(JSC::DFG::SpeculativeJIT::compileArithRounding):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileArithPow):

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::doubleTrunc):
(JSC::FTL::Output::doubleUnary):
(JSC::FTL::Output::doubleStdPow):
(JSC::FTL::Output::doublePow): Deleted.

  • ftl/FTLOutput.h:
  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::callDoubleToDouble):

  • jit/ThunkGenerators.cpp:
  • runtime/MathCommon.cpp:

(JSC::Math::log1pDoubleImpl):
(JSC::Math::log1pFloatImpl):
(JSC::Math::log1p):
(JSC::Math::JSC_DEFINE_JIT_OPERATION):
(JSC::Math::roundDoubleImpl):

  • runtime/MathCommon.h:
  • runtime/MathObject.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/Operations.h:

(JSC::jsRemainder):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGArithMode.cpp

    r216178 r267754  
    4040#define DFG_ARITH_UNARY(capitalizedName, lowerName) \
    4141    case Arith::UnaryType::capitalizedName: \
    42         return static_cast<Arith::UnaryFunction>(JSC::Math::lowerName);
    43     FOR_EACH_DFG_ARITH_UNARY_OP(DFG_ARITH_UNARY)
     42        return JSC::Math::lowerName##Double;
     43    FOR_EACH_ARITH_UNARY_OP(DFG_ARITH_UNARY)
    4444#undef DFG_ARITH_UNARY
    4545    }
     
    5454    case Arith::UnaryType::capitalizedName: \
    5555        return static_cast<Arith::UnaryOperation>(operationArith##capitalizedName);
    56     FOR_EACH_DFG_ARITH_UNARY_OP(DFG_ARITH_UNARY)
     56    FOR_EACH_ARITH_UNARY_OP(DFG_ARITH_UNARY)
    5757#undef DFG_ARITH_UNARY
    5858    }
     
    109109        out.print(#capitalizedName); \
    110110        return;
    111     FOR_EACH_DFG_ARITH_UNARY_OP(DFG_ARITH_UNARY)
     111    FOR_EACH_ARITH_UNARY_OP(DFG_ARITH_UNARY)
    112112#undef DFG_ARITH_UNARY
    113113    }
Note: See TracChangeset for help on using the changeset viewer.