Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Oct 2004 11:30:11 -0700
From:      "David O'Brien" <obrien@FreeBSD.org>
To:        Ruslan Ermilov <ru@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc/i386/net htonl.S ntohl.S
Message-ID:  <20041018183011.GB10529@dragon.nuxi.com>
In-Reply-To: <20041018180319.GD89681@ip.net.ua>
References:  <200410181719.i9IHJa9l097436@repoman.freebsd.org> <20041018173516.GB89681@ip.net.ua> <20041018174511.GA6079@dragon.nuxi.com> <20041018180319.GD89681@ip.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 18, 2004 at 09:03:20PM +0300, Ruslan Ermilov wrote:
> On Mon, Oct 18, 2004 at 10:45:11AM -0700, David O'Brien wrote:
> > On Mon, Oct 18, 2004 at 08:35:16PM +0300, Ruslan Ermilov wrote:
> > > On Mon, Oct 18, 2004 at 05:19:36PM +0000, David E. O'Brien wrote:
> > > > obrien      2004-10-18 17:19:36 UTC
> > > >   FreeBSD src repository
> > > >   Modified files:
> > > >     lib/libc/i386/net    htonl.S ntohl.S 
> > > >   Log:
> > > >   Sync with sys/i386/include/endian.h: use the single instruction 'bswap'.
> > > >   Revision  Changes    Path
> > > >   1.10      +4 -0      src/lib/libc/i386/net/htonl.S
> > > >   1.10      +4 -0      src/lib/libc/i386/net/ntohl.S
> > > :  ENTRY(__htonl)
> > > :         movl    4(%esp),%eax
> > > : +#ifdef I386_CPU
> > > :         xchgb   %al,%ah
> > > :         roll    $16,%eax
> > > :         xchgb   %al,%ah
> > > : +#else
> > > : +       bswap   %eax
> > > : +#endif
> > > :         ret
> > > 
> > > Ahem, but this makes this code unsuitable for i386.
> > 
> > Yes.  You missed the discussion in freebsd-current on this?  For
> > 6-CURRENT and RELENG_5 running on a real I386 is not supported.
> 
> Hmm.  I remember the plan was to decomission the i386 support
> only in 6.0-CURRENT, as per sys/i386/conf/NOTES:
...
> If you are burning 6.0-CURRENT bridges already, and this change
> is the step in the I386_CPU deprecation direction, why not just
> unifdef(1) this libc code, so that the "xchg" is always used?

I'm not decommisioning it -- I left a code path in there for someone who
cares about running on real I386 CPU's.  I also plan on MFC'ing this to
RELENG_5 once the branch opens up.  Please go read the freebsd-current
thread.  As noted there we haven't built a 5-CURRENT I386 runable kernel
since 2001.  Do you really think things haven't attrophied such that one
must do some work to run on an I386 at this point?

-- 
-- David  (obrien@FreeBSD.org)



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