Skip to content

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

Closed

Description

@ianlancetaylor

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)

Activity

  1. added this to the Go1.16 milestone on Sep 28, 2020
  2. ceseo commented on Sep 28, 2020

    @ceseo
    Contributor

    Looking into it.

  3. laboger commented on Sep 28, 2020

    @laboger
    Contributor

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

  4. gopherbot commented on Sep 29, 2020

    @gopherbot
    Contributor

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

  5. locked and limited conversation to collaborators on Oct 1, 2021
  6. added a commit that references this issue on Apr 29, 2024
    cc2a5cf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.release-blocker

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions