aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm/internal/asm/testdata/arm64error.s
diff options
context:
space:
mode:
authorerifan01 <eric.fang@arm.com>2018-12-12 08:29:51 +0000
committerCherry Zhang <cherryyz@google.com>2019-03-06 18:52:03 +0000
commit448089854a971274db839a1cacea008b48134a19 (patch)
tree4a572f3bd15e5a6bb994f8c708ae36e1add47d2d /src/cmd/asm/internal/asm/testdata/arm64error.s
parent40d8c3d3e81769550bcaf96ec0a3e3308abb8862 (diff)
downloadgo-448089854a971274db839a1cacea008b48134a19.tar.gz
go-448089854a971274db839a1cacea008b48134a19.zip
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>
Diffstat (limited to 'src/cmd/asm/internal/asm/testdata/arm64error.s')
-rw-r--r--src/cmd/asm/internal/asm/testdata/arm64error.s120
1 files changed, 120 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/arm64error.s b/src/cmd/asm/internal/asm/testdata/arm64error.s
index 357db80222..387836dcbe 100644
--- a/src/cmd/asm/internal/asm/testdata/arm64error.s
+++ b/src/cmd/asm/internal/asm/testdata/arm64error.s
@@ -112,4 +112,124 @@ 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"
+ LDANDD R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDW R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDH R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDB R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDLD R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDLW R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDLH R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDLB 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"
+ LDADDAB R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDALD R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDALW R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDALH R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDALB R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDD R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDW R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDH R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDB R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDLD R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDLW R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDLH R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDLB R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDAD R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDAW R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDAH R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDAB R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDALD R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDALW R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDALH R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDALB R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDD R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDW R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDH R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDB R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDLD R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDLW R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDLH R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDLB R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORAD R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORAW R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORAH R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORAB R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORALD R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORALW R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORALH R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORALB R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORD R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORW R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORH R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORB R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORLD R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORLW R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORLH R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORLB R5, (R6), RSP // ERROR "illegal destination register"
+ LDORAD R5, (R6), RSP // ERROR "illegal destination register"
+ LDORAW R5, (R6), RSP // ERROR "illegal destination register"
+ LDORAH R5, (R6), RSP // ERROR "illegal destination register"
+ LDORAB R5, (R6), RSP // ERROR "illegal destination register"
+ LDORALD R5, (R6), RSP // ERROR "illegal destination register"
+ LDORALW R5, (R6), RSP // ERROR "illegal destination register"
+ LDORALH R5, (R6), RSP // ERROR "illegal destination register"
+ LDORALB R5, (R6), RSP // ERROR "illegal destination register"
+ LDORD R5, (R6), RSP // ERROR "illegal destination register"
+ LDORW R5, (R6), RSP // ERROR "illegal destination register"
+ LDORH R5, (R6), RSP // ERROR "illegal destination register"
+ LDORB R5, (R6), RSP // ERROR "illegal destination register"
+ LDORLD R5, (R6), RSP // ERROR "illegal destination register"
+ LDORLW R5, (R6), RSP // ERROR "illegal destination register"
+ LDORLH R5, (R6), RSP // ERROR "illegal destination register"
+ LDORLB R5, (R6), RSP // ERROR "illegal destination register"
+ SWPAD R5, (R6), RSP // ERROR "illegal destination register"
+ SWPAW R5, (R6), RSP // ERROR "illegal destination register"
+ SWPAH R5, (R6), RSP // ERROR "illegal destination register"
+ SWPAB R5, (R6), RSP // ERROR "illegal destination register"
+ SWPALD R5, (R6), RSP // ERROR "illegal destination register"
+ SWPALW R5, (R6), RSP // ERROR "illegal destination register"
+ SWPALH R5, (R6), RSP // ERROR "illegal destination register"
+ SWPALB R5, (R6), RSP // ERROR "illegal destination register"
+ SWPD R5, (R6), RSP // ERROR "illegal destination register"
+ SWPW R5, (R6), RSP // ERROR "illegal destination register"
+ SWPH R5, (R6), RSP // ERROR "illegal destination register"
+ SWPB R5, (R6), RSP // ERROR "illegal destination register"
+ SWPLD R5, (R6), RSP // ERROR "illegal destination register"
+ SWPLW R5, (R6), RSP // ERROR "illegal destination register"
+ SWPLH R5, (R6), RSP // ERROR "illegal destination register"
+ SWPLB R5, (R6), RSP // ERROR "illegal destination register"
+ STXR R5, (R6), RSP // ERROR "illegal destination register"
+ STXRW R5, (R6), RSP // ERROR "illegal destination register"
+ STLXR R5, (R6), RSP // ERROR "illegal destination register"
+ STLXRW R5, (R6), RSP // ERROR "illegal destination register"
+ STXP (R5, R7), (R6), RSP // ERROR "illegal destination register"
+ STXPW (R5, R7), (R6), RSP // ERROR "illegal destination register"
+ STLXP (R5, R7), (R6), RSP // ERROR "illegal destination register"
+ STLXP (R5, R7), (R6), RSP // ERROR "illegal destination register"
RET