matt-kempster / m2c

A MIPS and PowerPC decompiler.
GNU General Public License v3.0
396 stars 48 forks source link

Add comments when args span multiple slots #199

Closed zbanks closed 2 years ago

zbanks commented 2 years ago

Follow-up to Simon's suggestion in #198.

For large arguments that span multiple AbiArgSlots, add inline comments indicating their type & offset. This is done using a new CommentExpr wrapper. I also changed the argument names to add the _unk0 if the argument does not fit in one slot, instead of starting with _unk4.

Warn when there are unused subroutine_args for functions with known parameters by including an extra? comment.

Diffs

zbanks commented 2 years ago

huh, what's up with the missing temp_a1_3 = temp_t7 + 0xFA; in the diff

I screwed up the dependencies function, it's fixed in the next commit.