Page MenuHomePhabricator

__udivdi3 and __udivmoddi4 call each other and stuck in loop
AbandonedPublic

Authored by kamleshbhalui on Apr 8 2020, 10:22 AM.

Details

Summary

currently, call stack is like this

udivdi3 ====> udivmoddi4 ===> udivdi3.
above problem clearly seen when we disabled M extension in RISC-V.
i.e.
00000000000100fc <
udivdi3>:

...
10116:       00e000ef          jal  ra,10124 <__udivmoddi4>
...

0000000000010124 <__udivmoddi4>:

...
101a0:       f5dff0ef             jal  ra,100fc <__udivdi3>

to break this loop we provide an independent implementation of __udivdi3.

Diff Detail