lkml.org 
[lkml]   [2001]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] __up_read and gcc-3.0
On 11 May 01 at 9:13, Tom Leete wrote:
> > __asm__ __volatile__(
> > "# beginning __up_read\n\t"
> > + " movl %2,%%edx\n\t"
> > LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */
> > " js 2f\n\t" /* jump if the lock is being waited upon */
> > "1:\n\t"
>
> My solution to this was to relax +d(tmp) to +m(tmp). Posted a few days ago.
> I have larger problems with 2.4.5-pre1 and have not gone back to check what
> comes out. Being a product of pure reason (and not much of that), mine
> deserves suspicion.

Changing +d => +m could generate 'xadd (%%xyz),(%%eax)' which does not exist.
Maybe +r, but in this case do not forget to add push/pop %%edx around
call to rwsem_wake. Otherwise you can have some corruption if gcc decides
to use %edx for some local variable around __up_read.
Best regards,
Petr Vandrovec
vandrove@vc.cvut.cz

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.027 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site