Subject: Re: CVS commit: src/regress/sys/kern/ras
To: Martin Husemann <martin@netbsd.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: source-changes
Date: 01/06/2004 17:08:07
--f+W+jCU1fRNres8c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 06, 2004 at 09:40:57PM +0000, Martin Husemann wrote:
>=20
> Module Name:	src
> Committed By:	martin
> Date:		Tue Jan  6 21:40:57 UTC 2004
>=20
> Added Files:
> 	src/regress/sys/kern/ras: Makefile.inc
>=20
> Log Message:
> Avoid optimizations that move common code out of the RAS.
> The compiler does not understand RAS, so it makes wrong assumptions
> about the lifetime of register values.

Wouldn't it be better to tell the compiler that it can't reorder? I'm=20
concerend that by relying on compile settings we end up with something a=20
bit fragile.

For C code, "volatile" (or "__volatile" or however we spell it now) is the=
=20
way to go. I realize you have some .s files in here, but there should be a=
=20
way to tell the compiler to not move code around there too.

Take care,

Bill

--f+W+jCU1fRNres8c
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQE/+1v3Wz+3JHUci9cRAhNwAJwOez+EF6R7L6ZpVbfeogUiM0XAoQCgkfIb
mbK/e3MqxOXc+lCyWI2DM7o=
=hSnm
-----END PGP SIGNATURE-----

--f+W+jCU1fRNres8c--