Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/internal/obj/arm64: "AND C_MOVCON, Reg, RSP" instruction causes the assembler crash #25584

Closed
benshi001 opened this issue May 26, 2018 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@benshi001
Copy link
Member

"AND $0x22220000, R2, RSP"

"--- FAIL: TestARM64EndToEnd (0.02s)
        endtoend_test.go:186: bad opxrrr AND
                02228 (testdata/arm64.s:702)    AND     $572653568, R2, RSP
        endtoend_test.go:186: overflow in spadj: 0 + -572653568 = -572653568
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x501c37]
@benshi001 benshi001 added the NeedsFix The path to resolution is known, but the work has not been done. label May 26, 2018
@benshi001 benshi001 added this to the Go1.11 milestone May 26, 2018
@benshi001 benshi001 self-assigned this May 26, 2018
@benshi001 benshi001 changed the title cmd/internal/obj/arm64: "AND C_MOVCON, Reg, RSP" instruction causes segment fault cmd/internal/obj/arm64: "AND C_MOVCON, Reg, RSP" instruction causes the assembler crash May 26, 2018
@benshi001
Copy link
Member Author

use RSP as destination in AND is only legal in "AND C_BITCON, Reg, RSP".

The attempt to emulate "AND C_MOVCON, Reg, RSP" by combination of
"MOV C_MOVCON, Rtmp"
"AND Rtmp, RSP, RSP" is illegal,

according to arm64's architecture reference manual,
"AND Reg, Reg, Reg" does not accept RSP as source or destination.

@benshi001
Copy link
Member Author

Sorry, I made a mistake. close it.

@golang golang locked and limited conversation to collaborators May 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants