mirror of
https://github.com/golang/go
synced 2024-11-11 22:40:22 -07:00
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>
This commit is contained in:
parent
be8ee5a58f
commit
ecee4a3291
2
src/cmd/asm/internal/asm/testdata/arm64.s
vendored
2
src/cmd/asm/internal/asm/testdata/arm64.s
vendored
@ -1627,4 +1627,6 @@ again:
|
||||
MSR R13, ZCR_EL1 // 0d1218d5
|
||||
MRS ZCR_EL1, R23 // 171238d5
|
||||
MSR R17, ZCR_EL1 // 111218d5
|
||||
SYS $32768, R1 // 018008d5
|
||||
SYS $32768 // 1f8008d5
|
||||
END
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user