]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/ppc64: modify PCALIGN to ensure alignment
authorLynn Boger <laboger@linux.vnet.ibm.com>
Mon, 17 Apr 2023 15:02:48 +0000 (10:02 -0500)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Fri, 21 Apr 2023 16:47:45 +0000 (16:47 +0000)
commite23322e2ccd19b5802a823d20a089540afef79ce
treedf27fc09f5ee19f00d2b1319ddfcc22b1d22d846
parentde788efeac46f18bd3372666cfc2c698de69d8b6
cmd/internal/obj/ppc64: modify PCALIGN to ensure alignment

The initial purpose of PCALIGN was to identify code
where it would be beneficial to align code for performance,
but avoid cases where too many NOPs were added. On p10, it
is now necessary to enforce a certain alignment in some
cases, so the behavior of PCALIGN needs to be slightly
different.  Code will now be aligned to the value specified
on the PCALIGN instruction regardless of number of NOPs added,
which is more intuitive and consistent with power assembler
alignment directives.

This also adds 64 as a possible alignment value.

The existing values used in PCALIGN were modified according to
the new behavior.

A testcase was updated and performance testing was done to
verify that this does not adversely affect performance.

Change-Id: Iad1cf5ff112e5bfc0514f0805be90e24095e932b
Reviewed-on: https://go-review.googlesource.com/c/go/+/485056
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Archana Ravindar <aravind5@in.ibm.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Paul Murphy <murp@ibm.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/internal/obj/ppc64/asm9.go
src/cmd/internal/obj/ppc64/asm_test.go
src/cmd/internal/obj/ppc64/doc.go
src/crypto/aes/asm_ppc64x.s
src/internal/bytealg/compare_ppc64x.s
src/internal/bytealg/equal_ppc64x.s
src/internal/bytealg/index_ppc64x.s
src/math/big/arith_ppc64x.s
src/runtime/memclr_ppc64x.s
src/runtime/memmove_ppc64x.s