diff options
| author | Michael Munday <mike.munday@ibm.com> | 2019-10-07 14:37:44 -0700 |
|---|---|---|
| committer | Michael Munday <mike.munday@ibm.com> | 2019-10-09 14:45:09 +0000 |
| commit | ff86ce13b69f427248203493d669a730988f882c (patch) | |
| tree | a4fa77d4d142f2e2090b5fd57dbf66692c77e8be | |
| parent | 421d35cf69f4a18edf96004ba99c01e629a0f79f (diff) | |
| download | go-git-ff86ce13b69f427248203493d669a730988f882c.tar.gz | |
cmd/asm: fix element size encoding for VSUMQ instruction on s390x
The element size for VSUMQF and VSUMQG was off by one. Fix this
and add tests for VSUM* instruction encodings.
Change-Id: I6de2dabb383e5bc6f85eef1e0f106ba949c9030b
Reviewed-on: https://go-review.googlesource.com/c/go/+/199978
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
| -rw-r--r-- | src/cmd/asm/internal/asm/testdata/s390x.s | 6 | ||||
| -rw-r--r-- | src/cmd/internal/obj/s390x/vector.go | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/s390x.s b/src/cmd/asm/internal/asm/testdata/s390x.s index 4fc599416f..6888651007 100644 --- a/src/cmd/asm/internal/asm/testdata/s390x.s +++ b/src/cmd/asm/internal/asm/testdata/s390x.s @@ -435,6 +435,12 @@ TEXT main·foo(SB),DUPOK|NOSPLIT,$16-0 // TEXT main.foo(SB), DUPOK|NOSPLIT, $16- VMSLEG V21, V22, V23, V24 // e78563807fb8 VMSLOG V21, V22, V23, V24 // e78563407fb8 VMSLEOG V21, V22, V23, V24 // e78563c07fb8 + VSUMGH V1, V2, V3 // e73120001065 + VSUMGF V16, V17, V18 // e72010002e65 + VSUMQF V4, V5, V6 // e76450002067 + VSUMQG V19, V20, V21 // e75340003e67 + VSUMB V7, V8, V9 // e79780000064 + VSUMH V22, V23, V24 // e78670001e64 RET RET foo(SB) diff --git a/src/cmd/internal/obj/s390x/vector.go b/src/cmd/internal/obj/s390x/vector.go index 62adcf6d4a..00f578340f 100644 --- a/src/cmd/internal/obj/s390x/vector.go +++ b/src/cmd/internal/obj/s390x/vector.go @@ -978,9 +978,9 @@ func vop(as obj.As) (opcode, es, cs uint32) { case AVSUMQ: return op_VSUMQ, 0, 0 case AVSUMQF: - return op_VSUMQ, 1, 0 - case AVSUMQG: return op_VSUMQ, 2, 0 + case AVSUMQG: + return op_VSUMQ, 3, 0 case AVSUM: return op_VSUM, 0, 0 case AVSUMB: |
