diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2010-06-11 17:21:35 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-06-11 17:21:35 -0700 |
commit | 92d1d619c033353a5e532b7118daee1a403f08ca (patch) | |
tree | 468cb15a66b93664975ce5146acdf9c9006ee889 /mbr | |
parent | 5bc3c2cf4bc0edd52af33737b15416d021822d51 (diff) | |
download | syslinux-92d1d619c033353a5e532b7118daee1a403f08ca.tar.gz |
gptmbr: save four bytes
Save four bytes by observing that none of our code relies on
saturate_stosl not actually corrupting %eax.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'mbr')
-rw-r--r-- | mbr/gptmbr.S | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mbr/gptmbr.S b/mbr/gptmbr.S index 42887dbd..e8c60c00 100644 --- a/mbr/gptmbr.S +++ b/mbr/gptmbr.S @@ -222,15 +222,20 @@ boot: cli jmpw *%sp /* %sp == bootsec */ +/* + * Store the value in %eax to %di iff %edx == 0, otherwise store -1. + * Returns the value that was actually written in %eax. + */ saturate_stosl: - pushl %eax andl %edx,%edx jz 1f orl $-1,%eax 1: stosl - popl %eax ret +/* + * Increment %edx:%eax + */ inc64: addl $1,%eax adcl $0,%edx |