-
Notifications
You must be signed in to change notification settings - Fork 232
Add signed division functions #44
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
Conversation
5382cf5
to
aa2561a
Compare
@@ -30,6 +30,43 @@ pub unsafe fn __aeabi_uldivmod() { | |||
intrinsics::unreachable(); | |||
} | |||
|
|||
#[naked] | |||
#[cfg_attr(not(test), no_mangle)] | |||
pub unsafe fn __aeabi_idivmod() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to add a test for this assembly routine (and the one below)? Just to check its expected signature (fn(u32, u32) -> (u32,u32)
in this case, I think) works as expected?
I thought the aeabi intrinsics could have been tested by calling |
Yea, you need asm to call them with the custom convention. |
} | ||
|
||
macro_rules! divmod { | ||
($intrinsic:ident, $div:ident: $ty:ty, $uty:ty) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$uty is not used in this macro?
OK. Thanks for clarifying. I left some comments about nits. r=me after those are addressed. |
ca354ff
to
95d3b84
Compare
Thanks @Amanieu! |
108: coshf tanhf and atan2f r=japaric a=burrbull closes rust-lang#44 closes rust-lang#52 closes rust-lang#41 Co-authored-by: Andrey Zgarbul <[email protected]> Co-authored-by: Zgarbul Andrey <[email protected]>
No description provided.