linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to fix: asm output is not an lvalue
@ 2014-04-26 21:57 Sam Ravnborg
  2014-04-26 23:44 ` Linus Torvalds
  0 siblings, 1 reply; 5+ messages in thread
From: Sam Ravnborg @ 2014-04-26 21:57 UTC (permalink / raw)
  To: Linux-Sparse

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");
}







^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-27  8:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-26 21:57 How to fix: asm output is not an lvalue Sam Ravnborg
2014-04-26 23:44 ` Linus Torvalds
2014-04-27  6:48   ` Sam Ravnborg
2014-04-27  6:57     ` Josh Triplett
2014-04-27  8:41       ` Sam Ravnborg

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).