[Bug c/48487] Multiple Definition of Labels in Inlining Assembler
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 6 23:03:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48487
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-04-06 23:03:46 UTC ---
This is the correct behavior.
Try doing:
void doit(char *d, char *s, int loops) {
long ll = (long) loops;
asm(
"xor %%rax, %%rax;" // clear loop ctr
"movq %2, %%rdx;" // load length
"cmp %%rax, %%rdx;" // len == 0?
"je 1f;"
"add $16, %%rax;" // inc loop ctr
"cmp %%rax, %%rdx;"
"je 1f;"
"1:"
: /* no outputs */
: "m" (s), "m" (d), "m" (ll)
: /* clobbers */ "eax", "edx", "esi", "edi"
);
}
This will make the label local and will not have the problem of having two ore
more 'done''s.
*** This bug has been marked as a duplicate of bug 20468 ***
More information about the Gcc-bugs
mailing list