This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Status Report (2004-03-09)
Paul Koning <pkoning@equallogic.com> writes:
> >>>>> "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")?
Seconded. For high performance device manipulation, it would be good
to have a way to say "do not schedule instructions across this point"
without also saying "clobber everything".
Ian