Buy the book!
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
Compiler optimizations in the presence of Inline Assembler may sometimes have unwanted effects.
For example, when
Asm invocation with an input variable is inside a loop, the compiler might move
the loading of the input variable outside the loop, regarding it as a
If this effect is not desired, you can disable such optimizations by setting the
Volatile parameter to
True; for example:
Asm ("movl %0, %%ebx" & LF & HT & "movl %%ebx, %1", Inputs => Unsigned_32'Asm_Input ("g", Var_In), Outputs => Unsigned_32'Asm_Output ("=g", Var_Out), Clobber => "ebx", Volatile => True);
Volatile is set to
False unless there is no
True prevents unwanted optimizations,
it will also disable other optimizations that might be important for efficiency.
In general, you should set
True only if the compiler's
optimizations have created problems.
|webmaster||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|