]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj: remove bogus load/store optab entries from ppc64
authorPaul E. Murphy <murp@ibm.com>
Tue, 9 Mar 2021 22:55:04 +0000 (16:55 -0600)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 24 Mar 2021 14:20:32 +0000 (14:20 +0000)
No valid operation should match those removed by this patch. They
kind of look as if they match X-form load/stores on ppc64, but the
second argument is always ignored when translating to machine code.

Similarly, it should be noted an X-form memory access encodes into
an Addr which is a classified as a ZOREG argument with a non-zero
index, and a register type Addr.

Change-Id: I1adbb020d1b2612b18949d0e7eda05dbb3e8a25c
Reviewed-on: https://go-review.googlesource.com/c/go/+/303329
Reviewed-by: Carlos Eduardo Seo <carlos.seo@linaro.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Carlos Eduardo Seo <carlos.seo@linaro.org>

src/cmd/internal/obj/ppc64/asm9.go

index 1a97dda71560e8d3bea3af12a9f09e9b83441ae5..1745409b4d8361349cc8f20f67e674318e571b61 100644 (file)
@@ -194,40 +194,31 @@ var optab = []Optab{
        {as: AFMUL, a1: C_FREG, a6: C_FREG, type_: 32, size: 4},
        {as: AFMUL, a1: C_FREG, a2: C_FREG, a6: C_FREG, type_: 32, size: 4},
 
-       {as: AMOVBU, a1: C_REG, a2: C_REG, a6: C_ZOREG, type_: 7, size: 4},
        {as: AMOVBU, a1: C_REG, a6: C_SOREG, type_: 7, size: 4},
        {as: AMOVBU, a1: C_SOREG, a6: C_REG, type_: 9, size: 8},
        {as: AMOVBU, a1: C_ZOREG, a2: C_REG, a6: C_REG, type_: 9, size: 8},
 
-       {as: AMOVBZU, a1: C_REG, a2: C_REG, a6: C_ZOREG, type_: 7, size: 4},
        {as: AMOVBZU, a1: C_REG, a6: C_SOREG, type_: 7, size: 4},
        {as: AMOVBZU, a1: C_SOREG, a6: C_REG, type_: 8, size: 4},
-       {as: AMOVBZU, a1: C_ZOREG, a2: C_REG, a6: C_REG, type_: 8, size: 4},
 
-       {as: AMOVHBR, a1: C_REG, a2: C_REG, a6: C_ZOREG, type_: 44, size: 4},
        {as: AMOVHBR, a1: C_REG, a6: C_ZOREG, type_: 44, size: 4},
-       {as: AMOVHBR, a1: C_ZOREG, a2: C_REG, a6: C_REG, type_: 45, size: 4},
        {as: AMOVHBR, a1: C_ZOREG, a6: C_REG, type_: 45, size: 4},
 
        {as: AMOVB, a1: C_ADDR, a6: C_REG, type_: 76, size: 12},
        {as: AMOVB, a1: C_LOREG, a6: C_REG, type_: 37, size: 12},
-       {as: AMOVB, a1: C_REG, a2: C_REG, a6: C_ZOREG, type_: 7, size: 4},
        {as: AMOVB, a1: C_REG, a6: C_ADDR, type_: 74, size: 8},
        {as: AMOVB, a1: C_REG, a6: C_LOREG, type_: 35, size: 8},
        {as: AMOVB, a1: C_REG, a6: C_REG, type_: 12, size: 4},
        {as: AMOVB, a1: C_REG, a6: C_SOREG, type_: 7, size: 4},
        {as: AMOVB, a1: C_SOREG, a6: C_REG, type_: 9, size: 8},
-       {as: AMOVB, a1: C_ZOREG, a2: C_REG, a6: C_REG, type_: 9, size: 8},
 
        {as: AMOVBZ, a1: C_ADDR, a6: C_REG, type_: 75, size: 8},
        {as: AMOVBZ, a1: C_LOREG, a6: C_REG, type_: 36, size: 8},
-       {as: AMOVBZ, a1: C_REG, a2: C_REG, a6: C_ZOREG, type_: 7, size: 4},
        {as: AMOVBZ, a1: C_REG, a6: C_ADDR, type_: 74, size: 8},
        {as: AMOVBZ, a1: C_REG, a6: C_LOREG, type_: 35, size: 8},
        {as: AMOVBZ, a1: C_REG, a6: C_REG, type_: 13, size: 4},
        {as: AMOVBZ, a1: C_REG, a6: C_SOREG, type_: 7, size: 4},
        {as: AMOVBZ, a1: C_SOREG, a6: C_REG, type_: 8, size: 4},
-       {as: AMOVBZ, a1: C_ZOREG, a2: C_REG, a6: C_REG, type_: 8, size: 4},
 
        {as: AMOVD, a1: C_ADDCON, a6: C_REG, type_: 3, size: 4},
        {as: AMOVD, a1: C_ADDR, a6: C_REG, type_: 75, size: 8},
@@ -240,7 +231,6 @@ var optab = []Optab{
        {as: AMOVD, a1: C_LOREG, a6: C_REG, type_: 36, size: 8},
        {as: AMOVD, a1: C_LR, a6: C_REG, type_: 66, size: 4},
        {as: AMOVD, a1: C_MSR, a6: C_REG, type_: 54, size: 4}, /* mfmsr */
-       {as: AMOVD, a1: C_REG, a2: C_REG, a6: C_ZOREG, type_: 7, size: 4},
        {as: AMOVD, a1: C_REG, a6: C_ADDR, type_: 74, size: 8},
        {as: AMOVD, a1: C_REG, a6: C_CTR, type_: 66, size: 4},
        {as: AMOVD, a1: C_REG, a6: C_LOREG, type_: 35, size: 8},
@@ -259,7 +249,6 @@ var optab = []Optab{
        {as: AMOVD, a1: C_TOCADDR, a6: C_REG, type_: 95, size: 8},
        {as: AMOVD, a1: C_UCON, a6: C_REG, type_: 3, size: 4},
        {as: AMOVD, a1: C_XER, a6: C_REG, type_: 66, size: 4},
-       {as: AMOVD, a1: C_ZOREG, a2: C_REG, a6: C_REG, type_: 8, size: 4},
 
        {as: AMOVW, a1: C_ADDCON, a6: C_REG, type_: 3, size: 4},
        {as: AMOVW, a1: C_ADDR, a6: C_REG, type_: 75, size: 8},
@@ -269,7 +258,6 @@ var optab = []Optab{
        {as: AMOVW, a1: C_LCON, a6: C_REG, type_: 19, size: 8},
        {as: AMOVW, a1: C_LECON, a6: C_REG, type_: 26, size: 8},
        {as: AMOVW, a1: C_LOREG, a6: C_REG, type_: 36, size: 8},
-       {as: AMOVW, a1: C_REG, a2: C_REG, a6: C_ZOREG, type_: 7, size: 4},
        {as: AMOVW, a1: C_REG, a6: C_ADDR, type_: 74, size: 8},
        {as: AMOVW, a1: C_REG, a6: C_CREG, type_: 69, size: 4},
        {as: AMOVW, a1: C_REG, a6: C_CTR, type_: 66, size: 4},
@@ -284,7 +272,6 @@ var optab = []Optab{
        {as: AMOVW, a1: C_SPR, a6: C_REG, type_: 66, size: 4},
        {as: AMOVW, a1: C_UCON, a6: C_REG, type_: 3, size: 4},
        {as: AMOVW, a1: C_XER, a6: C_REG, type_: 66, size: 4},
-       {as: AMOVW, a1: C_ZOREG, a2: C_REG, a6: C_REG, type_: 8, size: 4},
 
        {as: AMOVWZ, a1: C_ADDCON, a6: C_REG, type_: 3, size: 4},
        {as: AMOVWZ, a1: C_ADDR, a6: C_REG, type_: 75, size: 8},
@@ -294,7 +281,6 @@ var optab = []Optab{
        {as: AMOVWZ, a1: C_LCON, a6: C_REG, type_: 19, size: 8},
        {as: AMOVWZ, a1: C_LECON, a6: C_REG, type_: 26, size: 8},
        {as: AMOVWZ, a1: C_LOREG, a6: C_REG, type_: 36, size: 8},
-       {as: AMOVWZ, a1: C_REG, a2: C_REG, a6: C_ZOREG, type_: 7, size: 4},
        {as: AMOVWZ, a1: C_REG, a6: C_ADDR, type_: 74, size: 8},
        {as: AMOVWZ, a1: C_REG, a6: C_CREG, type_: 69, size: 4},
        {as: AMOVWZ, a1: C_REG, a6: C_CTR, type_: 66, size: 4},
@@ -310,7 +296,6 @@ var optab = []Optab{
        {as: AMOVWZ, a1: C_SPR, a6: C_REG, type_: 66, size: 4},
        {as: AMOVWZ, a1: C_UCON, a6: C_REG, type_: 3, size: 4},
        {as: AMOVWZ, a1: C_XER, a6: C_REG, type_: 66, size: 4},
-       {as: AMOVWZ, a1: C_ZOREG, a2: C_REG, a6: C_REG, type_: 8, size: 4},
 
        {as: AMOVFL, a1: C_CREG, a6: C_CREG, type_: 67, size: 4},
        {as: AMOVFL, a1: C_FPSCR, a6: C_CREG, type_: 73, size: 4},
@@ -349,11 +334,8 @@ var optab = []Optab{
        {as: AFMOVD, a1: C_FREG, a6: C_SOREG, type_: 7, size: 4},
        {as: AFMOVD, a1: C_FREG, a6: C_LOREG, type_: 35, size: 8},
        {as: AFMOVD, a1: C_FREG, a6: C_ADDR, type_: 74, size: 8},
-       {as: AFMOVSX, a1: C_ZOREG, a2: C_REG, a6: C_FREG, type_: 45, size: 4},
        {as: AFMOVSX, a1: C_ZOREG, a6: C_FREG, type_: 45, size: 4},
-       {as: AFMOVSX, a1: C_FREG, a2: C_REG, a6: C_ZOREG, type_: 44, size: 4},
        {as: AFMOVSX, a1: C_FREG, a6: C_ZOREG, type_: 44, size: 4},
-       {as: AFMOVSZ, a1: C_ZOREG, a2: C_REG, a6: C_FREG, type_: 45, size: 4},
        {as: AFMOVSZ, a1: C_ZOREG, a6: C_FREG, type_: 45, size: 4},
        {as: ASYNC, type_: 46, size: 4},
        {as: AWORD, a1: C_LCON, type_: 40, size: 4},