Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 66 additions & 66 deletions Cargo.lock

Large diffs are not rendered by default.

104 changes: 52 additions & 52 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ exclude = [
]

[workspace.package]
version = "32.0.0"
version = "33.0.0"
authors = ["The Wasmtime Project Developers"]
edition = "2021"
# Wasmtime's current policy is that this number can be no larger than the
Expand Down Expand Up @@ -223,72 +223,72 @@ allow_attributes_without_reason = 'warn'

[workspace.dependencies]
arbitrary = { version = "1.4.0" }
wasmtime-wmemcheck = { path = "crates/wmemcheck", version = "=32.0.0" }
wasmtime = { path = "crates/wasmtime", version = "32.0.0", default-features = false }
wasmtime-c-api-macros = { path = "crates/c-api-macros", version = "=32.0.0" }
wasmtime-cache = { path = "crates/cache", version = "=32.0.0" }
wasmtime-cli-flags = { path = "crates/cli-flags", version = "=32.0.0" }
wasmtime-cranelift = { path = "crates/cranelift", version = "=32.0.0" }
wasmtime-winch = { path = "crates/winch", version = "=32.0.0" }
wasmtime-environ = { path = "crates/environ", version = "=32.0.0" }
wasmtime-explorer = { path = "crates/explorer", version = "=32.0.0" }
wasmtime-fiber = { path = "crates/fiber", version = "=32.0.0" }
wasmtime-jit-debug = { path = "crates/jit-debug", version = "=32.0.0" }
wasmtime-wast = { path = "crates/wast", version = "=32.0.0" }
wasmtime-wasi = { path = "crates/wasi", version = "32.0.0", default-features = false }
wasmtime-wasi-io = { path = "crates/wasi-io", version = "32.0.0", default-features = false }
wasmtime-wasi-http = { path = "crates/wasi-http", version = "32.0.0", default-features = false }
wasmtime-wasi-nn = { path = "crates/wasi-nn", version = "32.0.0" }
wasmtime-wasi-config = { path = "crates/wasi-config", version = "32.0.0" }
wasmtime-wasi-keyvalue = { path = "crates/wasi-keyvalue", version = "32.0.0" }
wasmtime-wasi-threads = { path = "crates/wasi-threads", version = "32.0.0" }
wasmtime-component-util = { path = "crates/component-util", version = "=32.0.0" }
wasmtime-component-macro = { path = "crates/component-macro", version = "=32.0.0" }
wasmtime-asm-macros = { path = "crates/asm-macros", version = "=32.0.0" }
wasmtime-versioned-export-macros = { path = "crates/versioned-export-macros", version = "=32.0.0" }
wasmtime-slab = { path = "crates/slab", version = "=32.0.0" }
wasmtime-wasi-tls = { path = "crates/wasi-tls", version = "32.0.0" }
component-async-tests = { path = "crates/misc/component-async-tests" }
wiggle = { path = "crates/wiggle", version = "=32.0.0", default-features = false }
wiggle-macro = { path = "crates/wiggle/macro", version = "=32.0.0" }
wiggle-generate = { path = "crates/wiggle/generate", version = "=32.0.0" }
wasi-common = { path = "crates/wasi-common", version = "=32.0.0", default-features = false }
wasmtime-wmemcheck = { path = "crates/wmemcheck", version = "=33.0.0" }
wasmtime = { path = "crates/wasmtime", version = "33.0.0", default-features = false }
wasmtime-c-api-macros = { path = "crates/c-api-macros", version = "=33.0.0" }
wasmtime-cache = { path = "crates/cache", version = "=33.0.0" }
wasmtime-cli-flags = { path = "crates/cli-flags", version = "=33.0.0" }
wasmtime-cranelift = { path = "crates/cranelift", version = "=33.0.0" }
wasmtime-winch = { path = "crates/winch", version = "=33.0.0" }
wasmtime-environ = { path = "crates/environ", version = "=33.0.0" }
wasmtime-explorer = { path = "crates/explorer", version = "=33.0.0" }
wasmtime-fiber = { path = "crates/fiber", version = "=33.0.0" }
wasmtime-jit-debug = { path = "crates/jit-debug", version = "=33.0.0" }
wasmtime-wast = { path = "crates/wast", version = "=33.0.0" }
wasmtime-wasi = { path = "crates/wasi", version = "33.0.0", default-features = false }
wasmtime-wasi-io = { path = "crates/wasi-io", version = "33.0.0", default-features = false }
wasmtime-wasi-http = { path = "crates/wasi-http", version = "33.0.0", default-features = false }
wasmtime-wasi-nn = { path = "crates/wasi-nn", version = "33.0.0" }
wasmtime-wasi-config = { path = "crates/wasi-config", version = "33.0.0" }
wasmtime-wasi-keyvalue = { path = "crates/wasi-keyvalue", version = "33.0.0" }
wasmtime-wasi-threads = { path = "crates/wasi-threads", version = "33.0.0" }
wasmtime-component-util = { path = "crates/component-util", version = "=33.0.0" }
wasmtime-component-macro = { path = "crates/component-macro", version = "=33.0.0" }
wasmtime-asm-macros = { path = "crates/asm-macros", version = "=33.0.0" }
wasmtime-versioned-export-macros = { path = "crates/versioned-export-macros", version = "=33.0.0" }
wasmtime-slab = { path = "crates/slab", version = "=33.0.0" }
wasmtime-wasi-tls = { path = "crates/wasi-tls", version = "33.0.0" }
wiggle = { path = "crates/wiggle", version = "=33.0.0", default-features = false }
wiggle-macro = { path = "crates/wiggle/macro", version = "=33.0.0" }
wiggle-generate = { path = "crates/wiggle/generate", version = "=33.0.0" }
wasi-common = { path = "crates/wasi-common", version = "=33.0.0", default-features = false }
wasmtime-fuzzing = { path = "crates/fuzzing" }
wasmtime-jit-icache-coherence = { path = "crates/jit-icache-coherence", version = "=32.0.0" }
wasmtime-wit-bindgen = { path = "crates/wit-bindgen", version = "=32.0.0" }
wasmtime-math = { path = "crates/math", version = "=32.0.0" }
wasmtime-jit-icache-coherence = { path = "crates/jit-icache-coherence", version = "=33.0.0" }
wasmtime-wit-bindgen = { path = "crates/wit-bindgen", version = "=33.0.0" }
wasmtime-math = { path = "crates/math", version = "=33.0.0" }
test-programs-artifacts = { path = 'crates/test-programs/artifacts' }
wasmtime-test-util = { path = "crates/test-util" }
component-async-tests = { path = "crates/misc/component-async-tests" }

