Consider recompiling libgcc/libkmc functions instead of ignoring them
AngheloAlf opened this issue · comments
Currently Recomp ignores a lot of libgcc functions and expects the user to provide manual reimplementations, Ideally those could get recompiled instead.
This was brought up here: #35 (comment)
After some testing seems like the recompiler can handle just fine __muldi3
and __umoddi3
, but it has problems with __divdi3
, __udivdi3
and __moddi3
.
This seems to be caused because the recompiler can't handle a function jumping or branching outside of the boundaries of the function.
So we would need to implement some way to handle tail call optimizations to get those working.
I'm testing libkmc btw, I haven't looked at other libgcc implementations like libegcs or a modern libgcc