2020-11-13 12:51:53 +01:00
|
|
|
// 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.
|
|
|
|
|
2025-04-29 08:03:15 +02:00
|
|
|
// Flags: --liftoff --no-wasm-tier-up --print-code --wasm-staging
|
2020-11-13 12:51:53 +01:00
|
|
|
|
2021-08-29 14:20:49 +02:00
|
|
|
d8.file.execute("test/mjsunit/wasm/wasm-module-builder.js");
|
2020-11-13 12:51:53 +01:00
|
|
|
|
|
|
|
(function testPrintCode() {
|
|
|
|
let builder = new WasmModuleBuilder();
|
2023-10-05 08:46:07 +02:00
|
|
|
builder.addMemory(1, undefined);
|
2020-11-13 12:51:53 +01:00
|
|
|
builder
|
|
|
|
.addFunction('main', makeSig([kWasmI32, kWasmI32, kWasmF64], [kWasmI32]))
|
|
|
|
.addBody([
|
|
|
|
kExprLocalGet, 0, kExprLocalGet, 1, kExprI64UConvertI32, kExprLocalGet,
|
2024-03-30 09:54:35 +01:00
|
|
|
2, kExprI64SConvertF64, kAtomicPrefix, kExprI64AtomicWait, 3, 0
|
2020-11-13 12:51:53 +01:00
|
|
|
]);
|
|
|
|
builder.instantiate();
|
|
|
|
})();
|