summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-12-08 18:21:06 +0000
committerjhb <jhb@FreeBSD.org>2000-12-08 18:21:06 +0000
commitb9e04ff83c5be4de38c4890777436eb7a59ff026 (patch)
tree9c2a2250af13a9063e0c6afaadcd920edea7bcb3
parente0196ec99c11e2ccb27caac50a1e5c2b4dd4934a (diff)
downloadFreeBSD-src-b9e04ff83c5be4de38c4890777436eb7a59ff026.zip
FreeBSD-src-b9e04ff83c5be4de38c4890777436eb7a59ff026.tar.gz
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.
-rw-r--r--sys/amd64/include/mutex.h18
-rw-r--r--sys/i386/include/mutex.h18
2 files changed, 18 insertions, 18 deletions
diff --git a/sys/amd64/include/mutex.h b/sys/amd64/include/mutex.h
index 34fe04e..d419b40 100644
--- a/sys/amd64/include/mutex.h
+++ b/sys/amd64/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 */
diff --git a/sys/i386/include/mutex.h b/sys/i386/include/mutex.h
index 34fe04e..d419b40 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 */
OpenPOWER on IntegriCloud