]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Dont clobber %eax after getting memory size
authorGraeme Russ <graeme.russ@gmail.com>
Thu, 7 Oct 2010 09:03:28 +0000 (20:03 +1100)
committerGraeme Russ <graeme.russ@gmail.com>
Thu, 7 Oct 2010 09:03:28 +0000 (20:03 +1100)
By using another register, reduce code size by one instruction

arch/i386/cpu/start.S

index 63f733421bc91470a91d84b21819f612e674aea1..66ff4f3e06d08ee1ce411a202a11d45f4ea0888f 100644 (file)
@@ -114,8 +114,8 @@ mem_ok:
 
        /* Test the stack */
        pushl   $0
-       popl    %eax
-       cmpl    $0, %eax
+       popl    %ecx
+       cmpl    $0, %ecx
        jne     die
        push    $0x55aa55aa
        popl    %ecx
@@ -125,7 +125,6 @@ mem_ok:
        wbinvd
 
        /* Set the upper memory limit parameter */
-       movl    %esp, %eax
        subl    $CONFIG_SYS_STACK_SIZE, %eax
 
        call    board_init_f    /* Enter, U-boot! */