Module Name:    src
Committed By:   jakllsch
Date:           Wed Dec 29 22:40:46 UTC 2010

Modified Files:
        src/sys/arch/i386/stand/lib: bios_disk.S

Log Message:
Utilize movz[bw]l to save a few instrutions and bytes of .text.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/i386/stand/lib/bios_disk.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/stand/lib/bios_disk.S
diff -u src/sys/arch/i386/stand/lib/bios_disk.S:1.19 src/sys/arch/i386/stand/lib/bios_disk.S:1.20
--- src/sys/arch/i386/stand/lib/bios_disk.S:1.19	Sat Nov 21 11:52:57 2009
+++ src/sys/arch/i386/stand/lib/bios_disk.S	Wed Dec 29 22:40:46 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bios_disk.S,v 1.19 2009/11/21 11:52:57 dsl Exp $	*/
+/*	$NetBSD: bios_disk.S,v 1.20 2010/12/29 22:40:46 jakllsch Exp $	*/
 
 /*
  * Ported to boot 386BSD by Julian Elischer (jul...@tfs.com) Sept 1992
@@ -82,8 +82,7 @@
 	calll	_C_LABEL(real_to_prot) # back to protected mode
 	.code32
 
-	xorl	%eax, %eax
-	movw	%bx, %ax	# return value in %ax
+	movzwl	%bx, %eax	# return value in %eax
 
 	pop	%edi
 	pop	%edx
@@ -146,7 +145,7 @@
 	calll	_C_LABEL(real_to_prot) # back to protected mode
 	.code32
 
-	andl	$0xffff, %eax
+	movzwl	%ax, %eax	# return value in %eax
 
 	pop	%edi
 	pop	%esi
@@ -246,8 +245,7 @@
 	calll	_C_LABEL(real_to_prot)	# switch back
 	.code32
 
-	xorl	%eax, %eax
-	movb	%dl, %al	# return value in %ax
+	movzbl	%dl, %eax		# return value in %eax
 
 	cmpw	$0xaa55, %bx
 	sete	%dl
@@ -304,8 +302,7 @@
 	calll	_C_LABEL(real_to_prot) # back to protected mode
 	.code32
 
-	xorl	%eax, %eax
-	movw	%bx, %ax	# return value in %ax
+	movzwl	%bx, %eax	# return value in %eax
 
 	pop	%edi
 	pop	%esi
@@ -346,8 +343,7 @@
 	calll	_C_LABEL(real_to_prot) # back to protected mode
 	.code32
 
-	xorl	%eax, %eax
-	movb	%bl, %al	# return value in %ax
+	movzbl	%bl, %eax	# return value in %eax
 
 	pop	%edi
 	pop	%esi

Reply via email to