Assembler errors, not sure what to do...
Posted: Tue May 23, 2006 11:00 pm
Hi, you may know me, I'm the mad creator of Sendla OS, rawrr, and stuff.. ahem. Anyway, I have a problem with some source, I was debugging some code that one of our polish developers gave to me. It compiled successfully but it threw some assembler errors. I am not to good with assembler so I thought I'd ask ye to help me out.
Heres the Function that throws the errors:
And Heres the errors that gcc throw:
Thanks in advance,
-Steven
Heres the Function that throws the errors:
Code: Select all
void mutex_SetSpinLock(spinlock *lock) {
__asm__ __volatile__ ( "pushal\n"
"_repeat:\n"
"movl $0, %%eax\n"
"movl %0, %%ebx\n"
"cmpl (%%ebx), %%eax\n"
"jne _repeat\n"
"pushfl\n"
"cli\n"
"movl $0, %%eax\n"
"movl %0, %%ebx\n"
"cmpl (%%ebx), %%eax\n"
"je _finish\n"
"popfl\n"
"jmp _repeat\n"
"_finish:\n"
"incl (%%ebx)\n"
"popfl\n"
"popal\n" :: "g" (lock) );
}
Probably an obvious error, but I'm afraid that i will mess it up.c:/shared/gcc/tmp/cci2Hf8i.s: Assembler messages:
c:/shared/gcc/tmp/cci2Hf8i.s:63: Error: symbol `_repeat' is already defined
c:/shared/gcc/tmp/cci2Hf8i.s:76: Error: symbol `_finish' is already defined
c:/shared/gcc/tmp/cci2Hf8i.s:94: Error: symbol `_repeat' is already defined
c:/shared/gcc/tmp/cci2Hf8i.s:107: Error: symbol `_finish' is already defined
Thanks in advance,
-Steven