]> Cypherpunks repositories - gostls13.git/commit
cmd/asm: print absolute PC for all patterns "off(PC)" in testEndToEnd
authorRuinan <ruinan.sun@arm.com>
Thu, 30 Nov 2023 07:54:06 +0000 (15:54 +0800)
committerCherry Mui <cherryyz@google.com>
Thu, 7 Dec 2023 18:42:59 +0000 (18:42 +0000)
commitb11d19e03b57d6cec1142002a22c3df732118847
tree2f3e97b6d78f0b8fba6cef7b2be32218a8fb782d
parentbb34112d4df7b5dfd12fc83b8d1305631a7b8708
cmd/asm: print absolute PC for all patterns "off(PC)" in testEndToEnd

Before this CL, testEndToEnd only turns the relative PC to absolute PC
when pattern "off(PC)" is the suffix of an instruction. But there are
some instructions like:

  ADR 10(PC), R10

it's also acceptable for the assembler while the pattern "off(PC)" is
not a suffix, which makes the test fail.

This CL fixes this issue by searching the pattern in the whole string
instead of only in the suffix.

Change-Id: I0cffedeb7b3c63abca7697671088cf993aff71ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/547235
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ruinan Sun <Ruinan.Sun@arm.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
src/cmd/asm/internal/asm/endtoend_test.go
src/cmd/asm/internal/asm/testdata/arm64.s