|author||Keith Randall <email@example.com>||Thu Jun 22 15:18:25 2023 -0700|
|committer||Keith Randall <firstname.lastname@example.org>||Mon Jul 03 19:24:36 2023 +0000|
x86asm: disassemble CMP instruction's arguments in the opposite order That way it matches what the compiler's -S flag generates, and what we write in assembly. CMP AX, $16 JLE foo should get to foo if AX <= 16. Without this CL, the disassembly looks like CMP $16, AX JLE foo which reads like we should get to foo if 16 <= AX, which is not what these two instructions actually do. It was originally this way because the CMP instruction parallels the SUB instruction, except it throws away the non-flags result. We write that subtraction as SUB $16, AX // AX <- AX-16 but we don't need to match the SUB's disassembly order, as CMP is not writing to a register output. Update golang/go#60920 (This fixes the underlying issue, but the actual "fixes" comment needs to go on the CL that vendors x/arch containing this CL into the main branch.) Change-Id: Ifa8d3878453d6e33ae144bfdb01b34171c2106a1 Reviewed-on: https://go-review.googlesource.com/c/arch/+/505375 Reviewed-by: Cherry Mui <email@example.com> Run-TryBot: Keith Randall <firstname.lastname@example.org> TryBot-Result: Gopher Robot <email@example.com> Reviewed-by: Keith Randall <firstname.lastname@example.org>
This repository holds machine architecture information used by the Go toolchain. The parts needed in the main Go repository are copied in.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the arch repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/arch:” in the subject line, so it is easy to find.