aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm/internal
diff options
context:
space:
mode:
authorfanzha02 <fannie.zhang@arm.com>2017-06-13 11:07:34 +0000
committerCherry Zhang <cherryyz@google.com>2017-11-21 14:00:35 +0000
commit556fb16bbda6c9312d8862cfce2d0c03e5ce0426 (patch)
tree1a4f0e414b6483fb7a156f3381d6ec9740ce6e5b /src/cmd/asm/internal
parent5f29a7a705e706e307653db47c03df6dbbaf47bc (diff)
downloadgo-556fb16bbda6c9312d8862cfce2d0c03e5ce0426.tar.xz
cmd/internal/obj/arm64: fix assemble msr/mrs bug
The arguments <pstatefield> is a struct that includes two elements, element reg is special register, elememt enc is pstate field values. The current code compares two different type values and get a incorrect result. The fix follows pstate field to create a systemreg struct, each system register has a vaule to use in instruction. Uncomment the msr/mrs cases. Fixes #21464 Change-Id: I1bb1587ec8548f3e4bd8d5be4d7127bd10d53186 Reviewed-on: https://go-review.googlesource.com/56030 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')
-rw-r--r--src/cmd/asm/internal/asm/testdata/arm64enc.s10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/arm64enc.s b/src/cmd/asm/internal/asm/testdata/arm64enc.s
index 2c0f32e971..b02e0b32ec 100644
--- a/src/cmd/asm/internal/asm/testdata/arm64enc.s
+++ b/src/cmd/asm/internal/asm/testdata/arm64enc.s
@@ -246,11 +246,11 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$-8
MOVKW $(3905<<16), R21 // MOVKW $255918080, R21 // 35e8a172
MOVK $(3905<<32), R21 // MOVK $16771847290880, R21 // 35e8c1f2
MOVD $0, R5 // 050080d2
- // MRS $4567, R16 // f03a32d5
- // MRS $32345, R6 // 26cb3fd5
- // MSR R25, $3452 // 99af11d5
- // MSR R25, $16896 // 194018d5
- // MSR $6, DAIFClr // ff4603d5
+ MSR $1, SPSel // bf4100d5
+ MSR $9, DAIFSet // df4903d5
+ MSR $6, DAIFClr // ff4603d5
+ MRS ELR_EL1, R8 // 284038d5
+ MSR R16, ELR_EL1 // 304018d5
MSUBW R1, R1, R12, R5 // 8585011b
MSUB R19, R16, R26, R2 // 42c3139b
MULW R26, R5, R22 // b67c1a1b