This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/54087] __atomic_fetch_add does not use xadd instruction


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54087

--- Comment #9 from Andrew Macleod <amacleod at redhat dot com> 2012-10-01 15:50:26 UTC ---
Author: amacleod
Date: Mon Oct  1 15:50:09 2012
New Revision: 191929

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191929
Log:

2012-10-01  Andrew MacLeod  <amacleod@redhat.com>

    PR target/54087
    * optabs.c (expand_atomic_fetch_op_no_fallback): New.  Factored code
    from expand_atomic_fetch_op.
    (expand_atomic_fetch_op):  Try atomic_{add|sub} operations in terms of
    the other one if direct opcode fails.
    * testsuite/gcc.dg/pr54087.c:  New testcase for atomic_sub -> 
    atomic_add when atomic_sub fails.


Added:
    trunk/gcc/testsuite/gcc.dg/pr54087.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/optabs.c
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]