libm: implement accelerated computation of `(x << e) % y`
Builds on rust-lang/compiler-builtins#1011, both were split from rust-lang/compiler-builtins#1002
The computation is implemented in linear_mul_reduction.
I've now rebased and applied the previous feedback.
@tgross35
Could you add a module-level doc comment with some of the common names used here? E.g.
R,RR(if that's notR*R)r,m,q,xq. I'm unfortunately a bit lost :) (but I don't need to understand it in detail)
To make the module easier to follow, I moved the public interface, fn linear_mul_reduction, to the start of the file and added more explanatory comments. That should be understandable on its own. The implementation is essentially unchanged from before, other than one minor tweak.
I've gone through and rewritten the comments for the implementation of Reducer, which should actually be understandable now. (At least this time I didn't get too much of a headache from it.)
:warning: Warning :warning:
-
The following commits have merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.
- 43fc861484dc9dda855f415c41dea70043fb196e
You can start a rebase with the following commands:
$ # rebase $ git pull --rebase https://github.com/rust-lang/compiler-builtins.git master $ git push --force-with-lease