From: Graeme Russ Date: Tue, 5 Oct 2010 22:19:20 +1100 Subject: [U-Boot] [PATCH v2 14/20] x86: Dont clobber %eax after getting memory size In-Reply-To: <1286277566-12408-1-git-send-email-graeme.russ@gmail.com> References: <1286277566-12408-1-git-send-email-graeme.russ@gmail.com> Message-ID: <1286277566-12408-15-git-send-email-graeme.russ@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de By using another register, reduce code size by one instruction Signed-off-by: Graeme Russ --- arch/i386/cpu/start.S | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/i386/cpu/start.S b/arch/i386/cpu/start.S index 63f7334..66ff4f3 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! */ -- 1.7.1.422.g049e9