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

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

Issue 1941323002: [wasm] Mark all 64-bit instructions as supported on 32-bit platforms. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 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 eee8a02c76ba9a6c16bc8ddfab8ce392ac092659..395ae5cd1589115e1906aa791d327ba960b436d7 100644
--- a/test/cctest/wasm/test-run-wasm-64.cc
+++ b/test/cctest/wasm/test-run-wasm-64.cc
@@ -121,9 +121,6 @@ TEST(Run_Wasm_Return_I64) {
FOR_INT64_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
}
-// todo(ahaas): I added a list of missing instructions here to make merging
-// easier when I do them one by one.
-// kExprI64Add:
TEST(Run_WasmI64Add) {
REQUIRE(I64Add);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
@@ -132,7 +129,7 @@ TEST(Run_WasmI64Add) {
FOR_INT64_INPUTS(j) { CHECK_EQ(*i + *j, r.Call(*i, *j)); }
}
}
-// kExprI64Sub:
+
TEST(Run_Wasm_I64Sub) {
REQUIRE(I64Sub);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
@@ -141,8 +138,6 @@ TEST(Run_Wasm_I64Sub) {
FOR_INT64_INPUTS(j) { CHECK_EQ(*i - *j, r.Call(*i, *j)); }
}
}
-// kExprI64Mul:
-// kExprI64DivS:
TEST(Run_WasmI64DivS) {
REQUIRE(I64DivS);
@@ -186,7 +181,6 @@ TEST(Run_WasmI64DivS_Byzero_Const) {
}
}
}
-// kExprI64DivU:
TEST(Run_WasmI64DivU) {
REQUIRE(I64DivU);
@@ -228,7 +222,7 @@ TEST(Run_WasmI64DivU_Byzero_Const) {
}
}
}
-// kExprI64RemS:
+
TEST(Run_WasmI64RemS) {
REQUIRE(I64RemS);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
@@ -255,7 +249,6 @@ TEST(Run_WasmI64RemS_Trap) {
CHECK_TRAP64(r.Call(std::numeric_limits<int64_t>::min(), asi64(0)));
}
-// kExprI64RemU:
TEST(Run_WasmI64RemU) {
REQUIRE(I64RemU);
WasmRunner<uint64_t> r(MachineType::Uint64(), MachineType::Uint64());
@@ -281,7 +274,6 @@ TEST(Run_Wasm_I64RemU_Trap) {
CHECK_TRAP64(r.Call(std::numeric_limits<uint64_t>::max(), asu64(0)));
}
-// kExprI64And:
TEST(Run_Wasm_I64And) {
REQUIRE(I64And);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
@@ -290,7 +282,7 @@ TEST(Run_Wasm_I64And) {
FOR_INT64_INPUTS(j) { CHECK_EQ((*i) & (*j), r.Call(*i, *j)); }
}
}
-// kExprI64Ior:
+
TEST(Run_Wasm_I64Ior) {
REQUIRE(I64Ior);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
@@ -299,7 +291,7 @@ TEST(Run_Wasm_I64Ior) {
FOR_INT64_INPUTS(j) { CHECK_EQ((*i) | (*j), r.Call(*i, *j)); }
}
}
-// kExprI64Xor:
+
TEST(Run_Wasm_I64Xor) {
REQUIRE(I64Xor);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
@@ -308,7 +300,7 @@ TEST(Run_Wasm_I64Xor) {
FOR_INT64_INPUTS(j) { CHECK_EQ((*i) ^ (*j), r.Call(*i, *j)); }
}
}
-// kExprI64Shl:
+
TEST(Run_Wasm_I64Shl) {
REQUIRE(I64Shl);
{
@@ -343,7 +335,7 @@ TEST(Run_Wasm_I64Shl) {
FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 40, r.Call(*i)); }
}
}
-// kExprI64ShrU:
+
TEST(Run_Wasm_I64ShrU) {
REQUIRE(I64ShrU);
{
@@ -378,7 +370,7 @@ TEST(Run_Wasm_I64ShrU) {
FOR_UINT64_INPUTS(i) { CHECK_EQ(*i >> 40, r.Call(*i)); }
}
}
-// kExprI64ShrS:
+
TEST(Run_Wasm_I64ShrS) {
REQUIRE(I64ShrS);
{
@@ -413,7 +405,7 @@ TEST(Run_Wasm_I64ShrS) {
FOR_INT64_INPUTS(i) { CHECK_EQ(*i >> 40, r.Call(*i)); }
}
}
-// kExprI64Eq:
+
TEST(Run_Wasm_I64Eq) {
REQUIRE(I64Eq);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
@@ -422,7 +414,7 @@ TEST(Run_Wasm_I64Eq) {
FOR_INT64_INPUTS(j) { CHECK_EQ(*i == *j ? 1 : 0, r.Call(*i, *j)); }
}
}
-// kExprI64Ne:
+
TEST(Run_Wasm_I64Ne) {
REQUIRE(I64Ne);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
@@ -431,7 +423,7 @@ TEST(Run_Wasm_I64Ne) {
FOR_INT64_INPUTS(j) { CHECK_EQ(*i != *j ? 1 : 0, r.Call(*i, *j)); }
}
}
-// kExprI64LtS:
+
TEST(Run_Wasm_I64LtS) {
REQUIRE(I64LtS);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
@@ -440,6 +432,7 @@ TEST(Run_Wasm_I64LtS) {
FOR_INT64_INPUTS(j) { CHECK_EQ(*i < *j ? 1 : 0, r.Call(*i, *j)); }
}
}
+
TEST(Run_Wasm_I64LeS) {
REQUIRE(I64LeS);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
@@ -448,6 +441,7 @@ TEST(Run_Wasm_I64LeS) {
FOR_INT64_INPUTS(j) { CHECK_EQ(*i <= *j ? 1 : 0, r.Call(*i, *j)); }
}
}
+
TEST(Run_Wasm_I64LtU) {
REQUIRE(I64LtU);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
@@ -456,6 +450,7 @@ TEST(Run_Wasm_I64LtU) {
FOR_UINT64_INPUTS(j) { CHECK_EQ(*i < *j ? 1 : 0, r.Call(*i, *j)); }
}
}
+
TEST(Run_Wasm_I64LeU) {
REQUIRE(I64LeU);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
@@ -464,6 +459,7 @@ TEST(Run_Wasm_I64LeU) {
FOR_UINT64_INPUTS(j) { CHECK_EQ(*i <= *j ? 1 : 0, r.Call(*i, *j)); }
}
}
+
TEST(Run_Wasm_I64GtS) {
REQUIRE(I64GtS);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
@@ -472,6 +468,7 @@ TEST(Run_Wasm_I64GtS) {
FOR_INT64_INPUTS(j) { CHECK_EQ(*i > *j ? 1 : 0, r.Call(*i, *j)); }
}
}
+
TEST(Run_Wasm_I64GeS) {
REQUIRE(I64GeS);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
@@ -498,7 +495,7 @@ TEST(Run_Wasm_I64GeU) {
FOR_UINT64_INPUTS(j) { CHECK_EQ(*i >= *j ? 1 : 0, r.Call(*i, *j)); }
}
}
-// kExprI32ConvertI64:
+
TEST(Run_Wasm_I32ConvertI64) {
REQUIRE(I32ConvertI64);
FOR_INT64_INPUTS(i) {
@@ -507,7 +504,7 @@ TEST(Run_Wasm_I32ConvertI64) {
CHECK_EQ(static_cast<int32_t>(*i), r.Call());
}
}
-// kExprI64SConvertI32:
+
TEST(Run_Wasm_I64SConvertI32) {
REQUIRE(I64SConvertI32);
WasmRunner<int64_t> r(MachineType::Int32());
@@ -515,7 +512,6 @@ TEST(Run_Wasm_I64SConvertI32) {
FOR_INT32_INPUTS(i) { CHECK_EQ(static_cast<int64_t>(*i), r.Call(*i)); }
}
-// kExprI64UConvertI32:
TEST(Run_Wasm_I64UConvertI32) {
REQUIRE(I64UConvertI32);
WasmRunner<int64_t> r(MachineType::Uint32());
@@ -523,12 +519,6 @@ TEST(Run_Wasm_I64UConvertI32) {
FOR_UINT32_INPUTS(i) { CHECK_EQ(static_cast<uint64_t>(*i), r.Call(*i)); }
}
-// kExprF64ReinterpretI64:
-// kExprI64ReinterpretF64:
-
-// kExprI64Clz:
-// kExprI64Ctz:
-// kExprI64Popcnt:
TEST(Run_WasmI64Popcnt) {
struct {
int64_t expected;
@@ -546,14 +536,13 @@ TEST(Run_WasmI64Popcnt) {
}
}
-// kExprF32SConvertI64:
TEST(Run_WasmF32SConvertI64) {
REQUIRE(F32SConvertI64);
WasmRunner<float> r(MachineType::Int64());
BUILD(r, WASM_F32_SCONVERT_I64(WASM_GET_LOCAL(0)));
FOR_INT64_INPUTS(i) { CHECK_FLOAT_EQ(static_cast<float>(*i), r.Call(*i)); }
}
-// kExprF32UConvertI64:
+
TEST(Run_WasmF32UConvertI64) {
REQUIRE(F32UConvertI64);
struct {
@@ -641,14 +630,14 @@ TEST(Run_WasmF32UConvertI64) {
CHECK_EQ(bit_cast<float>(values[i].expected), r.Call(values[i].input));
}
}
-// kExprF64SConvertI64:
+
TEST(Run_WasmF64SConvertI64) {
REQUIRE(F64SConvertI64);
WasmRunner<double> r(MachineType::Int64());
BUILD(r, WASM_F64_SCONVERT_I64(WASM_GET_LOCAL(0)));
FOR_INT64_INPUTS(i) { CHECK_DOUBLE_EQ(static_cast<double>(*i), r.Call(*i)); }
}
-// kExprF64UConvertI64:
+
TEST(Run_Wasm_F64UConvertI64) {
REQUIRE(F64UConvertI64);
struct {
@@ -735,7 +724,6 @@ TEST(Run_Wasm_F64UConvertI64) {
CHECK_EQ(bit_cast<double>(values[i].expected), r.Call(values[i].input));
}
}
-// kExprI64SConvertF32:
TEST(Run_Wasm_I64SConvertF32a) {
WasmRunner<int64_t> r(MachineType::Float32());
@@ -750,7 +738,7 @@ TEST(Run_Wasm_I64SConvertF32a) {
}
}
}
-// kExprI64SConvertF64:
+
TEST(Run_Wasm_I64SConvertF64a) {
WasmRunner<int64_t> r(MachineType::Float64());
BUILD(r, WASM_I64_SCONVERT_F64(WASM_GET_LOCAL(0)));
@@ -765,7 +753,6 @@ TEST(Run_Wasm_I64SConvertF64a) {
}
}
-// kExprI64UConvertF32:
TEST(Run_Wasm_I64UConvertF32a) {
WasmRunner<uint64_t> r(MachineType::Float32());
BUILD(r, WASM_I64_UCONVERT_F32(WASM_GET_LOCAL(0)));
@@ -780,7 +767,6 @@ TEST(Run_Wasm_I64UConvertF32a) {
}
}
-// kExprI64UConvertF64:
TEST(Run_Wasm_I64UConvertF64a) {
WasmRunner<uint64_t> r(MachineType::Float64());
BUILD(r, WASM_I64_UCONVERT_F64(WASM_GET_LOCAL(0)));
« 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