]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.15] cmd/internal/obj/ppc64: don't remove NOP in assembler
authorLynn Boger <laboger@linux.vnet.ibm.com>
Tue, 11 Aug 2020 16:04:25 +0000 (12:04 -0400)
committerDmitri Shuralyov <dmitshur@golang.org>
Thu, 3 Sep 2020 02:16:47 +0000 (02:16 +0000)
commita5fb3b1f3d0de39805462abce5a722c9c3ce8647
tree6933f0e6a9290c57f72085d1d84fddfc5ab75b72
parent33e86004f1c80fd5114696faec7c08e5c1cbb915
[release-branch.go1.15] cmd/internal/obj/ppc64: don't remove NOP in assembler

Previously, the assembler removed NOPs from the Prog list in
obj9.go. NOPs shouldn't be removed if they were added as
an inline mark, as described in the issue below.

Fixes #40767

Once the NOPs were left in the Prog list, some instructions
were flagged as invalid because they had an operand which was
not represented in optab. In order to preserve the previous
assembler behavior, entries were added to optab for those
operand cases. They were not flagged as errors before because
the NOP instructions were removed before the code to check the
valid opcode/operand combinations.

Change-Id: Iae5145f94459027cf458e914d7c5d6089807ccf8
Reviewed-on: https://go-review.googlesource.com/c/go/+/247842
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Paul Murphy <murp@ibm.com>
Reviewed-by: Michael Munday <mike.munday@ibm.com>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit 7d7bd5abc7f7ac901830b79496f63ce86895e262)
Reviewed-on: https://go-review.googlesource.com/c/go/+/248381
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
src/cmd/internal/obj/ppc64/asm9.go
src/cmd/internal/obj/ppc64/obj9.go