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

FPU support #61

Open
ibara opened this issue May 17, 2016 · 3 comments
Open

FPU support #61

ibara opened this issue May 17, 2016 · 3 comments

Comments

@ibara
Copy link
Collaborator

ibara commented May 17, 2016

The PIC32MZ has an FPU. LiteBSD should support it. Then we can turn off -msoft-float in the build and have better performance.

@majenkotech
Copy link
Collaborator

Not all of them have it. You would have to pick-and-choose depending on which chip you have.

@ibara
Copy link
Collaborator Author

ibara commented May 19, 2016

Fair enough. But that should be easy.

@sergev
Copy link
Owner

sergev commented May 19, 2016

MZ-EF family has FPU, but MZ-EC does not. A proper solution is to port the FPU kernel emulation code from NetBSD (http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/mips/mips/fp.S?rev=1.46). User space binaries should assume the FPU is present (no -msoft-float option). In case there is no real FPU, every floating-point opcode will take exception, processed by the emulation code in the kernel. A performance would not be much different from the soft-float library.

The code in fp.S file looks pretty self contained. It can be debugged and verified using QEMU with tracing option enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants