From 0d628e5402dbfee63181d20b9fb66d9f7fca9b1e Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 11 Jul 2007 17:20:59 -0700 Subject: [PATCH] MBR: shave 2 more bytes We always re-read the last partition table on any kind of error, so no need to prevent the code from clobbering it on failure. --- mbr/mbr.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mbr/mbr.S b/mbr/mbr.S index b9729eb..ac24b74 100644 --- a/mbr/mbr.S +++ b/mbr/mbr.S @@ -148,18 +148,20 @@ read_common: * read_partition_table: * Read a partition table (pointed to by %eax), and copy * the partition table into the ptab buffer. + * * Clobbers %si, %di, and %cx, other registers preserved. + * %cx = 0 on exit. + * + * On error, CF is set and ptab is overwritten with junk. */ ptab = _start+446 read_partition_table: call read_sector - jc 20f movw $bootsec+446, %si movw $ptab, %di movw $(16*4/2), %cx rep ; movsw -20: ret /* -- 2.7.4