aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/ppc64
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2017-06-02 15:51:18 -0700
committerIan Lance Taylor <iant@golang.org>2017-06-05 19:59:33 +0000
commit555d1e36f97cdb3fa8fc3a354370d27dfe885545 (patch)
tree3f732a91236d69ac5be7de0411c0d378cca047d9 /src/cmd/internal/obj/ppc64
parent51711d1429cb592c9ddc772e6362e74ac8545dc8 (diff)
downloadgo-555d1e36f97cdb3fa8fc3a354370d27dfe885545.tar.xz
cmd/internal/obj/ppc64: fix MOVFL REG, CONST
The MOVFL instruction (which external PPC64 docs call mtcrf) can take either a CR register or a constant. It doesn't make sense to specify both, as the CR register implies the constant value. Specifying either a register or a constant is enforced by the implementation in the asmout method (case 69). However, the optab was providing a form that specified both a constant and a CR register, and was not providing a form that specified only a constant. This CL fixes the optab table to provide a form that takes only a constant. No test because I don't know where to write it. The next CL in this series will use the new instruction format. Change-Id: I8bb5d3ed60f483b54c341ce613931e126f7d7be6 Reviewed-on: https://go-review.googlesource.com/44732 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Diffstat (limited to 'src/cmd/internal/obj/ppc64')
-rw-r--r--src/cmd/internal/obj/ppc64/asm9.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/ppc64/asm9.go b/src/cmd/internal/obj/ppc64/asm9.go
index 53cdb5f92b..bdbac03f9c 100644
--- a/src/cmd/internal/obj/ppc64/asm9.go
+++ b/src/cmd/internal/obj/ppc64/asm9.go
@@ -520,7 +520,7 @@ var optab = []Optab{
{AMOVFL, C_CREG, C_NONE, C_NONE, C_CREG, 67, 4, 0},
{AMOVW, C_CREG, C_NONE, C_NONE, C_REG, 68, 4, 0},
{AMOVWZ, C_CREG, C_NONE, C_NONE, C_REG, 68, 4, 0},
- {AMOVFL, C_REG, C_NONE, C_LCON, C_CREG, 69, 4, 0},
+ {AMOVFL, C_REG, C_NONE, C_NONE, C_LCON, 69, 4, 0},
{AMOVFL, C_REG, C_NONE, C_NONE, C_CREG, 69, 4, 0},
{AMOVW, C_REG, C_NONE, C_NONE, C_CREG, 69, 4, 0},
{AMOVWZ, C_REG, C_NONE, C_NONE, C_CREG, 69, 4, 0},