Re: GNU C++ Inline Assembler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bob Plantz wrote:

> How can that be? The thing that matters is the machine code. Both
> syntaxes generate exactly the same machine code.

Because the MSVC style of inline assembler doesn't allow for specifying
any constraints such as which registers or stack slots are clobbered. 
This means that compiler can't assume anything about the state before
and after the block, it must just throw away all dataflow information it
had before the block and assume everything was clobbered, leading to
tons of useless redundant loads/stores.  The GNU style inline asm works
within the framework of the optimizing compiler, rather than outside it
by totally going behind it's back.

Read the long thread that starts here:
<http://gcc.gnu.org/ml/gcc/2004-05/threads.html#00070>.

Brian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux