On 9/11/07, 陶捷 TaoJie <[EMAIL PROTECTED]> wrote: > I found that there were alway serveral nop instructions followed with the > jmp instruction in the program generated by suncc. > > err... Why does sun cc generate code using this pattern (a jmp followed by > serveral nops)? For what?
In some cases, the compiler *needs* to put a nop instruction right after the branch because SPARC implements delayed branches. If the compiler could not find a useful instruction to fill the delay slot, then it puts a nop there. With no optimizations turned on, the compiler will not spend time to do any of that, so that it can trade code quality for faster compile time. Rayson > > TIA > > > Regards, > TJ > _______________________________________________ > dtrace-discuss mailing list > [email protected] > _______________________________________________ dtrace-discuss mailing list [email protected]
