public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Brian Dessent <brian@dessent.net>
To: Bob Plantz <plantz@cds1.net>
Cc: Andrew Haley <aph@redhat.com>,
	 	Robin-Vossen <robin-vossen@hotmail.com>,
	gcc-help@gcc.gnu.org
Subject: Re: GNU C++ Inline Assembler
Date: Tue, 12 Aug 2008 02:29:00 -0000	[thread overview]
Message-ID: <48A0E23F.EE8BC28C@dessent.net> (raw)
In-Reply-To: <1218489833.5989.6.camel@bob-desktop>

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

  reply	other threads:[~2008-08-12  1:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-10 21:39 Robin-Vossen
2008-08-11  6:37 ` Bob Plantz
2008-08-11 16:35   ` Robin-Vossen
2008-08-11 16:59     ` David Daney
2008-08-11 21:24     ` Andrew Haley
2008-08-12  1:08       ` Bob Plantz
2008-08-12  2:29         ` Brian Dessent [this message]
2008-08-12  8:56           ` Bob Plantz
2008-08-13 17:27             ` Robin-Vossen
2008-08-12 15:26           ` Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48A0E23F.EE8BC28C@dessent.net \
    --to=brian@dessent.net \
    --cc=aph@redhat.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=plantz@cds1.net \
    --cc=robin-vossen@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).