v8/test/mjsunit/regress/wasm/regress-1220855.js
Clemens Backes 47051ae0aa Move wasm regression test to wasm directory
This will automatically skip the test in the stress_snapshot variant,
where Wasm is not supported.

R=cbruni@chromium.org

Bug: v8:11937
Change-Id: I29078e070a7b1526470e15d8667c5256ea4d8fe1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2996642
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75473}
2021-06-30 14:12:55 +00:00

20 lines
701 B
JavaScript

// Copyright 2021 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: --wasm-staging --liftoff --no-wasm-tier-up
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
const builder = new WasmModuleBuilder();
builder.addMemory(1, 1, false, true);
builder.addFunction('test', makeSig([kWasmI32], [kWasmI64]))
.addBody([
...wasmI32Const(1 << 30), // pages to grow
kExprMemoryGrow, 0, // returns -1
kExprI64UConvertI32 // asserts that the i32 is zero extended
])
.exportFunc();
const instance = builder.instantiate();
instance.exports.test();