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

runtime: asyncPreempt should not try to save floating-point context for softfloat MIPS targets #37653

Closed
draganmladjenovic opened this issue Mar 4, 2020 · 5 comments

Comments

@draganmladjenovic
Copy link

@draganmladjenovic draganmladjenovic commented Mar 4, 2020

The GOMIPS_softfloat and GOMIPS64_softfloat defines can be used to conditionally compile floating-point context save/restore. It would be nice if assembler would error out when trying to use FP registers when targeting softfloat. Currently we silently end up with floating-point instructions in softfloat binaries.

MOVV FCR31, R1
MOVV R1, 224(R29)
MOVD F0, 232(R29)
MOVD F1, 240(R29)
MOVD F2, 248(R29)
MOVD F3, 256(R29)

MOVW FCR31, R1
MOVW R1, 112(R29)
MOVF F0, 116(R29)
MOVF F1, 120(R29)
MOVF F2, 124(R29)
MOVF F3, 128(R29)

@randall77
@cherrymui
@vstefanovic

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Mar 4, 2020

Thanks for catching this! I'll send a fix.

@gopherbot
Copy link

@gopherbot gopherbot commented Mar 4, 2020

Change https://golang.org/cl/222057 mentions this issue: runtime: don't save/restore FP registers in softfloat mode on MIPS(64)

@gopherbot gopherbot closed this in 588ee79 Mar 4, 2020
@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Mar 4, 2020

We probably want to backport this to Go 1.14, otherwise it will SIGILL on softfloat MIPS machines.

@gopherbot please backport this to Go 1.14. Thanks.

@gopherbot
Copy link

@gopherbot gopherbot commented Mar 4, 2020

Backport issue(s) opened: #37667 (for 1.14).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

@gopherbot
Copy link

@gopherbot gopherbot commented Mar 4, 2020

Change https://golang.org/cl/222062 mentions this issue: [release-branch.go1.14] runtime: don't save/restore FP registers in softfloat mode on MIPS(64)

gopherbot pushed a commit that referenced this issue Mar 10, 2020
…oftfloat mode on MIPS(64)

Fixes #37667.
Updates #37653.

Change-Id: I6188e44b4bc4aba7b56f29d9ce9de4618c70fd7b
Reviewed-on: https://go-review.googlesource.com/c/go/+/222057
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 588ee79)
Reviewed-on: https://go-review.googlesource.com/c/go/+/222062
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.