From owner-freebsd-current Mon Dec 23 20:55: 3 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F066A37B401; Mon, 23 Dec 2002 20:55:01 -0800 (PST) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E11343EEF; Mon, 23 Dec 2002 20:55:01 -0800 (PST) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.6/8.12.2) with ESMTP id gBO4sudD017780; Mon, 23 Dec 2002 20:54:56 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.6/8.12.6/Submit) id gBO4rfFr017771; Mon, 23 Dec 2002 20:53:41 -0800 (PST) Date: Mon, 23 Dec 2002 20:53:41 -0800 From: "David O'Brien" To: Bruce Evans Cc: Juli Mallett , current@FreeBSD.ORG Subject: Re: WEIRD! div() broken on -CURRENT? Message-ID: <20021224045341.GB17618@dragon.nuxi.com> Reply-To: obrien@FreeBSD.ORG Mail-Followup-To: David O'Brien , Bruce Evans , Juli Mallett , current@FreeBSD.ORG References: <20021221162001.A17127@dilbert.robbins.dropbear.id.au> <20021222103405.A7492-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021222103405.A7492-100000@gamplex.bde.org> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Dec 22, 2002 at 10:40:33AM +1100, Bruce Evans wrote: > > that the pcc struct return convention had something to do with it. > > Did we really mean to change this? It is a relatively recent change. From > cvs history: > > % RCS file: /home/ncvs/src/contrib/gcc/config/freebsd.h,v > % Working file: freebsd.h > % head: 1.37 > % ... > % ---------------------------- > % revision 1.37 > % date: 2002/04/30 17:22:42; author: obrien; state: Exp; lines: +34 -460 > % MI bits for Gcc 3.1. > % ---------------------------- > > This contains mounds changes, one of which breaks 5-10 (?) years of binary > compatibility within gcc-compiled objects: Actually only a 4 years -- the a.out->ELF cut over broke the "5-10 years of binary compatibility". As mentioned at http://gcc.gnu.org/ml/gcc-patches/2002-01/msg01783.html we really made a mistake when we did the a.out->ELF cut over thus resulting in us breaking the i386 ELF ABI. I have wondered in the past how this affects is with sharing XFree86 binary modules with Linux. That said, the ABI change was not intentional. It was a GCC bug. > % RCS file: /home/ncvs/src/contrib/gcc/config/freebsd.h,v ... > % -#undef DEFAULT_PCC_STRUCT_RETURN > % -#define DEFAULT_PCC_STRUCT_RETURN 0 I moved this setting from the MI file to the i386 MD file. > I think gcc didn't override its default of DEFAULT_PCC_STRUCT_RETURN = 1 > on i386's meany years ago, since bcc uses this method of returning structs > and ISTR copying the gcc behaviour. AFAIK, stock GCC always used DEFAULT_PCC_STRUCT_RETURN=1 for i386 ELF. DEFAULT_PCC_STRUCT_RETURN=0 was the a.out default, as there wasn't a standard one had to adhear to. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message