From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28652 invoked by alias); 12 Aug 2008 01:08:04 -0000 Received: (qmail 28643 invoked by uid 22791); 12 Aug 2008 01:08:03 -0000 X-Spam-Check-By: sourceware.org Received: from dessent.net (HELO dessent.net) (69.60.119.225) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Aug 2008 01:07:10 +0000 Received: from localhost.localdomain ([127.0.0.1] helo=dessent.net) by dessent.net with esmtp (Exim 4.50) id 1KSiLp-0003qU-50; Tue, 12 Aug 2008 01:07:05 +0000 Message-ID: <48A0E23F.EE8BC28C@dessent.net> Date: Tue, 12 Aug 2008 02:29:00 -0000 From: Brian Dessent Reply-To: gcc-help@gcc.gnu.org X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: Bob Plantz CC: Andrew Haley , Robin-Vossen , gcc-help@gcc.gnu.org Subject: Re: GNU C++ Inline Assembler References: <18912389.post@talk.nabble.com> <1218415637.5988.10.camel@bob-desktop> <18929255.post@talk.nabble.com> <48A08513.6050103@redhat.com> <1218489833.5989.6.camel@bob-desktop> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00108.txt.bz2 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: . Brian