![]() Movl $.LC5, %edi # // move "Loop test over" to %edi Movl $.LC4, %edi # // move "Second if test over" to %edi Movl $.LC3, %edi # // move "First if test over" to %edi Here's the assembly output of test_normally() from gcc on a 64 bit Intel processor - you can see that there's almost a one-to-one mapping between the assembly instructions and the C source for the other function, test_subnormally(). ![]() Test_subnormally() is actually very close to what the processor is actually doing, after your C source gets compiled into machine code. Loop test comparing the two functions, hopefully you can see why if and while and all their friends are better than the alternatives. In the following program, the functions test_normally() and test_subnormally() are equivalent: #include ![]() You don't even need while, you just need to be able to compare and to be able to branch, in other words, if and goto.
0 Comments
Leave a Reply. |