浏览代码

i386: Change inline asm global symbols to local

gcc 4.3.2 optimiser creates multiple copies of inline asm (who knows why)
Remove use of global names for labels to prevent 'symbol already defined'
errors

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Graeme Russ 15 年之前
父节点
当前提交
cfb3a736ff
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 2
      board/eNET/eNET.c
  2. 2 2
      cpu/i386/sc520/sc520.c

+ 2 - 2
board/eNET/eNET.c

@@ -51,9 +51,9 @@ void init_sc520_enet (void)
 
 	/* wait at least one millisecond */
 	asm("movl	$0x2000,%%ecx\n"
-	    "wait_loop:	pushl %%ecx\n"
+	    "0:	pushl %%ecx\n"
 	    "popl	%%ecx\n"
-	    "loop wait_loop\n": : : "ecx");
+	    "loop 0b\n": : : "ecx");
 
 	/* turn on the SDRAM write buffer */
 	write_mmcr_byte(SC520_DBCTL, 0x11);

+ 2 - 2
cpu/i386/sc520/sc520.c

@@ -109,9 +109,9 @@ void init_sc520(void)
 
 	/* wait at least one millisecond */
 	asm("movl	$0x2000,%%ecx\n"
-	    "wait_loop:	pushl %%ecx\n"
+	    "0:		pushl %%ecx\n"
 	    "popl	%%ecx\n"
-	    "loop wait_loop\n": : : "ecx");
+	    "loop 0b\n": : : "ecx");
 
 	/* turn on the SDRAM write buffer */
 	write_mmcr_byte(SC520_DBCTL, 0x11);