OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 COMPARE(min_s(f3, f4, f5), "460520dc min.s f3, f4, f5"); | 886 COMPARE(min_s(f3, f4, f5), "460520dc min.s f3, f4, f5"); |
887 COMPARE(max_s(f3, f4, f5), "460520de max.s f3, f4, f5"); | 887 COMPARE(max_s(f3, f4, f5), "460520de max.s f3, f4, f5"); |
888 | 888 |
889 COMPARE(mina_d(f3, f4, f5), "462520dd mina.d f3, f4, f5"); | 889 COMPARE(mina_d(f3, f4, f5), "462520dd mina.d f3, f4, f5"); |
890 COMPARE(mina_s(f3, f4, f5), "460520dd mina.s f3, f4, f5"); | 890 COMPARE(mina_s(f3, f4, f5), "460520dd mina.s f3, f4, f5"); |
891 | 891 |
892 COMPARE(maxa_d(f3, f4, f5), "462520df maxa.d f3, f4, f5"); | 892 COMPARE(maxa_d(f3, f4, f5), "462520df maxa.d f3, f4, f5"); |
893 COMPARE(maxa_s(f3, f4, f5), "460520df maxa.s f3, f4, f5"); | 893 COMPARE(maxa_s(f3, f4, f5), "460520df maxa.s f3, f4, f5"); |
894 } | 894 } |
895 | 895 |
| 896 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 897 IsFp64Mode()) { |
| 898 COMPARE(trunc_l_d(f8, f6), "46203209 trunc.l.d f8, f6"); |
| 899 COMPARE(trunc_l_s(f8, f6), "46003209 trunc.l.s f8, f6"); |
| 900 |
| 901 COMPARE(round_l_s(f8, f6), "46003208 round.l.s f8, f6"); |
| 902 COMPARE(round_l_d(f8, f6), "46203208 round.l.d f8, f6"); |
| 903 |
| 904 COMPARE(floor_l_s(f8, f6), "4600320b floor.l.s f8, f6"); |
| 905 COMPARE(floor_l_d(f8, f6), "4620320b floor.l.d f8, f6"); |
| 906 |
| 907 COMPARE(ceil_l_s(f8, f6), "4600320a ceil.l.s f8, f6"); |
| 908 COMPARE(ceil_l_d(f8, f6), "4620320a ceil.l.d f8, f6"); |
| 909 } |
| 910 |
896 COMPARE(trunc_w_d(f8, f6), "4620320d trunc.w.d f8, f6"); | 911 COMPARE(trunc_w_d(f8, f6), "4620320d trunc.w.d f8, f6"); |
897 COMPARE(trunc_w_s(f8, f6), "4600320d trunc.w.s f8, f6"); | 912 COMPARE(trunc_w_s(f8, f6), "4600320d trunc.w.s f8, f6"); |
898 | 913 |
899 COMPARE(round_w_s(f8, f6), "4600320c round.w.s f8, f6"); | 914 COMPARE(round_w_s(f8, f6), "4600320c round.w.s f8, f6"); |
900 COMPARE(round_w_d(f8, f6), "4620320c round.w.d f8, f6"); | 915 COMPARE(round_w_d(f8, f6), "4620320c round.w.d f8, f6"); |
901 | 916 |
902 COMPARE(round_l_s(f8, f6), "46003208 round.l.s f8, f6"); | |
903 COMPARE(round_l_d(f8, f6), "46203208 round.l.d f8, f6"); | |
904 | |
905 COMPARE(floor_w_s(f8, f6), "4600320f floor.w.s f8, f6"); | 917 COMPARE(floor_w_s(f8, f6), "4600320f floor.w.s f8, f6"); |
906 COMPARE(floor_w_d(f8, f6), "4620320f floor.w.d f8, f6"); | 918 COMPARE(floor_w_d(f8, f6), "4620320f floor.w.d f8, f6"); |
907 | 919 |
908 COMPARE(floor_l_s(f8, f6), "4600320b floor.l.s f8, f6"); | |
909 COMPARE(floor_l_d(f8, f6), "4620320b floor.l.d f8, f6"); | |
910 | |
911 COMPARE(ceil_w_s(f8, f6), "4600320e ceil.w.s f8, f6"); | 920 COMPARE(ceil_w_s(f8, f6), "4600320e ceil.w.s f8, f6"); |
912 COMPARE(ceil_w_d(f8, f6), "4620320e ceil.w.d f8, f6"); | 921 COMPARE(ceil_w_d(f8, f6), "4620320e ceil.w.d f8, f6"); |
913 | 922 |
914 COMPARE(ceil_l_s(f8, f6), "4600320a ceil.l.s f8, f6"); | |
915 COMPARE(ceil_l_d(f8, f6), "4620320a ceil.l.d f8, f6"); | |
916 | |
917 COMPARE(sub_s(f10, f8, f6), "46064281 sub.s f10, f8, f6"); | 923 COMPARE(sub_s(f10, f8, f6), "46064281 sub.s f10, f8, f6"); |
918 COMPARE(sub_d(f10, f8, f6), "46264281 sub.d f10, f8, f6"); | 924 COMPARE(sub_d(f10, f8, f6), "46264281 sub.d f10, f8, f6"); |
919 | 925 |
920 COMPARE(sqrt_s(f8, f6), "46003204 sqrt.s f8, f6"); | 926 COMPARE(sqrt_s(f8, f6), "46003204 sqrt.s f8, f6"); |
921 COMPARE(sqrt_d(f8, f6), "46203204 sqrt.d f8, f6"); | 927 COMPARE(sqrt_d(f8, f6), "46203204 sqrt.d f8, f6"); |
922 | 928 |
923 COMPARE(neg_s(f8, f6), "46003207 neg.s f8, f6"); | 929 COMPARE(neg_s(f8, f6), "46003207 neg.s f8, f6"); |
924 COMPARE(neg_d(f8, f6), "46203207 neg.d f8, f6"); | 930 COMPARE(neg_d(f8, f6), "46203207 neg.d f8, f6"); |
925 | 931 |
926 COMPARE(mul_s(f8, f6, f4), "46043202 mul.s f8, f6, f4"); | 932 COMPARE(mul_s(f8, f6, f4), "46043202 mul.s f8, f6, f4"); |
927 COMPARE(mul_d(f8, f6, f4), "46243202 mul.d f8, f6, f4"); | 933 COMPARE(mul_d(f8, f6, f4), "46243202 mul.d f8, f6, f4"); |
928 | 934 |
929 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 935 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { |
930 COMPARE(rsqrt_s(f8, f6), "46003216 rsqrt.s f8, f6"); | 936 COMPARE(rsqrt_s(f8, f6), "46003216 rsqrt.s f8, f6"); |
931 COMPARE(rsqrt_d(f8, f6), "46203216 rsqrt.d f8, f6"); | 937 COMPARE(rsqrt_d(f8, f6), "46203216 rsqrt.d f8, f6"); |
932 | 938 |
933 COMPARE(recip_s(f8, f6), "46003215 recip.s f8, f6"); | 939 COMPARE(recip_s(f8, f6), "46003215 recip.s f8, f6"); |
934 COMPARE(recip_d(f8, f6), "46203215 recip.d f8, f6"); | 940 COMPARE(recip_d(f8, f6), "46203215 recip.d f8, f6"); |
935 } | 941 } |
936 | 942 |
937 COMPARE(mov_s(f6, f4), "46002186 mov.s f6, f4"); | 943 COMPARE(mov_s(f6, f4), "46002186 mov.s f6, f4"); |
938 COMPARE(mov_d(f6, f4), "46202186 mov.d f6, f4"); | 944 COMPARE(mov_d(f6, f4), "46202186 mov.d f6, f4"); |
939 | 945 |
940 if (IsMipsArchVariant(kMips32r2)) { | 946 if (IsMipsArchVariant(kMips32r2)) { |
941 COMPARE(trunc_l_d(f8, f6), "46203209 trunc.l.d f8, f6"); | |
942 COMPARE(trunc_l_s(f8, f6), "46003209 trunc.l.s f8, f6"); | |
943 | |
944 COMPARE(movz_s(f6, f4, t0), "46082192 movz.s f6, f4, t0"); | 947 COMPARE(movz_s(f6, f4, t0), "46082192 movz.s f6, f4, t0"); |
945 COMPARE(movz_d(f6, f4, t0), "46282192 movz.d f6, f4, t0"); | 948 COMPARE(movz_d(f6, f4, t0), "46282192 movz.d f6, f4, t0"); |
946 | 949 |
947 COMPARE(movt_s(f6, f4, 4), "46112191 movt.s f6, f4, cc(1)"); | 950 COMPARE(movt_s(f6, f4, 4), "46112191 movt.s f6, f4, cc(1)"); |
948 COMPARE(movt_d(f6, f4, 4), "46312191 movt.d f6, f4, cc(1)"); | 951 COMPARE(movt_d(f6, f4, 4), "46312191 movt.d f6, f4, cc(1)"); |
949 | 952 |
950 COMPARE(movf_s(f6, f4, 4), "46102191 movf.s f6, f4, cc(1)"); | 953 COMPARE(movf_s(f6, f4, 4), "46102191 movf.s f6, f4, cc(1)"); |
951 COMPARE(movf_d(f6, f4, 4), "46302191 movf.d f6, f4, cc(1)"); | 954 COMPARE(movf_d(f6, f4, 4), "46302191 movf.d f6, f4, cc(1)"); |
952 | 955 |
953 COMPARE(movn_s(f6, f4, t0), "46082193 movn.s f6, f4, t0"); | 956 COMPARE(movn_s(f6, f4, t0), "46082193 movn.s f6, f4, t0"); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 | 1044 |
1042 VERIFY_RUN(); | 1045 VERIFY_RUN(); |
1043 } | 1046 } |
1044 } | 1047 } |
1045 | 1048 |
1046 | 1049 |
1047 TEST(CVT_DISSASM) { | 1050 TEST(CVT_DISSASM) { |
1048 SET_UP(); | 1051 SET_UP(); |
1049 COMPARE(cvt_d_s(f22, f24), "4600c5a1 cvt.d.s f22, f24"); | 1052 COMPARE(cvt_d_s(f22, f24), "4600c5a1 cvt.d.s f22, f24"); |
1050 COMPARE(cvt_d_w(f22, f24), "4680c5a1 cvt.d.w f22, f24"); | 1053 COMPARE(cvt_d_w(f22, f24), "4680c5a1 cvt.d.w f22, f24"); |
1051 if (IsMipsArchVariant(kMips32r6) || IsMipsArchVariant(kMips32r2)) { | |
1052 COMPARE(cvt_d_l(f22, f24), "46a0c5a1 cvt.d.l f22, f24"); | |
1053 } | |
1054 | |
1055 if (IsMipsArchVariant(kMips32r6) || IsMipsArchVariant(kMips32r2)) { | |
1056 COMPARE(cvt_l_s(f22, f24), "4600c5a5 cvt.l.s f22, f24"); | |
1057 COMPARE(cvt_l_d(f22, f24), "4620c5a5 cvt.l.d f22, f24"); | |
1058 } | |
1059 | |
1060 COMPARE(cvt_s_d(f22, f24), "4620c5a0 cvt.s.d f22, f24"); | |
1061 COMPARE(cvt_s_w(f22, f24), "4680c5a0 cvt.s.w f22, f24"); | |
1062 if (IsMipsArchVariant(kMips32r6) || IsMipsArchVariant(kMips32r2)) { | |
1063 COMPARE(cvt_s_l(f22, f24), "46a0c5a0 cvt.s.l f22, f24"); | |
1064 } | |
1065 | 1054 |
1066 COMPARE(cvt_s_d(f22, f24), "4620c5a0 cvt.s.d f22, f24"); | 1055 COMPARE(cvt_s_d(f22, f24), "4620c5a0 cvt.s.d f22, f24"); |
1067 COMPARE(cvt_s_w(f22, f24), "4680c5a0 cvt.s.w f22, f24"); | 1056 COMPARE(cvt_s_w(f22, f24), "4680c5a0 cvt.s.w f22, f24"); |
1068 | 1057 |
| 1058 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 1059 IsFp64Mode()) { |
| 1060 COMPARE(cvt_d_l(f22, f24), "46a0c5a1 cvt.d.l f22, f24"); |
| 1061 COMPARE(cvt_l_d(f22, f24), "4620c5a5 cvt.l.d f22, f24"); |
| 1062 |
| 1063 COMPARE(cvt_s_l(f22, f24), "46a0c5a0 cvt.s.l f22, f24"); |
| 1064 COMPARE(cvt_l_s(f22, f24), "4600c5a5 cvt.l.s f22, f24"); |
| 1065 } |
| 1066 |
1069 VERIFY_RUN(); | 1067 VERIFY_RUN(); |
1070 } | 1068 } |
OLD | NEW |