4 releases (2 breaking)
| 0.3.0 | Jun 4, 2025 |
|---|---|
| 0.2.0 | Feb 18, 2025 |
| 0.1.1 | Sep 6, 2022 |
| 0.1.0 | Jan 12, 2022 |
#34 in Emulators
170KB
4K
SLoC
strop
strop, the stochastic optimizer, written in Rust.
Like a compiler, strop generates assembly that computes a given function. But unlike a compiler, it generates assembly-language subroutines by a random search or a brute-force search.
Ancillary documents:
- LICENSE It's just the MIT license.
- Theory of operation High-level documentation explaining how strop works.
What it's for
To see what strop could be used for:
- opt optimizes an existing machine code function
- gen generates a Z80 function matching the Rust function, after a fashion compiling Rust to Z80.
- peephole discovers lacunae in the peephole optimizers and other constraints
Supported instruction sets:
Strop currently has the following back-ends:
- armv4t, which targets the ARMv4T processors, such as the ARM7TDMI
- m6502, targets various models of the MOS 6502
- Supports the NMOS and CMOS variants and others, thanks to the mos6502 dependency.
- m6809, which targets the Motorola 6809
- z80, which targets the Zilog Z80
- mips, which targets the MIPS I architecture
- Supports the GTE coprocessor found in a Playstation 1, thanks to the trapezoid-core dependency.
Dependencies
~2.3–8MB
~179K SLoC