From owner-freebsd-i386@FreeBSD.ORG Wed Apr 8 21:31:33 2009 Return-Path: Delivered-To: freebsd-i386@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51CB51065672 for ; Wed, 8 Apr 2009 21:31:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id E6DCD8FC16 for ; Wed, 8 Apr 2009 21:31:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1Lreqw-000ERN-J6; Wed, 08 Apr 2009 23:58:34 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n38KwVC9074564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Apr 2009 23:58:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n38KwVIS007210; Wed, 8 Apr 2009 23:58:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n38KwV7I007209; Wed, 8 Apr 2009 23:58:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 8 Apr 2009 23:58:31 +0300 From: Kostik Belousov To: Christoph Mallon Message-ID: <20090408205831.GK3014@deviant.kiev.zoral.com.ua> References: <49DD01CA.3040900@gmx.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1y1tiN5hVw5cPBDe" Content-Disposition: inline In-Reply-To: <49DD01CA.3040900@gmx.de> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1Lreqw-000ERN-J6 cb1c7ae4464e023beb1abd38385d05dc X-Terabit: YES Cc: Ed Schouten , freebsd-i386@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: [PATCH] Simplify in*() and out*() functions of AMD64 and i386 X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2009 21:31:33 -0000 --1y1tiN5hVw5cPBDe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 08, 2009 at 09:58:02PM +0200, Christoph Mallon wrote: > Hi amd64@ and i386@, >=20 > attached is a patch which simplifies the in*() and out*() functions for= =20 > I/O port access of AMD64 and i386. It removes an unnecessary distinction= =20 > of cases for inb() and outb(), which was used to generate better code=20 > for ports < 256. This is unnecessary, because GCC supports an asm input= =20 > constraint to handle this ("N"). The stale comment, which states there=20 > is no constraint for this, is removed, too. Also the {in,out}{w,l}() get= =20 > treated with this constraint. They had no special case before, so now=20 > better code is generated for them. Further, the unnecessary "cld" is=20 > removed from {in,out}s{b,w,l}(), because it is guaranteed by the ABI=20 > that the direction flag is cleared. All in all the code for in/out gets= =20 > a bit simpler. The DF flag is guaranteed to be cleared for usermode only. Currently, kernel does not clear the flag on entry. We did fixed signal handlers to always have DF cleared, but the kernel was explicitely left out because used version of gcc does the right thing with DF when needed. --1y1tiN5hVw5cPBDe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkndD/UACgkQC3+MBN1Mb4hXiwCg2e662P8WkauJesi4PCP7YRVT /tEAoNa5yIybsppNuukP1CgbmNJMdClQ =A95l -----END PGP SIGNATURE----- --1y1tiN5hVw5cPBDe--