From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22744 invoked by alias); 10 Feb 2009 15:20:52 -0000 Received: (qmail 22626 invoked by uid 48); 10 Feb 2009 15:20:40 -0000 Date: Tue, 10 Feb 2009 15:20:00 -0000 Message-ID: <20090210152040.22625.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/16331] x86-64 inline asm register constraints insufficient WRT ABI In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ubizjak at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg00882.txt.bz2 ------- Comment #14 from ubizjak at gmail dot com 2009-02-10 15:20 ------- > > OTOH, constraints should be used to support correct register > > allocation for machine instructions, not to emulate ABI in order to > > support calls from inside asm statements. > > Please indulge me for a moment. > > What exactly is a call? > > Are you considering the only method of transferring control to be the > standard 'near call' & 'near ret' instructions on the x86? I was referring at the procedure call, where you need to setup outgoing arguments on the calling point and setup incoming arguments on caller point. gcc will magically match these two no matter what ABI-changing compile flag (i.e. -mregparm) you use. When you call procedure from inside asm, gcc does not know about that, and there is no way that gcc will know where arguments are to be found. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16331