Skip to content

Commit

Permalink
[30.0.0] asm: avoid propagating arbitrary (#10295)
Browse files Browse the repository at this point in the history
* asm: avoid propagating `arbitrary` (#10217)

This is something that @alexcrichton already fixed over in the assembler
crate--no need to implement `Arbitrary` unnecessarily. It's unclear how
this stayed in here in `cranelift-codegen` but this change removes it.

* Update release notes

---------

Co-authored-by: Andrew Brown <[email protected]>
  • Loading branch information
alexcrichton and abrown authored Feb 25, 2025
1 parent 3f9bf16 commit 0891f25
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Released 2025-02-25.
fix an issue caused by #9929.
[#10290](https://github.com/bytecodealliance/wasmtime/pull/10290)

### Changed

* The `cranelift-codegen` crate now no longer depends on `arbitrary`, a
now-unnecessary dependency.
[#10217](https://github.com/bytecodealliance/wasmtime/pull/10217)

--------------------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion cranelift/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ workspace = true
features = ["all-arch"]

[dependencies]
arbitrary = { version = "1.3.2", features = ["derive"] }
anyhow = { workspace = true, optional = true, features = ['std'] }
bumpalo = "3"
capstone = { workspace = true, optional = true }
Expand Down
13 changes: 0 additions & 13 deletions cranelift/codegen/src/isa/x64/inst/external.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use super::{
SyntheticAmode, VCodeConstant, WritableGpr,
};
use crate::ir::TrapCode;
use arbitrary::Arbitrary;
use cranelift_assembler_x64 as asm;

/// Define the types of registers Cranelift will use.
Expand Down Expand Up @@ -42,12 +41,6 @@ impl asm::AsReg for PairedGpr {
}
}

impl<'a> Arbitrary<'a> for PairedGpr {
fn arbitrary(_: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result<Self> {
unimplemented!("assembler fuzzing is not implemented at this level")
}
}

/// This bridges the gap between codegen and assembler register types.
impl asm::AsReg for Gpr {
fn enc(&self) -> u8 {
Expand All @@ -59,12 +52,6 @@ impl asm::AsReg for Gpr {
}
}

impl<'a> Arbitrary<'a> for Gpr {
fn arbitrary(_: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result<Self> {
unimplemented!("assembler fuzzing is not implemented at this level")
}
}

/// A helper method for extracting the hardware encoding of a register.
#[inline]
fn enc(gpr: &Gpr) -> u8 {
Expand Down

0 comments on commit 0891f25

Please sign in to comment.