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: ppc64le: Invalid n or b for CLRLSLDI: 30 28 #41683

Closed
ianlancetaylor opened this issue Sep 28, 2020 · 3 comments
Closed

cmd/compile: ppc64le: Invalid n or b for CLRLSLDI: 30 28 #41683

ianlancetaylor opened this issue Sep 28, 2020 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@ianlancetaylor
Copy link
Contributor

On current tip (874b313, CL 247477) this valid code gets an incorrect compilation error with GOARCH=ppc64le.

I believe this is due to CL 252097. CC @laboger @ceseo @pmur

package p

func F(s int32, n uint64) uint64 {
	c := (s >> 1) & 0xffffff
	return uint64(c)<<48
}

This is the compilation error with GOARCH=ppc64le. Note the missing %v message.

foo.go:5:2: Invalid n or b for CLRLSLDI: 30 28
%!v(MISSING)
@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Sep 28, 2020
@ianlancetaylor ianlancetaylor added this to the Go1.16 milestone Sep 28, 2020
@ceseo
Copy link
Contributor

ceseo commented Sep 28, 2020

Looking into it.

@laboger
Copy link
Contributor

laboger commented Sep 28, 2020

I see the problem. The rules that use AND need to do more checking of mask length and shift count.

@gopherbot
Copy link

Change https://golang.org/cl/258138 mentions this issue: cmd/compile,cmd/internal/obj/ppc64: fix some shift rules due to a regression

@golang golang locked and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants