Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 48b15ca

Browse files
authored
Merge pull request #195 from alexcrichton/merge
Another merge with main
2 parents a759b5c + 4f1b72f commit 48b15ca

108 files changed

Lines changed: 2966 additions & 1304 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 79 additions & 75 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ exclude = [
174174
]
175175

176176
[workspace.package]
177-
version = "34.0.0"
177+
version = "35.0.0"
178178
authors = ["The Wasmtime Project Developers"]
179179
edition = "2024"
180180
# Wasmtime's current policy is that this number can be no larger than the
@@ -218,66 +218,67 @@ from_over_into = 'warn'
218218

219219
[workspace.dependencies]
220220
arbitrary = { version = "1.4.0" }
221-
wasmtime-wmemcheck = { path = "crates/wmemcheck", version = "=34.0.0" }
222-
wasmtime = { path = "crates/wasmtime", version = "34.0.0", default-features = false }
223-
wasmtime-c-api-macros = { path = "crates/c-api-macros", version = "=34.0.0" }
224-
wasmtime-cache = { path = "crates/cache", version = "=34.0.0" }
225-
wasmtime-cli-flags = { path = "crates/cli-flags", version = "=34.0.0" }
226-
wasmtime-cranelift = { path = "crates/cranelift", version = "=34.0.0" }
227-
wasmtime-winch = { path = "crates/winch", version = "=34.0.0" }
228-
wasmtime-environ = { path = "crates/environ", version = "=34.0.0" }
229-
wasmtime-explorer = { path = "crates/explorer", version = "=34.0.0" }
230-
wasmtime-fiber = { path = "crates/fiber", version = "=34.0.0" }
231-
wasmtime-jit-debug = { path = "crates/jit-debug", version = "=34.0.0" }
232-
wasmtime-wast = { path = "crates/wast", version = "=34.0.0" }
233-
wasmtime-wasi = { path = "crates/wasi", version = "34.0.0", default-features = false }
234-
wasmtime-wasi-io = { path = "crates/wasi-io", version = "34.0.0", default-features = false }
235-
wasmtime-wasi-http = { path = "crates/wasi-http", version = "34.0.0", default-features = false }
236-
wasmtime-wasi-nn = { path = "crates/wasi-nn", version = "34.0.0" }
237-
wasmtime-wasi-config = { path = "crates/wasi-config", version = "34.0.0" }
238-
wasmtime-wasi-keyvalue = { path = "crates/wasi-keyvalue", version = "34.0.0" }
239-
wasmtime-wasi-threads = { path = "crates/wasi-threads", version = "34.0.0" }
240-
wasmtime-component-util = { path = "crates/component-util", version = "=34.0.0" }
241-
wasmtime-component-macro = { path = "crates/component-macro", version = "=34.0.0" }
242-
wasmtime-asm-macros = { path = "crates/asm-macros", version = "=34.0.0" }
243-
wasmtime-versioned-export-macros = { path = "crates/versioned-export-macros", version = "=34.0.0" }
244-
wasmtime-slab = { path = "crates/slab", version = "=34.0.0" }
245-
wasmtime-wasi-tls = { path = "crates/wasi-tls", version = "34.0.0" }
246-
wiggle = { path = "crates/wiggle", version = "=34.0.0", default-features = false }
247-
wiggle-macro = { path = "crates/wiggle/macro", version = "=34.0.0" }
248-
wiggle-generate = { path = "crates/wiggle/generate", version = "=34.0.0" }
249-
wasi-common = { path = "crates/wasi-common", version = "=34.0.0", default-features = false }
221+
wasmtime-wmemcheck = { path = "crates/wmemcheck", version = "=35.0.0" }
222+
wasmtime = { path = "crates/wasmtime", version = "35.0.0", default-features = false }
223+
wasmtime-c-api-macros = { path = "crates/c-api-macros", version = "=35.0.0" }
224+
wasmtime-cache = { path = "crates/cache", version = "=35.0.0" }
225+
wasmtime-cli-flags = { path = "crates/cli-flags", version = "=35.0.0" }
226+
wasmtime-cranelift = { path = "crates/cranelift", version = "=35.0.0" }
227+
wasmtime-winch = { path = "crates/winch", version = "=35.0.0" }
228+
wasmtime-environ = { path = "crates/environ", version = "=35.0.0" }
229+
wasmtime-explorer = { path = "crates/explorer", version = "=35.0.0" }
230+
wasmtime-fiber = { path = "crates/fiber", version = "=35.0.0" }
231+
wasmtime-jit-debug = { path = "crates/jit-debug", version = "=35.0.0" }
232+
wasmtime-wast = { path = "crates/wast", version = "=35.0.0" }
233+
wasmtime-wasi = { path = "crates/wasi", version = "35.0.0", default-features = false }
234+
wasmtime-wasi-io = { path = "crates/wasi-io", version = "35.0.0", default-features = false }
235+
wasmtime-wasi-http = { path = "crates/wasi-http", version = "35.0.0", default-features = false }
236+
wasmtime-wasi-nn = { path = "crates/wasi-nn", version = "35.0.0" }
237+
wasmtime-wasi-config = { path = "crates/wasi-config", version = "35.0.0" }
238+
wasmtime-wasi-keyvalue = { path = "crates/wasi-keyvalue", version = "35.0.0" }
239+
wasmtime-wasi-threads = { path = "crates/wasi-threads", version = "35.0.0" }
240+
wasmtime-component-util = { path = "crates/component-util", version = "=35.0.0" }
241+
wasmtime-component-macro = { path = "crates/component-macro", version = "=35.0.0" }
242+
wasmtime-asm-macros = { path = "crates/asm-macros", version = "=35.0.0" }
243+
wasmtime-versioned-export-macros = { path = "crates/versioned-export-macros", version = "=35.0.0" }
244+
wasmtime-slab = { path = "crates/slab", version = "=35.0.0" }
245+
wasmtime-wasi-tls = { path = "crates/wasi-tls", version = "35.0.0" }
246+
wiggle = { path = "crates/wiggle", version = "=35.0.0", default-features = false }
247+
wiggle-macro = { path = "crates/wiggle/macro", version = "=35.0.0" }
248+
wiggle-generate = { path = "crates/wiggle/generate", version = "=35.0.0" }
249+
wasi-common = { path = "crates/wasi-common", version = "=35.0.0", default-features = false }
250250
wasmtime-fuzzing = { path = "crates/fuzzing" }
251-
wasmtime-jit-icache-coherence = { path = "crates/jit-icache-coherence", version = "=34.0.0" }
252-
wasmtime-wit-bindgen = { path = "crates/wit-bindgen", version = "=34.0.0" }
253-
wasmtime-math = { path = "crates/math", version = "=34.0.0" }
251+
wasmtime-jit-icache-coherence = { path = "crates/jit-icache-coherence", version = "=35.0.0" }
252+
wasmtime-wit-bindgen = { path = "crates/wit-bindgen", version = "=35.0.0" }
253+
wasmtime-math = { path = "crates/math", version = "=35.0.0" }
254+
wasmtime-unwinder = { path = "crates/unwinder", version = "=35.0.0" }
254255
test-programs-artifacts = { path = 'crates/test-programs/artifacts' }
255256
wasmtime-test-util = { path = "crates/test-util" }
256257
component-async-tests = { path = "crates/misc/component-async-tests" }
257258

