]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/internal/obj: refactor ppc64 address relocation code generation
authorPaul E. Murphy <murp@ibm.com>
Tue, 9 Mar 2021 22:55:13 +0000 (16:55 -0600)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Tue, 27 Apr 2021 11:50:41 +0000 (11:50 +0000)
commit1eca6aa7472604eb7597cbb3b132c6e28b89ee55
treefaa5e6be8671af221671ba564d60d9f5c9915c4f
parente0815d041c55dad8ae5642466b08fc2f520a59d4
cmd/internal/obj: refactor ppc64 address relocation code generation

The code for generating a long constant versus generating an address
(either via a relocation, or known offset) should be handled in the
same place.

Resolve this by classifying memory arguments as C_LACON (a long
address constant) instead of C_LCON (a long constant).

Likewise, reorder AMOVD/AMOVW optab entries to keep similar
classifications near each other. An extra optab entry for
DWORD is also added to continue handling C_LACON arguments
correctly.

Change-Id: I5ce28400492a071f615125a9b8d260826f1600d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/312296
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Carlos Eduardo Seo <carlos.seo@linaro.org>
Trust: Carlos Eduardo Seo <carlos.seo@linaro.org>
src/cmd/asm/internal/asm/testdata/ppc64.s
src/cmd/internal/obj/ppc64/asm9.go