From: Christian Iseli <chris@ludwig-alpha.unil.ch>
To: linux-kernel@vger.kernel.org
Subject: Linux 2.4.4-ac3, asm problem in asm-i386/rwsem.h using gcc 3.0 CVS
Date: Wed, 02 May 2001 18:13:59 +0200 [thread overview]
Message-ID: <200105021613.SAA22580@ludwig-alpha.unil.ch> (raw)
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':
/usr/src/linux/include/asm/rwsem.h:152:
inconsistent operand constraints in an `asm'
Here is the code exerpt:
/*
* unlock after reading
*/
static inline void __up_read(struct rw_semaphore *sem)
{
__s32 tmp = -RWSEM_ACTIVE_READ_BIAS;
__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 */
"1:\n\t"
".section .text.lock,\"ax\"\n"
"2:\n\t"
" 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"
".previous\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 :) ?
Thanks,
Christian
next reply other threads:[~2001-05-02 16:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-02 16:13 Christian Iseli [this message]
2001-05-03 16:14 ` Mike Black
2001-05-04 13:16 ` Christian Iseli
[not found] <org0em8zhu.fsf@guarana.lsd.ic.unicamp.br>
2001-05-03 12:11 ` Christian Iseli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200105021613.SAA22580@ludwig-alpha.unil.ch \
--to=chris@ludwig-alpha.unil.ch \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®