summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-02-25 15:11:28 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-02-25 15:11:28 -0800
commit241be5df8baa2089a635a2a373e5a219d184015d (patch)
treebb67d7c80df1ba6b566c656fdb2e526cba8b1e2c
parent4098fb7f5b886f4875a6cb8f2edfb4f77890d256 (diff)
downloadsyslinux-241be5df8baa2089a635a2a373e5a219d184015d.tar.gz
gptmbr: since %bx is advanced, we can test -2(%bx) == (bootsec+510)
With %bx advanced to the end of the boot sector, we can use -2(%bx) instead of (bootsec+510), thus saving one byte.
-rw-r--r--mbr/gptmbr.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/mbr/gptmbr.S b/mbr/gptmbr.S
index 49414e48..cca7b479 100644
--- a/mbr/gptmbr.S
+++ b/mbr/gptmbr.S
@@ -195,7 +195,7 @@ boot:
movl (48+16)(%si),%edx
movw $bootsec,%bx
call read_sector
- cmpw $0xaa55, (bootsec+510)
+ cmpw $0xaa55, -2(%bx)
jne missing_os /* Not a valid boot sector */
movw $driveno, %sp /* driveno == bootsec-6 */
popw %dx /* dl -> drive number */