pulley-interpreter = { path = 'pulley', version = "=32.0.0" }
pulley-interpreter = { path = 'pulley', version = "=33.0.0" }
pulley-interpreter-fuzz = { path = 'pulley/fuzz' }

cranelift-assembler-x64 = { path = "cranelift/assembler-x64", version = "0.119.0" }
cranelift-codegen = { path = "cranelift/codegen", version = "0.119.0", default-features = false, features = ["std", "unwind"] }
cranelift-frontend = { path = "cranelift/frontend", version = "0.119.0" }
cranelift-entity = { path = "cranelift/entity", version = "0.119.0" }
cranelift-native = { path = "cranelift/native", version = "0.119.0" }
cranelift-module = { path = "cranelift/module", version = "0.119.0" }
cranelift-interpreter = { path = "cranelift/interpreter", version = "0.119.0" }
cranelift-reader = { path = "cranelift/reader", version = "0.119.0" }
cranelift-assembler-x64 = { path = "cranelift/assembler-x64", version = "0.120.0" }
cranelift-codegen = { path = "cranelift/codegen", version = "0.120.0", default-features = false, features = ["std", "unwind"] }
cranelift-frontend = { path = "cranelift/frontend", version = "0.120.0" }
cranelift-entity = { path = "cranelift/entity", version = "0.120.0" }
cranelift-native = { path = "cranelift/native", version = "0.120.0" }
cranelift-module = { path = "cranelift/module", version = "0.120.0" }
cranelift-interpreter = { path = "cranelift/interpreter", version = "0.120.0" }
cranelift-reader = { path = "cranelift/reader", version = "0.120.0" }
cranelift-filetests = { path = "cranelift/filetests" }
cranelift-object = { path = "cranelift/object", version = "0.119.0" }
cranelift-jit = { path = "cranelift/jit", version = "0.119.0" }
cranelift-object = { path = "cranelift/object", version = "0.120.0" }
cranelift-jit = { path = "cranelift/jit", version = "0.120.0" }
cranelift-fuzzgen = { path = "cranelift/fuzzgen" }
cranelift-bforest = { path = "cranelift/bforest", version = "0.119.0" }
cranelift-bitset = { path = "cranelift/bitset", version = "0.119.0" }
cranelift-control = { path = "cranelift/control", version = "0.119.0" }
cranelift-srcgen = { path = "cranelift/srcgen", version = "0.119.0" }
cranelift = { path = "cranelift/umbrella", version = "0.119.0" }
cranelift-bforest = { path = "cranelift/bforest", version = "0.120.0" }
cranelift-bitset = { path = "cranelift/bitset", version = "0.120.0" }
cranelift-control = { path = "cranelift/control", version = "0.120.0" }
cranelift-srcgen = { path = "cranelift/srcgen", version = "0.120.0" }
cranelift = { path = "cranelift/umbrella", version = "0.120.0" }

