diff options
author | Cherry Zhang <cherryyz@google.com> | 2018-03-12 19:28:21 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2018-03-13 16:09:57 +0000 |
commit | 518e6f0893a5d8dd12bc03ced6b22a989e350e57 (patch) | |
tree | 9ac18bce0bcdd13f2d05a08c9534bf19fc53d850 /src/cmd/asm/internal/asm/testdata/arm64error.s | |
parent | 6cb064c9c44fcd07bced22d2952a4856e5febc3e (diff) | |
download | go-518e6f0893a5d8dd12bc03ced6b22a989e350e57.tar.gz go-518e6f0893a5d8dd12bc03ced6b22a989e350e57.zip |
cmd/internal/obj/arm64: support logical instructions targeting RSP
Logical instructions can have RSP as its destination. Support it.
Note that the two-operand form, like "AND $1, RSP", which is
equivalent to the three-operand form "AND $1, RSP, RSP", is
invalid, because the source register is not allowed to be RSP.
Also note that instructions that set the conditional flags, like
ANDS, cannot target RSP. Because of this, we split out the optab
entries of AND et al. and ANDS et al.
Merge the optab entries of BIC et al. to AND et al., because they
are same.
Fixes #24332.
Change-Id: I3584d6f2e7cea98a659a1ed9fdf67c353e090637
Reviewed-on: https://go-review.googlesource.com/100217
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/asm/internal/asm/testdata/arm64error.s')
-rw-r--r-- | src/cmd/asm/internal/asm/testdata/arm64error.s | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/arm64error.s b/src/cmd/asm/internal/asm/testdata/arm64error.s index b77dabd4e1..93c3acdc3b 100644 --- a/src/cmd/asm/internal/asm/testdata/arm64error.s +++ b/src/cmd/asm/internal/asm/testdata/arm64error.s @@ -50,4 +50,7 @@ TEXT errors(SB),$0 VFMLS V1.H4, V12.H4, V3.H4 // ERROR "invalid arrangement" VFMLS V1.H8, V12.H8, V3.H8 // ERROR "invalid arrangement" VFMLS V1.H4, V12.H4, V3.H4 // ERROR "invalid arrangement" + + AND $1, RSP // ERROR "illegal combination" + ANDS $1, R0, RSP // ERROR "illegal combination" RET |