* 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