[X86] Emit BT instruction for single-bit tests.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 May 2014 23:22:07 +0000 (23:22 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 May 2014 23:22:07 +0000 (23:22 +0000)
commitccfb7c557e3600541d1b82bd4c5245797a01554a
treeb04afbd4f81c7996827f68260e152b6ef8d8459e
parent20403702a2ccd7eb39b6bea60582e3a1ff385315
[X86] Emit BT instruction for single-bit tests.
<https://webkit.org/b/132650>

Implement test-bit-and-branch slightly more efficiently by using
BT + JC/JNC instead of TEST + JZ/JNZ when we're only testing for
a single bit.

Reviewed by Michael Saboff.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::singleBitIndex):
(JSC::MacroAssemblerX86Common::branchTest32):
* assembler/X86Assembler.h:
(JSC::X86Assembler::bt_i8r):
(JSC::X86Assembler::bt_i8m):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
Source/JavaScriptCore/assembler/X86Assembler.h