This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/67334] [4.7 arm inline-asm] inline assembly incorrect register allocation
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Aug 2015 09:12:20 +0000
- Subject: [Bug inline-asm/67334] [4.7 arm inline-asm] inline assembly incorrect register allocation
- Auto-submitted: auto-generated
- References: <bug-67334-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67334
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
That is:
__asm__ volatile ("\n"
" adds %0,%2,%4\n"
" adc %1,%3,$0"
: "=&r"(c),"=r"(d)
: "r"(a),"r"(b),"r"(i) : "cc");
Because the first (0th) operand gets clobbered (set) before you use the other
ones.