aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/arm64/asm7.go
diff options
context:
space:
mode:
authoreric fang <eric.fang@arm.com>2022-03-31 07:34:01 +0000
committerEric Fang <eric.fang@arm.com>2022-04-01 01:23:42 +0000
commitecee4a32918c5e575303530abb9a504a235a1c71 (patch)
tree76b0e9bcc74f08fb35840481b1dca722089e715b /src/cmd/internal/obj/arm64/asm7.go
parentbe8ee5a58f8c30e95e425779fb31b2ae4e35cb8c (diff)
downloadgo-ecee4a32918c5e575303530abb9a504a235a1c71.tar.gz
go-ecee4a32918c5e575303530abb9a504a235a1c71.zip
cmd/internal/obj/arm64: fix encoding error for SYS instruction
Currently using the SYS instruction will report the "illegal combination" error. This is because the assembler parser treats the register operand as p.To, while optab defines it as p.Reg. This CL fixes this bug. Change-Id: I57799a7c19934b0c62278948f4efaa41001593a4 Reviewed-on: https://go-review.googlesource.com/c/go/+/396796 Run-TryBot: Eric Fang <eric.fang@arm.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Trust: Eric Fang <eric.fang@arm.com>
Diffstat (limited to 'src/cmd/internal/obj/arm64/asm7.go')
-rw-r--r--src/cmd/internal/obj/arm64/asm7.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/arm64/asm7.go b/src/cmd/internal/obj/arm64/asm7.go
index 244430eb8f..bf33da50c1 100644
--- a/src/cmd/internal/obj/arm64/asm7.go
+++ b/src/cmd/internal/obj/arm64/asm7.go
@@ -843,7 +843,7 @@ var optab = []Optab{
{ADMB, C_VCON, C_NONE, C_NONE, C_NONE, 51, 4, 0, 0, 0},
{AHINT, C_VCON, C_NONE, C_NONE, C_NONE, 52, 4, 0, 0, 0},
{ASYS, C_VCON, C_NONE, C_NONE, C_NONE, 50, 4, 0, 0, 0},
- {ASYS, C_VCON, C_REG, C_NONE, C_NONE, 50, 4, 0, 0, 0},
+ {ASYS, C_VCON, C_NONE, C_NONE, C_REG, 50, 4, 0, 0, 0},
{ASYSL, C_VCON, C_NONE, C_NONE, C_REG, 50, 4, 0, 0, 0},
/* encryption instructions */