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/asm: ppc64 RLWNM reg, reg, const, reg encodes incorrectly #42368

Closed
pmur opened this issue Nov 3, 2020 · 1 comment
Closed

cmd/asm: ppc64 RLWNM reg, reg, const, reg encodes incorrectly #42368

pmur opened this issue Nov 3, 2020 · 1 comment

Comments

@pmur
Copy link
Contributor

pmur commented Nov 3, 2020

What version of Go are you using (go version)?

$ go version devel +05e6d28849 Mon Nov 2 16:14:49 2020 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes, fails with 1.15.3

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

Testing assembler changes. The rlwnm instruction was encoded with incorrect opcode, and in newer versions (as noted in hash above) RB is encoded wrong too.

Adding the following tests to ppc64enc.s:

        RLWNM R3, R4, $7, R6            // 5c861f7e
        RLWNMCC R3, R4, $7, R6          // 5c861f7f

What did you expect to see?

No errors

What did you see instead?

--- FAIL: TestPPC64Encoder (0.01s)
    endtoend_test.go:228: 02520 (testdata/ppc64enc.s:631)	RLWNM	R3, R4, $7, R6: have encoding 54861f7e, want 5c861f7e
    endtoend_test.go:228: 02524 (testdata/ppc64enc.s:632)	RLWNMCC	R3, R4, $7, R6: have encoding 54861f7f, want 5c861f7f
@gopherbot
Copy link

Change https://golang.org/cl/267421 mentions this issue: cmd/asm: fix rlwnm reg,reg,const,reg encoding on ppc64

@golang golang locked and limited conversation to collaborators Nov 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants