------- Comment #2 from pinskia at gcc dot gnu dot org  2005-12-02 20:44 -------
Actually it should generate code like:
 lock; addl $-1,(%rdi)
 jne .L4
 jmp release
.L4:
 ret
---
The lock is fully needed for correct behavior.

Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-02 20:44:30
               date|                            |
            Summary|__sync_add_and_fetch cannot |__sync_add_and_fetch does
                   |use condition flags from    |not use condition flags from
                   |subl                        |subl


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

Reply via email to