From owner-cvs-src@FreeBSD.ORG Mon Oct 18 18:03:37 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 513E816A4CE; Mon, 18 Oct 2004 18:03:37 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8813243D39; Mon, 18 Oct 2004 18:03:36 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i9II3ZJG098360; Mon, 18 Oct 2004 21:03:35 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 34755-19; Mon, 18 Oct 2004 21:03:34 +0300 (EEST) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i9II3RGj098356; Mon, 18 Oct 2004 21:03:30 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id i9II3KOX090004; Mon, 18 Oct 2004 21:03:20 +0300 (EEST) (envelope-from ru) Date: Mon, 18 Oct 2004 21:03:20 +0300 From: Ruslan Ermilov To: "David O'Brien" Message-ID: <20041018180319.GD89681@ip.net.ua> References: <200410181719.i9IHJa9l097436@repoman.freebsd.org> <20041018173516.GB89681@ip.net.ua> <20041018174511.GA6079@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SO98HVl1bnMOfKZd" Content-Disposition: inline In-Reply-To: <20041018174511.GA6079@dragon.nuxi.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/i386/net htonl.S ntohl.S X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2004 18:03:37 -0000 --SO98HVl1bnMOfKZd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=20 > > > Log: > > > Sync with sys/i386/include/endian.h: use the single instruction 'bs= wap'. > > > 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 > >=20 > > Ahem, but this makes this code unsuitable for i386. >=20 > Yes. You missed the discussion in freebsd-current on this? For > 6-CURRENT and RELENG_5 running on a real I386 is not supported. >=20 Hmm. I remember the plan was to decomission the i386 support only in 6.0-CURRENT, as per sys/i386/conf/NOTES: # Be sure to disable 'cpu I386_CPU' for SMP kernels. # I386_CPU is mutually exclusive with the other CPU types. # I386_CPU is deprecated and will be removed in 6.0-RELEASE. And http://www.freebsd.org/releases/5.2.1R/hardware-i386.html#PROC says i386 (except 386SX) is still supported. I recall phk@ looking for the 386DX testers, but I don't remember what was the result. 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? > > I386_CPU > > is only defined if kernel config file has "cpu I386_CPU", and > > this has little relation to libc if at all. >=20 > I know. Give me some other symbol then we can publish that one should > add to /etc/make.conf CFLAGS to try to build a userland for an I386. > "I386_CPU" looks as good a spelling as any and I didn't see any need to > spell it differently than in the kernel. >=20 You can check for the CPUTYPE=3D"i386" for ${MACHINE_ARCH} =3D=3D "i386" in libc/Makefile, and set I386_CPU in CFLAGS in this case. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --SO98HVl1bnMOfKZd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBdAVnqRfpzJluFF4RArQ8AJwKAdH082TeByAbFDX3edmlTP7QrQCfWmoP 5VJb8+RzBFXbTPdToqTLsyI= =UcvN -----END PGP SIGNATURE----- --SO98HVl1bnMOfKZd--