Date: Wed, 27 Jan 1999 19:12:51 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Bruce Evans <bde@zeta.org.au> Cc: current@FreeBSD.ORG Subject: Re: Changing bzero, bcopy, memset, memcpy, etc... prototypes Message-ID: <199901280312.TAA92729@apollo.backplane.com> References: <199901280301.OAA25274@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
:
:No. bzero() and bcopy() are for handling ordinary memory. There is no
:proper way to volatilize them without pessimizing them. Adding volatile
:to their prototypes won't actually make them handle volatile memory; it
:just breaks the warnings. Some of the i586-optimized versions in fact
:don't handle volatile memory properly - they do things like reading some
:locations twice to prefetch the cache lines. Even ordinary bcopy() via
:movsl accesses memory backwards in some cases.
:
:Drivers should use the bus access macros.
:
:Bruce
Hmmm.. quite a bit more work.
-Matt
Matthew Dillon
<dillon@backplane.com>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901280312.TAA92729>
