diff options
| author | Michael Munday <munday@ca.ibm.com> | 2017-01-22 12:12:22 -0500 |
|---|---|---|
| committer | Michael Munday <munday@ca.ibm.com> | 2017-02-01 19:37:18 +0000 |
| commit | fd118b69fabda2f5def2f46606a0ec23f093cbb9 (patch) | |
| tree | a0ed080891a4649fdc2abe6fcfd9bfcd5bf92c8b /src | |
| parent | 7f31971f594edbacbdba5407aaee042850fbd220 (diff) | |
| download | go-fd118b69fabda2f5def2f46606a0ec23f093cbb9.tar.xz | |
cmd/asm, cmd/internal/obj/s390x: fix encoding of VREPI{H,F,G}
Also adds tests for all missing VRI-a instructions (which may be
affected by this change).
Fixes #18749.
Change-Id: I48249dda626f32555da9ab58659e2e140de6504a
Reviewed-on: https://go-review.googlesource.com/35561
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/asm/internal/asm/testdata/s390x.s | 6 | ||||
| -rw-r--r-- | src/cmd/internal/obj/s390x/asmz.go | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/s390x.s b/src/cmd/asm/internal/asm/testdata/s390x.s index badedc1534..198ca1d312 100644 --- a/src/cmd/asm/internal/asm/testdata/s390x.s +++ b/src/cmd/asm/internal/asm/testdata/s390x.s @@ -294,6 +294,9 @@ TEXT main·foo(SB),7,$16-0 // TEXT main.foo(SB), 7, $16-0 VZERO V16 // e70000000844 VGBM $52428, V31 // e7f0cccc0844 VREPIB $255, V4 // e74000ff0045 + VREPIH $-1, V16 // e700ffff1845 + VREPIF $-32768, V0 // e70080002045 + VREPIG $32767, V31 // e7f07fff3845 VREPG $1, V4, V16 // e7040001384d VREPB $4, V31, V1 // e71f0004044d VFTCIDB $4095, V1, V2 // e721fff0304a @@ -318,7 +321,10 @@ TEXT main·foo(SB),7,$16-0 // TEXT main.foo(SB), 7, $16-0 VLL R0, (R15), V1 // VLL (R15), R0, V1 // e710f0000037 VSTL R0, V16, (R15) // VSTL V16, R0, (R15) // e700f000083f VGMH $8, $16, V12 // VGMH $16, $8, V12 // e7c008101046 + VLEIB $15, $255, V0 // VLEIB $255, $15, V0 // e70000fff040 + VLEIH $7, $-32768, V15 // VLEIH $-32768, $7, V15 // e7f080007041 VLEIF $2, $-43, V16 // VLEIF $-43, $2, V16 // e700ffd52843 + VLEIG $1, $32767, V31 // VLEIG $32767, $1, V31 // e7f07fff1842 VSLDB $3, V1, V16, V18 // VSLDB V1, V16, $3, V18 // e72100030a77 VERIMB $2, V31, V1, V2 // VERIMB V31, V1, $2, V2 // e72f10020472 VSEL V1, V2, V3, V4 // VSEL V2, V3, V1, V4 // e7412000308d diff --git a/src/cmd/internal/obj/s390x/asmz.go b/src/cmd/internal/obj/s390x/asmz.go index cc039bd1d2..42028347d6 100644 --- a/src/cmd/internal/obj/s390x/asmz.go +++ b/src/cmd/internal/obj/s390x/asmz.go @@ -4014,7 +4014,7 @@ func asmout(ctxt *obj.Link, asm *[]byte) { zVRS(op, uint32(p.To.Reg), uint32(p.From3.Reg), uint32(reg), offset, 0, asm) case 109: // VRI-a - op, _, _ := vop(p.As) + op, m3, _ := vop(p.As) i2 := uint32(vregoff(ctxt, &p.From)) switch p.As { case AVZERO: @@ -4022,7 +4022,6 @@ func asmout(ctxt *obj.Link, asm *[]byte) { case AVONE: i2 = 0xffff } - m3 := uint32(0) if p.From3 != nil { m3 = uint32(vregoff(ctxt, p.From3)) } |
