OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/assembler-inl.h" | 5 #include "src/assembler-inl.h" |
6 #include "src/wasm/wasm-macro-gen.h" | 6 #include "src/wasm/wasm-macro-gen.h" |
7 #include "test/cctest/cctest.h" | 7 #include "test/cctest/cctest.h" |
8 #include "test/cctest/compiler/value-helper.h" | 8 #include "test/cctest/compiler/value-helper.h" |
9 #include "test/cctest/wasm/wasm-run-utils.h" | 9 #include "test/cctest/wasm/wasm-run-utils.h" |
10 | 10 |
(...skipping 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1605 WASM_EXEC_COMPILED_TEST(S1x8Or) { RunS1x8BinOpTest(kExprS1x8Or, Or); } | 1605 WASM_EXEC_COMPILED_TEST(S1x8Or) { RunS1x8BinOpTest(kExprS1x8Or, Or); } |
1606 | 1606 |
1607 WASM_EXEC_COMPILED_TEST(S1x8Xor) { RunS1x8BinOpTest(kExprS1x8Xor, Xor); } | 1607 WASM_EXEC_COMPILED_TEST(S1x8Xor) { RunS1x8BinOpTest(kExprS1x8Xor, Xor); } |
1608 | 1608 |
1609 WASM_EXEC_COMPILED_TEST(S1x16And) { RunS1x16BinOpTest(kExprS1x16And, And); } | 1609 WASM_EXEC_COMPILED_TEST(S1x16And) { RunS1x16BinOpTest(kExprS1x16And, And); } |
1610 | 1610 |
1611 WASM_EXEC_COMPILED_TEST(S1x16Or) { RunS1x16BinOpTest(kExprS1x16Or, Or); } | 1611 WASM_EXEC_COMPILED_TEST(S1x16Or) { RunS1x16BinOpTest(kExprS1x16Or, Or); } |
1612 | 1612 |
1613 WASM_EXEC_COMPILED_TEST(S1x16Xor) { RunS1x16BinOpTest(kExprS1x16Xor, Xor); } | 1613 WASM_EXEC_COMPILED_TEST(S1x16Xor) { RunS1x16BinOpTest(kExprS1x16Xor, Xor); } |
1614 | 1614 |
| 1615 #endif // V8_TARGET_ARCH_ARM |
| 1616 |
| 1617 #if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET |
1615 WASM_EXEC_COMPILED_TEST(SimdI32x4ExtractWithF32x4) { | 1618 WASM_EXEC_COMPILED_TEST(SimdI32x4ExtractWithF32x4) { |
1616 FLAG_wasm_simd_prototype = true; | 1619 FLAG_wasm_simd_prototype = true; |
1617 WasmRunner<int32_t> r(kExecuteCompiled); | 1620 WasmRunner<int32_t> r(kExecuteCompiled); |
1618 BUILD(r, WASM_IF_ELSE_I( | 1621 BUILD(r, WASM_IF_ELSE_I( |
1619 WASM_I32_EQ(WASM_SIMD_I32x4_EXTRACT_LANE( | 1622 WASM_I32_EQ(WASM_SIMD_I32x4_EXTRACT_LANE( |
1620 0, WASM_SIMD_F32x4_SPLAT(WASM_F32(30.5))), | 1623 0, WASM_SIMD_F32x4_SPLAT(WASM_F32(30.5))), |
1621 WASM_I32_REINTERPRET_F32(WASM_F32(30.5))), | 1624 WASM_I32_REINTERPRET_F32(WASM_F32(30.5))), |
1622 WASM_I32V(1), WASM_I32V(0))); | 1625 WASM_I32V(1), WASM_I32V(0))); |
1623 CHECK_EQ(1, r.Call()); | 1626 CHECK_EQ(1, r.Call()); |
1624 } | 1627 } |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1855 WASM_SIMD_I32x4_EXTRACT_LANE( | 1858 WASM_SIMD_I32x4_EXTRACT_LANE( |
1856 0, WASM_LOAD_MEM(MachineType::Simd128(), WASM_ZERO))); | 1859 0, WASM_LOAD_MEM(MachineType::Simd128(), WASM_ZERO))); |
1857 | 1860 |
1858 FOR_INT32_INPUTS(i) { | 1861 FOR_INT32_INPUTS(i) { |
1859 int32_t expected = *i; | 1862 int32_t expected = *i; |
1860 r.module().WriteMemory(&memory[0], expected); | 1863 r.module().WriteMemory(&memory[0], expected); |
1861 CHECK_EQ(expected, r.Call()); | 1864 CHECK_EQ(expected, r.Call()); |
1862 } | 1865 } |
1863 } | 1866 } |
1864 #endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET | 1867 #endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET |
OLD | NEW |