ppc750cl/README.md

50 lines
1.9 KiB
Markdown
Raw Normal View History

# ppc750cl [![Build Status]][actions] [![Latest Version]][crates.io] [![Api Rustdoc]][rustdoc] ![Rust Version]
[Build Status]: https://github.com/encounter/ppc750cl/actions/workflows/test.yml/badge.svg
[actions]: https://github.com/encounter/ppc750cl/actions
[Latest Version]: https://img.shields.io/crates/v/ppc750cl.svg
[crates.io]: https://crates.io/crates/ppc750cl
[Api Rustdoc]: https://img.shields.io/badge/api-rustdoc-blue.svg
[rustdoc]: https://docs.rs/ppc750cl
[Rust Version]: https://img.shields.io/badge/rust-1.74+-blue.svg?maxAge=3600
2021-08-08 00:59:07 +00:00
2024-09-27 05:21:28 +00:00
Rust tools for working with the PowerPC 750CL / 750CXe family of processors.
2021-08-08 00:59:07 +00:00
### Building
2022-04-06 23:48:21 +00:00
```shell
cargo run --package ppc750cl-genisa
cargo build --release
```
2021-08-16 22:53:29 +00:00
2022-04-06 23:48:21 +00:00
### 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.
2024-09-27 05:21:28 +00:00
- 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.
2022-04-06 23:48:21 +00:00
### isa.yaml
2024-09-27 05:21:28 +00:00
The file [isa.yaml](./isa.yaml) contains a full definition of the PowerPC 750CL / 750CXe instruction set.
2022-04-06 23:48:21 +00:00
It powers the disassembler and assembler.
2022-04-06 23:48:21 +00:00
Similarly to LLVM TableGen, the program `ppc750cl-genisa` generates a Rust file implementing an instruction decoder.
2022-04-07 04:20:53 +00:00
### 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.
2022-04-07 04:20:53 +00:00
### Performance
With a single thread on Ryzen 9 3900X:
2024-09-27 05:21:28 +00:00
- Disassembling & printing: ~12M insn/s (~50 MB/s)
- Disassembling only: ~275M insn/s (~1 GB/s)