[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Inline Assembly
From: |
scarvenger |
Subject: |
Inline Assembly |
Date: |
Sun, 30 Sep 2007 08:27:32 -0700 (PDT) |
The following code seems to be considered ilegal in GCC, why?
movb 2(%1, %%ecx), (%0, %%ecx);
Why when i try to compile my program with the following code and the option
-O3 the compiler says to me that the symbol bgrLoop was already defined?
__asm__ __volatile__ (
"xorl %%ecx, %%ecx;"
"bgrLoop:;"
"movb (%1, %%ecx), %%al;"
"movb 2(%1, %%ecx), %%ah;"
"movb %%al, 2(%0, %%ecx);"
"movb %%ah, (%0, %%ecx);"
"addl $3, %%ecx;"
"decl %2;"
"jnz bgrLoop;" : "=r" (buffer) : "r" (buffer), "r" (size) : "ah",
"al", "ecx");
Felipe
--
View this message in context:
http://www.nabble.com/Inline-Assembly-tf4543809.html#a12966786
Sent from the gcc - Gnu Help List mailing list archive at Nabble.com.
- Inline Assembly,
scarvenger <=