-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/tools/go/analysis: asmdecl false positives on AVX2 instructions #47625
Comments
Could we get a reproducer code? What would also help is to have the opening comment follow the default issue formatter. |
I narrowed down and root caused the issue because presumably using a giant wall of assembly isn't all that fun, but ok. What version of Go are you using (
|
Maybe related: #39220. |
FWIW, I would be fine with adding this as a special case to asmdecl, either to recognize the AVX2 instructions, or to recognize the Yn registers. We have long-term plans (#17544) to replace asmdecl, which is just a bunch of ad hoc regeps, with integration directly into the assembler so it can use the real parser, but that isn't high on the priority list right now. |
For the specific VPBROADCASTD case that I am hitting, I believe this needs the former? asmdecl is complaining that I am passing it a GP register that contains the address of a uint32 (
|
go vet raises
invalid VPBROADCASTD of mask+24(FP); uint32 is 4-byte value
forVPBROADCASTD mask+24(FP), Y0
.Skimming the asmdecl source, this is because argument size is determined by the final character of the opcode (plus some special cases), but when AVX2 instructions were added, the decision was made to use the actual (ie: Intel's) name of each instruction. I suspect there are other opcodes that also trigger false positives in this way.
The text was updated successfully, but these errors were encountered: