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: compilation fail due to unhandled unaligned offset on ARM64 #21992

Closed
cherrymui opened this issue Sep 23, 2017 · 2 comments
Closed
Milestone

Comments

@cherrymui
Copy link
Member

cherrymui commented Sep 23, 2017

What version of Go are you using (go version)?

tip (5993a75)

Compile the following program on ARM64,

package p

type T struct {
        a [257]byte
        b [2]byte
}

func f(x *T) {
        x.b = [2]byte{}
}
$ GOARCH=arm64 GOOS=linux go tool compile /tmp/x.go 
/tmp/x.go:9:6: offset out of range: 257
00020 (/tmp/x.go:9)	MOVH	ZR, 257(R0)

CL 42172 handled large unaligned offset, but did not cover (or mis-handled) unaligned offset between 256 and 512. I'll make a CL to fix.

@cherrymui cherrymui self-assigned this Sep 23, 2017
@cherrymui
Copy link
Member Author

cherrymui commented Sep 23, 2017

Take another look, this is a regression from CL https://go-review.googlesource.com/c/go/+/55610. Before this CL, C_PPAUTO and C_PPOREG only match multiple of 8, so the alignment is satisfied. That CL changes C_PPAUTO and C_PPOREG to match anything between 0 and 504.

@williamweixiao

@cherrymui cherrymui added this to the Go1.10 milestone Sep 23, 2017
@gopherbot
Copy link

Change https://golang.org/cl/65730 mentions this issue: cmd/internal/obj/arm64: fix handling of unaligned offset between 256 and 504

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

2 participants