-
Notifications
You must be signed in to change notification settings - Fork 211
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
Add __divtf3
#622
Add __divtf3
#622
Conversation
Unfortunately this algorithm has an exponent rounding error with subnormals for
|
f37bf6f
to
def2e46
Compare
The f128 issue is proving pretty tricky to fix. To help slim down the surface area, |
f128 division is working with full iterations 🎉 I need to figure out what is wrong with the half-width iterations, and do some more documentation. |
It looks like there are some platform-specific issues with the system libraries:
|
The i686 issue appears to be an ABI issue: GCC aligns
I believe the relevant LLVM issue is llvm/llvm-project#77401. |
Interesting, I am surprised that doesn't show up for the other functions. I suspect that the aarch64 division issue is another case of llvm/llvm-project#91840 that is still waiting on your fix to be merged. |
4dc87bc
to
81b96a3
Compare
I think this is ready for a look when you get the chance @Amanieu.
|
Even with the extra iteration performance isn't bad. Not sure why we are that much faster here.
|
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.
Overall LGTM, though I didn't check the algorithm in detail.
Float division requires some shift operations on big integers; implement right shift here.
Add some bounds to integer types that allow our function trait bounds to be slightly less verbose. Also clarify documentation and remove a redundant operation.
Float division currently has a separate `div32` and `div64` for `f32` and `f64`, respectively. Combine these to make use of generics. This will make it easier to support `f128` division, and reduces a lot of redundant code. This includes a simplification of division tests.
Use the new generic division algorithm to expose `__divtf3` and `__divkf3`.
Thanks for taking a look! I'll have some more improvements to do here but at least this gets us off the ground. |
This includes the following: - rust-lang/compiler-builtins#686 - rust-lang/compiler-builtins#622
This includes the following, which adds `__divtf3` - rust-lang/compiler-builtins#622 - rust-lang/compiler-builtins#692 The `cc` bump [1] was previously included but was reverted due to problems updating. [1]: rust-lang/compiler-builtins#690
This includes the following which add `__divtf3` and `__powtf2`, and do some feature cleanup: - rust-lang/compiler-builtins#622 - rust-lang/compiler-builtins#692 - rust-lang/compiler-builtins#614 - rust-lang/compiler-builtins#694 The `cc` bump [1] was previously included but was reverted due to problems updating. [1]: rust-lang/compiler-builtins#690
This includes the following which add `__divtf3` and `__powtf2`, and do some feature cleanup: - rust-lang/compiler-builtins#622 - rust-lang/compiler-builtins#692 - rust-lang/compiler-builtins#614 - rust-lang/compiler-builtins#694 The `cc` bump [1] was previously included but was reverted due to problems updating. [1]: rust-lang/compiler-builtins#690
Update compiler-builtins to 0.1.130 This includes the following which add `__divtf3` and `__powtf2`, and do some feature cleanup: - rust-lang/compiler-builtins#622 - rust-lang/compiler-builtins#692 - rust-lang/compiler-builtins#614 - rust-lang/compiler-builtins#694 The `cc` bump [1] was previously included but was reverted due to problems updating. [1]: rust-lang/compiler-builtins#690
This includes the following which add `__divtf3` and `__powtf2`, and do some feature cleanup: - rust-lang/compiler-builtins#622 - rust-lang/compiler-builtins#692 - rust-lang/compiler-builtins#614 - rust-lang/compiler-builtins#694 The `cc` bump [1] was previously included but was reverted due to problems updating. [1]: rust-lang/compiler-builtins#690
Update compiler-builtins to 0.1.130 This includes the following which add `__divtf3` and `__powtf2`, and do some feature cleanup: - rust-lang/compiler-builtins#622 - rust-lang/compiler-builtins#692 - rust-lang/compiler-builtins#614 - rust-lang/compiler-builtins#694 The `cc` bump [1] was previously included but was reverted due to problems updating. [1]: rust-lang/compiler-builtins#690
This includes the following which add `__divtf3` and `__powtf2`, and do some feature cleanup: - rust-lang/compiler-builtins#622 - rust-lang/compiler-builtins#692 - rust-lang/compiler-builtins#614 - rust-lang/compiler-builtins#694 The `cc` bump [1] was previously included but was reverted due to problems updating. [1]: rust-lang/compiler-builtins#690
Division for
f128
. Still pretty buggy