mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
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: Bill O'Farrell <billotosyr@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
a30b5a3d19
commit
413f1ef4de
|
@ -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
|
||||
}
|
||||
|
|
5
src/cmd/asm/internal/asm/testdata/s390x.s
vendored
5
src/cmd/asm/internal/asm/testdata/s390x.s
vendored
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue