On 03 Oct 2011, at 10:14, Florian Klämpfl wrote:

FPC doesn't do any optimization in procedures containing inline assembler.

It does. But also assumes that all registers are used in assembler blocks, unless the programmer specifies otherwise. If you change the assembler block into

  asm nop end [];

then the statement will optimized. Otherwise the compiler assumes that the contents of eax may still be used inside the assembler block and hence cannot remove its use.

The fact that the optimization is performed in case the used register is ax instead of eax suggests a small bug.


Jonas_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to