From: Graeme Russ Date: Thu, 7 Oct 2010 09:03:28 +0000 (+1100) Subject: x86: Dont clobber %eax after getting memory size X-Git-Tag: v2010.12-rc1~149^2~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5a3876d2ac0aaaf16d50ce91b03c2030822da66f;p=u-boot x86: Dont clobber %eax after getting memory size By using another register, reduce code size by one instruction --- diff --git a/arch/i386/cpu/start.S b/arch/i386/cpu/start.S index 63f733421b..66ff4f3e06 100644 --- a/arch/i386/cpu/start.S +++ b/arch/i386/cpu/start.S @@ -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! */