From 65b3053a5e868708e5a746b3e120902d71a45d4b Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 25 Feb 2008 14:55:45 -0800 Subject: [PATCH] gptmbr: shuffle slightly to reduce register pressure Shuffle some code slightly to reduce register pressure; no size change but this might make the code easier to follow and/or change. --- mbr/gptmbr.S | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mbr/gptmbr.S b/mbr/gptmbr.S index 138ac51..80b26ed 100644 --- a/mbr/gptmbr.S +++ b/mbr/gptmbr.S @@ -178,8 +178,6 @@ found_part: stosl movl 40(%si),%eax movl 48(%si),%edx - pushl %eax - pushl %edx call saturate_stosl /* Partition start */ subl 32(%si),%eax @@ -188,16 +186,15 @@ found_part: call saturate_stosl /* Partition length */ rep; movsb /* GPT entry follows MBR entry */ - popl %edx - popl %eax popw %si /* * boot: invoke the actual bootstrap. %ds:%si points to the - * partition information in memory, and %edx:%eax to the boot sector - * on disk. + * partition information in memory. */ boot: + movl (40+16)(%si),%eax + movl (48+16)(%si),%edx call read_sector cmpw $0xaa55, (bootsec+510) jne missing_os /* Not a valid boot sector */ -- 2.7.4