This is the mail archive of the gcc-patches@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]

[PATCH, i386]: Implement atomic_fetch_sub


Hello!

We can implement atomic_fetch_sub with atomic_fetch_add and inverted
operand 2. However, we have to prevent overflows with negation, so
only const_int operand 2 is allowed in the expander.

2012-08-02  Uros Bizjak  <ubizjak@gmail.com>

        PR target/54087
        * config/i386/sync.md (atomic_fetch_sub<mode>): New expander.

Tested on x86_64-pc-linux-gnu {,-m32}.

I will wait for a day for possible comments.

Uros.

Attachment: p.diff.txt
Description: Text document


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