Changeset a4be38d in mainline


Ignore:
Timestamp:
2005-11-12T22:23:30Z (19 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
35667f8
Parents:
30187eb
Message:

Revert of =m in ia32 atomic operations. In according to gcc docs +m should be right but as Jakub said it is not working
with amd64 but =m is… and I'm not able to build tools for that platform to test it now :-( . (Maybe bug in gcc ???)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/include/atomic.h

    r30187eb ra4be38d  
    3636static inline void atomic_inc(atomic_t *val) {
    3737#ifdef CONFIG_SMP
    38         __asm__ volatile ("lock incl %0\n" : "+m" (*val));
     38        __asm__ volatile ("lock incl %0\n" : "=m" (*val));
    3939#else
    40         __asm__ volatile ("incl %0\n" : "+m" (*val));
     40        __asm__ volatile ("incl %0\n" : "=m" (*val));
    4141#endif /* CONFIG_SMP */
    4242}
     
    4444static inline void atomic_dec(atomic_t *val) {
    4545#ifdef CONFIG_SMP
    46         __asm__ volatile ("lock decl %0\n" : "+m" (*val));
     46        __asm__ volatile ("lock decl %0\n" : "=m" (*val));
    4747#else
    48         __asm__ volatile ("decl %0\n" : "+m" (*val));
     48        __asm__ volatile ("decl %0\n" : "=m" (*val));
    4949#endif /* CONFIG_SMP */
    5050}
     
    5656                "movl $1,%0;"
    5757                "lock xaddl %0,%1;"
    58                 : "=r"(r), "+m" (*val)
     58                : "=r"(r), "=m" (*val)
    5959        );
    6060        return r;
     
    6969                "movl $-1,%0;"
    7070                "lock xaddl %0,%1;"
    71                 : "=r"(r), "+m" (*val)
     71                : "=r"(r), "=m" (*val)
    7272        );
    7373        return r;
     
    8585                "movl $1, %0\n"
    8686                "xchgl %0, %1\n"
    87                 : "=r" (v),"+m" (*val)
     87                : "=r" (v),"=m" (*val)
    8888        );
    8989       
Note: See TracChangeset for help on using the changeset viewer.