binbun-aarch64 0.1.0

AArch64 instruction decoder generated from Arm's machine-readable specification.
Documentation
  • Coverage
  • 100%
    4818 out of 4818 items documented2 out of 64 items with examples
  • Size
  • Source code size: 5.9 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 21.3 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • dmaivel/binbun
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dmaivel

binbun-aarch64

An AArch64 (A64) instruction decoder, generated from Arm's machine-readable specification: operands, implicit registers, control flow, and text as LLVM writes it. It is the AArch64 disassembler of binbun, usable on its own.

use binbun_aarch64::Decoder;

// stp x29, x30, [sp, #-0x10]! and ret, little-endian as in memory.
let code = [0xfd, 0x7b, 0xbf, 0xa9, 0xc0, 0x03, 0x5f, 0xd6];
for (address, decoded) in Decoder::new(&code, 0x1000) {
    match decoded {
        Ok(insn) => println!("{address:#x}  {}", insn.display(address)),
        Err(error) => println!("{address:#x}  ({error})"),
    }
}

For x86 and AArch64 through one API, see binbun-disasm. More examples are in the repository.

Licensed under either of Apache License, Version 2.0 or MIT license at your option, except the code generated from Arm's A-profile Machine Readable Specification, which is under Arm's BSD 3-Clause licence (NOTICE-AARCHMRS.html).