From: Michael Munday Date: Mon, 28 Nov 2016 16:41:48 +0000 (-0500) Subject: cmd/asm: fix parsing of the s390x instructions VSTE{G,F,H,B} X-Git-Tag: go1.8beta1~50 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=beec631c4c6a26fc7011d9f3be2b9aaa52b39ad2;p=gostls13.git cmd/asm: fix parsing of the s390x instructions VSTE{G,F,H,B} The element index needs to be placed in From3. Before this CL it was impossible to write a VSTE instruction that could be successfully parsed, so this won't affect existing assembly code. Fixes #18075. Change-Id: I5b71be4c6632b1d5a30820a529122f96fd1bc864 Reviewed-on: https://go-review.googlesource.com/33584 Run-TryBot: Michael Munday TryBot-Result: Gobot Gobot Reviewed-by: Bill O'Farrell Reviewed-by: Ian Lance Taylor --- diff --git a/src/cmd/asm/internal/arch/s390x.go b/src/cmd/asm/internal/arch/s390x.go index 7e0e8b9e0f..1836f87b57 100644 --- a/src/cmd/asm/internal/arch/s390x.go +++ b/src/cmd/asm/internal/arch/s390x.go @@ -110,6 +110,8 @@ func IsS390xWithIndex(op obj.As) bool { return true case s390x.AVLEG, s390x.AVLEF, s390x.AVLEH, s390x.AVLEB: return true + case s390x.AVSTEG, s390x.AVSTEF, s390x.AVSTEH, s390x.AVSTEB: + return true case s390x.AVPDI: return true } diff --git a/src/cmd/asm/internal/asm/testdata/s390x.s b/src/cmd/asm/internal/asm/testdata/s390x.s index f6278e9dbd..badedc1534 100644 --- a/src/cmd/asm/internal/asm/testdata/s390x.s +++ b/src/cmd/asm/internal/asm/testdata/s390x.s @@ -333,7 +333,10 @@ TEXT main·foo(SB),7,$16-0 // TEXT main.foo(SB), 7, $16-0 VLEF $2, (R0), V31 // VLEF (R0), $2, V31 // e7f000002803 VLEH $3, (R12), V16 // VLEH (R12), $3, V16 // e700c0003801 VLEB $15, 4095(R9), V15 // VLEB 4095(R9), $15, V15 // e7f09ffff000 - + VSTEG $1, V30, (R1)(R2*1) // VSTEG V30, $1, (R1)(R2*1) // e7e21000180a + VSTEF $3, V2, (R9) // VSTEF V2, $3, (R9) // e7209000300b + VSTEH $7, V31, (R2) // VSTEH V31, $7, (R2) // e7f020007809 + VSTEB $15, V29, 4094(R12) // VSTEB V29, $15, 4094(R12) // e7d0cffef808 RET