This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC proposal for "@" asm constraint
- To: John Wehle <john at feith dot com>
- Subject: Re: GCC proposal for "@" asm constraint
- From: Andrea Arcangeli <andrea at suse dot de>
- Date: Tue, 19 Sep 2000 22:45:56 +0200
- Cc: egcs at tantalophile dot demon dot co dot uk, gcc at gcc dot gnu dot org, kuznet at ms2 dot inr dot ac dot ru, linux-kernel at vger dot kernel dot org, torvalds at transmeta dot com, rth at cygnus dot com
- References: <200009192016.QAA28511@jwlab.FEITH.COM>
On Tue, Sep 19, 2000 at 04:16:07PM -0400, John Wehle wrote:
> Umm ... "miscompilation"? As in the compiler produced the wrong code
> based on the input provided?
That's not a gcc bug (gcc is doing the right thing). It's the kernel that
should use the "memory" clobber in the spinlock implementation.
The sad code generated was in reality the _right_ code. I was blind not
noticing the missing $ (I missed it the first time in the first testcase I
tried and I kept missing it, I was probably also biased assuming the current
spinlocks was safe with the commonly used compilers, I was thinking to fix only
a theorical bug). I'm sorry for that (and thanks again to Richard and Jamie).
Andrea