diff options
author | Frediano Ziglio <frediano.ziglio@citrix.com> | 2013-02-08 12:58:33 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-02-11 11:51:53 +0000 |
commit | 71a16643953b812d7054784c3f7f0f03cf116264 (patch) | |
tree | 27421583722b17c111ce7c5dd9936fec72128024 | |
parent | c1d72be30417ab699b29d560dcbf71c1cd420c34 (diff) | |
download | syslinux-71a16643953b812d7054784c3f7f0f03cf116264.tar.gz syslinux-71a16643953b812d7054784c3f7f0f03cf116264.tar.xz syslinux-71a16643953b812d7054784c3f7f0f03cf116264.zip |
4k_sector: Recover 3 bytes avoid a call
after read_sector %edx:%eax are unused or incremented so increment
always at end gaining 3 bytes
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | mbr/gptmbr.S | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mbr/gptmbr.S b/mbr/gptmbr.S index ae0549f0..ef2235db 100644 --- a/mbr/gptmbr.S +++ b/mbr/gptmbr.S @@ -142,7 +142,6 @@ next: pushw %bx get_ptab: call read_sector - call inc64 loopw get_ptab /* Find the boot partition */ @@ -240,16 +239,9 @@ saturate_stosl: ret /* - * Increment %edx:%eax - */ -inc64: - addl $1,%eax - adcl $0,%edx - ret - -/* * read_sector: read a single sector pointed to by %edx:%eax to * %es:%bx. CF is set on error. All registers saved. + * %edx:%eax and %es:%bx are incremented to read next sector */ read_sector: pushal @@ -282,6 +274,15 @@ read_common: popal jc disk_error addb $2, %bh /* bx += 512: point to the next buffer */ + + /* fall through and increment sector number */ + +/* + * Increment %edx:%eax + */ +inc64: + addl $1,%eax + adcl $0,%edx ret disk_error: |