Commit bb3911a609084dc1c0c72fc25884ef712066bec9

Authored by bellard
1 parent 4e3b1ea1

Sparc64 add/sub flag bugs fixed (Blue Swirl)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1579 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 4 additions and 4 deletions
target-sparc/op.c
... ... @@ -379,7 +379,7 @@ void OPPROTO op_add_T1_T0_cc(void)
379 379 env->psr |= PSR_ZERO;
380 380 if ((int32_t) T0 < 0)
381 381 env->psr |= PSR_NEG;
382   - if ((src1 & 0xffffffff) < (T1 & 0xffffffff))
  382 + if ((T0 & 0xffffffff) < (src1 & 0xffffffff))
383 383 env->psr |= PSR_CARRY;
384 384 if ((((src1 & 0xffffffff) ^ (T1 & 0xffffffff) ^ -1) &
385 385 ((src1 & 0xffffffff) ^ (T0 & 0xffffffff))) & (1 << 31))
... ... @@ -424,7 +424,7 @@ void OPPROTO op_addx_T1_T0_cc(void)
424 424 env->psr |= PSR_ZERO;
425 425 if ((int32_t) T0 < 0)
426 426 env->psr |= PSR_NEG;
427   - if ((src1 & 0xffffffff) < (T1 & 0xffffffff))
  427 + if ((T0 & 0xffffffff) < (src1 & 0xffffffff))
428 428 env->psr |= PSR_CARRY;
429 429 if ((((src1 & 0xffffffff) ^ (T1 & 0xffffffff) ^ -1) &
430 430 ((src1 & 0xffffffff) ^ (T0 & 0xffffffff))) & (1 << 31))
... ... @@ -480,7 +480,7 @@ void OPPROTO op_sub_T1_T0_cc(void)
480 480 env->xcc |= PSR_ZERO;
481 481 if ((int64_t) T0 < 0)
482 482 env->xcc |= PSR_NEG;
483   - if (T0 < src1)
  483 + if (src1 < T1)
484 484 env->xcc |= PSR_CARRY;
485 485 if (((src1 ^ T1) & (src1 ^ T0)) & (1ULL << 63))
486 486 env->xcc |= PSR_OVF;
... ... @@ -525,7 +525,7 @@ void OPPROTO op_subx_T1_T0_cc(void)
525 525 env->xcc |= PSR_ZERO;
526 526 if ((int64_t) T0 < 0)
527 527 env->xcc |= PSR_NEG;
528   - if (T0 < src1)
  528 + if (src1 < T1)
529 529 env->xcc |= PSR_CARRY;
530 530 if (((src1 ^ T1) & (src1 ^ T0)) & (1ULL << 63))
531 531 env->xcc |= PSR_OVF;
... ...