2009-05-14 Pavel Roskin <proski@gnu.org>

* commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
	jump.  This saves two bytes, so the typical case of 2 swapped
	drives would fit 32 bytes.
This commit is contained in:
proski 2009-05-14 13:43:13 +00:00
parent ac96388340
commit 3834887fb2
2 changed files with 10 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2009-05-14 Pavel Roskin <proski@gnu.org>
* commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
jump. This saves two bytes, so the typical case of 2 swapped
drives would fit 32 bytes.
2009-05-13 Pavel Roskin <proski@gnu.org> 2009-05-13 Pavel Roskin <proski@gnu.org>
* loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to

View file

@ -37,14 +37,11 @@ more_remaining:
movw %cs:(%bx), %ax movw %cs:(%bx), %ax
cmpb %ah, %al cmpb %ah, %al
jz not_found /* DRV=DST => map end - drive not remapped, keep DL. */ jz not_found /* DRV=DST => map end - drive not remapped, keep DL. */
inc %bx
inc %bx
cmpb %dl, %al cmpb %dl, %al
jz found /* Found - drive remapped, modify DL. */ jnz more_remaining /* Not found, but more remaining, loop. */
inc %bx movb %ah, %dl /* Found - drive remapped, modify DL. */
inc %bx
jmp more_remaining /* Not found, but more remaining, loop. */
found:
movb %ah, %dl
not_found: not_found:
pop %bx pop %bx