projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdf1db1
)
gptmbr: use cltq to extend a zero %eax into %edx
author
H. Peter Anvin
<hpa@zytor.com>
Tue, 26 Feb 2008 00:59:54 +0000
(16:59 -0800)
committer
H. Peter Anvin
<hpa@zytor.com>
Tue, 26 Feb 2008 00:59:54 +0000
(16:59 -0800)
Using cltq (cdq) to clear %edx when %eax is zero is cheaper by one
byte.
mbr/gptmbr.S
patch
|
blob
|
history
diff --git
a/mbr/gptmbr.S
b/mbr/gptmbr.S
index
9005183
..
85b9fcd
100644
(file)
--- a/
mbr/gptmbr.S
+++ b/
mbr/gptmbr.S
@@
-112,7
+112,7
@@
next:
/* Load partition table header */
xorl %eax,%eax
- xorl %edx,%edx
+ cltd
incw %ax /* %edx:%eax = 1 */
movw $phdr, %bx
pushw %bx /* -8(%bp) phdr == bootsect */