Revision 9278480e target-mips/op.c

b/target-mips/op.c
543 543
        T0 = 32;
544 544
    } else {
545 545
        for (n = 0; n < 32; n++) {
546
            if (!(T0 & (1 << 31)))
546
            if (!(((int32_t)T0) & (1 << 31)))
547 547
                break;
548
            T0 = T0 << 1;
548
            T0 <<= 1;
549 549
        }
550 550
        T0 = n;
551 551
    }
......
562 562
        for (n = 0; n < 32; n++) {
563 563
            if (T0 & (1 << 31))
564 564
                break;
565
            T0 = T0 << 1;
565
            T0 <<= 1;
566 566
        }
567 567
        T0 = n;
568 568
    }
......
747 747
        for (n = 0; n < 64; n++) {
748 748
            if (!(T0 & (1ULL << 63)))
749 749
                break;
750
            T0 = T0 << 1;
750
            T0 <<= 1;
751 751
        }
752 752
        T0 = n;
753 753
    }
......
764 764
        for (n = 0; n < 64; n++) {
765 765
            if (T0 & (1ULL << 63))
766 766
                break;
767
            T0 = T0 << 1;
767
            T0 <<= 1;
768 768
        }
769 769
        T0 = n;
770 770
    }

Also available in: Unified diff