Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: test/cctest/test-disasm-arm.cc

Issue 2360243002: [arm] Clean up use of IsSupported and IsEnabled. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/test-assembler-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 COMPARE(mrs(r2, CPSR, ge), "a10f2000 mrsge r2, CPSR"); 498 COMPARE(mrs(r2, CPSR, ge), "a10f2000 mrsge r2, CPSR");
499 COMPARE(mrs(r3, SPSR, lt), "b14f3000 mrslt r3, SPSR"); 499 COMPARE(mrs(r3, SPSR, lt), "b14f3000 mrslt r3, SPSR");
500 500
501 VERIFY_RUN(); 501 VERIFY_RUN();
502 } 502 }
503 503
504 504
505 TEST(Vfp) { 505 TEST(Vfp) {
506 SET_UP(); 506 SET_UP();
507 507
508 if (CpuFeatures::IsSupported(VFP3)) { 508 if (CpuFeatures::IsSupported(VFPv3)) {
509 CpuFeatureScope scope(&assm, VFP3); 509 CpuFeatureScope scope(&assm, VFPv3);
510 COMPARE(vmov(d0, r2, r3), 510 COMPARE(vmov(d0, r2, r3),
511 "ec432b10 vmov d0, r2, r3"); 511 "ec432b10 vmov d0, r2, r3");
512 COMPARE(vmov(r2, r3, d0), 512 COMPARE(vmov(r2, r3, d0),
513 "ec532b10 vmov r2, r3, d0"); 513 "ec532b10 vmov r2, r3, d0");
514 COMPARE(vmov(d0, d1), 514 COMPARE(vmov(d0, d1),
515 "eeb00b41 vmov.f64 d0, d1"); 515 "eeb00b41 vmov.f64 d0, d1");
516 COMPARE(vmov(d3, d3, eq), 516 COMPARE(vmov(d3, d3, eq),
517 "0eb03b43 vmoveq.f64 d3, d3"); 517 "0eb03b43 vmoveq.f64 d3, d3");
518 518
519 COMPARE(vmov(s0, s31), 519 COMPARE(vmov(s0, s31),
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 "eefdbbcb vcvt.s32.f64 s23, d11"); 730 "eefdbbcb vcvt.s32.f64 s23, d11");
731 COMPARE(vcvt_u32_f32(s22, s21), 731 COMPARE(vcvt_u32_f32(s22, s21),
732 "eebcbaea vcvt.u32.f32 s22, s21"); 732 "eebcbaea vcvt.u32.f32 s22, s21");
733 COMPARE(vcvt_u32_f64(s20, d10), 733 COMPARE(vcvt_u32_f64(s20, d10),
734 "eebcabca vcvt.u32.f64 s20, d10"); 734 "eebcabca vcvt.u32.f64 s20, d10");
735 735
736 COMPARE(vcvt_f64_s32(d9, 2), 736 COMPARE(vcvt_f64_s32(d9, 2),
737 "eeba9bcf vcvt.f64.s32 d9, d9, #2"); 737 "eeba9bcf vcvt.f64.s32 d9, d9, #2");
738 738
739 if (CpuFeatures::IsSupported(VFP32DREGS)) { 739 if (CpuFeatures::IsSupported(VFP32DREGS)) {
740 CpuFeatureScope scope(&assm, VFP32DREGS);
740 COMPARE(vmov(d3, d27), 741 COMPARE(vmov(d3, d27),
741 "eeb03b6b vmov.f64 d3, d27"); 742 "eeb03b6b vmov.f64 d3, d27");
742 COMPARE(vmov(d18, d7), 743 COMPARE(vmov(d18, d7),
743 "eef02b47 vmov.f64 d18, d7"); 744 "eef02b47 vmov.f64 d18, d7");
744 COMPARE(vmov(d18, r2, r3), 745 COMPARE(vmov(d18, r2, r3),
745 "ec432b32 vmov d18, r2, r3"); 746 "ec432b32 vmov d18, r2, r3");
746 COMPARE(vmov(r2, r3, d18), 747 COMPARE(vmov(r2, r3, d18),
747 "ec532b32 vmov r2, r3, d18"); 748 "ec532b32 vmov r2, r3, d18");
748 COMPARE(vmov(d20, d31), 749 COMPARE(vmov(d20, d31),
749 "eef04b6f vmov.f64 d20, d31"); 750 "eef04b6f vmov.f64 d20, d31");
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 } 834 }
834 835
835 VERIFY_RUN(); 836 VERIFY_RUN();
836 } 837 }
837 838
838 839
839 TEST(ARMv8_vrintX_disasm) { 840 TEST(ARMv8_vrintX_disasm) {
840 SET_UP(); 841 SET_UP();
841 842
842 if (CpuFeatures::IsSupported(ARMv8)) { 843 if (CpuFeatures::IsSupported(ARMv8)) {
844 CpuFeatureScope scope(&assm, ARMv8);
843 COMPARE(vrinta(d0, d0), "feb80b40 vrinta.f64.f64 d0, d0"); 845 COMPARE(vrinta(d0, d0), "feb80b40 vrinta.f64.f64 d0, d0");
844 COMPARE(vrinta(d2, d3), "feb82b43 vrinta.f64.f64 d2, d3"); 846 COMPARE(vrinta(d2, d3), "feb82b43 vrinta.f64.f64 d2, d3");
845 847
846 COMPARE(vrintp(d0, d0), "feba0b40 vrintp.f64.f64 d0, d0"); 848 COMPARE(vrintp(d0, d0), "feba0b40 vrintp.f64.f64 d0, d0");
847 COMPARE(vrintp(d2, d3), "feba2b43 vrintp.f64.f64 d2, d3"); 849 COMPARE(vrintp(d2, d3), "feba2b43 vrintp.f64.f64 d2, d3");
848 850
849 COMPARE(vrintn(d0, d0), "feb90b40 vrintn.f64.f64 d0, d0"); 851 COMPARE(vrintn(d0, d0), "feb90b40 vrintn.f64.f64 d0, d0");
850 COMPARE(vrintn(d2, d3), "feb92b43 vrintn.f64.f64 d2, d3"); 852 COMPARE(vrintn(d2, d3), "feb92b43 vrintn.f64.f64 d2, d3");
851 853
852 COMPARE(vrintm(d0, d0), "febb0b40 vrintm.f64.f64 d0, d0"); 854 COMPARE(vrintm(d0, d0), "febb0b40 vrintm.f64.f64 d0, d0");
853 COMPARE(vrintm(d2, d3), "febb2b43 vrintm.f64.f64 d2, d3"); 855 COMPARE(vrintm(d2, d3), "febb2b43 vrintm.f64.f64 d2, d3");
854 856
855 COMPARE(vrintz(d0, d0), "eeb60bc0 vrintz.f64.f64 d0, d0"); 857 COMPARE(vrintz(d0, d0), "eeb60bc0 vrintz.f64.f64 d0, d0");
856 COMPARE(vrintz(d2, d3, ne), "1eb62bc3 vrintzne.f64.f64 d2, d3"); 858 COMPARE(vrintz(d2, d3, ne), "1eb62bc3 vrintzne.f64.f64 d2, d3");
857 } 859 }
858 860
859 VERIFY_RUN(); 861 VERIFY_RUN();
860 } 862 }
861 863
862 864
863 TEST(ARMv8_vminmax_disasm) { 865 TEST(ARMv8_vminmax_disasm) {
864 SET_UP(); 866 SET_UP();
865 867
866 if (CpuFeatures::IsSupported(ARMv8)) { 868 if (CpuFeatures::IsSupported(ARMv8)) {
869 CpuFeatureScope scope(&assm, ARMv8);
867 COMPARE(vmaxnm(d0, d1, d2), "fe810b02 vmaxnm.f64 d0, d1, d2"); 870 COMPARE(vmaxnm(d0, d1, d2), "fe810b02 vmaxnm.f64 d0, d1, d2");
868 COMPARE(vminnm(d3, d4, d5), "fe843b45 vminnm.f64 d3, d4, d5"); 871 COMPARE(vminnm(d3, d4, d5), "fe843b45 vminnm.f64 d3, d4, d5");
869 COMPARE(vmaxnm(s6, s7, s8), "fe833a84 vmaxnm.f32 s6, s7, s8"); 872 COMPARE(vmaxnm(s6, s7, s8), "fe833a84 vmaxnm.f32 s6, s7, s8");
870 COMPARE(vminnm(s9, s10, s11), "fec54a65 vminnm.f32 s9, s10, s11"); 873 COMPARE(vminnm(s9, s10, s11), "fec54a65 vminnm.f32 s9, s10, s11");
871 } 874 }
872 875
873 VERIFY_RUN(); 876 VERIFY_RUN();
874 } 877 }
875 878
876 879
877 TEST(ARMv8_vselX_disasm) { 880 TEST(ARMv8_vselX_disasm) {
878 SET_UP(); 881 SET_UP();
879 882
880 if (CpuFeatures::IsSupported(ARMv8)) { 883 if (CpuFeatures::IsSupported(ARMv8)) {
884 CpuFeatureScope scope(&assm, ARMv8);
881 // Native instructions. 885 // Native instructions.
882 COMPARE(vsel(eq, d0, d1, d2), 886 COMPARE(vsel(eq, d0, d1, d2),
883 "fe010b02 vseleq.f64 d0, d1, d2"); 887 "fe010b02 vseleq.f64 d0, d1, d2");
884 COMPARE(vsel(eq, s0, s1, s2), 888 COMPARE(vsel(eq, s0, s1, s2),
885 "fe000a81 vseleq.f32 s0, s1, s2"); 889 "fe000a81 vseleq.f32 s0, s1, s2");
886 COMPARE(vsel(ge, d0, d1, d2), 890 COMPARE(vsel(ge, d0, d1, d2),
887 "fe210b02 vselge.f64 d0, d1, d2"); 891 "fe210b02 vselge.f64 d0, d1, d2");
888 COMPARE(vsel(ge, s0, s1, s2), 892 COMPARE(vsel(ge, s0, s1, s2),
889 "fe200a81 vselge.f32 s0, s1, s2"); 893 "fe200a81 vselge.f32 s0, s1, s2");
890 COMPARE(vsel(gt, d0, d1, d2), 894 COMPARE(vsel(gt, d0, d1, d2),
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 1223
1220 COMPARE(ldrexb(r0, r1), "e1d10f9f ldrexb r0, [r1]"); 1224 COMPARE(ldrexb(r0, r1), "e1d10f9f ldrexb r0, [r1]");
1221 COMPARE(strexb(r0, r1, r2), "e1c20f91 strexb r0, r1, [r2]"); 1225 COMPARE(strexb(r0, r1, r2), "e1c20f91 strexb r0, r1, [r2]");
1222 COMPARE(ldrexh(r0, r1), "e1f10f9f ldrexh r0, [r1]"); 1226 COMPARE(ldrexh(r0, r1), "e1f10f9f ldrexh r0, [r1]");
1223 COMPARE(strexh(r0, r1, r2), "e1e20f91 strexh r0, r1, [r2]"); 1227 COMPARE(strexh(r0, r1, r2), "e1e20f91 strexh r0, r1, [r2]");
1224 COMPARE(ldrex(r0, r1), "e1910f9f ldrex r0, [r1]"); 1228 COMPARE(ldrex(r0, r1), "e1910f9f ldrex r0, [r1]");
1225 COMPARE(strex(r0, r1, r2), "e1820f91 strex r0, r1, [r2]"); 1229 COMPARE(strex(r0, r1, r2), "e1820f91 strex r0, r1, [r2]");
1226 1230
1227 VERIFY_RUN(); 1231 VERIFY_RUN();
1228 } 1232 }
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698