Changeset 345ce2f in mainline


Ignore:
Timestamp:
2005-09-03T11:43:54Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4f0bba0
Parents:
be56c17
Message:

Fixed asm problems in asm in atomic instructions.

Files:
1 deleted
2 edited

Legend:

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

    rbe56c17 r345ce2f  
    3434static inline void atomic_inc(volatile int *val) {
    3535#ifdef __SMP__
    36         __asm__ volatile ("lock incl (%0)\n" : : "r" (val));
     36        __asm__ volatile ("lock incl %0\n" : "=m" (*val));
    3737#else
    38         __asm__ volatile ("incl (%0)\n" : : "r" (val));
     38        __asm__ volatile ("incl %0\n" : "=m" (*val));
    3939#endif /* __SMP__ */
    4040}
     
    4242static inline void atomic_dec(volatile int *val) {
    4343#ifdef __SMP__
    44         __asm__ volatile ("lock decl (%0)\n" : : "r" (val));
     44        __asm__ volatile ("lock decl %0\n" : "=m" (*val));
    4545#else
    46         __asm__ volatile ("decl (%0)\n" : : "r" (val));
     46        __asm__ volatile ("decl %0\n" : "=m" (*val));
    4747#endif /* __SMP__ */
    4848}
     
    5353        __asm__ volatile (
    5454                "movl $1, %0\n"
    55                 "xchgl %0, (%1)\n"
    56                 : "=r" (v)
    57                 : "r" (val)
     55                "xchgl %0, %1\n"
     56                : "=r" (v),"=m" (*val)
    5857        );
    5958       
  • src/build.amd64

    rbe56c17 r345ce2f  
    1616done
    1717
    18 for a in ega.h i8042.h i8259.h i8254.h interrupt.h bios mm/memory_init.h boot/memmap.h boot/memmapasm.h; do
     18for a in atomic.h ega.h i8042.h i8259.h i8254.h interrupt.h bios mm/memory_init.h boot/memmap.h boot/memmapasm.h; do
    1919  if [ \! -e amd64/include/$a ]; then
    2020    echo ln -sf `pwd`/ia32/include/$a amd64/include/$a
Note: See TracChangeset for help on using the changeset viewer.