Commit 413f1ef4 authored by Michael Munday's avatar Michael Munday

cmd/asm: fix parsing of the s390x VLE{G,F,H,B} instructions

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: 's avatarBill O'Farrell <billotosyr@gmail.com>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent a30b5a3d
......@@ -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
}
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment