Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/objdump: new GOAMD64=v3 instructions don't disassemble properly #48584

Open
randall77 opened this issue Sep 23, 2021 · 2 comments · May be fixed by golang/arch#10
Open

cmd/objdump: new GOAMD64=v3 instructions don't disassemble properly #48584

randall77 opened this issue Sep 23, 2021 · 2 comments · May be fixed by golang/arch#10
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@randall77
Copy link
Contributor

Build this program with GOAMD64=v3:

package main

//go:noinline
func f(x, y uint64) uint64 {
	return x &^ y
}
func main() {
	f(0, 0)
}

Disassembling with the native objdump -d, we get

 1053b20:       c4 e2 e0 f2 c0  andnq   %rax, %rbx, %rax

With go tool objdump we get

  :0                    0x1053b20               c4e2e0f2c0c3cc          ROLL $0xcc, BL          

@martisch

Side note, the popcount instruction disassembles as POPCNT, it should really disassemble as POPCNTQ or POPCNTL, as appropriate.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/351889 mentions this issue: x86asm: include size suffix on popcnt instruction

gopherbot pushed a commit to golang/arch that referenced this issue Sep 23, 2021
Update golang/go#48584

Change-Id: I2c770aaf88e15f8987dc8f1d974127b02b220777
Reviewed-on: https://go-review.googlesource.com/c/arch/+/351889
Trust: Keith Randall <[email protected]>
Run-TryBot: Keith Randall <[email protected]>
TryBot-Result: Go Bot <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
@dr2chase dr2chase added the NeedsFix The path to resolution is known, but the work has not been done. label Sep 24, 2021
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 13, 2022
@mknyszek mknyszek moved this to Triage Backlog in Go Compiler / Runtime Jul 15, 2022
@seankhliao seankhliao added this to the Backlog milestone Aug 20, 2022
Wonderex95 pushed a commit to Wonderex95/arch that referenced this issue Feb 2, 2024
Update golang/go#48584

Change-Id: I2c770aaf88e15f8987dc8f1d974127b02b220777
Reviewed-on: https://go-review.googlesource.com/c/arch/+/351889
Trust: Keith Randall <[email protected]>
Run-TryBot: Keith Randall <[email protected]>
TryBot-Result: Go Bot <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
@mhr3 mhr3 linked a pull request Oct 5, 2024 that will close this issue
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/618036 mentions this issue: x86: allow decoding of AVX instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
Status: Triage Backlog
Development

Successfully merging a pull request may close this issue.

4 participants