Skip to content
Commit b541196e authored by Fangrui Song's avatar Fangrui Song
Browse files

[builtins] Make __umodsi3/__udivdi3/__umoddi3 standalone (shift and subtract)

@kamleshbhalui reported that when the Standard Extension M
(Multiplication and Division) is disabled for RISC-V,
`__udivdi3` will call __udivmodti4 which will in turn calls `__udivdi3`.

This patch moves __udivsi3 (shift and subtract) to int_div_impl.inc
`__udivXi3`, optimize a bit, add a `__umodXi3`, and use `__udivXi3` and
`__umodXi3` to define `__udivsi3` `__umodsi3` `__udivdi3` `__umoddi3`.

Reviewed By: kamleshbhalui

Differential Revision: https://reviews.llvm.org/D77912
parent b34c9049
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment