]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm64: fix assemble msr/mrs bug
authorfanzha02 <fannie.zhang@arm.com>
Tue, 13 Jun 2017 11:07:34 +0000 (11:07 +0000)
committerCherry Zhang <cherryyz@google.com>
Tue, 21 Nov 2017 14:00:35 +0000 (14:00 +0000)
commit556fb16bbda6c9312d8862cfce2d0c03e5ce0426
tree1a4f0e414b6483fb7a156f3381d6ec9740ce6e5b
parent5f29a7a705e706e307653db47c03df6dbbaf47bc
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>
src/cmd/asm/internal/asm/testdata/arm64enc.s
src/cmd/internal/obj/arm64/asm7.go