Subject: Re: CVS commit: src/regress/sys/kern/ras
To: Martin Husemann <martin@duskware.de>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: source-changes
Date: 01/07/2004 14:25:31
> > Using:
> >
> > __asm __volatile("":::"memory");
> >
> > on both sides of the RAS ought to be enough, if the RAS doesn't operate
> > on any locals.
>
> Thanks, I'll try that and remove the -O0 if it works.
>
> Should we turn that into a macro to stay gcc-neutral?
You might also consider this:
#define __insn_barrier() __asm __volatile("": : : "g0")
(see sparc/include/cdefs.h), which prevents instruction re-ordering
but does not include the `memory clobber' that will cause register
reloads on the other side.
-pk