]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/asm: fix parsing of the s390x instructions VSTE{G,F,H,B}
authorMichael Munday <munday@ca.ibm.com>
Mon, 28 Nov 2016 16:41:48 +0000 (11:41 -0500)
committerMichael Munday <munday@ca.ibm.com>
Mon, 28 Nov 2016 18:33:23 +0000 (18:33 +0000)
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 <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bill O'Farrell <billotosyr@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/asm/internal/arch/s390x.go
src/cmd/asm/internal/asm/testdata/s390x.s

index 7e0e8b9e0fbad874accc949ca699b5748a47ed81..1836f87b5733060835329fd93b48b719cd6684ef 100644 (file)
@@ -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
        }
index f6278e9dbda7e5d08e5ae550aa3d74b987479c86..badedc15345cd40d3b9934564930850f36ca7b14 100644 (file)
@@ -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