#12174 - johnny_north - Sun Nov 02, 2003 7:28 am
Hello-
Maybe this question belongs in the asm forum...
I've been using the mbclient code from over at gba devr's. With no optimizations the code compiles fine, but when I compile at -O3, the compiler gives the following errors:
/cygdrive/c/WINDOWS/TEMP/cc0c07vF.s: Assembler messages:
/cygdrive/c/WINDOWS/TEMP/cc0c07vF.s:1141: Error: Symbol MultiBootWaitCyclesLoop already defined.
from the code:
I'm ignorant when it comes to assembly, but I can see that there's no redefinition - one lable and three branches to that lable. Anyone know what changes I can make to this to get it to assemble properly?
Maybe this question belongs in the asm forum...
I've been using the mbclient code from over at gba devr's. With no optimizations the code compiles fine, but when I compile at -O3, the compiler gives the following errors:
/cygdrive/c/WINDOWS/TEMP/cc0c07vF.s: Assembler messages:
/cygdrive/c/WINDOWS/TEMP/cc0c07vF.s:1141: Error: Symbol MultiBootWaitCyclesLoop already defined.
from the code:
Code: |
/* GCC code16 */
asm("mov r2, pc"); asm("lsr r2, #24"); // EWRAM asm("mov r1, #12"); asm("cmp r2, #0x02"); asm("beq MultiBootWaitCyclesLoop"); // ROM 4/2 wait asm("mov r1, #14"); asm("cmp r2, #0x08"); asm("beq MultiBootWaitCyclesLoop"); // IWRAM asm("mov r1, #4"); asm("MultiBootWaitCyclesLoop:"); asm("sub r0, r1"); asm("bgt MultiBootWaitCyclesLoop"); |
I'm ignorant when it comes to assembly, but I can see that there's no redefinition - one lable and three branches to that lable. Anyone know what changes I can make to this to get it to assemble properly?