f1530eddf9
Rename opcodes based on the renaming in the proposal, https://github.com/WebAssembly/simd/pull/322. Bug: v8:10946 Change-Id: If267d6f8fb1b9deeff64cd9abcd7e4cd64a540a5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2422357 Commit-Queue: Zhi An Ng <zhin@chromium.org> Reviewed-by: Bill Budge <bbudge@chromium.org> Cr-Commit-Position: refs/heads/master@{#70077}
24 lines
798 B
JavaScript
24 lines
798 B
JavaScript
// Copyright 2020 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: --experimental-wasm-simd
|
|
|
|
load('test/mjsunit/wasm/wasm-module-builder.js');
|
|
|
|
const builder = new WasmModuleBuilder();
|
|
builder.addMemory(16, 32, false);
|
|
builder.addType(makeSig([], [kWasmI32]));
|
|
// Generate function 1 (out of 1).
|
|
builder.addFunction(undefined, 0 /* sig */)
|
|
.addBodyWithEnd([
|
|
// signature: i_v
|
|
// body:
|
|
kExprI32Const, 0x00, // i32.const
|
|
kSimdPrefix, kExprS128Load8x8U, 0x03, 0xff, 0xff, 0x3f, // i16x8.load8x8_u
|
|
kSimdPrefix, kExprI16x8ExtractLaneS, 0,
|
|
kExprEnd, // end @371
|
|
]).exportAs('main');
|
|
const instance = builder.instantiate();
|
|
assertTraps(kTrapMemOutOfBounds, () => instance.exports.main());
|