Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Apr 2009 23:58:31 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Christoph Mallon <christoph.mallon@gmx.de>
Cc:        Ed Schouten <ed@freebsd.org>, freebsd-i386@freebsd.org, freebsd-amd64@freebsd.org
Subject:   Re: [PATCH] Simplify in*() and out*() functions of AMD64 and i386
Message-ID:  <20090408205831.GK3014@deviant.kiev.zoral.com.ua>
In-Reply-To: <49DD01CA.3040900@gmx.de>
References:  <49DD01CA.3040900@gmx.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090408205831.GK3014>