Revision 417454b0 target-sparc/op.c

b/target-sparc/op.c
1534 1534
    helper_flush(T0);
1535 1535
}
1536 1536

  
1537
void OPPROTO op_clear_ieee_excp_and_FTT(void)
1538
{
1539
    env->fsr &= ~(FSR_FTT_MASK | FSR_CEXC_MASK);;
1540
}
1541

  
1537 1542
#define F_OP(name, p) void OPPROTO op_f##name##p(void)
1538 1543

  
1539 1544
#define F_BINOP(name)                                           \
1540 1545
    F_OP(name, s)                                               \
1541 1546
    {                                                           \
1547
	set_float_exception_flags(0, &env->fp_status);		\
1542 1548
        FT0 = float32_ ## name (FT0, FT1, &env->fp_status);     \
1549
	check_ieee_exceptions();				\
1543 1550
    }                                                           \
1544 1551
    F_OP(name, d)                                               \
1545 1552
    {                                                           \
1553
	set_float_exception_flags(0, &env->fp_status);		\
1546 1554
        DT0 = float64_ ## name (DT0, DT1, &env->fp_status);     \
1555
	check_ieee_exceptions();				\
1547 1556
    }
1548 1557

  
1549 1558
F_BINOP(add);
......
1554 1563

  
1555 1564
void OPPROTO op_fsmuld(void)
1556 1565
{
1566
    set_float_exception_flags(0, &env->fp_status);
1557 1567
    DT0 = float64_mul(float32_to_float64(FT0, &env->fp_status),
1558 1568
                      float32_to_float64(FT1, &env->fp_status),
1559 1569
                      &env->fp_status);
1570
    check_ieee_exceptions();
1560 1571
}
1561 1572

  
1562 1573
#define F_HELPER(name)    \
......
1582 1593
}
1583 1594

  
1584 1595
F_HELPER(cmp);
1596
F_HELPER(cmpe);
1585 1597

  
1586 1598
#ifdef TARGET_SPARC64
1587 1599
F_OP(neg, d)
......
1623 1635
{
1624 1636
    do_fcmpd_fcc3();
1625 1637
}
1638

  
1639
void OPPROTO op_fcmpes_fcc1(void)
1640
{
1641
    do_fcmpes_fcc1();
1642
}
1643

  
1644
void OPPROTO op_fcmped_fcc1(void)
1645
{
1646
    do_fcmped_fcc1();
1647
}
1648

  
1649
void OPPROTO op_fcmpes_fcc2(void)
1650
{
1651
    do_fcmpes_fcc2();
1652
}
1653

  
1654
void OPPROTO op_fcmped_fcc2(void)
1655
{
1656
    do_fcmped_fcc2();
1657
}
1658

  
1659
void OPPROTO op_fcmpes_fcc3(void)
1660
{
1661
    do_fcmpes_fcc3();
1662
}
1663

  
1664
void OPPROTO op_fcmped_fcc3(void)
1665
{
1666
    do_fcmped_fcc3();
1667
}
1668

  
1626 1669
#endif
1627 1670

  
1628 1671
/* Integer to float conversion.  */
......
1631 1674
#else
1632 1675
F_OP(ito, s)
1633 1676
{
1677
    set_float_exception_flags(0, &env->fp_status);
1634 1678
    FT0 = int32_to_float32(*((int32_t *)&FT1), &env->fp_status);
1679
    check_ieee_exceptions();
1635 1680
}
1636 1681

  
1637 1682
F_OP(ito, d)
1638 1683
{
1684
    set_float_exception_flags(0, &env->fp_status);
1639 1685
    DT0 = int32_to_float64(*((int32_t *)&FT1), &env->fp_status);
1686
    check_ieee_exceptions();
1640 1687
}
1641 1688

  
1642 1689
#ifdef TARGET_SPARC64
1643 1690
F_OP(xto, s)
1644 1691
{
1692
    set_float_exception_flags(0, &env->fp_status);
1645 1693
    FT0 = int64_to_float32(*((int64_t *)&DT1), &env->fp_status);
1694
    check_ieee_exceptions();
1646 1695
}
1647 1696

  
1648 1697
F_OP(xto, d)
1649 1698
{
1699
    set_float_exception_flags(0, &env->fp_status);
1650 1700
    DT0 = int64_to_float64(*((int64_t *)&DT1), &env->fp_status);
1701
    check_ieee_exceptions();
1651 1702
}
1652 1703
#endif
1653 1704
#endif
......
1656 1707
/* floating point conversion */
1657 1708
void OPPROTO op_fdtos(void)
1658 1709
{
1710
    set_float_exception_flags(0, &env->fp_status);
1659 1711
    FT0 = float64_to_float32(DT1, &env->fp_status);
1712
    check_ieee_exceptions();
1660 1713
}
1661 1714

  
1662 1715
void OPPROTO op_fstod(void)
1663 1716
{
1717
    set_float_exception_flags(0, &env->fp_status);
1664 1718
    DT0 = float32_to_float64(FT1, &env->fp_status);
1719
    check_ieee_exceptions();
1665 1720
}
1666 1721

  
1667 1722
/* Float to integer conversion.  */
1668 1723
void OPPROTO op_fstoi(void)
1669 1724
{
1725
    set_float_exception_flags(0, &env->fp_status);
1670 1726
    *((int32_t *)&FT0) = float32_to_int32_round_to_zero(FT1, &env->fp_status);
1727
    check_ieee_exceptions();
1671 1728
}
1672 1729

  
1673 1730
void OPPROTO op_fdtoi(void)
1674 1731
{
1732
    set_float_exception_flags(0, &env->fp_status);
1675 1733
    *((int32_t *)&FT0) = float64_to_int32_round_to_zero(DT1, &env->fp_status);
1734
    check_ieee_exceptions();
1676 1735
}
1677 1736

  
1678 1737
#ifdef TARGET_SPARC64
1679 1738
void OPPROTO op_fstox(void)
1680 1739
{
1740
    set_float_exception_flags(0, &env->fp_status);
1681 1741
    *((int64_t *)&DT0) = float32_to_int64_round_to_zero(FT1, &env->fp_status);
1742
    check_ieee_exceptions();
1682 1743
}
1683 1744

  
1684 1745
void OPPROTO op_fdtox(void)
1685 1746
{
1747
    set_float_exception_flags(0, &env->fp_status);
1686 1748
    *((int64_t *)&DT0) = float64_to_int64_round_to_zero(DT1, &env->fp_status);
1749
    check_ieee_exceptions();
1687 1750
}
1688 1751

  
1689 1752
void OPPROTO op_fmovs_cc(void)

Also available in: Unified diff