From 27908725b9e2ccabc5089eb6f8975c6b277de14b Mon Sep 17 00:00:00 2001 From: bellard Date: Mon, 23 Oct 2006 21:31:01 +0000 Subject: [PATCH] sparc64 syscall fix (Blue Swirl) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2199 c046a42c-6fe2-441c-8c8c-71466251a162 --- linux-user/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 53bf1bb92e..38e94d27b5 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -559,10 +559,18 @@ void cpu_loop (CPUSPARCState *env) env->regwptr[2], env->regwptr[3], env->regwptr[4], env->regwptr[5]); if ((unsigned int)ret >= (unsigned int)(-515)) { +#ifdef TARGET_SPARC64 + env->xcc |= PSR_CARRY; +#else env->psr |= PSR_CARRY; +#endif ret = -ret; } else { +#ifdef TARGET_SPARC64 + env->xcc &= ~PSR_CARRY; +#else env->psr &= ~PSR_CARRY; +#endif } env->regwptr[0] = ret; /* next instruction */