[2214] 2009-05-14 Pavel Roskin <[email protected]>

Pavel Roskin <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2214
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2214
Author:   proski
Date:     2009-05-14 13:43:13 +0000 (Thu, 14 May 2009)
Log Message:
-----------
2009-05-14  Pavel Roskin  <[email protected]>

	* 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.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/commands/i386/pc/drivemap_int13h.S

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-05-14 03:59:10 UTC (rev 2213)
+++ trunk/grub2/ChangeLog	2009-05-14 13:43:13 UTC (rev 2214)
@@ -1,3 +1,9 @@
+2009-05-14  Pavel Roskin  <[email protected]>
+
+	* 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  <[email protected]>
 
 	* loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to

Modified: trunk/grub2/commands/i386/pc/drivemap_int13h.S
===================================================================
--- trunk/grub2/commands/i386/pc/drivemap_int13h.S	2009-05-14 03:59:10 UTC (rev 2213)
+++ trunk/grub2/commands/i386/pc/drivemap_int13h.S	2009-05-14 13:43:13 UTC (rev 2214)
@@ -37,15 +37,12 @@
 	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.  */
+	cmpb	%dl, %al
+	jnz	more_remaining /* Not found, but more remaining, loop.  */
+	movb	%ah, %dl /* Found - drive remapped, modify DL.  */
 
-found:
-	movb	%ah, %dl
-
 not_found:
 	pop	%bx
 	pop	%ax
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.