258-
pulley-interpreter = { path = 'pulley', version = "=34.0.0" }
259+
pulley-interpreter = { path = 'pulley', version = "=35.0.0" }
259260
pulley-interpreter-fuzz = { path = 'pulley/fuzz' }
260-
pulley-macros = { path = 'pulley/macros', version = "=34.0.0" }
261-
262-
cranelift-assembler-x64 = { path = "cranelift/assembler-x64", version = "0.121.0" }
263-
cranelift-codegen = { path = "cranelift/codegen", version = "0.121.0", default-features = false, features = ["std", "unwind"] }
264-
cranelift-frontend = { path = "cranelift/frontend", version = "0.121.0" }
265-
cranelift-entity = { path = "cranelift/entity", version = "0.121.0" }
266-
cranelift-native = { path = "cranelift/native", version = "0.121.0" }
267-
cranelift-module = { path = "cranelift/module", version = "0.121.0" }
268-
cranelift-interpreter = { path = "cranelift/interpreter", version = "0.121.0" }
269-
cranelift-reader = { path = "cranelift/reader", version = "0.121.0" }
261+
pulley-macros = { path = 'pulley/macros', version = "=35.0.0" }
262+
263+
cranelift-assembler-x64 = { path = "cranelift/assembler-x64", version = "0.122.0" }
264+
cranelift-codegen = { path = "cranelift/codegen", version = "0.122.0", default-features = false, features = ["std", "unwind"] }
265+
cranelift-frontend = { path = "cranelift/frontend", version = "0.122.0" }
266+
cranelift-entity = { path = "cranelift/entity", version = "0.122.0" }
267+
cranelift-native = { path = "cranelift/native", version = "0.122.0" }
268+
cranelift-module = { path = "cranelift/module", version = "0.122.0" }
269+
cranelift-interpreter = { path = "cranelift/interpreter", version = "0.122.0" }
270+
cranelift-reader = { path = "cranelift/reader", version = "0.122.0" }
270271
cranelift-filetests = { path = "cranelift/filetests" }
271-
cranelift-object = { path = "cranelift/object", version = "0.121.0" }
272-
cranelift-jit = { path = "cranelift/jit", version = "0.121.0" }
272+
cranelift-object = { path = "cranelift/object", version = "0.122.0" }
273+
cranelift-jit = { path = "cranelift/jit", version = "0.122.0" }
273274
cranelift-fuzzgen = { path = "cranelift/fuzzgen" }
274-
cranelift-bforest = { path = "cranelift/bforest", version = "0.121.0" }
275-
cranelift-bitset = { path = "cranelift/bitset", version = "0.121.0" }
276-
cranelift-control = { path = "cranelift/control", version = "0.121.0" }
277-
cranelift-srcgen = { path = "cranelift/srcgen", version = "0.121.0" }
278-
cranelift = { path = "cranelift/umbrella", version = "0.121.0" }
275+
cranelift-bforest = { path = "cranelift/bforest", version = "0.122.0" }
276+
cranelift-bitset = { path = "cranelift/bitset", version = "0.122.0" }
277+
cranelift-control = { path = "cranelift/control", version = "0.122.0" }
278+
cranelift-srcgen = { path = "cranelift/srcgen", version = "0.122.0" }
279+
cranelift = { path = "cranelift/umbrella", version = "0.122.0" }
279280

