You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I put together a quick test to see how useful it would be to try to handle the __ll_* functions as normal arithmetic instructions: dword-arith.
Looking at SSSV's matrix functions, the output and diff do look better, but they do highlight the fact that m2c is merely ignoring the upper register in the 64-bit value.
The output will probably be pretty close, as long as that upper register is always either 0 or a sign bit -- but, if there's anything else there, m2c would ignore it entirely. (This makes me hesitant to try to incorporate this into the main branch.)
As mentioned on Discord, m2c will need a bit more work to support for 64-bit values, even on MIPS.
Example scratch: https://decomp.me/scratch/z6j5r
The sqrtf call results in calls to
__ll_mul
for the s64 multiplication as well as__ll_to_f
for the s64 -> f32 conversion.m2c writes out these functions verbatim (with all the weird things the compiler does behind the scenes):
It would be wonderful if these kind of patterns could be better detected and replaced by the s64 casts.
PS - is this an IDO specific quirk or does GCC compilation do this too?
The text was updated successfully, but these errors were encountered: