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

Side by Side Diff: test/cctest/wasm/test-run-wasm-simd.cc

Issue 2695613004: Add several SIMD opcodes to IA32 (Closed)
Patch Set: Rebase Created 3 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-disasm-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 13 matching lines...) Expand all
24 typedef int32_t (*Int32ShiftOp)(int32_t, int); 24 typedef int32_t (*Int32ShiftOp)(int32_t, int);
25 typedef int16_t (*Int16UnOp)(int16_t); 25 typedef int16_t (*Int16UnOp)(int16_t);
26 typedef int16_t (*Int16BinOp)(int16_t, int16_t); 26 typedef int16_t (*Int16BinOp)(int16_t, int16_t);
27 typedef int (*Int16CompareOp)(int16_t, int16_t); 27 typedef int (*Int16CompareOp)(int16_t, int16_t);
28 typedef int16_t (*Int16ShiftOp)(int16_t, int); 28 typedef int16_t (*Int16ShiftOp)(int16_t, int);
29 typedef int8_t (*Int8UnOp)(int8_t); 29 typedef int8_t (*Int8UnOp)(int8_t);
30 typedef int8_t (*Int8BinOp)(int8_t, int8_t); 30 typedef int8_t (*Int8BinOp)(int8_t, int8_t);
31 typedef int (*Int8CompareOp)(int8_t, int8_t); 31 typedef int (*Int8CompareOp)(int8_t, int8_t);
32 typedef int8_t (*Int8ShiftOp)(int8_t, int); 32 typedef int8_t (*Int8ShiftOp)(int8_t, int);
33 33
34 #if !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_X64 34 #if !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32
35 #define SIMD_LOWERING_TARGET 1 35 #define SIMD_LOWERING_TARGET 1
36 #else 36 #else
37 #define SIMD_LOWERING_TARGET 0 37 #define SIMD_LOWERING_TARGET 0
38 #endif // !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_X64 38 #endif // !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32
39 39
40 // Generic expected value functions. 40 // Generic expected value functions.
41 template <typename T> 41 template <typename T>
42 T Negate(T a) { 42 T Negate(T a) {
43 return -a; 43 return -a;
44 } 44 }
45 45
46 template <typename T> 46 template <typename T>
47 T Add(T a, T b) { 47 T Add(T a, T b) {
48 return a + b; 48 return a + b;
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 WASM_SET_GLOBAL(0, WASM_SIMD_F32x4_REPLACE_LANE(3, WASM_GET_GLOBAL(0), 1828 WASM_SET_GLOBAL(0, WASM_SIMD_F32x4_REPLACE_LANE(3, WASM_GET_GLOBAL(0),
1829 WASM_F32(65.0))), 1829 WASM_F32(65.0))),
1830 WASM_I32V(1)); 1830 WASM_I32V(1));
1831 FOR_INT32_INPUTS(i) { CHECK_EQ(1, r.Call(0)); } 1831 FOR_INT32_INPUTS(i) { CHECK_EQ(1, r.Call(0)); }
1832 CHECK_EQ(*global, 13.5); 1832 CHECK_EQ(*global, 13.5);
1833 CHECK_EQ(*(global + 1), 45.5); 1833 CHECK_EQ(*(global + 1), 45.5);
1834 CHECK_EQ(*(global + 2), 32.25); 1834 CHECK_EQ(*(global + 2), 32.25);
1835 CHECK_EQ(*(global + 3), 65.0); 1835 CHECK_EQ(*(global + 3), 65.0);
1836 } 1836 }
1837 #endif // SIMD_LOWERING_TARGET 1837 #endif // SIMD_LOWERING_TARGET
OLDNEW
« no previous file with comments | « test/cctest/test-disasm-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698