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

Side by Side Diff: test/cctest/wasm/test-run-wasm-simd.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 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 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 \ 1434 \
1435 CHECK_EQ(1, r.Call(0x12, 0x34)); \ 1435 CHECK_EQ(1, r.Call(0x12, 0x34)); \
1436 } 1436 }
1437 1437
1438 WASM_SIMD_SELECT_TEST(32x4) 1438 WASM_SIMD_SELECT_TEST(32x4)
1439 #endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 1439 #endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64
1440 1440
1441 #if V8_TARGET_ARCH_ARM 1441 #if V8_TARGET_ARCH_ARM
1442 WASM_SIMD_SELECT_TEST(16x8) 1442 WASM_SIMD_SELECT_TEST(16x8)
1443 WASM_SIMD_SELECT_TEST(8x16) 1443 WASM_SIMD_SELECT_TEST(8x16)
1444 #endif // V8_TARGET_ARCH_ARM
1444 1445
1446 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
1445 // Boolean unary operations are 'AllTrue' and 'AnyTrue', which return an integer 1447 // Boolean unary operations are 'AllTrue' and 'AnyTrue', which return an integer
1446 // result. Use relational ops on numeric vectors to create the boolean vector 1448 // result. Use relational ops on numeric vectors to create the boolean vector
1447 // test inputs. Test inputs with all true, all false, one true, and one false. 1449 // test inputs. Test inputs with all true, all false, one true, and one false.
1448 #define WASM_SIMD_BOOL_REDUCTION_TEST(format, lanes) \ 1450 #define WASM_SIMD_BOOL_REDUCTION_TEST(format, lanes) \
1449 WASM_EXEC_TEST(ReductionTest##lanes) { \ 1451 WASM_EXEC_TEST(ReductionTest##lanes) { \
1450 FLAG_wasm_simd_prototype = true; \ 1452 FLAG_wasm_simd_prototype = true; \
1451 WasmRunner<int32_t> r(kExecuteCompiled); \ 1453 WasmRunner<int32_t> r(kExecuteCompiled); \
1452 byte zero = r.AllocateLocal(kWasmS128); \ 1454 byte zero = r.AllocateLocal(kWasmS128); \
1453 byte one_one = r.AllocateLocal(kWasmS128); \ 1455 byte one_one = r.AllocateLocal(kWasmS128); \
1454 byte reduced = r.AllocateLocal(kWasmI32); \ 1456 byte reduced = r.AllocateLocal(kWasmI32); \
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1859 WASM_LOAD_MEM(MachineType::Simd128(), WASM_ZERO)), 1861 WASM_LOAD_MEM(MachineType::Simd128(), WASM_ZERO)),
1860 WASM_SIMD_I32x4_EXTRACT_LANE( 1862 WASM_SIMD_I32x4_EXTRACT_LANE(
1861 0, WASM_LOAD_MEM(MachineType::Simd128(), WASM_ZERO))); 1863 0, WASM_LOAD_MEM(MachineType::Simd128(), WASM_ZERO)));
1862 1864
1863 FOR_INT32_INPUTS(i) { 1865 FOR_INT32_INPUTS(i) {
1864 int32_t expected = *i; 1866 int32_t expected = *i;
1865 r.module().WriteMemory(&memory[0], expected); 1867 r.module().WriteMemory(&memory[0], expected);
1866 CHECK_EQ(expected, r.Call()); 1868 CHECK_EQ(expected, r.Call());
1867 } 1869 }
1868 } 1870 }
1869 #endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET 1871 #endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
OLDNEW
« test/cctest/test-disasm-mips64.cc ('K') | « test/cctest/test-disasm-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698