Skip to content

go.mod: update disassembler#4379

Draft
aarzilli wants to merge 1 commit into
go-delve:masterfrom
aarzilli:newdisass
Draft

go.mod: update disassembler#4379
aarzilli wants to merge 1 commit into
go-delve:masterfrom
aarzilli:newdisass

Conversation

@aarzilli

Copy link
Copy Markdown
Member

Supports disassembling more AVX, AVX2 and AVX-512 instructions.

@aarzilli aarzilli marked this pull request as draft June 26, 2026 09:21
Supports disassembling more AVX, AVX2 and AVX-512 instructions.
Comment thread pkg/proc/x86_disasm.go

asmInst.Size = inst.Len
asmInst.Bytes = mem[:asmInst.Size]
patchPCRelX86(asmInst.Loc.PC, &inst)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is somewhat scary because this line has been there since 2016. I remove it (and add the handling of x86asm.Rel arguments to resolveCallArgX86) because changing the arguments of CALL instructions to immediates violates assumptions in the formatting code of golang.org/x/arch/x86/x86asm, see the comment in golang.org/x/arch/x86/x86asm/plan9x.go function plan9Arg, case Imm.

It should be fine since the other architectures, in particular arm64, does not patch out relative addresses, so this makes the two codepaths more similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant