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

math: remove assembly stubs #31362

Open
mundaym opened this issue Apr 9, 2019 · 1 comment
Open

math: remove assembly stubs #31362

mundaym opened this issue Apr 9, 2019 · 1 comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@mundaym
Copy link
Member

mundaym commented Apr 9, 2019

I could be wrong, but I think now that we have mid-stack inlining it should be possible to move the math package from this pattern:

// F does blah.
func F() // implemented in asm, might just jump straight to f

func f() {
    // generic implementation in Go
}

To something more like this pattern:

// F does blah.
func F() {
    f() // might call asm, might just call fGeneric
}

func fGeneric() {
    // generic implementation in Go
}

This would have the side benefit of allowing architectures that use the generic implementation to inline it if it is cheap enough. It might also make stdlib easier to build with other compilers (#31330).

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 10, 2019
@bcmills bcmills added this to the Unplanned milestone Apr 10, 2019
@gopherbot
Copy link

Change https://golang.org/cl/173398 mentions this issue: math: consolidate assembly stub implementations

gopherbot pushed a commit that referenced this issue Apr 23, 2019
Where assembly functions are just jumps to the Go implementation
put them into a stubs_<arch>.s file. This reduces the number of
files considerably and makes it easier to see what is really
implemented in assembly.

I've also run the stubs files through asmfmt to format them in
a more consistent way.

Eventually we should replace these 'stub' assembly files with
a pure Go implementation now that we have mid-stack inlining
(see #31362).

Change-Id: If5b2022dcc23e1299f1b7ba79884f1b1263d0f7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/173398
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants