alpha support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@111 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
43f04c233c
commit
e026db5893
19
exec-i386.c
19
exec-i386.c
@ -102,6 +102,25 @@ static inline int testandset (int *p)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __alpha__
|
||||||
|
int testandset (int *p)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
unsigned long one;
|
||||||
|
|
||||||
|
__asm__ __volatile__ ("0: mov 1,%2\n"
|
||||||
|
" ldl_l %0,%1\n"
|
||||||
|
" stl_c %2,%1\n"
|
||||||
|
" beq %2,1f\n"
|
||||||
|
".subsection 2\n"
|
||||||
|
"1: br 0b\n"
|
||||||
|
".previous"
|
||||||
|
: "=r" (ret), "=m" (*p), "=r" (one)
|
||||||
|
: "m" (*p));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int global_cpu_lock = 0;
|
int global_cpu_lock = 0;
|
||||||
|
|
||||||
void cpu_lock(void)
|
void cpu_lock(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user