* config/i386/i386.h (x86_use_xchgb): New.
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Feb 2007 18:36:01 +0000 (18:36 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Feb 2007 18:36:01 +0000 (18:36 +0000)
commit3289a94d47e6c5ba037afe7dcd704f79a0e8c379
tree1833442ed772629bbb3c8f04dd569abd773e57b0
parentac0573396099038a4f16ed126e6bcfde004a6b70
    * config/i386/i386.h (x86_use_xchgb): New.
        (TARGET_USE_XCHGB): New macro.
        * config/i386/i386.c (x86_use_xchgb): Set for PENT4.
        * config/i386/i386.md (*rotlhi3_1 splitter, *rotrhi3_1 splitter):
        Split after reload into bswaphi for shifts of 8.
        (bswaphi_lowpart): Generate rolw insn for HImode byte swaps.
        (*bswaphi_lowpart_1): Generate xchgb for Q registers for TARGET_XCHGB
        or when optimizing for size.

testsuite/ChangeLog:

        * gcc.target/i386/builtin-bswap-1.c: Remove -march=nocona.
        * gcc.target/i386/builtin-bswap-3.c: Ditto.
        * gcc.target/i386/xchg-1.c: New test.
        * gcc.target/i386/xchg-2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122049 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/builtin-bswap-1.c
gcc/testsuite/gcc.target/i386/builtin-bswap-3.c
gcc/testsuite/gcc.target/i386/xchg-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/xchg-2.c [new file with mode: 0644]