]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] i386: Remove lock section support in mutex.h
authorAndi Kleen <ak@suse.de>
Tue, 26 Sep 2006 08:52:31 +0000 (10:52 +0200)
committerAndi Kleen <andi@basil.nowhere.org>
Tue, 26 Sep 2006 08:52:31 +0000 (10:52 +0200)
Lock sections don't work the new dwarf2 unwinder
This generates slightly smaller code. It adds one more taken
jump to the fast path.

Cc: jbeulich@novell.com
Signed-off-by: Andi Kleen <ak@suse.de>
include/asm-i386/mutex.h

index 05a5385312294582a082592838f600c4b9ab7a32..7a17d9e58ad6586140e84a91a0a850b1b527e77a 100644 (file)
@@ -30,14 +30,10 @@ do {                                                                        \
                                                                        \
        __asm__ __volatile__(                                           \
                LOCK_PREFIX "   decl (%%eax)    \n"                     \
-                       "   js 2f               \n"                     \
+                       "   jns 1f              \n"                     \
+                       "   call "#fail_fn"     \n"                     \
                        "1:                     \n"                     \
                                                                        \
-               LOCK_SECTION_START("")                                  \
-                       "2: call "#fail_fn"     \n"                     \
-                       "   jmp 1b              \n"                     \
-               LOCK_SECTION_END                                        \
-                                                                       \
                :"=a" (dummy)                                           \
                : "a" (count)                                           \
                : "memory", "ecx", "edx");                              \
@@ -86,14 +82,10 @@ do {                                                                        \
                                                                        \
        __asm__ __volatile__(                                           \
                LOCK_PREFIX "   incl (%%eax)    \n"                     \
-                       "   jle 2f              \n"                     \
+                       "   jg  1f              \n"                     \
+                       "   call "#fail_fn"     \n"                     \
                        "1:                     \n"                     \
                                                                        \
-               LOCK_SECTION_START("")                                  \
-                       "2: call "#fail_fn"     \n"                     \
-                       "   jmp 1b              \n"                     \
-               LOCK_SECTION_END                                        \
-                                                                       \
                :"=a" (dummy)                                           \
                : "a" (count)                                           \
                : "memory", "ecx", "edx");                              \