-
Notifications
You must be signed in to change notification settings - Fork 208
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
Please make aeabi division functions use weak linkage, because they are incorrect for ARMv4T #477
Comments
You can use |
Hmm. Interesting! Would you also be willing to accept a PR for weak linkage on the division functions anyway? Because even if I use that target_feature to fix up these general functions with the correct return instructions (which I'll try to do later today) I would also like to be able to define my own versions that are stored in RAM rather than ROM because of the speed difference (it's like a 5x time difference in my case). |
I think that we should have weak linkage on all functions in compiler-builtins actually, subject to target support. Anything except apple/windows uses ELF where this should work fine. |
The division functions included in this crate pop the link-register value directly into
pc
to return. This is correct for interworking code with v5T and later, but it is incorrect for v4T.With v4T, you must use
bx
to switch code modes.At this time I'm not aware of a way to
cfg
on the ARM version of a target. I think the best fix is to just declare the functions as weak linkage, and then v4T users can just override the functions on their end.The text was updated successfully, but these errors were encountered: