This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: RFA: [PATCH]: MIPS enhancements to libgcj...
- From: Jeff Sturm <jsturm at one-point dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: java-patches at gcc dot gnu dot org, Eric Christopher <echristo at redhat dot com>
- Date: Tue, 21 Oct 2003 16:23:25 -0400 (EDT)
- Subject: Re: RFA: [PATCH]: MIPS enhancements to libgcj...
On Tue, 21 Oct 2003, David Daney wrote:
> >Probably want a memory clobber here...
> >
> Perhaps, can anyone verify that?
At a minimum, you should have something like i386:
__asm__ __volatile__(" " : : : "memory");
*(addr) = new_val;
The "memory" clobber prevents GCC from moving loads and stores across the
asm.
> Or if "sync" is even needed?
Depending on the memory model, it may be essential on multiprocessor
systems.
> Or if "sync" is available on most/all CPUs?
No idea. Surely a MIPS architecture manual would tell you (if there is
such a thing).
Jeff