svn commit: r212005 - stable/8/sys/amd64/amd64

Xin LI delphij at FreeBSD.org
Mon Aug 30 18:23:48 UTC 2010


Author: delphij
Date: Mon Aug 30 18:23:48 2010
New Revision: 212005
URL: http://svn.freebsd.org/changeset/base/212005

Log:
  MFC r210665:
  
  In rdmsr_safe, use zero extend (by doing a 32-bit movl over
  eax to itself) instead of a sign extend.
  
  Discussed with: stas

Modified:
  stable/8/sys/amd64/amd64/support.S
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/amd64/amd64/support.S
==============================================================================
--- stable/8/sys/amd64/amd64/support.S	Mon Aug 30 18:12:21 2010	(r212004)
+++ stable/8/sys/amd64/amd64/support.S	Mon Aug 30 18:23:48 2010	(r212005)
@@ -729,7 +729,7 @@ ENTRY(rdmsr_safe)
 	rdmsr			/* Read MSR pointed by %ecx. Returns
 				   hi byte in edx, lo in %eax */
 	salq	$32,%rdx	/* sign-shift %rdx left */
-	cltq			/* sign-extend %eax -> %rax */
+	movl	%eax,%eax	/* zero-extend %eax -> %rax */
 	orq	%rdx,%rax
 	movq	%rax,(%rsi)
 	xorq	%rax,%rax


More information about the svn-src-stable-8 mailing list