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: arm assembler "illegal combination" for CMPF in Go 1.5 #12458

Closed
samuel opened this issue Sep 2, 2015 · 4 comments
Closed

cmd/asm: arm assembler "illegal combination" for CMPF in Go 1.5 #12458

samuel opened this issue Sep 2, 2015 · 4 comments

Comments

@samuel
Copy link

samuel commented Sep 2, 2015

It's likely something I'm doing wrong that just happened to work previously, but some ARM assembly that
worked fine in Go 1.4.2 (go version go1.4.2 darwin/amd64) is giving an error in Go 1.5 (go version go1.5 darwin/amd64)

The instruction CMPF F4, F1 at https://github.com/samuel/go-dsp/blob/master/dsp/math32_arm.s#L246 produced the follow in Go 1.4.2 running GOOS=linux GOARCH=arm GOARM=7 go build

vcmpe.f32  s2, s8
vmrs       APSR_nzcv, fpscr

In Go 1.5 I get during compile

asm: illegal combination 00128 (/Users/samuel/Dropbox/Workspace/go/src/github.com/samuel/go-dsp/dsp/math32_arm.s:246)   CMPF    F4, F1; PSR NONE PSR, 11 11
@minux minux added this to the Go1.5.1 milestone Sep 2, 2015
@minux
Copy link
Member

minux commented Sep 2, 2015 via email

@robpike
Copy link
Contributor

robpike commented Sep 2, 2015

To me, it looks like a special case is needed in the assembler. The old 5a code explicitly put the second arg in a register, but the new one does not. This applies only to CMPF and CMPD, if I am reading the old code correctly.

@robpike robpike self-assigned this Sep 2, 2015
@gopherbot
Copy link

CL https://golang.org/cl/14183 mentions this issue.

@robpike robpike closed this as completed in 36af087 Sep 3, 2015
@broady
Copy link
Contributor

broady commented Sep 8, 2015

This doesn't cherry-pick cleanly into the 1.5.1 release branch.

Rob, can you take a look?

robpike added a commit that referenced this issue Sep 8, 2015
These instructions are special cases that were missed in the translation.
The second argument must go into the Reg field not the To field.

Fixes #12458

For Go 1.5.1

Change-Id: Iad57c60c7e38e3bcfafda483ed5037ce670e8816
Reviewed-on: https://go-review.googlesource.com/14183
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/14358
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
@golang golang locked and limited conversation to collaborators Sep 8, 2016
@rsc rsc unassigned robpike Jun 23, 2022
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

5 participants