From owner-freebsd-ppc@FreeBSD.ORG Tue Jun 14 20:28:49 2005 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 380E916A41C for ; Tue, 14 Jun 2005 20:28:49 +0000 (GMT) (envelope-from toa@pop.agri.ch) Received: from smtp.messaging.ch (exsmtp01.agrinet.ch [81.221.250.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id B617F43D55 for ; Tue, 14 Jun 2005 20:28:48 +0000 (GMT) (envelope-from toa@pop.agri.ch) Received: from [192.168.225.5] ([80.218.0.93]) by smtp.messaging.ch with Microsoft SMTPSVC(6.0.3790.211); Tue, 14 Jun 2005 22:28:46 +0200 Message-ID: <42AF3DF7.1080701@pop.agri.ch> Date: Tue, 14 Jun 2005 22:28:39 +0200 From: Andreas Tobler User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-ppc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 14 Jun 2005 20:28:46.0730 (UTC) FILETIME=[AA6FB6A0:01C5711F] Subject: ABI convention for structs <=8 bytes? X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2005 20:28:49 -0000 Hello all, I play around with gdb and libffi. And also gcc. My situation is the following, there are two implementation of the SYSv4 abi for PPC around in gcc. The first one, a draft, passes structs smaller or equal to 8 bytes in memory. The second one, the final one, passes them in registers. So far the fbsd ppc uses the final one. Fine. Except that it is a nightmare to build the resulting struct out of registers with alignment rules... OpenBSD, NetBSD and Linux PPC which rely on SYSV4 pass them in memory. AIX and Darwin do pass them also in memory but they have a different ABI. NetBSD passed it until 1.5 also in registers, according to the comments in gdb ppcnbsd-tdep.c. Now they use the 'broken' convention. I do not know more about why and how long this will be... My simple question is, will the fbsd-ppc ABI convention stay with the final SYSV4 ABI from Sun, or will there be a switch to the broken one? Thanks for comments, Andreas