-
Notifications
You must be signed in to change notification settings - Fork 162
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
riscv-rt
: Implement FPU initialization
#157
Comments
What kind of FPU initialization would be expected on RISC-V? |
Something like this: rust-embedded/riscv-rt@3a76c3b (and optionally zeroing all of the FPU registers). |
This is what
So as I understand:
So yes, they use an instruction instead of CSR access. Interesting (but annoying) that accessing the control word through Looks like this is going to need a function implemented in a I've wondered at times: why is inline assembly an optional feature? |
Yes, something like that.
Inline assembly unstable AFAIK, so if you want to build this on stable, you have to use a different approach (such as pre-compiled asm functions or ThinLTO) |
Oh right (rust-lang/rust#29722), thanks, had thought it would be stable by now, but even the syntax is still under discussion. |
Okay, I didn't know this, but apparently
I really wonder what causes the K210 issue now. |
I don't remember exactly, but I think I accessed only one half of the CSR (there are |
Hello from the future, did this ever get cleared-up? |
Well you are from the future, you should know! 😄 But no—it's still an open issue. |
Hi from the future! inline assembly is already stable and I opened a PR (#118). So thanks to inline assembly we can start to attend to these old issues :) |
riscv-rt
: Implement FPU initialization
I am happy to have a go at implementing this, what would be the preferred approach for setting FPU as enabled? a piece of config similar to the m-mode / s-mode switch that the crate currently uses, or something more like if in m-mode use I feel like I read somewhere before |
Perfect thankyou!!! ❤️ |
No description provided.
The text was updated successfully, but these errors were encountered: