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

Commit f0bc20f

Browse files
authored
Merge pull request #187 from alexcrichton/merge
Merge with upstream
2 parents ae2e65c + fcf02be commit f0bc20f

616 files changed

Lines changed: 21912 additions & 22490 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.

.github/actions/install-rust/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ runs:
2828
elif [ "${{ inputs.toolchain }}" = "msrv" ]; then
2929
echo "version=1.$msrv.0" >> "$GITHUB_OUTPUT"
3030
elif [ "${{ inputs.toolchain }}" = "wasmtime-ci-pinned-nightly" ]; then
31-
echo "version=nightly-2025-05-16" >> "$GITHUB_OUTPUT"
31+
echo "version=nightly-2025-06-02" >> "$GITHUB_OUTPUT"
3232
else
3333
echo "version=${{ inputs.toolchain }}" >> "$GITHUB_OUTPUT"
3434
fi

Cargo.lock

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

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ memfd = "0.6.2"
345345
psm = "0.1.11"
346346
proptest = "1.0.0"
347347
rand = { version = "0.8.3", features = ["small_rng"] }
348-
sptr = "0.3.2"
349348
# serde and serde_derive must have the same version
350349
serde = { version = "1.0.215", default-features = false, features = ['alloc'] }
351350
serde_derive = "1.0.188"

cranelift/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ For an example of how to use Cranelift to run WebAssembly code, see
2727

2828
[Wasmtime]: https://github.com/bytecodealliance/wasmtime
2929

30+
For various examples of how to use Cranelift to accomplish common compiler
31+
tasks, see the [Cranelift Examples] repository maintained by @simvux.
32+
33+
[Cranelift Examples]: https://github.com/simvux/cranelift-examples
34+
3035
Status
3136
------
3237

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ mod encoding;
88
mod features;
99
pub mod format;
1010

11+
pub use encoding::{Encoding, ModRmKind, OpcodeMod};
1112
pub use encoding::{
12-
Encoding, Group1Prefix, Group2Prefix, Group3Prefix, Group4Prefix, Opcodes, Prefixes, Rex, Vex,
13-
VexLength, VexMMMMM, VexPP, rex, vex,
13+
Group1Prefix, Group2Prefix, Group3Prefix, Group4Prefix, Opcodes, Prefixes, Rex, rex,
1414
};
15+
pub use encoding::{Vex, VexEscape, VexLength, VexPrefix, vex};
1516
pub use features::{ALL_FEATURES, Feature, Features};
1617
pub use format::{Extension, Format, Location, Mutability, Operand, OperandKind, RegClass};
1718
pub use format::{align, fmt, implicit, r, rw, sxl, sxq, sxw, w};
@@ -31,6 +32,7 @@ pub fn inst(
3132
encoding,
3233
features: features.into(),
3334
has_trap: false,
35+
custom_visit: false,
3436
}
3537
}
3638

@@ -60,6 +62,9 @@ pub struct Inst {
6062
/// Whether or not this instruction can trap and thus needs a `TrapCode`
6163
/// payload in the instruction itself.
6264
pub has_trap: bool,
65+
/// Whether or not this instruction has a custom visit function for register
66+
/// allocation.
67+
pub custom_visit: bool,
6368
}
6469

6570
impl Inst {
@@ -88,6 +93,13 @@ impl Inst {
8893
self.has_trap = true;
8994
self
9095
}
96+
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;
101+
self
102+
}
91103
}
92104

93105
impl core::fmt::Display for Inst {
@@ -98,6 +110,7 @@ impl core::fmt::Display for Inst {
98110
encoding,
99111
features,
100112
has_trap,
113+
custom_visit,
101114
} = self;
102115
write!(f, "{name}: {format} => {encoding}")?;
103116
if !features.is_empty() {
@@ -106,6 +119,9 @@ impl core::fmt::Display for Inst {
106119
if *has_trap {
107120
write!(f, " has_trap")?;
108121
}
122+
if *custom_visit {
123+
write!(f, " custom_visit")?;
124+
}
109125
Ok(())
110126
}
111127
}

0 commit comments

Comments
 (0)