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

Comments

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Sep 28, 2020

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)
@ceseo
Copy link
Contributor

@ceseo ceseo commented Sep 28, 2020

Looking into it.

Loading

@laboger
Copy link
Contributor

@laboger 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.

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 29, 2020

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

Loading

@gopherbot gopherbot closed this in cc2a5cf Oct 1, 2020
@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants