Fix broken register restraints that needlessly clobbered registers %ecx

and %edx resulting in gcc not having enough registers left to work with.
This commit is contained in:
John Baldwin 2000-12-07 02:23:16 +00:00
parent 3a50ed55e2
commit a423d0122b
2 changed files with 26 additions and 26 deletions

View File

@ -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 */

View File

@ -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 */