From: Sam Ravnborg <sam@ravnborg.org>
To: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: How to fix: asm output is not an lvalue
Date: Sat, 26 Apr 2014 23:57:05 +0200 [thread overview]
Message-ID: <20140426215705.GA20867@ravnborg.org> (raw)
Hi all.
Following code snippet generate these warnings:
t.c:9:9: warning: asm output is not an lvalue
t.c:10:10: warning: asm output is not an lvalue
t.c:9:9: warning: generating address of non-lvalue (11)
t.c:10:10: warning: generating address of non-lvalue (11)
The code snippet is part of the math emu in the kernel.
For sparc32 I get a lot of the "asm output is not an lvalue"
warnings.
For sparc32 I do not get the "generating address of non-lvalue".
Can you help me gettitng rid of these warnings?
Thanks in advance,
Sam
$ cat t.c
static void todo(void)
{
typedef unsigned int USItype __attribute__((mode(SI)));
USItype l1;
USItype DR_f0, DA_f1, DB_f1, DA_f0, DB_f0;
__asm__ ("subcc %r4,%5,%1\n\t" "subx %r2,%3,%0\n" :
"=r" ((USItype)(l1)),
"=&r" ((USItype)(DR_f0)) :
"rJ" ((USItype)(DA_f1)),
"rI" ((USItype)(DB_f1)),
"rJ" ((USItype)(DA_f0)),
"rI" ((USItype)(DB_f0)) :
"cc");
}
next reply other threads:[~2014-04-26 22:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-26 21:57 Sam Ravnborg [this message]
2014-04-26 23:44 ` How to fix: asm output is not an lvalue Linus Torvalds
2014-04-27 6:48 ` Sam Ravnborg
2014-04-27 6:57 ` Josh Triplett
2014-04-27 8:41 ` Sam Ravnborg
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=20140426215705.GA20867@ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-sparse@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;
as well as URLs for NNTP newsgroup(s).