A collection of source-generator-based reusable ISA decoders.
Each decoder is a Roslyn incremental generator. You declare a partial type with a decoder attribute, and the generator emits the instruction dispatch tables and the contracts you implement.
| Package | Purpose |
|---|---|
Ontos.Core |
Attributes and enums shared by all decoders. Pulled in automatically by any decoder package. |
Ontos.ARM32 |
ARM32 (ARM and Thumb) decoder generator. |
Decoder packages are analyzer-only and self-contained, so a project can reference several of them without conflicts.
- .NET 10 SDK or newer (the generators use Roslyn 5.9)
AllowUnsafeBlocksenabled in the consuming project, since the generated dispatch uses function pointers
dotnet add package Ontos.ARM32
using Ontos.Core.ARM32;
using Ontos.ARM32.Generated;
[ARMDecoder(ARMVersion.V6)]
public partial class ARMImplementation : IARMv6 /* generated contract */
{
// Implement the generated contract for the version
}ARMDecoder can be applied more than once, with a different ARMVersion each time, to generate a decoder per version. Each version may appear at most once per type.
See LICENSE.