Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Dec 2002 20:43:25 -0800
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Tim Robbins <tjr@FreeBSD.ORG>
Cc:        Joe Marcus Clarke <marcus@marcuscom.com>, current@FreeBSD.ORG
Subject:   Re: WEIRD! div() broken on -CURRENT?
Message-ID:  <20021220204325.A76249@FreeBSD.org>
In-Reply-To: <20021221145741.A14018@dilbert.robbins.dropbear.id.au>; from tjr@FreeBSD.ORG on Sat, Dec 21, 2002 at 02:57:41PM %2B1100
References:  <1040437478.29101.23.camel@shumai.marcuscom.com> <20021221145741.A14018@dilbert.robbins.dropbear.id.au>

next in thread | previous in thread | raw e-mail | index | archive | help
* De: Tim Robbins <tjr@FreeBSD.ORG> [ Data: 2002-12-20 ]
	[ Subjecte: Re: WEIRD! div() broken on -CURRENT? ]
> On Fri, Dec 20, 2002 at 09:24:39PM -0500, Joe Marcus Clarke wrote:
> > I'm doing something wrong, right?  I mean, this can't be right.  I've
> > verified this now on a P4 running:
> [...]
> 
> I can reproduce it here. It looks like gcc is using a strange calling
> convention that the i386 div.S does not understand (MI div.c seems to, though).

TenDRA and GCC3 use a different struct return format than we used to
use (see http://gcc.gnu.org/ml/gcc-patches/2002-01/msg01783.html) and
we never had a flag day for the old format, and there's no UPDATING or
whatnot notes about this AFAIK.  This means at least div has to change
to use the new calling convention.  Of course, this only applies to
things in assembly, as everything else returning a struct (in C) already
uses the format of the compiler that compiled it.  Sure changing div
will break dynamically linked programs using the old calling convention,
but anything else returning a struct has already gone through this.  This
will only affect non-native compilers generating code on a running   
FreeBSD 5 system which use the old struct return format.  Older FreeBSD
programs will of course use the old format with an old libc using the
old format, and so it will work if compatability libraries are used.
 
What we need now is a belated UPDATING, HEADS UP, as surely this will
affect some edge case, much like the __sF hiding did, though certainly
not that exact same edge case.  More likely someone calling div() in libc
from assembly (though why they'd do that is beyond me).
  
Thanx,
juli.
-- 
Juli Mallett <jmallett@FreeBSD.org>
OpenDarwin, Mono, FreeBSD Developer.
ircd-hybrid Developer, EFnet addict.
FreeBSD on MIPS-Anything on FreeBSD.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021220204325.A76249>