This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: locking problem with mips atomicity
- From: Phil Edwards <phil at codesourcery dot com>
- To: Michael Eager <eager at mvista dot com>
- Cc: gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Mon, 15 Mar 2004 19:13:42 -0500
- Subject: Re: locking problem with mips atomicity
- References: <405642CE.F6DB290F@mvista.com>
- Reply-to: gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
Things dealing with libstdc++-v3 should also be sent to that list.
I'll leave the guts of the patch to a MIPS maintainer to approve, but here
are some things you'll need to change:
> - _Atomic_word __result, __tmp;
> + _Atomic_word __result, __tmp, temp;
The name must have two leading underscores, so it would have to be __temp,
not temp. Likewise for the second function.
Please consider renaming these to something more descriptive. We know
they're temporary. :-) We don't know what they're used for without
studying the assembly. (Feel free to rename tmp as well.)
> + "la %3,%2\n\t"
> + "ll %0,0(%3)\n\t"
> + "addu %1,%5,%0\n\t"
> + "sc %1,0(%3)\n\t"
Watch the extra space in the first line. (Might as well get the cosmetic
aspects right from the beginning.)
Phil
--
Behind everything some further thing is found, forever; thus the tree behind
the bird, stone beneath soil, the sun behind Urth. Behind our efforts, let
there be found our efforts.
- Ascian saying, as related by Loyal to the Group of Seventeen