This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: [PATCH] MIPS: Implement built-in atomic memory operations.
- From: "Maciej W. Rozycki" <macro at linux-mips dot org>
- To: David Daney <ddaney at avtrex dot com>
- Cc: richard at codesourcery dot com, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 13 Aug 2007 19:08:48 +0100 (BST)
- Subject: Re: RFC: [PATCH] MIPS: Implement built-in atomic memory operations.
- References: <46BF6B8A.2050405@avtrex.com> <87hcn3sxs8.fsf@firetop.home> <46C08483.2030907@avtrex.com>
On Mon, 13 Aug 2007, David Daney wrote:
> > and what's to stop the compiler from inserting a
> > load from read-only memory?
> >
> That is not a problem unique to ll/sc is it? Presumable there would be some
> sort of fault and something like SIGSEGV or SIGBUS would be generated.
It is implementation-specific how much address space is checked by the
LL/SC logic for bus activity, so if you have another load (or store)
between an LL and an SC chances are the SC will never succeed.
Maciej