diff options
author | fanzha02 <fannie.zhang@arm.com> | 2023-01-13 06:22:34 +0000 |
---|---|---|
committer | Joel Sing <joel@sing.id.au> | 2023-02-28 05:12:50 +0000 |
commit | 41e8679611fdee738065b91588b7016880ffde61 (patch) | |
tree | e2b054be3d5052e62ceff875ca2eac75b4fd008d /src/cmd/asm/internal/asm/testdata/arm64error.s | |
parent | af2bc6de6203608f26217d59db0d1a31549272e6 (diff) | |
download | go-41e8679611fdee738065b91588b7016880ffde61.tar.gz go-41e8679611fdee738065b91588b7016880ffde61.zip |
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>
Diffstat (limited to 'src/cmd/asm/internal/asm/testdata/arm64error.s')
-rw-r--r-- | src/cmd/asm/internal/asm/testdata/arm64error.s | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/arm64error.s b/src/cmd/asm/internal/asm/testdata/arm64error.s index 52f01e16a6..fa5ec8e89c 100644 --- a/src/cmd/asm/internal/asm/testdata/arm64error.s +++ b/src/cmd/asm/internal/asm/testdata/arm64error.s @@ -166,38 +166,6 @@ TEXT errors(SB),$0 FSTPD (R1, R2), (R0) // ERROR "invalid register pair" FMOVS (F2), F0 // ERROR "illegal combination" FMOVD F0, (F1) // ERROR "illegal combination" - LDADDD R5, (R6), ZR // ERROR "illegal destination register" - LDADDW R5, (R6), ZR // ERROR "illegal destination register" - LDADDH R5, (R6), ZR // ERROR "illegal destination register" - LDADDB R5, (R6), ZR // ERROR "illegal destination register" - LDADDLD R5, (R6), ZR // ERROR "illegal destination register" - LDADDLW R5, (R6), ZR // ERROR "illegal destination register" - LDADDLH R5, (R6), ZR // ERROR "illegal destination register" - LDADDLB R5, (R6), ZR // ERROR "illegal destination register" - LDCLRD R5, (R6), ZR // ERROR "illegal destination register" - LDCLRW R5, (R6), ZR // ERROR "illegal destination register" - LDCLRH R5, (R6), ZR // ERROR "illegal destination register" - LDCLRB R5, (R6), ZR // ERROR "illegal destination register" - LDCLRLD R5, (R6), ZR // ERROR "illegal destination register" - LDCLRLW R5, (R6), ZR // ERROR "illegal destination register" - LDCLRLH R5, (R6), ZR // ERROR "illegal destination register" - LDCLRLB R5, (R6), ZR // ERROR "illegal destination register" - LDEORD R5, (R6), ZR // ERROR "illegal destination register" - LDEORW R5, (R6), ZR // ERROR "illegal destination register" - LDEORH R5, (R6), ZR // ERROR "illegal destination register" - LDEORB R5, (R6), ZR // ERROR "illegal destination register" - LDEORLD R5, (R6), ZR // ERROR "illegal destination register" - LDEORLW R5, (R6), ZR // ERROR "illegal destination register" - LDEORLH R5, (R6), ZR // ERROR "illegal destination register" - LDEORLB R5, (R6), ZR // ERROR "illegal destination register" - LDORD R5, (R6), ZR // ERROR "illegal destination register" - LDORW R5, (R6), ZR // ERROR "illegal destination register" - LDORH R5, (R6), ZR // ERROR "illegal destination register" - LDORB R5, (R6), ZR // ERROR "illegal destination register" - LDORLD R5, (R6), ZR // ERROR "illegal destination register" - LDORLW R5, (R6), ZR // ERROR "illegal destination register" - LDORLH R5, (R6), ZR // ERROR "illegal destination register" - LDORLB R5, (R6), ZR // ERROR "illegal destination register" LDADDAD R5, (R6), RSP // ERROR "illegal destination register" LDADDAW R5, (R6), RSP // ERROR "illegal destination register" LDADDAH R5, (R6), RSP // ERROR "illegal destination register" |