sparc support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@119 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2003-04-29 21:26:53 +00:00
parent a98fd896cd
commit d014c98c8d
6 changed files with 310 additions and 3 deletions

View file

@ -121,6 +121,20 @@ int testandset (int *p)
}
#endif
#ifdef __sparc__
static inline int testandset (int *p)
{
int ret;
__asm__ __volatile__("ldstub [%1], %0"
: "=r" (ret)
: "r" (p)
: "memory");
return (ret ? 1 : 0);
}
#endif
int global_cpu_lock = 0;
void cpu_lock(void)