]> Cypherpunks repositories - gostls13.git/commit
cmd/asm: remove the incorrect check of LDADDx-like instructions
authorfanzha02 <fannie.zhang@arm.com>
Fri, 13 Jan 2023 06:22:34 +0000 (06:22 +0000)
committerJoel Sing <joel@sing.id.au>
Tue, 28 Feb 2023 05:12:50 +0000 (05:12 +0000)
commit41e8679611fdee738065b91588b7016880ffde61
treee2b054be3d5052e62ceff875ca2eac75b4fd008d
parentaf2bc6de6203608f26217d59db0d1a31549272e6
cmd/asm: remove the incorrect check of LDADDx-like instructions

According to the ARM Architecture Reference Manual, LDADDx-like
instructions can take rt as zr when the encode A bit is 0. They
are used by the alias STADDx-like instructions. The current
assembler adds incorrect constraints for them, which is rt can't
be zr when field.enc A is 0. This patch removes it.

Add test cases.

Reported by Matt Horsnell <matt.horsnell@arm.com>

The reference:
https://developer.arm.com/documentation/ddi0602/2022-12/Base-Instructions

Change-Id: Ia2487a5e3900e32994fc14edaf03deeb245e70c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/462295
Reviewed-by: Matt Horsnell <matthew.horsnell@gmail.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/asm/internal/asm/testdata/arm64error.s
src/cmd/internal/obj/arm64/asm7.go