Ignore:
Timestamp:
Feb 13, 2015, 3:08:18 PM (11 years ago)
Author:
[email protected]
Message:

ArithSqrt should not be conditional on supportsFloatingPointSqrt
https://bugs.webkit.org/show_bug.cgi?id=141546

Patch by Benjamin Poulain <[email protected]> on 2015-02-13
Reviewed by Geoffrey Garen and Filip Pizlo.

Just fallback to the function call in the DFG codegen.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsic):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArithSqrt):

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

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • tests/stress/math-sqrt-basics.js: Added.

Basic coverage.

  • tests/stress/math-sqrt-basics-disable-architecture-specific-optimizations.js: Added.

Same tests but forcing the function call.

File:
1 edited

Legend:

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

    r179816 r180085  
    16691669        switch (intrinsic) {
    16701670        case SqrtIntrinsic:
    1671             if (!MacroAssembler::supportsFloatingPointSqrt())
    1672                 return false;
    1673            
    16741671            set(VirtualRegister(resultOperand), addToGraph(ArithSqrt, get(virtualRegisterForArgument(1, registerOffset))));
    16751672            return true;
Note: See TracChangeset for help on using the changeset viewer.