icedland / iced

Blazing fast and correct x86/x64 disassembler, assembler, decoder, encoder for Rust, .NET, Java, Python, Lua
MIT License
2.91k stars 232 forks source link

API to get register / mnemonic name #560

Open riptl opened 5 months ago

riptl commented 5 months ago

It'd be nice to have a fn name() -> &'static str API to convert Register::RAX into "rax".

The Debug trait works too, but is less efficient (calling format!() requires a memory alloc)