Drop the __GNUCLIKE_ASM guards around most atomic inlines.
There are no alternatives defined, so there's no point in keeping them. Also, they weren't around every inline asm block anyway. Without __GNUCLIKE_ASM defined, the guarded functions return garbage. Reported by: Andrew Thompson
This commit is contained in:
parent
605e7281dc
commit
37af2ad077
@ -446,7 +446,6 @@ atomic_readandclear_int(volatile u_int *addr)
|
||||
{
|
||||
u_int result,temp;
|
||||
|
||||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile (
|
||||
"\tsync\n" /* drain writes */
|
||||
"1:\tlwarx %0, 0, %3\n\t" /* load old value */
|
||||
@ -456,7 +455,6 @@ atomic_readandclear_int(volatile u_int *addr)
|
||||
: "=&r"(result), "=&r"(temp), "=m" (*addr)
|
||||
: "r" (addr), "m" (*addr)
|
||||
: "cr0", "memory");
|
||||
#endif
|
||||
|
||||
return (result);
|
||||
}
|
||||
@ -467,7 +465,6 @@ atomic_readandclear_long(volatile u_long *addr)
|
||||
{
|
||||
u_long result,temp;
|
||||
|
||||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile (
|
||||
"\tsync\n" /* drain writes */
|
||||
"1:\tldarx %0, 0, %3\n\t" /* load old value */
|
||||
@ -477,7 +474,6 @@ atomic_readandclear_long(volatile u_long *addr)
|
||||
: "=&r"(result), "=&r"(temp), "=m" (*addr)
|
||||
: "r" (addr), "m" (*addr)
|
||||
: "cr0", "memory");
|
||||
#endif
|
||||
|
||||
return (result);
|
||||
}
|
||||
@ -565,7 +561,6 @@ atomic_cmpset_int(volatile u_int* p, u_int cmpval, u_int newval)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile (
|
||||
"1:\tlwarx %0, 0, %2\n\t" /* load old value */
|
||||
"cmplw %3, %0\n\t" /* compare */
|
||||
@ -581,7 +576,6 @@ atomic_cmpset_int(volatile u_int* p, u_int cmpval, u_int newval)
|
||||
: "=&r" (ret), "=m" (*p)
|
||||
: "r" (p), "r" (cmpval), "r" (newval), "m" (*p)
|
||||
: "cr0", "memory");
|
||||
#endif
|
||||
|
||||
return (ret);
|
||||
}
|
||||
@ -590,7 +584,6 @@ atomic_cmpset_long(volatile u_long* p, u_long cmpval, u_long newval)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile (
|
||||
#ifdef __powerpc64__
|
||||
"1:\tldarx %0, 0, %2\n\t" /* load old value */
|
||||
@ -617,7 +610,6 @@ atomic_cmpset_long(volatile u_long* p, u_long cmpval, u_long newval)
|
||||
: "=&r" (ret), "=m" (*p)
|
||||
: "r" (p), "r" (cmpval), "r" (newval), "m" (*p)
|
||||
: "cr0", "memory");
|
||||
#endif
|
||||
|
||||
return (ret);
|
||||
}
|
||||
@ -685,7 +677,6 @@ atomic_fcmpset_int(volatile u_int *p, u_int *cmpval, u_int newval)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile (
|
||||
"1:\tlwarx %0, 0, %3\n\t" /* load old value */
|
||||
"cmplw %4, %0\n\t" /* compare */
|
||||
@ -702,7 +693,6 @@ atomic_fcmpset_int(volatile u_int *p, u_int *cmpval, u_int newval)
|
||||
: "=&r" (ret), "=m" (*p), "=m" (*cmpval)
|
||||
: "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval)
|
||||
: "cr0", "memory");
|
||||
#endif
|
||||
|
||||
return (ret);
|
||||
}
|
||||
@ -711,7 +701,6 @@ atomic_fcmpset_long(volatile u_long *p, u_long *cmpval, u_long newval)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile (
|
||||
#ifdef __powerpc64__
|
||||
"1:\tldarx %0, 0, %3\n\t" /* load old value */
|
||||
@ -740,7 +729,6 @@ atomic_fcmpset_long(volatile u_long *p, u_long *cmpval, u_long newval)
|
||||
: "=&r" (ret), "=m" (*p), "=m" (*cmpval)
|
||||
: "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval)
|
||||
: "cr0", "memory");
|
||||
#endif
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user