You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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: