1
0
mirror of https://github.com/golang/go synced 2024-11-12 03:10:22 -07:00

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 <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>
This commit is contained in:
Michael Munday 2016-11-28 11:41:48 -05:00
parent 25a81e77c2
commit beec631c4c
2 changed files with 6 additions and 1 deletions

View 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
}

View 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