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

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

Issue 2801683003: MIPS[64]: Support for some SIMD operations (8) (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
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 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 SET_UP(); 1124 SET_UP();
1125 if (IsMipsArchVariant(kMips32r6) && CpuFeatures::IsSupported(MIPS_SIMD)) { 1125 if (IsMipsArchVariant(kMips32r6) && CpuFeatures::IsSupported(MIPS_SIMD)) {
1126 CpuFeatureScope fscope(&assm, MIPS_SIMD); 1126 CpuFeatureScope fscope(&assm, MIPS_SIMD);
1127 1127
1128 COMPARE_MSA_BRANCH(bnz_b(w0, 1), "47800001 bnz.b w0, 1", 1); 1128 COMPARE_MSA_BRANCH(bnz_b(w0, 1), "47800001 bnz.b w0, 1", 1);
1129 COMPARE_MSA_BRANCH(bnz_h(w1, -1), "47a1ffff bnz.h w1, -1", -1); 1129 COMPARE_MSA_BRANCH(bnz_h(w1, -1), "47a1ffff bnz.h w1, -1", -1);
1130 COMPARE_MSA_BRANCH(bnz_w(w2, 32767), "47c27fff bnz.w w2, 32767", 1130 COMPARE_MSA_BRANCH(bnz_w(w2, 32767), "47c27fff bnz.w w2, 32767",
1131 32767); 1131 32767);
1132 COMPARE_MSA_BRANCH(bnz_d(w3, -32768), "47e38000 bnz.d w3, -32768", 1132 COMPARE_MSA_BRANCH(bnz_d(w3, -32768), "47e38000 bnz.d w3, -32768",
1133 -32768); 1133 -32768);
1134 COMPARE_MSA_BRANCH(bnz_v(w0, 0), "45e00000 bnz.v w0, 0", 0); 1134 COMPARE_MSA_BRANCH(bnz_v(w0, (int16_t)0), "45e00000 bnz.v w0, 0", 0);
ivica.bogosavljevic 2017/05/15 14:59:06 use static_cast<int16_t> like the others
dusan.simicic 2017/05/19 08:55:01 Done.
1135 COMPARE_MSA_BRANCH(bz_b(w0, 1), "47000001 bz.b w0, 1", 1); 1135 COMPARE_MSA_BRANCH(bz_b(w0, 1), "47000001 bz.b w0, 1", 1);
1136 COMPARE_MSA_BRANCH(bz_h(w1, -1), "4721ffff bz.h w1, -1", -1); 1136 COMPARE_MSA_BRANCH(bz_h(w1, -1), "4721ffff bz.h w1, -1", -1);
1137 COMPARE_MSA_BRANCH(bz_w(w2, 32767), "47427fff bz.w w2, 32767", 1137 COMPARE_MSA_BRANCH(bz_w(w2, 32767), "47427fff bz.w w2, 32767",
1138 32767); 1138 32767);
1139 COMPARE_MSA_BRANCH(bz_d(w3, -32768), "47638000 bz.d w3, -32768", 1139 COMPARE_MSA_BRANCH(bz_d(w3, -32768), "47638000 bz.d w3, -32768",
1140 -32768); 1140 -32768);
1141 COMPARE_MSA_BRANCH(bz_v(w0, 0), "45600000 bz.v w0, 0", 0); 1141 COMPARE_MSA_BRANCH(bz_v(w0, (int16_t)0), "45600000 bz.v w0, 0", 0);
1142 } 1142 }
1143 VERIFY_RUN(); 1143 VERIFY_RUN();
1144 } 1144 }
1145 1145
1146 TEST(MSA_MI10) { 1146 TEST(MSA_MI10) {
1147 SET_UP(); 1147 SET_UP();
1148 if (IsMipsArchVariant(kMips32r6) && CpuFeatures::IsSupported(MIPS_SIMD)) { 1148 if (IsMipsArchVariant(kMips32r6) && CpuFeatures::IsSupported(MIPS_SIMD)) {
1149 CpuFeatureScope fscope(&assm, MIPS_SIMD); 1149 CpuFeatureScope fscope(&assm, MIPS_SIMD);
1150 1150
1151 COMPARE(ld_b(w0, MemOperand(at, -512)), 1151 COMPARE(ld_b(w0, MemOperand(at, -512)),
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 COMPARE(srli_h(w31, w31, 2), "7962ffc9 srli.h w31, w31, 2"); 1792 COMPARE(srli_h(w31, w31, 2), "7962ffc9 srli.h w31, w31, 2");
1793 COMPARE(srli_w(w5, w9, 4), "79444949 srli.w w5, w9, 4"); 1793 COMPARE(srli_w(w5, w9, 4), "79444949 srli.w w5, w9, 4");
1794 COMPARE(srli_d(w27, w26, 5), "7905d6c9 srli.d w27, w26, 5"); 1794 COMPARE(srli_d(w27, w26, 5), "7905d6c9 srli.d w27, w26, 5");
1795 COMPARE(srlri_b(w18, w3, 0), "79f01c8a srlri.b w18, w3, 0"); 1795 COMPARE(srlri_b(w18, w3, 0), "79f01c8a srlri.b w18, w3, 0");
1796 COMPARE(srlri_h(w1, w2, 3), "79e3104a srlri.h w1, w2, 3"); 1796 COMPARE(srlri_h(w1, w2, 3), "79e3104a srlri.h w1, w2, 3");
1797 COMPARE(srlri_w(w11, w22, 2), "79c2b2ca srlri.w w11, w22, 2"); 1797 COMPARE(srlri_w(w11, w22, 2), "79c2b2ca srlri.w w11, w22, 2");
1798 COMPARE(srlri_d(w24, w10, 6), "7986560a srlri.d w24, w10, 6"); 1798 COMPARE(srlri_d(w24, w10, 6), "7986560a srlri.d w24, w10, 6");
1799 } 1799 }
1800 VERIFY_RUN(); 1800 VERIFY_RUN();
1801 } 1801 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698