280-
winch-codegen = { path = "winch/codegen", version = "=34.0.0" }
281+
winch-codegen = { path = "winch/codegen", version = "=35.0.0" }
281282

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

RELEASES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 34.0.0
1+
## 35.0.0
22

33
Unreleased.
44

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

1414
<!-- ARCHIVE_START -->
15+
* [34.0.x](https://github.com/bytecodealliance/wasmtime/blob/release-34.0.0/RELEASES.md)
1516
* [33.0.x](https://github.com/bytecodealliance/wasmtime/blob/release-33.0.0/RELEASES.md)
1617
* [32.0.x](https://github.com/bytecodealliance/wasmtime/blob/release-32.0.0/RELEASES.md)
1718
* [31.0.x](https://github.com/bytecodealliance/wasmtime/blob/release-31.0.0/RELEASES.md)

cranelift/assembler-x64/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "cranelift-assembler-x64"
33
description = "A Cranelift-specific x64 assembler"
4-
version = "0.121.0"
4+
version = "0.122.0"
55
license = "Apache-2.0 WITH LLVM-exception"
66
edition.workspace = true
77
rust-version.workspace = true
@@ -16,7 +16,7 @@ arbtest = "0.3.1"
1616
capstone = { workspace = true }
1717

1818
[build-dependencies]
19-
cranelift-assembler-x64-meta = { path = "meta", version = "0.121.0" }
19+
cranelift-assembler-x64-meta = { path = "meta", version = "0.122.0" }
2020

2121
[lints]
2222
workspace = true

cranelift/assembler-x64/meta/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "cranelift-assembler-x64-meta"
33
description = "Generate a Cranelift-specific assembler for x64 instructions"
4-
version = "0.121.0"
4+
version = "0.122.0"
55
license = "Apache-2.0 WITH LLVM-exception"
66
edition.workspace = true
77
rust-version.workspace = true

cranelift/assembler-x64/meta/src/dsl.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
//! - compact--i.e., define an x64 instruction on a single line, and
55
//! - a close-to-direct mapping of what we read in the x64 reference manual.
66
7+
mod custom;
78
mod encoding;
89
mod features;
910
pub mod format;
1011

12+
pub use custom::{Custom, CustomOperation};
1113
pub use encoding::{Encoding, ModRmKind, OpcodeMod};
1214
pub use encoding::{
1315
Group1Prefix, Group2Prefix, Group3Prefix, Group4Prefix, Opcodes, Prefixes, Rex, rex,
@@ -32,7 +34,7 @@ pub fn inst(
3234
encoding,
3335
features: features.into(),
3436
has_trap: false,
35-
custom_visit: false,
37+
custom: Custom::default(),
3638
}
3739
}
3840

@@ -62,9 +64,9 @@ pub struct Inst {
6264
/// Whether or not this instruction can trap and thus needs a `TrapCode`
6365
/// payload in the instruction itself.
6466
pub has_trap: bool,
65-
/// Whether or not this instruction has a custom visit function for register
66-
/// allocation.
67-
pub custom_visit: bool,
67+
/// Whether or not this instruction uses custom, external functions
68+
/// instead of Rust code generated by this crate.
69+
pub custom: Custom,
6870
}
6971

7072
impl Inst {
@@ -94,10 +96,9 @@ impl Inst {
9496
self
9597
}
9698

97-
/// Flags this instruction as having a custom visit function, skipping the
98-
/// auto-generated one.
99-
pub fn custom_visit(mut self) -> Self {
100-
self.custom_visit = true;
99+
/// Indicate this instruction as needing custom processing.
100+
pub fn custom(mut self, custom: impl Into<Custom>) -> Self {
101+
self.custom = custom.into();
101102
self
102103
}
103104
}
@@ -110,7 +111,7 @@ impl core::fmt::Display for Inst {
110111
encoding,
111112
features,
112113
has_trap,
113-
custom_visit,
114+
custom,
114115
} = self;
115116
write!(f, "{name}: {format} => {encoding}")?;
116117
if !features.is_empty() {
@@ -119,8 +120,8 @@ impl core::fmt::Display for Inst {
119120
if *has_trap {
120121
write!(f, " has_trap")?;
121122
}
122-
if *custom_visit {
123-
write!(f, " custom_visit")?;
123+
if !custom.is_empty() {
124+
write!(f, " custom({custom})")?;
124125
}
125126
Ok(())
126127
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
use core::fmt;
2+
use std::ops::BitOr;
3+
4+
#[derive(PartialEq, Debug)]
5+
pub enum CustomOperation {
6+
Visit,
7+
Display,
8+
Encode,
9+
}
10+
11+
impl fmt::Display for CustomOperation {
12+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13+
fmt::Debug::fmt(self, f)
14+
}
15+
}
16+
17+
impl BitOr for CustomOperation {
18+
type Output = Custom;
19+
fn bitor(self, rhs: Self) -> Self::Output {
20+
assert_ne!(self, rhs, "duplicate custom operation: {self:?}");
21+
Custom(vec![self, rhs])
22+
}
23+
}
24+
25+
impl BitOr<CustomOperation> for Custom {
26+
type Output = Custom;
27+
fn bitor(mut self, rhs: CustomOperation) -> Self::Output {
28+
assert!(
29+
!self.0.contains(&rhs),
30+
"duplicate custom operation: {rhs:?}"
31+
);
32+
self.0.push(rhs);
33+
self
34+
}
35+
}
36+
37+
#[derive(PartialEq, Default)]
38+
pub struct Custom(Vec<CustomOperation>);
39+
40+
impl Custom {
41+
#[must_use]
42+
pub fn is_empty(&self) -> bool {
43+
self.0.is_empty()
44+
}
45+
46+
pub fn iter(&self) -> impl Iterator<Item = &CustomOperation> {
47+
self.0.iter()
48+
}
49+
50+
pub fn contains(&self, operation: CustomOperation) -> bool {
51+
self.0.contains(&operation)
52+
}
53+
}
54+
55+
impl fmt::Display for Custom {
56+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
57+
write!(
58+
f,
59+
"{}",
60+
self.0
61+
.iter()
62+
.map(ToString::to_string)
63+
.collect::<Vec<_>>()
64+
.join(" | ")
65+
)
66+
}
67+
}
68+
69+
impl From<CustomOperation> for Custom {
70+
fn from(operation: CustomOperation) -> Self {
71+
Custom(vec![operation])
72+
}
73+
}

cranelift/assembler-x64/meta/src/dsl/features.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ pub enum Feature {
6666
sse2,
6767
ssse3,
6868
sse41,
69+
sse42,
6970
bmi1,
7071
bmi2,
7172
lzcnt,
@@ -87,6 +88,7 @@ pub const ALL_FEATURES: &[Feature] = &[
8788
Feature::sse2,
8889
Feature::ssse3,
8990
Feature::sse41,
91+
Feature::sse42,
9092
Feature::bmi1,
9193
Feature::bmi2,
9294
Feature::lzcnt,

0 commit comments

Comments
 (0)