Dolphin, the GameCube and Wii emulator - Forums

Full Version: PPCAnalyst Info
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

devilsclaw

Im not sure where to post this info and currently pretty sure that I would not be a trusted commiter to the svn since I never have here.

I was looking at some of the JIT stuff and notices a comment on why something did what it did.

PPCAnalyst.cpp line 395: num_inst++; // why?

the reason for this questions is most likely do to the fact that the loop already increments num_inst++
line 308: for (int i = 0; i < maxsize; i++, num_inst++)

as one can tell its starting at 0 since its for processing

the extra num_inst++ after the loop is to return the number of bytes processed so it would have to be incremented to start from 1 instead of 0.

You can tell this by the end of the function where it does this.
line 544: *realsize = num_inst;

also there is no reason to do it at the end of the function since currently it only ever returns true, but good to keep there in case anyone ever adds some sort of error checking and returns false.