OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Flags: --expose-wasm --wasm-num-compilation-tasks=0 |
| 6 |
| 7 load('test/mjsunit/wasm/wasm-constants.js'); |
| 8 load('test/mjsunit/wasm/wasm-module-builder.js'); |
| 9 |
| 10 // TODO(gdeepti): Currently wasm simd ops are tested using runtime calls to |
| 11 // JS runtime functions, as this needs heap allocation sequential compile is |
| 12 // triggered here. This is only used for bootstrapping and needs to be removed |
| 13 // when we have architectuaral/scalar implementations for wasm simd ops. |
| 14 |
| 15 (function SimdSplatExtractTest() { |
| 16 var module = new WasmModuleBuilder(); |
| 17 module.addFunction("splatextract", kSig_i_ii) |
| 18 .addBody([kExprGetLocal, 0, kExprSimdPrefix, kExprI32x4Splat, |
| 19 kExprI32Const, 1, kExprSimdPrefix, kExprI32x4ExtractLane]) |
| 20 .exportAs("main"); |
| 21 var instance = module.instantiate(); |
| 22 assertEquals(123, instance.exports.main(123, 2)); |
| 23 })(); |
OLD | NEW |