]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/asm: complete the support for VDUP on arm64
authorfanzha02 <fannie.zhang@arm.com>
Fri, 4 Dec 2020 06:02:55 +0000 (14:02 +0800)
committerfannie zhang <Fannie.Zhang@arm.com>
Fri, 19 Mar 2021 01:38:59 +0000 (01:38 +0000)
commit9136d958ab258bc4f128c8582ab713c482ec33ed
tree24f206866459e8f90709b8910fba2575d5fb7013
parent67048432026062a98a3937a865aeb05a398148c5
cmd/asm: complete the support for VDUP on arm64

"VMOV Vn.<T>[index], Vn" is equivalent to "VDUP Vn.<T>[index], Vn", and
the latter has a higher priority in the disassembler than the former.
But the assembler doesn't support to encode this combination of VDUP,
this leads to an inconsistency between assembler and disassembler.

For example, if we assemble "VMOV V20.S[0], V20" to hex then decode it,
we'll get "VDUP V20.S[0], V20".

  VMOV V20.S[0], V20 -> 9406045e -> VDUP V20.S[0], V20 -> error

But we cannot assemble this VDUP again.

Similar reason for "VDUP Rn, Vd.<T>". This CL completes the support for
VDUP.

This patch is a copy of CL 276092. Co-authored-by: JunchenLi
<junchen.li@arm.com>

Change-Id: I8f8d86cf1911d5b16bb40d189f1dc34b24416aaf
Reviewed-on: https://go-review.googlesource.com/c/go/+/302929
Trust: fannie zhang <Fannie.Zhang@arm.com>
Run-TryBot: fannie zhang <Fannie.Zhang@arm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/asm/internal/asm/testdata/arm64enc.s
src/cmd/internal/obj/arm64/asm7.go