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

cherrymui opened this issue Sep 23, 2017 · 2 comments


None yet
2 participants
Copy link

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


This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2017

Take another look, this is a regression from CL 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.


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


This comment has been minimized.

Copy link

commented Sep 23, 2017

Change mentions this issue: cmd/internal/obj/arm64: fix handling of unaligned offset between 256 and 504

@gopherbot gopherbot closed this in a92a77c Oct 5, 2017

@golang golang locked and limited conversation to collaborators Oct 5, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.