From owner-cvs-src@FreeBSD.ORG Sun Oct 26 03:47:18 2003 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 A1AC016A4B3; Sun, 26 Oct 2003 03:47:18 -0800 (PST) Received: from mailout04.sul.t-online.com (mailout04.sul.t-online.com [194.25.134.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0276243F75; Sun, 26 Oct 2003 03:47:17 -0800 (PST) (envelope-from Alexander@Leidinger.net) Received: from fwd05.aul.t-online.de by mailout04.sul.t-online.com with smtp id 1ADjMO-0007K7-01; Sun, 26 Oct 2003 12:47:04 +0100 Received: from Andro-Beta.Leidinger.net (JO0T2EZFZez9TuWaU8qhAbhWNxHtPlKLQNCEd+XeRTXndxhP0Byk4k@[217.83.20.54]) by fmrl05.sul.t-online.com with esmtp id 1ADjMI-2Gnrf60; Sun, 26 Oct 2003 12:46:58 +0100 Received: from Magelan.Leidinger.net (Magellan [192.168.1.1]) h9QBknf5071990; Sun, 26 Oct 2003 12:46:49 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from Magelan.Leidinger.net (netchild@localhost [127.0.0.1]) h9QBknDC059440; Sun, 26 Oct 2003 12:46:49 +0100 (CET) (envelope-from Alexander@Leidinger.net) Date: Sun, 26 Oct 2003 12:46:48 +0100 From: Alexander Leidinger To: des@des.no (Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?=) Message-Id: <20031026124648.6dcdb7d4.Alexander@Leidinger.net> In-Reply-To: References: <20031026064145.18F0E2A8D5@canning.wemm.org> X-Mailer: Sylpheed version 0.9.6claws (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Seen: false X-ID: JO0T2EZFZez9TuWaU8qhAbhWNxHtPlKLQNCEd+XeRTXndxhP0Byk4k@t-dialin.net cc: Jeff Roberson cc: src-committers@freebsd.org cc: cvs-all@freebsd.org cc: Peter Wemm cc: cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/i386/i386 pmap.c 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: Sun, 26 Oct 2003 11:47:18 -0000 On Sun, 26 Oct 2003 12:13:37 +0100 des@des.no (Dag-Erling Sm=F8rgrav) wrote: > Is there any way to teach (or trick) gcc to generate a branch which > the p4 will predict correctly? First of all: ---snip--- `-fno-guess-branch-probability' Do not guess branch probabilities using a randomized model. Sometimes gcc will opt to use a randomized model to guess branch probabilities, when none are available from either profiling feedback (`-fprofile-arcs') or `__builtin_expect'. This means that different runs of the compiler on the same program may produce different object code. In a hard real-time system, people don't want different runs of the compiler to produce code that has different behavior; minimizing non-determinism is of paramount import. This switch allows users to reduce non-determinism, possibly at the expense of inferior optimization. The default is `-fguess-branch-probability' at levels `-O', `-O2', `-O3', `-Os'. ---snip--- Except instrumenting the code with "expect" or using "-fprofile-arcs" there's only the possibility to modify the code of gcc to match our existing model... Bye, Alexander. --=20 I believe the technical term is "Oops!" http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint =3D C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7