OSDN Git Service

Backport from mainline
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Aug 2012 17:22:13 +0000 (17:22 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Aug 2012 17:22:13 +0000 (17:22 +0000)
commitabf148fdc71bf7448267c7abe7c39ac0036af074
tree659c69e7fd66e33cf65a0c3fa26c83b384244bb0
parentaa9cbc9d1670723bc665a379c943dd58b4a8cf1e
Backport from mainline
2012-08-27  Uros Bizjak  <ubizjak@gmail.com>

PR target/46254
* config/i386/predicates.md (cmpxchg8b_pic_memory_operand): Return
true for TARGET_64BIT or !flag_pic.
* config/i386/sync.md (*atomic_compare_and_swap_doubledi_pic): Remove.
(atomic_compare_and_swap_double<mode>): Change operand 2 predicate
to cmpxchg8b_pic_memory_operand.  Use DWIH mode iterator.
Add insn constraint.  Conditionally emit xchg asm insns.
(atomic_compare_and_swap<mode>): Update calls.  Check only
cmpxchg8b_pic_memory_operand in memory address fixup.
(DCASMODE): Remove.
(CASHMODE): Rename from DCASHMODE.
(doublemodesuffix): Update modes.
(regprefix): New mode attribute.

(unspecv) <UNSPECV_CMPXCHG_{1,2,3,4}>: Remove.
<UNSPECV_CMPXCHG>: New constant.
(atomic_compare_and_swap<mode>_1): Rename from
atomic_compare_and_swap_single<mode>.  Update calls and
unspec_volatile constants.
(atomic_compare_and_swap<mode>_doubleword): Rename from
atomic_compare_and_swap_double<mode>.  Update calls and
unspec_volatile constants.

testsuite/ChangeLog:

Backport from mainline
2012-08-27  Uros Bizjak  <ubizjak@gmail.com>

PR target/46254
* gcc.target/i386/pr46254.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@190754 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/i386/predicates.md
gcc/config/i386/sync.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr46254.c [new file with mode: 0644]