From owner-freebsd-questions@FreeBSD.ORG Sun Sep 28 10:52:05 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC19E16A4B3 for ; Sun, 28 Sep 2003 10:52:05 -0700 (PDT) Received: from falcon.midgard.homeip.net (h76n3fls24o1048.bredband.comhem.se [213.67.148.76]) by mx1.FreeBSD.org (Postfix) with SMTP id 5C41644048 for ; Sun, 28 Sep 2003 10:52:02 -0700 (PDT) (envelope-from ertr1013@student.uu.se) Received: (qmail 95458 invoked by uid 1001); 28 Sep 2003 17:52:00 -0000 Date: Sun, 28 Sep 2003 19:51:59 +0200 From: Erik Trulsson To: Alex de Kruijff Message-ID: <20030928175159.GA95425@falcon.midgard.homeip.net> Mail-Followup-To: Alex de Kruijff , freebsd-questions@freebsd.org References: <20030928173759.GA16713@dds.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030928173759.GA16713@dds.nl> User-Agent: Mutt/1.5.4i cc: freebsd-questions@freebsd.org Subject: Re: Q: Compiles for wrong processor and it still worked X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2003 17:52:05 -0000 On Sun, Sep 28, 2003 at 07:37:59PM +0200, Alex de Kruijff wrote: > I have compiles my world sources for the PIII processors. I have > recently discoverd that i have a number of PII processors. The compiled > code for PIII still works on them. I'm ammazed. :o Can anybody explain why? The reason why it worked is obviously that the compiler didn't generate any PIII-only instructions in the code. The only real difference between PII and PIII is that the PIII has support for SSE, which most compilers don't use anyway, so it is not very amazing that code compiled for a PIII worked on a PII. If you are running -stable it is even less amazing since the compiler included in 4.x is too old to know how to optimize for the PIII, so it will generate identical code for all the processors based on the P6 micro-architecture (i.e the Pentium Pro, Pentium II and Pentium III) as well as for the newer Pentium 4. -- Erik Trulsson ertr1013@student.uu.se