Chromium Code Reviews| Index: test/mjsunit/wasm/test-wasm-simd-ops.js |
| diff --git a/test/mjsunit/wasm/test-wasm-simd-ops.js b/test/mjsunit/wasm/test-wasm-simd-ops.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..26a1019138c1577ca521ce19f5f8ff8f9841b043 |
| --- /dev/null |
| +++ b/test/mjsunit/wasm/test-wasm-simd-ops.js |
| @@ -0,0 +1,23 @@ |
| +// Copyright 2016 the V8 project authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Flags: --expose-wasm --enable-wasm-simd --wasm-num-compilation-tasks=0 |
| + |
| +load('test/mjsunit/wasm/wasm-constants.js'); |
| +load('test/mjsunit/wasm/wasm-module-builder.js'); |
| + |
| +// TODO(gdeepti): Currently wasm simd ops are tested using runtime calls to |
| +// JS runtime functions, as this needs heap allocation sequential compile is |
| +// triggered here. This is only used for bootstrapping and needs to be removed |
| +// when we have architectuaral/scalar implementations for wasm simd ops. |
| + |
| +(function SimdSplatExtractTest() { |
|
titzer
2016/07/13 19:45:10
Can we get some test/cctest/wasm/test-run-simd.cc
gdeepti
2016/07/15 08:26:40
Added test-run-wasm-simd.cc with a splat/extract t
|
| + var module = new WasmModuleBuilder(); |
| + module.addFunction("splatextract", kSig_i_ii) |
| + .addBody([kExprGetLocal, 0, kExprSimdPrefix, kExprI32x4Splat, |
| + kExprI32Const, 1, kExprSimdPrefix, kExprI32x4ExtractLane]) |
| + .exportAs("main"); |
| + var instance = module.instantiate(); |
| + assertEquals(123, instance.exports.main(123, 2)); |
| +})(); |