![]() Another fact is, that the C code for an infinite FOR loop. ![]() ![]() Because this is an infinite loop, we can assume that these lines are unnecessary.' Mov eax, 1' initializes eax.the test immediately afterwards tests the value of eax to ensure that it is nonzero.because eax will always be nonzero (eax = 1) at this point, the conditional jump can be removed along whith the 'mov' and the 'test'.The assembly is actually checking whether 1 equals 1. Mov eax, 1 test eax, eax je SHORT $L473The code in this line is the code generated for the 'while( 1 )' C code, to be exact, it represents the loop break condition. The compiler is very liberal with how it assigns storage in the function, and readily discards values that are not needed.Example: Manual Optimization. Also, the value of r is tested twice, in the same places. The structure of the function is altered greatly: the division of m and n to produce q and r is performed in this function twice: once at the beginning of the function to initialize, and once at the end of the loop.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |