b342cbb20b
This reverts commit b8f9166664
.
Reason for revert: Fails gc-stress (https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/28341).
Original change's description:
> [flags] warn about contradictory flags
>
> Design Doc: https://docs.google.com/document/d/1lkvu8crkK7Ei39qjkPCFijpNyxWXsOktG9GB-7K34jM/
>
> Bug: v8:10577
> Change-Id: Ib9cfdffa401c48c895bf31caed5ee03545beddab
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154792
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Tamer Tas <tmrts@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68168}
TBR=machenbach@chromium.org,neis@chromium.org,clemensb@chromium.org,tebbi@chromium.org,tmrts@chromium.org
Change-Id: Ia1e3373fbb4c369594ceb98eb560e3ccf2cb8780
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10577
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230523
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68169}
61 lines
2.3 KiB
JavaScript
61 lines
2.3 KiB
JavaScript
// Copyright 2017 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: --no-stress-opt --trace-wasm-memory --no-liftoff --no-future
|
|
// Flags: --experimental-wasm-simd
|
|
|
|
load("test/mjsunit/wasm/wasm-module-builder.js");
|
|
|
|
var builder = new WasmModuleBuilder();
|
|
builder.addMemory(1);
|
|
builder.addFunction('load', kSig_v_i)
|
|
.addBody([kExprLocalGet, 0, kExprI32LoadMem, 0, 0, kExprDrop])
|
|
.exportFunc();
|
|
builder.addFunction('load8', kSig_v_i)
|
|
.addBody([kExprLocalGet, 0, kExprI32LoadMem8U, 0, 0, kExprDrop])
|
|
.exportFunc();
|
|
builder.addFunction('loadf', kSig_v_i)
|
|
.addBody([kExprLocalGet, 0, kExprF32LoadMem, 0, 0, kExprDrop])
|
|
.exportFunc();
|
|
builder.addFunction('store', kSig_v_ii)
|
|
.addBody([kExprLocalGet, 0, kExprLocalGet, 1, kExprI32StoreMem, 0, 0])
|
|
.exportFunc();
|
|
builder.addFunction('store8', kSig_v_ii)
|
|
.addBody([kExprLocalGet, 0, kExprLocalGet, 1, kExprI32StoreMem8, 0, 0])
|
|
.exportFunc();
|
|
builder.addFunction('load128', kSig_v_i)
|
|
.addBody([kExprLocalGet, 0, kSimdPrefix, kExprS128LoadMem, 0, 0, kExprDrop])
|
|
.exportFunc();
|
|
// SIMD is not exposed to JS, so use splat to construct a s128 value.
|
|
builder.addFunction('store128', kSig_v_ii)
|
|
.addBody([kExprLocalGet, 0, kExprLocalGet, 1, kSimdPrefix, kExprI32x4Splat, kSimdPrefix, kExprS128StoreMem, 0, 0])
|
|
.exportFunc();
|
|
// We add functions after, rather than sorting in some order, so as to keep
|
|
// the .out changes small (due to function index).
|
|
builder.addFunction('load16', kSig_v_i)
|
|
.addBody([kExprLocalGet, 0, kExprI32LoadMem16U, 0, 0, kExprDrop])
|
|
.exportFunc();
|
|
builder.addFunction('load64', kSig_v_i)
|
|
.addBody([kExprLocalGet, 0, kExprI64LoadMem, 0, 0, kExprDrop])
|
|
.exportFunc();
|
|
builder.addFunction('loadf64', kSig_v_i)
|
|
.addBody([kExprLocalGet, 0, kExprF64LoadMem, 0, 0, kExprDrop])
|
|
.exportFunc();
|
|
var module = builder.instantiate();
|
|
|
|
module.exports.load(4);
|
|
module.exports.load8(1);
|
|
module.exports.store(4, 0x12345678);
|
|
module.exports.load(2);
|
|
module.exports.load8(6);
|
|
module.exports.loadf(2);
|
|
module.exports.store8(4, 0xab);
|
|
module.exports.load(2);
|
|
module.exports.loadf(2);
|
|
module.exports.store128(4, 0xbeef);
|
|
module.exports.load128(2);
|
|
module.exports.load16(4);
|
|
module.exports.load64(2);
|
|
module.exports.loadf64(2);
|