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/wasm/wasm-macro-gen.h" | 5 #include "src/wasm/wasm-macro-gen.h" |
6 #include "src/wasm/wasm-module.h" | 6 #include "src/wasm/wasm-module.h" |
7 | 7 |
8 #include "test/cctest/cctest.h" | 8 #include "test/cctest/cctest.h" |
9 #include "test/cctest/compiler/value-helper.h" | 9 #include "test/cctest/compiler/value-helper.h" |
10 #include "test/cctest/wasm/wasm-run-utils.h" | 10 #include "test/cctest/wasm/wasm-run-utils.h" |
11 #include "test/common/wasm/test-signatures.h" | 11 #include "test/common/wasm/test-signatures.h" |
12 | 12 |
13 using namespace v8::base; | 13 using namespace v8::base; |
14 using namespace v8::internal; | 14 using namespace v8::internal; |
15 using namespace v8::internal::compiler; | 15 using namespace v8::internal::compiler; |
16 using namespace v8::internal::wasm; | 16 using namespace v8::internal::wasm; |
17 | 17 |
18 #if !V8_TARGET_ARCH_X64 | |
bbudge
2016/11/18 19:30:59
Rather than comment out the code here, don't inclu
gdeepti
2016/11/21 19:30:03
Done.
| |
18 WASM_EXEC_TEST(Simd_I32x4_Splat) { | 19 WASM_EXEC_TEST(Simd_I32x4_Splat) { |
19 FLAG_wasm_simd_prototype = true; | 20 FLAG_wasm_simd_prototype = true; |
20 WasmRunner<int32_t> r(kExecuteCompiled, MachineType::Int32()); | 21 WasmRunner<int32_t> r(kExecuteCompiled, MachineType::Int32()); |
21 BUILD(r, | 22 BUILD(r, |
22 WASM_SIMD_I32x4_EXTRACT_LANE(0, WASM_SIMD_I32x4_SPLAT(WASM_I32V(5)))); | 23 WASM_SIMD_I32x4_EXTRACT_LANE(0, WASM_SIMD_I32x4_SPLAT(WASM_I32V(5)))); |
23 FOR_INT32_INPUTS(i) { CHECK_EQ(5, r.Call()); } | 24 FOR_INT32_INPUTS(i) { CHECK_EQ(5, r.Call()); } |
24 } | 25 } |
25 | 26 |
26 WASM_EXEC_TEST(Simd_I32x4_Add) { | 27 WASM_EXEC_TEST(Simd_I32x4_Add) { |
27 FLAG_wasm_simd_prototype = true; | 28 FLAG_wasm_simd_prototype = true; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 WASM_IF_ELSE( | 88 WASM_IF_ELSE( |
88 WASM_I32_EQ(WASM_SIMD_I32x4_EXTRACT_LANE( | 89 WASM_I32_EQ(WASM_SIMD_I32x4_EXTRACT_LANE( |
89 0, WASM_SIMD_I32x4_ADD( | 90 0, WASM_SIMD_I32x4_ADD( |
90 WASM_SIMD_F32x4_SPLAT(WASM_F32(21.25)), | 91 WASM_SIMD_F32x4_SPLAT(WASM_F32(21.25)), |
91 WASM_SIMD_F32x4_SPLAT(WASM_F32(31.5)))), | 92 WASM_SIMD_F32x4_SPLAT(WASM_F32(31.5)))), |
92 WASM_I32_ADD(WASM_I32_REINTERPRET_F32(WASM_F32(21.25)), | 93 WASM_I32_ADD(WASM_I32_REINTERPRET_F32(WASM_F32(21.25)), |
93 WASM_I32_REINTERPRET_F32(WASM_F32(31.5)))), | 94 WASM_I32_REINTERPRET_F32(WASM_F32(31.5)))), |
94 WASM_RETURN1(WASM_I32V(1)), WASM_RETURN1(WASM_I32V(0)))); | 95 WASM_RETURN1(WASM_I32V(1)), WASM_RETURN1(WASM_I32V(0)))); |
95 FOR_INT32_INPUTS(i) { CHECK_EQ(1, r.Call()); } | 96 FOR_INT32_INPUTS(i) { CHECK_EQ(1, r.Call()); } |
96 } | 97 } |
98 #endif // V8_TARGET_ARCH_X64 | |
OLD | NEW |