From 16430b12a31872d4db5200fc9be804323bca892f Mon Sep 17 00:00:00 2001 From: Xin LI Date: Fri, 30 Jul 2010 21:39:28 +0000 Subject: [PATCH] In rdmsr_safe, use zero extend (by doing a 32-bit movl over eax to itself) instead of a sign extend. Discussed with: stas MFC after: 1 month --- sys/amd64/amd64/support.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index b445ceef8b4..ab45e56a05f 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -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