winch-codegen = { path = "winch/codegen", version = "=32.0.0" }
winch-codegen = { path = "winch/codegen", version = "=33.0.0" }

wasi-preview1-component-adapter = { path = "crates/wasi-preview1-component-adapter" }
byte-array-literals = { path = "crates/wasi-preview1-component-adapter/byte-array-literals" }

# Bytecode Alliance maintained dependencies:
# ---------------------------
regalloc2 = "0.11.2"
regalloc2 = "0.11.3"

# cap-std family:
target-lexicon = "0.13.0"
Expand Down
3 changes: 2 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 32.0.0
## 33.0.0

Unreleased.

Expand All @@ -12,6 +12,7 @@ Release notes for previous releases of Wasmtime can be found on the respective
release branches of the Wasmtime repository.

<!-- ARCHIVE_START -->
* [32.0.x](https://github.com/bytecodealliance/wasmtime/blob/release-32.0.0/RELEASES.md)
* [31.0.x](https://github.com/bytecodealliance/wasmtime/blob/release-31.0.0/RELEASES.md)
* [30.0.x](https://github.com/bytecodealliance/wasmtime/blob/release-30.0.0/RELEASES.md)
* [29.0.x](https://github.com/bytecodealliance/wasmtime/blob/release-29.0.0/RELEASES.md)
Expand Down
4 changes: 2 additions & 2 deletions cranelift/assembler-x64/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cranelift-assembler-x64"
description = "A Cranelift-specific x64 assembler"
version = "0.119.0"
version = "0.120.0"
license = "Apache-2.0 WITH LLVM-exception"
edition.workspace = true
rust-version.workspace = true
Expand All @@ -16,7 +16,7 @@ arbtest = "0.3.1"
capstone = { workspace = true }

[build-dependencies]
cranelift-assembler-x64-meta = { path = "meta", version = "0.119.0" }
cranelift-assembler-x64-meta = { path = "meta", version = "0.120.0" }

[lints]
workspace = true
Expand Down
2 changes: 1 addition & 1 deletion cranelift/assembler-x64/meta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cranelift-assembler-x64-meta"
description = "Generate a Cranelift-specific assembler for x64 instructions"
version = "0.119.0"
version = "0.120.0"
license = "Apache-2.0 WITH LLVM-exception"
edition.workspace = true
rust-version.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion cranelift/bforest/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["The Cranelift Project Developers"]
name = "cranelift-bforest"
version = "0.119.0"
version = "0.120.0"
description = "A forest of B+-trees"
license = "Apache-2.0 WITH LLVM-exception"
documentation = "https://docs.rs/cranelift-bforest"
Expand Down
2 changes: 1 addition & 1 deletion cranelift/bitset/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["The Cranelift Project Developers"]
name = "cranelift-bitset"
version = "0.119.0"
version = "0.120.0"
description = "Various bitset stuff for use inside Cranelift"
license = "Apache-2.0 WITH LLVM-exception"
documentation = "https://docs.rs/cranelift-bitset"
Expand Down
8 changes: 4 additions & 4 deletions cranelift/codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["The Cranelift Project Developers"]
name = "cranelift-codegen"
version = "0.119.0"
version = "0.120.0"
description = "Low-level code generator library"
license = "Apache-2.0 WITH LLVM-exception"
documentation = "https://docs.rs/cranelift-codegen"
Expand All @@ -25,7 +25,7 @@ anyhow = { workspace = true, optional = true, features = ['std'] }
bumpalo = "3"
capstone = { workspace = true, optional = true }
cranelift-assembler-x64 = { workspace = true }
cranelift-codegen-shared = { path = "./shared", version = "0.119.0" }
cranelift-codegen-shared = { path = "./shared", version = "0.120.0" }
cranelift-entity = { workspace = true }
cranelift-bforest = { workspace = true }
cranelift-bitset = { workspace = true }
Expand Down Expand Up @@ -54,8 +54,8 @@ similar = "2.1.0"
env_logger = { workspace = true }

[build-dependencies]
cranelift-codegen-meta = { path = "meta", version = "0.119.0" }
cranelift-isle = { path = "../isle/isle", version = "=0.119.0" }
cranelift-codegen-meta = { path = "meta", version = "0.120.0" }
cranelift-isle = { path = "../isle/isle", version = "=0.120.0" }

[features]
default = ["std", "unwind", "host-arch", "timing"]
Expand Down
6 changes: 3 additions & 3 deletions cranelift/codegen/meta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cranelift-codegen-meta"
authors = ["The Cranelift Project Developers"]
version = "0.119.0"
version = "0.120.0"
description = "Metaprogram for cranelift-codegen code generator library"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
Expand All @@ -17,8 +17,8 @@ rustdoc-args = ["--document-private-items"]

[dependencies]
cranelift-srcgen = { workspace = true }
cranelift-assembler-x64-meta = { path = "../../assembler-x64/meta", version = "0.119.0" }
cranelift-codegen-shared = { path = "../shared", version = "0.119.0" }
cranelift-assembler-x64-meta = { path = "../../assembler-x64/meta", version = "0.120.0" }
cranelift-codegen-shared = { path = "../shared", version = "0.120.0" }
pulley-interpreter = { workspace = true, optional = true }

[features]
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/shared/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["The Cranelift Project Developers"]
name = "cranelift-codegen-shared"
version = "0.119.0"
version = "0.120.0"
description = "For code shared between cranelift-codegen-meta and cranelift-codegen"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
Expand Down
8 changes: 8 additions & 0 deletions cranelift/codegen/src/isa/aarch64/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,7 @@ impl ABIMachineSpec for AArch64MachineDeps {
is_leaf: bool,
incoming_args_size: u32,
tail_args_size: u32,
stackslots_size: u32,
fixed_frame_storage_size: u32,
outgoing_args_size: u32,
) -> FrameLayout {
Expand Down Expand Up @@ -1188,10 +1189,17 @@ impl ABIMachineSpec for AArch64MachineDeps {
setup_area_size,
clobber_size,
fixed_frame_storage_size,
stackslots_size,
outgoing_args_size,
clobbered_callee_saves: regs,
}
}

fn retval_temp_reg(_call_conv_of_callee: isa::CallConv) -> Writable<Reg> {
// Use x9 as a temp if needed: clobbered, not a
// retval.
regs::writable_xreg(9)
}
}

impl AArch64MachineDeps {
Expand Down
22 changes: 22 additions & 0 deletions cranelift/codegen/src/isa/aarch64/inst/emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2951,6 +2951,17 @@ impl MachInstEmit for Inst {
inst.emit(sink, emit_info, state);
}
}

// Load any stack-carried return values.
info.emit_retval_loads::<AArch64MachineDeps, _, _>(
state.frame_layout().stackslots_size,
|inst| inst.emit(sink, emit_info, state),
|needed_space| Some(Inst::EmitIsland { needed_space }),
);

// We produce an island above if needed, so disable
// the worst-case-size check in this case.
start_off = sink.cur_offset();
}
&Inst::CallInd { ref info } => {
let user_stack_map = state.take_stack_map();
Expand All @@ -2970,6 +2981,17 @@ impl MachInstEmit for Inst {
inst.emit(sink, emit_info, state);
}
}

// Load any stack-carried return values.
info.emit_retval_loads::<AArch64MachineDeps, _, _>(
state.frame_layout().stackslots_size,
|inst| inst.emit(sink, emit_info, state),
|needed_space| Some(Inst::EmitIsland { needed_space }),
);

// We produce an island above if needed, so disable
// the worst-case-size check in this case.
start_off = sink.cur_offset();
}
&Inst::ReturnCall { ref info } => {
emit_return_call_common_sequence(sink, emit_info, state, info);
Expand Down
14 changes: 10 additions & 4 deletions cranelift/codegen/src/isa/aarch64/inst/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,11 @@ fn aarch64_get_operands(inst: &mut Inst, collector: &mut impl OperandVisitor) {
for CallArgPair { vreg, preg } in uses {
collector.reg_fixed_use(vreg, *preg);
}
for CallRetPair { vreg, preg } in defs {
collector.reg_fixed_def(vreg, *preg);
for CallRetPair { vreg, location } in defs {
match location {
RetLocation::Reg(preg, ..) => collector.reg_fixed_def(vreg, *preg),
RetLocation::Stack(..) => collector.any_def(vreg),
}
}
collector.reg_clobbers(info.clobbers);
}
Expand All @@ -852,8 +855,11 @@ fn aarch64_get_operands(inst: &mut Inst, collector: &mut impl OperandVisitor) {
for CallArgPair { vreg, preg } in uses {
collector.reg_fixed_use(vreg, *preg);
}
for CallRetPair { vreg, preg } in defs {
collector.reg_fixed_def(vreg, *preg);
for CallRetPair { vreg, location } in defs {
match location {
RetLocation::Reg(preg, ..) => collector.reg_fixed_def(vreg, *preg),
RetLocation::Stack(..) => collector.any_def(vreg),
}
}
collector.reg_clobbers(info.clobbers);
}
Expand Down
12 changes: 10 additions & 2 deletions cranelift/codegen/src/isa/pulley_shared/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,14 +405,14 @@ where
}

fn gen_return(
_call_conv: isa::CallConv,
call_conv: isa::CallConv,
_isa_flags: &PulleyFlags,
frame_layout: &FrameLayout,
) -> SmallInstVec<Self::I> {
let mut insts = SmallVec::new();

// Handle final stack adjustments for the tail-call ABI.
if frame_layout.tail_args_size > 0 {
if call_conv == isa::CallConv::Tail && frame_layout.tail_args_size > 0 {
insts.extend(Self::gen_sp_reg_adjust(
frame_layout.tail_args_size.try_into().unwrap(),
));
Expand Down Expand Up @@ -544,6 +544,7 @@ where
is_leaf: bool,
incoming_args_size: u32,
tail_args_size: u32,
stackslots_size: u32,
fixed_frame_storage_size: u32,
outgoing_args_size: u32,
) -> FrameLayout {
Expand Down Expand Up @@ -578,6 +579,7 @@ where
setup_area_size: setup_area_size.into(),
clobber_size,
fixed_frame_storage_size,
stackslots_size,
outgoing_args_size,
clobbered_callee_saves: regs,
}
Expand All @@ -592,6 +594,12 @@ where
// Pulley doesn't need inline probestacks because it always checks stack
// decrements.
}

fn retval_temp_reg(_call_conv_of_callee: isa::CallConv) -> Writable<Reg> {
// Use x15 as a temp if needed: clobbered, not a
// retval.
Writable::from_reg(regs::x_reg(15))
}
}

/// Different styles of management of fp/lr and clobbered registers.
Expand Down
3 changes: 3 additions & 0 deletions cranelift/codegen/src/isa/pulley_shared/inst.isle
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
;; emit this instruction and auto-generated methods for other various
;; bits and pieces of boilerplate in the backend.
(Raw (raw RawInst))

;; Island generation prior to variable-length instructions.
(EmitIsland (space_needed u32))
)
)

Expand Down
Loading
Loading