diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2000-12-07 02:23:16 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2000-12-07 02:23:16 +0000 |
| commit | a423d0122b96e0ff2f6c110b0bdfdfecb6ba9ba3 (patch) | |
| tree | e0e5b42f9981f907c8c025bf59c747d184e98276 | |
| parent | 3a50ed55e261873d3dbedaea8a9c711e0302738e (diff) | |
Notes
| -rw-r--r-- | sys/amd64/include/mutex.h | 26 | ||||
| -rw-r--r-- | sys/i386/include/mutex.h | 26 |
2 files changed, 26 insertions, 26 deletions
diff --git a/sys/amd64/include/mutex.h b/sys/amd64/include/mutex.h index 4b9fe2c87560..ff08935fef29 100644 --- a/sys/amd64/include/mutex.h +++ b/sys/amd64/include/mutex.h @@ -104,7 +104,7 @@ extern char STR_SIEN[]; : "r" (tid), /* 3 (input) */ \ "gi" (type), /* 4 */ \ "g" (mtxp) /* 5 */ \ - : "memory", "ecx", "edx" /* used */ ); \ + : "memory" /* used */ ); \ }) /* Get a spin lock, handle recursion inline (as the less common case) */ @@ -132,7 +132,7 @@ extern char STR_SIEN[]; : "r" (tid), /* 3 (input) */ \ "gi" (type), /* 4 */ \ "g" (mtxp) /* 5 */ \ - : "memory", "ecx", "edx" /* used */ ); \ + : "memory" /* used */ ); \ }) /* @@ -158,7 +158,7 @@ extern char STR_SIEN[]; : "r" (tid), /* 2 (input) */ \ "gi" (type), /* 3 */ \ "g" (mtxp) /* 4 */ \ - : "memory", "ecx", "edx" /* used */ ); \ + : "memory" /* used */ ); \ }) /* @@ -183,7 +183,7 @@ extern char STR_SIEN[]; : "gi" (type), /* 2 (input) */ \ "g" (mtxp), /* 3 */ \ "r" (MTX_UNOWNED) /* 4 */ \ - : "memory", "ecx", "edx" /* used */ ); \ + : "memory" /* used */ ); \ }) /* @@ -217,7 +217,7 @@ extern char STR_SIEN[]; : "gi" (type), /* 3 (input) */ \ "g" (mtxp), /* 4 */ \ "r" (MTX_UNOWNED) /* 5 */ \ - : "memory", "ecx", "edx" /* used */ ); \ + : "memory" /* used */ ); \ }) /* @@ -230,24 +230,24 @@ extern char STR_SIEN[]; int _res; \ \ __asm __volatile ( \ -" movl %1,%%eax;" \ -" decl %%eax;" \ +" movl %1,%2;" \ +" decl %2;" \ " js 1f;" \ -" movl %%eax,%1;" \ +" movl %2,%1;" \ " jmp 2f;" \ -"1: movl %0,%%eax;" \ -" movl $ " _V(MTX_UNOWNED) ",%%ecx;" \ +"1: movl %0,%2;" \ " pushl %3;" \ " " MPLOCKED "" \ -" cmpxchgl %%ecx,%0;" \ +" cmpxchgl %4,%0;" \ " popfl;" \ "2:" \ "# exitlock_spin" \ : "+m" (mtxp->mtx_lock), /* 0 */ \ "+m" (mtxp->mtx_recurse), /* 1 */ \ "=&a" (_res) /* 2 */ \ - : "g" (mtxp->mtx_saveintr) /* 3 */ \ - : "memory", "ecx" /* used */ ); \ + : "g" (mtxp->mtx_saveintr), /* 3 */ \ + "r" (MTX_UNOWNED) /* 4 */ \ + : "memory" /* used */ ); \ }) #endif /* I386_CPU */ diff --git a/sys/i386/include/mutex.h b/sys/i386/include/mutex.h index 4b9fe2c87560..ff08935fef29 100644 --- a/sys/i386/include/mutex.h +++ b/sys/i386/include/mutex.h @@ -104,7 +104,7 @@ extern char STR_SIEN[]; : "r" (tid), /* 3 (input) */ \ "gi" (type), /* 4 */ \ "g" (mtxp) /* 5 */ \ - : "memory", "ecx", "edx" /* used */ ); \ + : "memory" /* used */ ); \ }) /* Get a spin lock, handle recursion inline (as the less common case) */ @@ -132,7 +132,7 @@ extern char STR_SIEN[]; : "r" (tid), /* 3 (input) */ \ "gi" (type), /* 4 */ \ "g" (mtxp) /* 5 */ \ - : "memory", "ecx", "edx" /* used */ ); \ + : "memory" /* used */ ); \ }) /* @@ -158,7 +158,7 @@ extern char STR_SIEN[]; : "r" (tid), /* 2 (input) */ \ "gi" (type), /* 3 */ \ "g" (mtxp) /* 4 */ \ - : "memory", "ecx", "edx" /* used */ ); \ + : "memory" /* used */ ); \ }) /* @@ -183,7 +183,7 @@ extern char STR_SIEN[]; : "gi" (type), /* 2 (input) */ \ "g" (mtxp), /* 3 */ \ "r" (MTX_UNOWNED) /* 4 */ \ - : "memory", "ecx", "edx" /* used */ ); \ + : "memory" /* used */ ); \ }) /* @@ -217,7 +217,7 @@ extern char STR_SIEN[]; : "gi" (type), /* 3 (input) */ \ "g" (mtxp), /* 4 */ \ "r" (MTX_UNOWNED) /* 5 */ \ - : "memory", "ecx", "edx" /* used */ ); \ + : "memory" /* used */ ); \ }) /* @@ -230,24 +230,24 @@ extern char STR_SIEN[]; int _res; \ \ __asm __volatile ( \ -" movl %1,%%eax;" \ -" decl %%eax;" \ +" movl %1,%2;" \ +" decl %2;" \ " js 1f;" \ -" movl %%eax,%1;" \ +" movl %2,%1;" \ " jmp 2f;" \ -"1: movl %0,%%eax;" \ -" movl $ " _V(MTX_UNOWNED) ",%%ecx;" \ +"1: movl %0,%2;" \ " pushl %3;" \ " " MPLOCKED "" \ -" cmpxchgl %%ecx,%0;" \ +" cmpxchgl %4,%0;" \ " popfl;" \ "2:" \ "# exitlock_spin" \ : "+m" (mtxp->mtx_lock), /* 0 */ \ "+m" (mtxp->mtx_recurse), /* 1 */ \ "=&a" (_res) /* 2 */ \ - : "g" (mtxp->mtx_saveintr) /* 3 */ \ - : "memory", "ecx" /* used */ ); \ + : "g" (mtxp->mtx_saveintr), /* 3 */ \ + "r" (MTX_UNOWNED) /* 4 */ \ + : "memory" /* used */ ); \ }) #endif /* I386_CPU */ |
