This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: locking problem with mips atomicity


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]