]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm64: support logical instructions targeting RSP
authorCherry Zhang <cherryyz@google.com>
Mon, 12 Mar 2018 23:28:21 +0000 (19:28 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 13 Mar 2018 16:09:57 +0000 (16:09 +0000)
commit518e6f0893a5d8dd12bc03ced6b22a989e350e57
tree9ac18bce0bcdd13f2d05a08c9534bf19fc53d850
parent6cb064c9c44fcd07bced22d2952a4856e5febc3e
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>
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/asm/internal/asm/testdata/arm64error.s
src/cmd/internal/obj/arm64/asm7.go