Commit 9c312245 authored by Fangming.Fang's avatar Fangming.Fang Committed by Cherry Zhang

cmd/asm: fix bug about VMOV instruction (move a vector element to another) on ARM64

This change fixes index error when encoding VMOV instruction which pattern
is vmov Vn.<T>[index], Vd.<T>[index]

Change-Id: I949166e6dfd63fb0a9365f183b6c50d452614f9d
Reviewed-on: https://go-review.googlesource.com/101335Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
parent 7673e305
......@@ -239,6 +239,7 @@ TEXT foo(SB), DUPOK|NOSPLIT, $-8
VMOV V10.S[0], V12.S[1] // 4c050c6e
VMOV V9.H[0], V12.H[1] // 2c05066e
VMOV V8.B[0], V12.B[1] // 0c05036e
VMOV V8.B[7], V4.B[8] // 043d116e
VREV32 V5.B16, V5.B16 // a508206e
VDUP V19.S[0], V17.S4 // 7106044e
//
......
......@@ -3910,7 +3910,7 @@ func (c *ctxt7) asmout(p *obj.Prog, o *Optab, out []uint32) {
default:
c.ctxt.Diag("invalid arrangement: %v", p)
}
o1 |= (uint32(imm5&0x1f) << 16) | (uint32(imm4&0xf) << 16) | (uint32(rf&31) << 5) | uint32(rt&31)
o1 |= (uint32(imm5&0x1f) << 16) | (uint32(imm4&0xf) << 11) | (uint32(rf&31) << 5) | uint32(rt&31)
break
......
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