OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 COMPARE(vrintm(d2, d3), "febb2b43 vrintm.f64.f64 d2, d3"); | 853 COMPARE(vrintm(d2, d3), "febb2b43 vrintm.f64.f64 d2, d3"); |
854 | 854 |
855 COMPARE(vrintz(d0, d0), "eeb60bc0 vrintz.f64.f64 d0, d0"); | 855 COMPARE(vrintz(d0, d0), "eeb60bc0 vrintz.f64.f64 d0, d0"); |
856 COMPARE(vrintz(d2, d3, ne), "1eb62bc3 vrintzne.f64.f64 d2, d3"); | 856 COMPARE(vrintz(d2, d3, ne), "1eb62bc3 vrintzne.f64.f64 d2, d3"); |
857 } | 857 } |
858 | 858 |
859 VERIFY_RUN(); | 859 VERIFY_RUN(); |
860 } | 860 } |
861 | 861 |
862 | 862 |
| 863 TEST(ARMv8_vselX_disasm) { |
| 864 SET_UP(); |
| 865 |
| 866 if (CpuFeatures::IsSupported(ARMv8)) { |
| 867 // Native instructions. |
| 868 COMPARE(vsel(eq, d0, d1, d2), |
| 869 "fe010b02 vseleq.f64 d0, d1, d2"); |
| 870 COMPARE(vsel(eq, s0, s1, s2), |
| 871 "fe000a81 vseleq.f32 s0, s1, s2"); |
| 872 COMPARE(vsel(ge, d0, d1, d2), |
| 873 "fe210b02 vselge.f64 d0, d1, d2"); |
| 874 COMPARE(vsel(ge, s0, s1, s2), |
| 875 "fe200a81 vselge.f32 s0, s1, s2"); |
| 876 COMPARE(vsel(gt, d0, d1, d2), |
| 877 "fe310b02 vselgt.f64 d0, d1, d2"); |
| 878 COMPARE(vsel(gt, s0, s1, s2), |
| 879 "fe300a81 vselgt.f32 s0, s1, s2"); |
| 880 COMPARE(vsel(vs, d0, d1, d2), |
| 881 "fe110b02 vselvs.f64 d0, d1, d2"); |
| 882 COMPARE(vsel(vs, s0, s1, s2), |
| 883 "fe100a81 vselvs.f32 s0, s1, s2"); |
| 884 |
| 885 // Inverted conditions (and swapped inputs). |
| 886 COMPARE(vsel(ne, d0, d1, d2), |
| 887 "fe020b01 vseleq.f64 d0, d2, d1"); |
| 888 COMPARE(vsel(ne, s0, s1, s2), |
| 889 "fe010a20 vseleq.f32 s0, s2, s1"); |
| 890 COMPARE(vsel(lt, d0, d1, d2), |
| 891 "fe220b01 vselge.f64 d0, d2, d1"); |
| 892 COMPARE(vsel(lt, s0, s1, s2), |
| 893 "fe210a20 vselge.f32 s0, s2, s1"); |
| 894 COMPARE(vsel(le, d0, d1, d2), |
| 895 "fe320b01 vselgt.f64 d0, d2, d1"); |
| 896 COMPARE(vsel(le, s0, s1, s2), |
| 897 "fe310a20 vselgt.f32 s0, s2, s1"); |
| 898 COMPARE(vsel(vc, d0, d1, d2), |
| 899 "fe120b01 vselvs.f64 d0, d2, d1"); |
| 900 COMPARE(vsel(vc, s0, s1, s2), |
| 901 "fe110a20 vselvs.f32 s0, s2, s1"); |
| 902 } |
| 903 |
| 904 VERIFY_RUN(); |
| 905 } |
| 906 |
| 907 |
863 TEST(Neon) { | 908 TEST(Neon) { |
864 SET_UP(); | 909 SET_UP(); |
865 | 910 |
866 if (CpuFeatures::IsSupported(NEON)) { | 911 if (CpuFeatures::IsSupported(NEON)) { |
867 CpuFeatureScope scope(&assm, NEON); | 912 CpuFeatureScope scope(&assm, NEON); |
868 COMPARE(vld1(Neon8, NeonListOperand(d4, 4), NeonMemOperand(r1)), | 913 COMPARE(vld1(Neon8, NeonListOperand(d4, 4), NeonMemOperand(r1)), |
869 "f421420f vld1.8 {d4, d5, d6, d7}, [r1]"); | 914 "f421420f vld1.8 {d4, d5, d6, d7}, [r1]"); |
870 COMPARE(vst1(Neon16, NeonListOperand(d17, 4), NeonMemOperand(r9)), | 915 COMPARE(vst1(Neon16, NeonListOperand(d17, 4), NeonMemOperand(r9)), |
871 "f449124f vst1.16 {d17, d18, d19, d20}, [r9]"); | 916 "f449124f vst1.16 {d17, d18, d19, d20}, [r9]"); |
872 COMPARE(vmovl(NeonU8, q3, d1), | 917 COMPARE(vmovl(NeonU8, q3, d1), |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 | 1164 |
1120 COMPARE(dsb(ISH), | 1165 COMPARE(dsb(ISH), |
1121 "f57ff04b dsb ish"); | 1166 "f57ff04b dsb ish"); |
1122 | 1167 |
1123 COMPARE(isb(ISH), | 1168 COMPARE(isb(ISH), |
1124 "f57ff06b isb ish"); | 1169 "f57ff06b isb ish"); |
1125 } | 1170 } |
1126 | 1171 |
1127 VERIFY_RUN(); | 1172 VERIFY_RUN(); |
1128 } | 1173 } |
OLD | NEW |