GCC Status Report (2004-03-09)
Paul Koning
pkoning@equallogic.com
Tue Mar 16 16:59:00 GMT 2004
>>>>> "Mark" == Mark Mitchell <mark@codesourcery.com> writes:
Mark> The other alternative I can think of is to introduce a
Mark> scheduling barrier (e.g., a dummy vaolatile asm) after the
Mark> clearing operation.
It would be nice if there were a clearly documented way to do that.
I've found two:
asm("")
asm("":::"memory")
The former does what I want but isn't documented and (according to
what I was told) should NOT be counted on to be a barrier.
The latter is documented and does a superset of what I needed at the
time. I say "superset" because it causes registers to be reloaded
with data from variables (due to the memory clobber). That's a
performance hit if I didn't have any real memory clobbers in the
system.
Perhaps we need asm("":::"barrier")?
paul
More information about the Gcc
mailing list