New SPARC definition, and volatile
Peter da Silva
peter at ficc.ferranti.com
Tue Mar 26 01:16:29 AEST 1991
C-language followups: please redirect to comp.lang.c
Architecture followups: please redirect to comp.arch
In article <40492 at cup.portal.com> mslater at cup.portal.com (Michael Z Slater) writes:
> The version 8 specification adds integer multiply and divide instructions.
> In addition, a "Store Barrier" instruction was added that requires all stores
> initiated before it to be completed before operation can continue. This is
> designed to support future multiprocessor machines that allow memory
> operations to occur out-of-order.
One thing that occurred to me, reading this, is what impact this sort of
instruction has on the use of "volatile" in C. If "volatile" implies the
use of a "store barrier" instruction on writes, this would impact the
performance of software that's using volatile to (for example) synchronise
lightweight processes on a single CPU, but to not use it would break s/w
that's using spinlocks for multiprocessor synchronisation.
What's the answer? "#pragma really_volatile"?
--
Peter da Silva. `-_-' peter at ferranti.com
+1 713 274 5180. 'U` "Have you hugged your wolf today?"
More information about the Comp.lang.c
mailing list