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

Add support for new ARM softfloat/hardfloat distinction added in Go 1.22 #4177

Open
MDr164 opened this issue Mar 6, 2024 · 6 comments · May be fixed by #4189
Open

Add support for new ARM softfloat/hardfloat distinction added in Go 1.22 #4177

MDr164 opened this issue Mar 6, 2024 · 6 comments · May be fixed by #4189
Labels
enhancement New feature or request

Comments

@MDr164
Copy link

MDr164 commented Mar 6, 2024

When trying to compile a binary with the new ARM subtargets, e.g. GOARM=6,softfloat, tinygo bails out. The support for ARM added in #2260 would need to be extended for that.

@aykevl
Copy link
Member

aykevl commented Mar 12, 2024

I believe TinyGo already uses softfloat with GOARM=6 because not all ARMv6 chips have an FPU.
Is this not the case for you?
(Can you explain what system you'd like to compile for?)

@MDr164
Copy link
Author

MDr164 commented Mar 13, 2024

Actually I would need both ARMv6 and ARMv7 with softfloat support for my usecase and it's more about supporting the same naming scheme that upstream Go uses since 1.22. I can have a try at implementing this as I got the chips here that require softfloat due to a lack of an FPU. The systems I'm looking to compile for are the Aspeed BMC chips. Both the 2500 and 2600 are missing the FPU.

@MDr164 MDr164 linked a pull request Mar 13, 2024 that will close this issue
@aykevl
Copy link
Member

aykevl commented Mar 13, 2024

and ARMv7 with softfloat support

Right, I wasn't aware these cores existed. Thanks for clearing that up!
(You'd still be able to compile with GOARM=6 for compatibility but it would be slower).

@MDr164
Copy link
Author

MDr164 commented Mar 13, 2024

Yep, that's also why this isn't anything high prio or blocking but might as well have it in to make use of the v7 features without an FPU. Still need to figure out which LLVM flags I'll need to set but otherwise the linked PR should already handle what I'm trying to achieve.

@aykevl
Copy link
Member

aykevl commented Mar 13, 2024

[...] but otherwise the linked PR should already handle what I'm trying to achieve.

Probably not, you need the correct LLVM feature flags. Those define the available instructions (and a few other things) that LLVM can use in the backend. Right now they are identical for ARMv7 softfloat and appear to include floating point instructions.

@MDr164
Copy link
Author

MDr164 commented Mar 13, 2024

That's why I wrote that I still need to figure out the flags 😅.
I left the identical for the draft just so I can post the general idea of what I'd change :)

@deadprogram deadprogram added the enhancement New feature or request label May 1, 2024
@deadprogram deadprogram changed the title No support for new ARM softfloat/hardfloat distinction added in Go 1.22 Add support for new ARM softfloat/hardfloat distinction added in Go 1.22 May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants