]> Cypherpunks repositories - gostls13.git/commit
cmd/asm: add arm64 v8.1 atomic instructions
authorerifan01 <eric.fang@arm.com>
Wed, 12 Dec 2018 08:29:51 +0000 (08:29 +0000)
committerCherry Zhang <cherryyz@google.com>
Wed, 6 Mar 2019 18:52:03 +0000 (18:52 +0000)
commit448089854a971274db839a1cacea008b48134a19
tree4a572f3bd15e5a6bb994f8c708ae36e1add47d2d
parent40d8c3d3e81769550bcaf96ec0a3e3308abb8862
cmd/asm: add arm64 v8.1 atomic instructions

This change adds several arm64 v8.1 atomic instructions and test cases.
They are LDADDAx, LDADDLx, LDANDAx, LDANDALx, LDANDLx, LDEORAx, LDEORALx,
LDEORLx, LDORAx, LDORALx, LDORLx, SWPAx and SWPLx. Their form is consistent
with the form of the existing atomic instructions.

For instructions STXRx, STLXRx, STXPx and STLXPx, the second destination
register can't be RSP. This CL also adds a check for this.

LDADDx Rs, (Rb), Rt: *Rb -> Rt, Rs + *Rb -> *Rb
LDANDx Rs, (Rb), Rt: *Rb -> Rt, Rs AND NOT(*Rb) -> *Rb
LDEORx Rs, (Rb), Rt: *Rb -> Rt, Rs EOR *Rb -> *Rb
LDORx  Rs, (Rb), Rt: *Rb -> Rt, Rs OR *Rb -> *Rb

Change-Id: I9f9b0245958cb57ab7d88c66fb9159b23b9017fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/157001
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/asm/internal/arch/arm64.go
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/asm/internal/asm/testdata/arm64error.s
src/cmd/internal/obj/arm64/a.out.go
src/cmd/internal/obj/arm64/anames.go
src/cmd/internal/obj/arm64/asm7.go