From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9488 invoked by alias); 22 Mar 2002 21:41:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9423 invoked from network); 22 Mar 2002 21:41:07 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 22 Mar 2002 21:41:07 -0000 Received: from localhost.redhat.com (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id NAA08297; Fri, 22 Mar 2002 13:40:58 -0800 (PST) Received: by localhost.redhat.com (Postfix, from userid 469) id AF91F11429; Fri, 22 Mar 2002 16:40:35 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15515.42195.51105.78562@localhost.redhat.com> Date: Fri, 22 Mar 2002 13:41:00 -0000 To: Kevin Buettner Cc: Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [RFA] PPC ABI compliance fix In-Reply-To: <1020322204651.ZM27792@localhost.localdomain> References: <15515.34258.778318.466752@localhost.redhat.com> <1020322204651.ZM27792@localhost.localdomain> X-Mailer: VM 7.00 under Emacs 20.7.1 X-SW-Source: 2002-03/txt/msg00436.txt.bz2 Kevin Buettner writes: > On Mar 22, 2:28pm, Elena Zannoni wrote: > > > Back in November, gcc changed the way structures <= 8 bytes are > > returned on the PPC. The change was made to be compliant with the > > SVR4 ABI. > > > > http://gcc.gnu.org/ml/gcc-patches/2001-11/msg01468.html > > > > The abi specifies that such structures are passed in r3 and r4. > > Bigger structures are passed in memory. > > > > Gcc was passing every structure in memory. The change was made for > > embedded targets, but not for natives (PowerPC Linux, NetBSD, and > > FreeBSD). > > > > Of course this change breaks binary compatibility with older gcc's. > > Not sure what to do about that, if anything, the case it covers is a > > corner case, anyway. > > Hmm... I have a hunch that, eventually, the natives will need to > change too. > Gcc is explicitly disabling ABI compliance for the natives. I think Aldy asked to the gcc mailing list if he could change at least Linux, and there was a loud 'No'. > For now though, your change is okay. > > (Alternately, we could take a really hard nosed stance and implement > the ABI exactly as written and just put up with the failures.) > Ironically enough the gcc implementation is not correct, yet. It screws up where exactly in r3 and r4 it puts the structure if the structure is strictly less than 8 bytes. :-( For instances 5 characters are stored like R3 R4 . . . h e l l o Instead of R3 R4 h e l l o . . . I thought Aldy was taking care of this, but he has gone on vacation. Elena > Kevin