This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: MS/CW-style inline assembly for GCC
On May 3, 2004, at 9:19 PM, Richard Henderson wrote:
On Mon, May 03, 2004 at 05:35:40PM -0700, Stan Shebs wrote:
Can you be more specific about the difficulties?
(1) Control flow. MSVC allows branches to leave the asm block,
something that doesn't map onto existing gcc asm blocks.
The hack we had for this was truely odious.
<other horrible things snipped>
Thanks for the list. As you say, awful stuff.
I don't think we want to emulate all of these things, which means
that not all code will be directly portable from MSVC to gcc. Maybe
this means that "MS/CW-style" is a bad name for what we're trying
to do. Perhaps a better name would just be: more natural syntax
for inline assembly. There will be a large common subset between
the new gcc inline assembly syntax and MSVC inline assembly
syntax, but not an expectation that it will be wart-for-wart identical.
Again, one of the motivations for this is compatibility, but that's not
the only motive. The other one is that the existing gcc syntax is
just plain ugly. We're not just trying to follow someone else
slavishly, we're trying to adopt a new syntax because we think the
new syntax is better.
--Matt