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/compile: GOARCH=arm64 compiler crash: illegal combination #22390

Closed
ALTree opened this issue Oct 23, 2017 · 3 comments
Closed

cmd/compile: GOARCH=arm64 compiler crash: illegal combination #22390

ALTree opened this issue Oct 23, 2017 · 3 comments
Milestone

Comments

@ALTree
Copy link
Member

ALTree commented Oct 23, 2017

$ gotip version
go version devel +006bc57095 Sun Oct 22 15:50:50 2017 +0000 linux/amd64

The following program, reduced from a gosmith-generated one:

package p

var V [2]interface{}

func F() {
	V = [2]interface{}{}
}

crashes the tip compiler when compiled with GOARCH=arm64:

$ GOARCH=arm64 gotip build 0.go

# command-line-arguments
<autogenerated>:1:0: illegal combination 00036 (0.go:6)	STP	(ZR, ZR), "".V(SB) PAIR NONE ADDR, 10 3
<autogenerated>:1:0: illegal combination 00040 (0.go:6)	STP	(ZR, ZR), "".V+16(SB) PAIR NONE ADDR, 10 3
<autogenerated>:1:0: illegal combination 00036 (0.go:6)	STP	(ZR, ZR), "".V(SB) PAIR NONE ADDR, 10 3
<autogenerated>:1:0: illegal combination 00040 (0.go:6)	STP	(ZR, ZR), "".V+16(SB) PAIR NONE ADDR, 10 3
<autogenerated>:1:0: illegal combination 00036 (0.go:6)	STP	(ZR, ZR), "".V(SB) PAIR NONE ADDR, 10 3
<autogenerated>:1:0: illegal combination 00040 (0.go:6)	STP	(ZR, ZR), "".V+16(SB) PAIR NONE ADDR, 10 3

The program compiles successfully with go1.9.1.

@ALTree ALTree added this to the Go1.10 milestone Oct 23, 2017
@ALTree
Copy link
Member Author

ALTree commented Oct 23, 2017

The issue was introduced in c02fc16 (cmd/compile: memory clearing optimization for arm64).

cc @williamweixiao @cherrymui

@cherrymui
Copy link
Member

Yeah, it seems that CL missed the addressing mode of global for LDP/STP.

@gopherbot
Copy link

Change https://golang.org/cl/72610 mentions this issue: cmd/internal/obj/arm64: handle global address in LDP/STP

@golang golang locked and limited conversation to collaborators Oct 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants