From: proski Date: Thu, 14 May 2009 13:43:13 +0000 (+0000) Subject: 2009-05-14 Pavel Roskin X-Git-Tag: 1.98~909 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3834887fb29c289638e34a1216bae7a87a2be92d;p=thirdparty%2Fgrub.git 2009-05-14 Pavel Roskin * 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. --- diff --git a/ChangeLog b/ChangeLog index 360b73a85..a488561a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-05-14 Pavel Roskin + + * 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 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to diff --git a/commands/i386/pc/drivemap_int13h.S b/commands/i386/pc/drivemap_int13h.S index 7db3a6793..6513411be 100644 --- a/commands/i386/pc/drivemap_int13h.S +++ b/commands/i386/pc/drivemap_int13h.S @@ -37,14 +37,11 @@ more_remaining: movw %cs:(%bx), %ax cmpb %ah, %al jz not_found /* DRV=DST => map end - drive not remapped, keep DL. */ - cmpb %dl, %al - jz found /* Found - drive remapped, modify DL. */ inc %bx inc %bx - jmp more_remaining /* Not found, but more remaining, loop. */ - -found: - movb %ah, %dl + cmpb %dl, %al + jnz more_remaining /* Not found, but more remaining, loop. */ + movb %ah, %dl /* Found - drive remapped, modify DL. */ not_found: pop %bx