Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JSC] Add ceil() support for x86 and expose it to B3
https://bugs.webkit.org/show_bug.cgi?id=152231 Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-14 Reviewed by Geoffrey Garen. Most x86 CPUs we care about support ceil() natively with the round instruction. This patch expose that behind a runtime flag, use it in the Math.ceil() thunk and expose it to B3. * assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::supportsFloatingPointCeil): * assembler/MacroAssemblerARMv7.h: (JSC::MacroAssemblerARMv7::supportsFloatingPointCeil): * assembler/MacroAssemblerMIPS.h: (JSC::MacroAssemblerMIPS::supportsFloatingPointCeil): * assembler/MacroAssemblerSH4.h: (JSC::MacroAssemblerSH4::supportsFloatingPointCeil): * assembler/MacroAssemblerX86Common.cpp: * assembler/MacroAssemblerX86Common.h: (JSC::MacroAssemblerX86Common::ceilDouble): (JSC::MacroAssemblerX86Common::ceilFloat): (JSC::MacroAssemblerX86Common::supportsFloatingPointCeil): (JSC::MacroAssemblerX86Common::supportsLZCNT): * assembler/X86Assembler.h: (JSC::X86Assembler::roundss_rr): (JSC::X86Assembler::roundss_mr): (JSC::X86Assembler::roundsd_rr): (JSC::X86Assembler::roundsd_mr): (JSC::X86Assembler::mfence): (JSC::X86Assembler::X86InstructionFormatter::threeByteOp): * b3/B3ConstDoubleValue.cpp: (JSC::B3::ConstDoubleValue::ceilConstant): * b3/B3ConstDoubleValue.h: * b3/B3ConstFloatValue.cpp: (JSC::B3::ConstFloatValue::ceilConstant): * b3/B3ConstFloatValue.h: * b3/B3LowerMacrosAfterOptimizations.cpp: * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::lower): * b3/B3Opcode.cpp: (WTF::printInternal): * b3/B3Opcode.h: * b3/B3ReduceDoubleToFloat.cpp: * b3/B3ReduceStrength.cpp: * b3/B3Validate.cpp: * b3/B3Value.cpp: (JSC::B3::Value::ceilConstant): (JSC::B3::Value::effects): (JSC::B3::Value::key): (JSC::B3::Value::typeFor): * b3/B3Value.h: * b3/air/AirOpcode.opcodes: * b3/testb3.cpp: (JSC::B3::testCeilArg): (JSC::B3::testCeilImm): (JSC::B3::testCeilMem): (JSC::B3::testCeilCeilArg): (JSC::B3::testCeilIToD64): (JSC::B3::testCeilIToD32): (JSC::B3::testCeilArgWithUselessDoubleConversion): (JSC::B3::testCeilArgWithEffectfulDoubleConversion): (JSC::B3::populateWithInterestingValues): (JSC::B3::run): * ftl/FTLB3Output.h: (JSC::FTL::Output::ceil64): * jit/ThunkGenerators.cpp: (JSC::ceilThunkGenerator): Canonical link: https://commits.webkit.org/170383@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
fe8f821
commit 01738ab
Showing
25 changed files
with
504 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.