4 releases

0.3.2 Sep 27, 2024
0.3.1 Sep 10, 2024
0.3.0 Sep 10, 2024
0.1.0 Aug 14, 2021

#169 in Hardware support

Download history 417/week @ 2024-10-01 376/week @ 2024-10-08 87/week @ 2024-10-15 31/week @ 2024-10-22 23/week @ 2024-10-29 31/week @ 2024-11-05 1/week @ 2024-11-12 8/week @ 2024-11-19 41/week @ 2024-11-26 45/week @ 2024-12-03 27/week @ 2024-12-10 1/week @ 2024-12-24 58/week @ 2024-12-31 16/week @ 2025-01-07 30/week @ 2025-01-14

105 downloads per month
Used in 3 crates

MIT/Apache

330KB
11K SLoC

ppc750cl Build Status Latest Version Api Rustdoc Rust Version

Rust tools for working with the PowerPC 750CL / 750CXe family of processors.

Building

cargo run --package ppc750cl-genisa
cargo build --release

Instruction Set

For those unfamiliar with PowerPC, here are some basics.

  • PowerPC 7xx is a family of RISC CPUs produced from 1997 to 2012.
    • They operate with 32-bit words and every instruction is 32-bits wide.
  • This project focuses (only) on compatibility with the PowerPC 750CL and 750CXe.
    • PowerPC 750CL ("Broadway") is used in the Nintendo Wii.
    • PowerPC 750CXe ("Gekko") is used in the Nintendo GameCube.
    • They add a "paired-singles" SIMD unit and a bunch of other instructions.

isa.yaml

The file isa.yaml contains a full definition of the PowerPC 750CL / 750CXe instruction set.

It powers the disassembler and assembler.

Similarly to LLVM TableGen, the program ppc750cl-genisa generates a Rust file implementing an instruction decoder.

Safety & Correctness

  • The disassembler has been fuzzed over all ~4.29 billion possible instructions (via ppc750cl-fuzz).
  • It is safe to run the disassembler over untrusted byte arrays.
  • However, no guarantees on correctness are made (yet). Expect bugs.

Performance

With a single thread on Ryzen 9 3900X:

  • Disassembling & printing: ~12M insn/s (~50 MB/s)
  • Disassembling only: ~275M insn/s (~1 GB/s)

No runtime deps