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

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

Issue 2838943002: [wasm] Implement 128-bit endian swap for simd type (Closed)
Patch Set: Created 3 years, 7 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
« src/compiler/wasm-compiler.cc ('K') | « src/compiler/wasm-compiler.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 "test/cctest/cctest.h" 6 #include "test/cctest/cctest.h"
7 #include "test/cctest/compiler/value-helper.h" 7 #include "test/cctest/compiler/value-helper.h"
8 #include "test/cctest/wasm/wasm-run-utils.h" 8 #include "test/cctest/wasm/wasm-run-utils.h"
9 #include "test/common/wasm/wasm-macro-gen.h" 9 #include "test/common/wasm/wasm-macro-gen.h"
10 10
(...skipping 2191 matching lines...) Expand 10 before | Expand all | Expand 10 after
2202 int32_t* memory = r.module().AddMemoryElems<int32_t>(4); 2202 int32_t* memory = r.module().AddMemoryElems<int32_t>(4);
2203 2203
2204 BUILD(r, 2204 BUILD(r,
2205 WASM_STORE_MEM(MachineType::Simd128(), WASM_ZERO, 2205 WASM_STORE_MEM(MachineType::Simd128(), WASM_ZERO,
2206 WASM_LOAD_MEM(MachineType::Simd128(), WASM_ZERO)), 2206 WASM_LOAD_MEM(MachineType::Simd128(), WASM_ZERO)),
2207 WASM_SIMD_I32x4_EXTRACT_LANE( 2207 WASM_SIMD_I32x4_EXTRACT_LANE(
2208 0, WASM_LOAD_MEM(MachineType::Simd128(), WASM_ZERO))); 2208 0, WASM_LOAD_MEM(MachineType::Simd128(), WASM_ZERO)));
2209 2209
2210 FOR_INT32_INPUTS(i) { 2210 FOR_INT32_INPUTS(i) {
2211 int32_t expected = *i; 2211 int32_t expected = *i;
2212 #if defined(V8_TARGET_LITTLE_ENDIAN)
2212 r.module().WriteMemory(&memory[0], expected); 2213 r.module().WriteMemory(&memory[0], expected);
2214 #else
2215 r.module().WriteMemory(&memory[3], expected);
Clemens Hammacher 2017/04/26 18:40:05 This does not look like the right fix. Storing the
bbudge 2017/04/26 20:14:12 You're right Clemens. SIMD shouldn't be any differ
2216 #endif
2213 CHECK_EQ(expected, r.Call()); 2217 CHECK_EQ(expected, r.Call());
2214 } 2218 }
2215 } 2219 }
2216 #endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET 2220 #endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
OLDNEW
« src/compiler/wasm-compiler.cc ('K') | « src/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698