mkst / maspsx

MIT License
5 stars 4 forks source link

Flip $at when operand is negative #6

Closed Xeeynamo closed 1 year ago

Xeeynamo commented 1 year ago

I noticed an edge scenario proven by this scratch: https://decomp.me/scratch/vbKu6

This is the only occurrence I found so far in our decomp. It looks like when the operand is negative, the addu $at,$at,SOURCE does not match and it requires to be addu $at,SOURCE,$at instead.

This probably needs some testing in all the decomps where maspsx is installed to verify the pattern I found is actually valid or just a fluke.

I pretty much copy&pasted the previous condition. If you have better ideas on how to tweak this piece of code let's modify it.