Overview of iced x86 instruction processing
mastericed is a high-performance x86 (16/32/64-bit) instruction decoder, disassembler, and assembler. It supports all Intel and AMD instructions and is designed for correctness through extensive testing against tools like xed, gas, objdump, masm, dumpbin, nasm, and ndisasm, as well as fuzzing.
Key features include:
- High Performance: Decodes >250 MB/s and decode+format >130 MB/s in Rust.
- Memory Efficient: Decoded instructions are only 40 bytes, and the decoder performs no memory allocations.
- Flexible Formatting: Supports masm, nasm, gas (AT&T), and Intel (XED) formats with extensive customization.
- Rich Metadata: Provides APIs to retrieve instruction information such as read/written registers, memory access, rflags bits, CPUID feature flags, and control flow info.
- Assembler Capabilities: Allows creating instructions via code (e.g.,
asm.mov(eax, edx)) and re-encoding decoded instructions at specific addresses.