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

Unified Diff: test/cctest/wasm/test-run-wasm-64.cc

Issue 1803453003: [wasm] Int64Lowering of Word64Popcnt. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@arm-shr
Patch Set: Rebase. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/wasm/test-run-wasm.cc ('k') | test/unittests/compiler/int64-lowering-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm-64.cc
diff --git a/test/cctest/wasm/test-run-wasm-64.cc b/test/cctest/wasm/test-run-wasm-64.cc
index ceec1912f9a438d1779f25ee8b6fc1f2a1421fc8..e8af93619f6474f734e053aa704bcfcd0a950c6a 100644
--- a/test/cctest/wasm/test-run-wasm-64.cc
+++ b/test/cctest/wasm/test-run-wasm-64.cc
@@ -70,7 +70,7 @@
V(I64GeU, true) \
V(I64Clz, false) \
V(I64Ctz, false) \
- V(I64Popcnt, false) \
+ V(I64Popcnt, !MIPS_OR_X87) \
V(I32ConvertI64, true) \
V(I64SConvertF32, false) \
V(I64SConvertF64, false) \
@@ -519,6 +519,22 @@ TEST(Run_Wasm_I64UConvertI32) {
// kExprI64Clz:
// kExprI64Ctz:
// kExprI64Popcnt:
+TEST(Run_WasmI64Popcnt) {
+ struct {
+ int64_t expected;
+ uint64_t input;
+ } values[] = {{64, 0xffffffffffffffff},
+ {0, 0x0000000000000000},
+ {2, 0x0000080000008000},
+ {26, 0x1123456782345678},
+ {38, 0xffedcba09edcba09}};
+
+ WasmRunner<int64_t> r(MachineType::Uint64());
+ BUILD(r, WASM_I64_POPCNT(WASM_GET_LOCAL(0)));
+ for (size_t i = 0; i < arraysize(values); i++) {
+ CHECK_EQ(values[i].expected, r.Call(values[i].input));
+ }
+}
// kExprF32SConvertI64:
TEST(Run_WasmF32SConvertI64) {
« no previous file with comments | « test/cctest/wasm/test-run-wasm.cc ('k') | test/unittests/compiler/int64-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698