]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/asm: fix parsing of the s390x VLE{G,F,H,B} instructions
authorMichael Munday <munday@ca.ibm.com>
Tue, 27 Sep 2016 14:29:43 +0000 (10:29 -0400)
committerMichael Munday <munday@ca.ibm.com>
Tue, 27 Sep 2016 16:01:11 +0000 (16:01 +0000)
This commit makes the assembler frontend reorder the operands so that
they are in the order the backend expects. The index should be first
for consistency with the other vector instructions.

Before this commit no operand order would have been accepted so this
isn't a breaking change.

Change-Id: I188d57eeb338d27fa1fa6845de0d6d1521b7a6c3
Reviewed-on: https://go-review.googlesource.com/29855
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: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/asm/internal/arch/s390x.go
src/cmd/asm/internal/asm/testdata/s390x.s

index 244758df5f28ebd51c08a71df5a606913b0c10ae..4110b43ebff5c94c3c971b27821a866d3d929aaa 100644 (file)
@@ -112,6 +112,8 @@ func IsS390xWithIndex(op obj.As) bool {
                return true
        case s390x.AVLEIG, s390x.AVLEIF, s390x.AVLEIH, s390x.AVLEIB:
                return true
+       case s390x.AVLEG, s390x.AVLEF, s390x.AVLEH, s390x.AVLEB:
+               return true
        case s390x.AVPDI:
                return true
        }
index be31221d00f20191bb77e5c3880a164593272e68..5fc7a8e9b52ccf1cdcfde8cc4f883408dc9e264d 100644 (file)
@@ -257,6 +257,11 @@ TEXT main·foo(SB),7,$16-0 // TEXT main.foo(SB), 7, $16-0
        WFMSDB  V2, V25, V24, V31       // WFMSDB  V25, V24, V2, V31       // e7f298038b8e
        VPERM   V31, V0, V2, V3         // VPERM   V0, V2, V31, V3         // e73f0000248c
        VPDI    $1, V2, V31, V1         // VPDI    V2, V31, $1, V1         // e712f0001284
+       VLEG    $1, (R3), V1            // VLEG    (R3), $1, V1            // e71030001002
+       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
+
 
        RET