[Bug inline-asm/87984] [7/8/9 Regression] wrong code for local reg var input to asm

amonakov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 12 11:16:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87984

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #7 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
OK, here's an example where 'a' is used once:

void f(long long x[])
{
    for (int i=0; i<3; i++) {
        register int a asm("eax");
        a = x[0] / x[1];
        asm("# %0" :: "r"(a));
        asm("xor %%eax, %%eax" ::: "eax");
    }
}


More information about the Gcc-bugs mailing list