Go bindings for Intel XED (X86 Encoder Decoder) library.
go get github.com/ddkwork/xedpackage main
import (
"fmt"
"github.com/ddkwork/xed"
)
func main() {
xed := xed.NewXed()
defer xed.GlobalShutdown()
xed.GlobalInit()
// Decode instruction
var xdi xed.XedDecodedInst
xed.Decode(&xdi, []byte{0xC3}, 1, xed.XED_MACHINE_MODE_LEGACY_32)
fmt.Println(xed.Disassemble(&xdi))
}- Full XED API coverage
- Instruction decoding
- Instruction encoding
- Disassembly output
- Register and operand access
- Windows x64
- Go 1.21+
MIT License