From: Andreas Schwab <schwab@linux-m68k.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux/m68k <linux-m68k@vger.kernel.org>
Subject: Re: atomic_sub_and_test() asm constraints
Date: Sun, 14 Mar 2010 15:30:51 +0100 [thread overview]
Message-ID: <m21vfnm0v8.fsf@igel.home> (raw)
In-Reply-To: <10f740e81003140559y7692c30ena811b6c0283c2303@mail.gmail.com> (Geert Uytterhoeven's message of "Sun, 14 Mar 2010 13:59:06 +0100")
Geert Uytterhoeven <geert@linux-m68k.org> writes:
> | CC mm/memcontrol.o
> | {standard input}: Assembler messages:
> | {standard input}:4076: Error: operands mismatch -- statement `subl
> 12(%fp),170(%a0)' ignored
>
> Seems like we have bad asm constraints in
>
> static inline int atomic_sub_and_test(int i, atomic_t *v)
> {
> char c;
> __asm__ __volatile__("subl %2,%1; seq %0" : "=d" (c), "+m"
> (*v): "g" (i));
Surely "g" is wrong, sub only accepts a data register as source operand
when the destination is in memory.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
prev parent reply other threads:[~2010-03-14 14:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-14 12:59 atomic_sub_and_test() asm constraints Geert Uytterhoeven
2010-03-14 14:30 ` Andreas Schwab [this message]
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=m21vfnm0v8.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@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