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

Unified Diff: test/mjsunit/wasm/test-wasm-simd-ops.js

Issue 1991143002: Convert SIMD wasm ops to runtime function calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review changes Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
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..6fc34b406a5adc05370750a66330bf5118034369
--- /dev/null
+++ b/test/mjsunit/wasm/test-wasm-simd-ops.js
@@ -0,0 +1,25 @@
+// 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 --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() {
+ print("simd test");
+ var module = new WasmModuleBuilder();
+ module.addFunction("splatextract", kSig_i_ii)
+ .addBody([kExprGetLocal, 0, kExprSimdPrefix, kExprI32x4Splat,
+ kExprGetLocal, 1, kExprSimdPrefix, kExprI32x4ExtractLane])
bbudge 2016/07/06 20:18:08 If this is a parameter, then we can't determine it
gdeepti 2016/07/07 04:05:34 Changed to kExprI32Const with the value 2. Added t
+ .exportAs("main");
+ var instance = module.instantiate();
+ assertEquals(123, instance.exports.main(123, 2));
+ print("success");
+})();

Powered by Google App Engine
This is Rietveld 408576698