Crates.io | cranelift-assembler-x64 |
lib.rs | cranelift-assembler-x64 |
version | 0.124.1 |
created_at | 2025-02-20 02:50:32.425423+00 |
updated_at | 2025-09-23 18:39:48.206043+00 |
description | A Cranelift-specific x64 assembler |
homepage | |
repository | |
max_upload_size | |
id | 1562129 |
size | 112,396 |
cranelift-assembler-x64
A Cranelift-specific x64 assembler. Unlike the existing cranelift-codegen
assembler, this assembler uses instructions, not instruction classes, as the
core abstraction.
Like cranelift-codegen
, using this assembler starts with enum Inst
. For
convenience, a main.rs
script prints the path to this generated code:
$ cat $(cargo run) | head
...
pub enum Inst<R:Registers> {
andb_i(andb_i),
andw_i(andw_i),
andl_i(andl_i),
...
In order to check that this assembler emits correct machine code, we fuzz it against a known-good disassembler. We can run a quick, one-second check:
$ cargo test -- --nocapture
Or we can run the fuzzer indefinitely:
$ cargo +nightly fuzz run -s none roundtrip -j16