Revision 5e4ef64c

b/target-mips/op_helper.c
782 782
FLOAT_OP(roundl, d)
783 783
{
784 784
    set_float_rounding_mode(float_round_nearest_even, &env->fp_status);
785
    DT2 = float64_round_to_int(FDT0, &env->fp_status);
786
    DT2 = float64_to_int64(DT2, &env->fp_status);
785
    DT2 = float64_to_int64(FDT0, &env->fp_status);
787 786
    RESTORE_ROUNDING_MODE;
788 787
    update_fcr31();
789 788
    if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
......
792 791
FLOAT_OP(roundl, s)
793 792
{
794 793
    set_float_rounding_mode(float_round_nearest_even, &env->fp_status);
795
    WT2 = float32_round_to_int(FST0, &env->fp_status);
796
    DT2 = float32_to_int64(WT2, &env->fp_status);
794
    DT2 = float32_to_int64(FST0, &env->fp_status);
797 795
    RESTORE_ROUNDING_MODE;
798 796
    update_fcr31();
799 797
    if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
......
802 800
FLOAT_OP(roundw, d)
803 801
{
804 802
    set_float_rounding_mode(float_round_nearest_even, &env->fp_status);
805
    DT2 = float64_round_to_int(FDT0, &env->fp_status);
806
// ???
807
    env->fp_status.float_exception_flags &= ~float_flag_inexact;
808
    WT2 = float64_to_int32(DT2, &env->fp_status);
803
    WT2 = float64_to_int32(FDT0, &env->fp_status);
809 804
    RESTORE_ROUNDING_MODE;
810 805
    update_fcr31();
811 806
    if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
......
814 809
FLOAT_OP(roundw, s)
815 810
{
816 811
    set_float_rounding_mode(float_round_nearest_even, &env->fp_status);
817
    WT2 = float32_round_to_int(FST0, &env->fp_status);
818
    WT2 = float32_to_int32(WT2, &env->fp_status);
812
    WT2 = float32_to_int32(FST0, &env->fp_status);
819 813
    RESTORE_ROUNDING_MODE;
820 814
    update_fcr31();
821 815
    if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
......
854 848
FLOAT_OP(ceill, d)
855 849
{
856 850
    set_float_rounding_mode(float_round_up, &env->fp_status);
857
    DT2 = float64_round_to_int(FDT0, &env->fp_status);
858
    DT2 = float64_to_int64(DT2, &env->fp_status);
851
    DT2 = float64_to_int64(FDT0, &env->fp_status);
859 852
    RESTORE_ROUNDING_MODE;
860 853
    update_fcr31();
861 854
    if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
......
864 857
FLOAT_OP(ceill, s)
865 858
{
866 859
    set_float_rounding_mode(float_round_up, &env->fp_status);
867
    WT2 = float32_round_to_int(FST0, &env->fp_status);
868
    DT2 = float32_to_int64(WT2, &env->fp_status);
860
    DT2 = float32_to_int64(FST0, &env->fp_status);
869 861
    RESTORE_ROUNDING_MODE;
870 862
    update_fcr31();
871 863
    if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
......
874 866
FLOAT_OP(ceilw, d)
875 867
{
876 868
    set_float_rounding_mode(float_round_up, &env->fp_status);
877
    DT2 = float64_round_to_int(FDT0, &env->fp_status);
878
// ???
879
    env->fp_status.float_exception_flags &= ~float_flag_inexact;
880
    WT2 = float64_to_int32(DT2, &env->fp_status);
869
    WT2 = float64_to_int32(FDT0, &env->fp_status);
881 870
    RESTORE_ROUNDING_MODE;
882 871
    update_fcr31();
883 872
    if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
......
886 875
FLOAT_OP(ceilw, s)
887 876
{
888 877
    set_float_rounding_mode(float_round_up, &env->fp_status);
889
    WT2 = float32_round_to_int(FST0, &env->fp_status);
890
    WT2 = float32_to_int32(WT2, &env->fp_status);
878
    WT2 = float32_to_int32(FST0, &env->fp_status);
891 879
    RESTORE_ROUNDING_MODE;
892 880
    update_fcr31();
893 881
    if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
......
897 885
FLOAT_OP(floorl, d)
898 886
{
899 887
    set_float_rounding_mode(float_round_down, &env->fp_status);
900
    DT2 = float64_round_to_int(FDT0, &env->fp_status);
901
    DT2 = float64_to_int64(DT2, &env->fp_status);
888
    DT2 = float64_to_int64(FDT0, &env->fp_status);
902 889
    RESTORE_ROUNDING_MODE;
903 890
    update_fcr31();
904 891
    if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
......
907 894
FLOAT_OP(floorl, s)
908 895
{
909 896
    set_float_rounding_mode(float_round_down, &env->fp_status);
910
    WT2 = float32_round_to_int(FST0, &env->fp_status);
911
    DT2 = float32_to_int64(WT2, &env->fp_status);
897
    DT2 = float32_to_int64(FST0, &env->fp_status);
912 898
    RESTORE_ROUNDING_MODE;
913 899
    update_fcr31();
914 900
    if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
......
917 903
FLOAT_OP(floorw, d)
918 904
{
919 905
    set_float_rounding_mode(float_round_down, &env->fp_status);
920
    DT2 = float64_round_to_int(FDT0, &env->fp_status);
921
// ???
922
    env->fp_status.float_exception_flags &= ~float_flag_inexact;
923
    WT2 = float64_to_int32(DT2, &env->fp_status);
906
    WT2 = float64_to_int32(FDT0, &env->fp_status);
924 907
    RESTORE_ROUNDING_MODE;
925 908
    update_fcr31();
926 909
    if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
......
929 912
FLOAT_OP(floorw, s)
930 913
{
931 914
    set_float_rounding_mode(float_round_down, &env->fp_status);
932
    WT2 = float32_round_to_int(FST0, &env->fp_status);
933
    WT2 = float32_to_int32(WT2, &env->fp_status);
915
    WT2 = float32_to_int32(FST0, &env->fp_status);
934 916
    RESTORE_ROUNDING_MODE;
935 917
    update_fcr31();
936 918
    if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))

Also available in: Unified diff