Closed mdecicco closed 3 years ago
@Tupelov seems like you looked at this too, would you mind commenting on this change?
I think this is correct. I'd like to double check with someone who is more familiar with the ps2 to know for certain if it is always truncated. I think there are options to change this behavior but I don't remember.
@uyjulian do you know about this by any chance?
Hmm… not sure.
The PS2 is not entirely IEEE754 compilant, but since this would make the decompilation similar to the behavior of -mhard-float
, I think this would be fine.
This is what the EE instruction set manual says…
After sleeping on it, I have decided that the change should be included. It wouldn't negatively affect the disassembly view but it would improve the decompilation. The current decompilation is a mess and stands no chance of being compiled back to the instruction that it came from, but a cast with the right complication flags should.
What's the holdup with this PR?
Conversion from
float
toint
was cluttering up the decompilation with explicit conversion logic instead of just usingdest = (int)source