s390 support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@65 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2003-03-29 17:32:36 +00:00
parent 7854b05654
commit fb3e5849bb
5 changed files with 94 additions and 1 deletions

View file

@ -87,6 +87,20 @@ static inline int testandset (int *p)
}
#endif
#ifdef __s390__
static inline int testandset (int *p)
{
int ret;
__asm__ __volatile__ ("0: cs %0,%1,0(%2)\n"
" jl 0b"
: "=&d" (ret)
: "r" (1), "a" (p), "0" (*p)
: "cc", "memory" );
return ret;
}
#endif
int global_cpu_lock = 0;
void cpu_lock(void)