]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/ppc64: support alignment of prefixed insn
authorPaul E. Murphy <murp@ibm.com>
Tue, 9 Mar 2021 22:55:20 +0000 (16:55 -0600)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Tue, 12 Oct 2021 12:24:09 +0000 (12:24 +0000)
commit46796703d739ba77913b0a2addab093a02b6d79d
tree6801cfca8e1e6d53e8fcb179894a97323469af62
parent9c1dbdf60edbffeff10f58af21fa055eb0fdd29f
cmd/internal/obj/ppc64: support alignment of prefixed insn

Insert machine NOPs when a prefixed instruction crosses a 64B boundary.
ISA 3.1 prohibits prefixed instructions being placed across them. Such
instructions generate SIGILL if executed.

Likewise, adjust the function alignment to guarantee such instructions
can never cross one. And, don't pad the PC based on alignment. The
linker can fit these more optimally.

Likewise, include the function alignment when printing function debug
information. This is needed to verify function alignment happens.

Updates #44549

Change-Id: I434fb0ee4e984ca00dc4566f7569c3bcdf93f910
Reviewed-on: https://go-review.googlesource.com/c/go/+/347050
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
src/cmd/internal/obj/objfile.go
src/cmd/internal/obj/ppc64/a.out.go
src/cmd/internal/obj/ppc64/anames.go
src/cmd/internal/obj/ppc64/asm9.go
src/cmd/internal/obj/ppc64/asm_test.go