diff options
author | ed <ed@FreeBSD.org> | 2009-06-13 13:56:06 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-13 13:56:06 +0000 |
commit | c8fca13eccd61e436c99dda952916977b9715b32 (patch) | |
tree | dfac6183fcb8a9992d37084f00162e97cd217d11 /sys/i386 | |
parent | 306af13a0320e277c98758dd0874184365cb4152 (diff) | |
download | FreeBSD-src-c8fca13eccd61e436c99dda952916977b9715b32.zip FreeBSD-src-c8fca13eccd61e436c99dda952916977b9715b32.tar.gz |
Simplify the inline assembler (and correct potential error) of pte_load_store().
Submitted by: Christoph Mallon
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/include/pmap.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index 519ff6c..fed8e5a 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -362,15 +362,8 @@ pte_load(pt_entry_t *ptep) static __inline pt_entry_t pte_load_store(pt_entry_t *ptep, pt_entry_t pte) { - pt_entry_t r; - - __asm __volatile( - "xchgl %0,%1" - : "=m" (*ptep), - "=r" (r) - : "1" (pte), - "m" (*ptep)); - return (r); + __asm volatile("xchgl %0, %1" : "+m" (*ptep), "+r" (pte)); + return (pte); } #define pte_load_clear(pte) atomic_readandclear_int(pte) |