Commit 27908725b9e2ccabc5089eb6f8975c6b277de14b
1 parent
dd016883
sparc64 syscall fix (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2199 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
8 additions
and
0 deletions
linux-user/main.c
... | ... | @@ -559,10 +559,18 @@ void cpu_loop (CPUSPARCState *env) |
559 | 559 | env->regwptr[2], env->regwptr[3], |
560 | 560 | env->regwptr[4], env->regwptr[5]); |
561 | 561 | if ((unsigned int)ret >= (unsigned int)(-515)) { |
562 | +#ifdef TARGET_SPARC64 | |
563 | + env->xcc |= PSR_CARRY; | |
564 | +#else | |
562 | 565 | env->psr |= PSR_CARRY; |
566 | +#endif | |
563 | 567 | ret = -ret; |
564 | 568 | } else { |
569 | +#ifdef TARGET_SPARC64 | |
570 | + env->xcc &= ~PSR_CARRY; | |
571 | +#else | |
565 | 572 | env->psr &= ~PSR_CARRY; |
573 | +#endif | |
566 | 574 | } |
567 | 575 | env->regwptr[0] = ret; |
568 | 576 | /* next instruction */ | ... | ... |