diff options
| author | Lynn Boger <laboger@linux.vnet.ibm.com> | 2018-11-13 16:05:15 -0500 |
|---|---|---|
| committer | Lynn Boger <laboger@linux.vnet.ibm.com> | 2018-11-28 21:49:33 +0000 |
| commit | 048580d341a530bb8d9ca891f95ce79aace4151f (patch) | |
| tree | d7aa2efc452e48d7e8267299458f7d3c1ddb5e36 /src/cmd | |
| parent | 9aadbf5755dc8e3c3b0a224f513c92b804a1a3a7 (diff) | |
| download | go-048580d341a530bb8d9ca891f95ce79aace4151f.tar.xz | |
cmd/asm,cmd/internal/obj/ppc64: add VPERMXOR to ppc64 assembler
VPERMXOR is missing from the Go assembler for ppc64. It has the
same format as VPERM. It was requested by an external user so
they could write an optimized algorithm in asm.
Change-Id: Icf4c682f7f46716ccae64e6ae3d62e8cec67f6c1
Reviewed-on: https://go-review.googlesource.com/c/151578
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Diffstat (limited to 'src/cmd')
| -rw-r--r-- | src/cmd/asm/internal/asm/testdata/ppc64.s | 1 | ||||
| -rw-r--r-- | src/cmd/internal/obj/ppc64/a.out.go | 1 | ||||
| -rw-r--r-- | src/cmd/internal/obj/ppc64/anames.go | 1 | ||||
| -rw-r--r-- | src/cmd/internal/obj/ppc64/asm9.go | 4 |
4 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/ppc64.s b/src/cmd/asm/internal/asm/testdata/ppc64.s index 9e8929dac4..366c80c090 100644 --- a/src/cmd/asm/internal/asm/testdata/ppc64.s +++ b/src/cmd/asm/internal/asm/testdata/ppc64.s @@ -948,6 +948,7 @@ label1: // <MNEMONIC> VRA,VRB,VRC,VRT produces // <mnemonic> VRT,VRA,VRB,VRC VPERM V3, V2, V1, V0 + VPERMXOR V3, V2, V1, V0 // Vector bit permute, VX-form // <MNEMONIC> VRA,VRB,VRT produces diff --git a/src/cmd/internal/obj/ppc64/a.out.go b/src/cmd/internal/obj/ppc64/a.out.go index 0fd9c81039..6b248d5c36 100644 --- a/src/cmd/internal/obj/ppc64/a.out.go +++ b/src/cmd/internal/obj/ppc64/a.out.go @@ -903,6 +903,7 @@ const ( AVCMPNEZB AVCMPNEZBCC AVPERM + AVPERMXOR AVBPERMQ AVBPERMD AVSEL diff --git a/src/cmd/internal/obj/ppc64/anames.go b/src/cmd/internal/obj/ppc64/anames.go index c04ce27e46..fb934e96f9 100644 --- a/src/cmd/internal/obj/ppc64/anames.go +++ b/src/cmd/internal/obj/ppc64/anames.go @@ -493,6 +493,7 @@ var Anames = []string{ "VCMPNEZB", "VCMPNEZBCC", "VPERM", + "VPERMXOR", "VBPERMQ", "VBPERMD", "VSEL", diff --git a/src/cmd/internal/obj/ppc64/asm9.go b/src/cmd/internal/obj/ppc64/asm9.go index 51a9a18601..d7f1a08622 100644 --- a/src/cmd/internal/obj/ppc64/asm9.go +++ b/src/cmd/internal/obj/ppc64/asm9.go @@ -1498,7 +1498,7 @@ func buildop(ctxt *obj.Link) { opset(AVCMPNEZBCC, r0) case AVPERM: /* vperm */ - opset(AVPERM, r0) + opset(AVPERMXOR, r0) case AVBPERMQ: /* vbpermq, vbpermd */ opset(AVBPERMD, r0) @@ -4503,6 +4503,8 @@ func (c *ctxt9) oprrr(a obj.As) uint32 { case AVPERM: return OPVX(4, 43, 0, 0) /* vperm - v2.03 */ + case AVPERMXOR: + return OPVX(4, 45, 0, 0) /* vpermxor - v2.03 */ case AVSEL: return OPVX(4, 42, 0, 0) /* vsel - v2.03 */ |
