[PATCH] Fix PR11784 - atomic __exchange_and_add() broken for ColdFire targets
Richard Henderson
rth@redhat.com
Mon Aug 4 22:52:00 GMT 2003
On Mon, Aug 04, 2003 at 03:22:13AM +0200, Bernardo Innocenti wrote:
> +// bset with no immediate addressing
> +#if defined(__mcf5200__) || defined(__mcf5300__)
> + __asm__ __volatile__("1: bset.b #7,%0@\n\tjbne 1b"
> + : /* no outputs */
> + : "a"(&__Atomicity_lock<0>::_S_atomicity_lock)
> + : "cc", "memory");
> +
> +// bset with immediate addressing
> +#elif defined(__mc68000__)
> + __asm__ __volatile__("1: bset.b #7,%0\n\tjbne 1b"
> + : "=m"(__Atomicity_lock<0>::_S_atomicity_lock)
> + : "m"(__Atomicity_lock<0>::_S_atomicity_lock)
> + : "cc");
> +
These should be combined, surely?
r~
More information about the Libstdc++
mailing list