From owner-freebsd-current@FreeBSD.ORG Thu Aug 28 12:55:44 2003 Return-Path: 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 0310C16A4BF for ; Thu, 28 Aug 2003 12:55:44 -0700 (PDT) Received: from tensor.xs4all.nl (tensor.xs4all.nl [194.109.160.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFF5343F93 for ; Thu, 28 Aug 2003 12:55:42 -0700 (PDT) (envelope-from dim@xs4all.nl) Received: from kilgore.dim (kilgore.dim [192.168.0.3]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by tensor.xs4all.nl (Postfix) with ESMTP id B01E222819 for ; Thu, 28 Aug 2003 21:55:40 +0200 (CEST) Date: Thu, 28 Aug 2003 21:55:13 +0200 From: Dimitry Andric X-Mailer: The Bat! (v2.0 Beta/5) UNREG / CD5BF9353B3B7091 X-Priority: 3 (Normal) Message-ID: <1947473743.20030828215513@xs4all.nl> To: FreeBSD Current List MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="----------CD11E1313B88611" Subject: Generating PPro instructions with CPUTYPE=i586? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2003 19:55:44 -0000 ------------CD11E1313B88611 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable While trying to build a -CURRENT release for my aging Pentium 150 router box on my substantially faster Athlon XP box, I ran into the following problem. I'm using CPUTYPE=3Di586 in /etc/make.conf, since the target box is not even capable of doing MMX. However, when the build is complete and I try to installkernel on the target box, the install tools all bomb out with SIGILLs. For example, % gdb infokey GNU gdb 5.2.1 (FreeBSD) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-undermydesk-freebsd"... (no debugging symbols found)... (gdb) run Starting program: /usr/obj/usr/src/i386/legacy/usr/bin/infokey=20 Program received signal SIGILL, Illegal instruction. 0x080556d4 in malloc_bytes () (gdb) disassemble Dump of assembler code for function malloc_bytes: 0x80556c0 : push %ebp 0x80556c1 : mov %esp,%ebp 0x80556c3 : push %edi 0x80556c4 : push %esi 0x80556c5 : push %ebx 0x80556c6 : sub $0x1c,%esp 0x80556c9 : mov 0x8(%ebp),%eax 0x80556cc : cmp $0xf,%eax 0x80556cf : mov $0x10,%edx 0x80556d4 : cmovbe %edx,%eax As you see, it seems to have generated a cmovbe instruction, which is only supported for Pentium Pro and higher. Is this normal? From the buildlog it seems that all tools under .../i386/legacy were built *without* any CPU specific flags, i.e. just -O -pipe. Only from "stage 4: building libraries" I see the options change to -O -pipe -march=3Dpentium. Note that the Athlon XP box I'm building on has been completely built using CPUTYPE=3Dathlon-xp, maybe this influences the default instruction set that gcc uses, even without -march flags? ------------CD11E1313B88611 Content-Type: application/pgp-signature -----BEGIN PGP MESSAGE----- Version: GnuPG v1.2.2 (MingW32) iD8DBQE/Tl4hsF6jCi4glqMRAn7BAJwOltoaeiBIHEgz75pFQTVW8ezIawCfb4WW th6n32caayJLuia8ao+gqC0= =fUt1 -----END PGP MESSAGE----- ------------CD11E1313B88611--