This is the mail archive of the gcc-patches@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: [PATCH] Fix PR11784 - atomic __exchange_and_add() broken for ColdFire targets


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~


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