Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: PPC64.rules for Zero are not checking alignment #21947
Go version: 1.9
Seems that PPC64.rules for Zero are not checking alignment in the cases when they should be.
compile: invalid offset for DS form load/store 00056 (/home/rdutra/repos/aports/community/geth/src/go-ethereum-1.7.0/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/statesync.go:452) MOVD R0, "".~r2+33(FP)
Steps to reproduce the behaviour
Clone go-ethereum repository in a ppc64le distribution
referenced this issue
Sep 20, 2017
When a MOVD instruction is used the offset field must be a multiple of 4. We had seen this problem a few months ago but MOVDstorezero did not get fixed at that time.
It can be reproduced when there is a function with something like this:
When there is a MOVDstorezero to data that is >= 8 bytes but not nicely aligned, you can hit this error.
No, not related to #22047, the failure in this issue would show up as a compile time error, because in the rare case where the field being zeroed is not aligned to 4 bytes as required by the instruction, the assembler would issue an error message and fail the compile.