diff --git a/disasm/disasm.go b/disasm/disasm.go index 464461c..5c3da4c 100644 --- a/disasm/disasm.go +++ b/disasm/disasm.go @@ -70,7 +70,7 @@ func Decode(a arch.Arch, code []byte, addr uint64) (Instruction, error) { if err != nil { return Instruction{Addr: addr, Text: "???", Len: 1}, nil } - return Instruction{Addr: addr, Text: x86asm.IntelSyntax(inst, addr, nil), Len: inst.Len}, nil + return Instruction{Addr: addr, Text: x86asm.GoSyntax(inst, addr, nil), Len: inst.Len}, nil } } diff --git a/disasm/disasm_test.go b/disasm/disasm_test.go index 85bc5e4..5dfa0ec 100644 --- a/disasm/disasm_test.go +++ b/disasm/disasm_test.go @@ -20,8 +20,8 @@ func TestDecodeKnownBytes(t *testing.T) { text string want int }{ - {arch.AMD64, []byte{0x55}, "push rbp", 1}, - {arch.AMD64, []byte{0x48, 0x89, 0xE5}, "mov rbp, rsp", 3}, + {arch.AMD64, []byte{0x55}, "PUSHQ BP", 1}, + {arch.AMD64, []byte{0x48, 0x89, 0xE5}, "MOVQ SP, BP", 3}, {arch.ARM64, []byte{0xc0, 0x03, 0x5f, 0xd6}, "RET", 4}, {arch.RISCV, []byte{0x67, 0x80, 0x00, 0x00}, "RET", 4}, {arch.LOONG64, []byte{0x20, 0x00, 0x00, 0x4c}, "RET", 4},