[lkml]   [2001]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectLinux 2.4.4-ac3, asm problem in asm-i386/rwsem.h using gcc 3.0 CVS
Hi folks,

I currently fail to compile the 2.4.4-ac3 kernel using latest GCC 3.0 from CVS:
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes
-O2 -fomit-frame-pointer -fno-strict-aliasing -pipe
-mpreferred-stack-boundary=2 -march=i686 -DEXPORT_SYMTAB -c sys.c
sys.c: In function `sys_gethostname':
inconsistent operand constraints in an `asm'

Here is the code exerpt:
* unlock after reading
static inline void __up_read(struct rw_semaphore *sem)
__asm__ __volatile__(
"# beginning __up_read\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 */
".section .text.lock,\"ax\"\n"
" decw %%dx\n\t" /* do nothing if still outstanding active readers */
" jnz 1b\n\t"
" pushl %%ecx\n\t"
" call rwsem_wake\n\t"
" popl %%ecx\n\t"
" jmp 1b\n"
"# ending __up_read\n"
: "+m"(sem->count), "+d"(tmp)
: "a"(sem)
: "memory", "cc");

I'm afraid I know zilch about asm constraints...
Can anybody spot the trouble (and fix it :) ?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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