-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better handling of instructions on 64bit variables #231
Comments
I put together a quick test to see how useful it would be to try to handle the 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: