diff options
author | John Baldwin <jhb@FreeBSD.org> | 2000-12-08 18:21:06 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2000-12-08 18:21:06 +0000 |
commit | 31ae9b450a70da93f935e8e4b722b72f219fb02c (patch) | |
tree | 505127ad906face0730023a3e4c19cb31dff1894 /sys/i386/include/mutex.h | |
parent | 2a0436783d910b6c4a2eadac789ab5ba9a9e801d (diff) | |
download | src-31ae9b450a70da93f935e8e4b722b72f219fb02c.tar.gz src-31ae9b450a70da93f935e8e4b722b72f219fb02c.zip |
Argh, revert the clobber changes. Since %ecx and %edx aren't call safe,
calling the C functions mtx_enter_hard() and mtx_exit_hard() clobbers them.
Note that %eax is also not call safe, but it is already clobbered due to
cmpxchg. However, now we are back to not compiling again, so these macros
are still left disabled for now.
Notes
Notes:
svn path=/head/; revision=69770
Diffstat (limited to 'sys/i386/include/mutex.h')
-rw-r--r-- | sys/i386/include/mutex.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/i386/include/mutex.h b/sys/i386/include/mutex.h index 34fe04e59e72..d419b400035a 100644 --- a/sys/i386/include/mutex.h +++ b/sys/i386/include/mutex.h @@ -105,7 +105,7 @@ extern char STR_SIEN[]; : "r" (tid), /* 3 (input) */ \ "gi" (type), /* 4 */ \ "g" (mtxp) /* 5 */ \ - : "memory" /* used */ ); \ + : "memory", "ecx", "edx" /* used */ ); \ }) /* Get a spin lock, handle recursion inline (as the less common case) */ @@ -133,7 +133,7 @@ extern char STR_SIEN[]; : "r" (tid), /* 3 (input) */ \ "gi" (type), /* 4 */ \ "g" (mtxp) /* 5 */ \ - : "memory" /* used */ ); \ + : "memory", "ecx", "edx" /* used */ ); \ }) /* @@ -159,7 +159,7 @@ extern char STR_SIEN[]; : "r" (tid), /* 2 (input) */ \ "gi" (type), /* 3 */ \ "g" (mtxp) /* 4 */ \ - : "memory" /* used */ ); \ + : "memory", "ecx", "edx" /* used */ ); \ }) /* @@ -184,7 +184,7 @@ extern char STR_SIEN[]; : "gi" (type), /* 2 (input) */ \ "g" (mtxp), /* 3 */ \ "r" (MTX_UNOWNED) /* 4 */ \ - : "memory" /* used */ ); \ + : "memory", "ecx", "edx" /* used */ ); \ }) /* @@ -218,7 +218,7 @@ extern char STR_SIEN[]; : "gi" (type), /* 3 (input) */ \ "g" (mtxp), /* 4 */ \ "r" (MTX_UNOWNED) /* 5 */ \ - : "memory" /* used */ ); \ + : "memory", "ecx", "edx" /* used */ ); \ }) /* @@ -237,18 +237,18 @@ extern char STR_SIEN[]; " movl %2,%1;" \ " jmp 2f;" \ "1: movl %0,%2;" \ +" movl $ " _V(MTX_UNOWNED) ",%%ecx;" \ " pushl %3;" \ " " MPLOCKED "" \ -" cmpxchgl %4,%0;" \ +" cmpxchgl %%ecx,%0;" \ " popfl;" \ "2:" \ "# exitlock_spin" \ : "+m" (mtxp->mtx_lock), /* 0 */ \ "+m" (mtxp->mtx_recurse), /* 1 */ \ "=&a" (_res) /* 2 */ \ - : "g" (mtxp->mtx_saveintr), /* 3 */ \ - "r" (MTX_UNOWNED) /* 4 */ \ - : "memory" /* used */ ); \ + : "g" (mtxp->mtx_saveintr) /* 3 */ \ + : "memory", "ecx" /* used */ ); \ }) #endif /* I386_CPU */ |