Commit beec631c authored by Michael Munday's avatar Michael Munday

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: 's avatarBill O'Farrell <billotosyr@gmail.com>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 25a81e77
......@@ -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
}
......
......@@ -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
......
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