From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6684 invoked by alias); 8 Jan 2008 14:13:39 -0000 Received: (qmail 6673 invoked by uid 22791); 8 Jan 2008 14:13:38 -0000 X-Spam-Check-By: sourceware.org Received: from qmta10.emeryville.ca.mail.comcast.net (HELO QMTA10.emeryville.ca.mail.comcast.net) (76.96.30.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 08 Jan 2008 14:13:12 +0000 Received: from OMTA05.emeryville.ca.mail.comcast.net ([76.96.30.43]) by QMTA10.emeryville.ca.mail.comcast.net with comcast id ac8s1Y0070vp7WLAA0Au00; Tue, 08 Jan 2008 14:13:10 +0000 Received: from lucon.org ([76.126.237.145]) by OMTA05.emeryville.ca.mail.comcast.net with comcast id aeCy1Y00538uYQk8R00000; Tue, 08 Jan 2008 14:12:59 +0000 X-Authority-Analysis: v=1.0 c=1 a=fYmO3zSF-rAA:10 a=1XWaLZrsAAAA:8 a=2Cm9yUGpwu1cxQLDAW8A:9 a=85Aq0WWAd8E0nY5S-jQGXmmxzncA:4 a=LY0hPdMaydYA:10 Received: by lucon.org (Postfix, from userid 500) id EE87EF82F9; Tue, 8 Jan 2008 06:13:09 -0800 (PST) Date: Tue, 08 Jan 2008 14:13:00 -0000 From: "H.J. Lu" To: Andrew Haley Cc: gcc@gcc.gnu.org Subject: Re: ABI compatibility regression: Return values on x86 Message-ID: <20080108141309.GA16021@lucon.org> References: <18306.28712.965027.740080@zebedee.pink> <20080107210457.GA10004@lucon.org> <18307.33118.456533.834701@zebedee.pink> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18307.33118.456533.834701@zebedee.pink> User-Agent: Mutt/1.5.17 (2007-11-01) X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg00059.txt.bz2 On Tue, Jan 08, 2008 at 01:57:50PM +0000, Andrew Haley wrote: > H.J. Lu writes: > > On Mon, Jan 07, 2008 at 06:32:08PM +0000, Andrew Haley wrote: > > > > > > So, what now? Can we even agree about what the psABI actually says > > > about sign-extending result values? Was what we did before correct, > > > or what we do now? I don't believe that it doesn't matter. > > > > You can follow up with this thread in ia32 psABI discussion group: > > > > http://groups.google.com/group/ia32-abi/browse_thread/thread/f47e0106b21d9269 > > Thanks for the reference. The attitude there looks surprisingly > complacent, but if Intel and gcc x86 maintainers agree that it doesn't > matter I suppose I'll have to defer to the weight of opinion. > My understanding is either way is ia32 psABI compliant. If the caller code generated by gcc is ia32 psABI compliant, that is --- callers need to assume that return value is in %al/%ax and that the upper bits of %eax are undefined. If the caller needs a 32-bit sign- or zero-extended value, it needs to do the extend itself. --- it shouldn't be a problem. H.J.