diff options
-rw-r--r-- | arch/x86/lib/hweight.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/lib/hweight.S b/arch/x86/lib/hweight.S index 02de3d74d2c5..8a602a1e404a 100644 --- a/arch/x86/lib/hweight.S +++ b/arch/x86/lib/hweight.S | |||
@@ -35,6 +35,7 @@ ENDPROC(__sw_hweight32) | |||
35 | 35 | ||
36 | ENTRY(__sw_hweight64) | 36 | ENTRY(__sw_hweight64) |
37 | #ifdef CONFIG_X86_64 | 37 | #ifdef CONFIG_X86_64 |
38 | pushq %rdi | ||
38 | pushq %rdx | 39 | pushq %rdx |
39 | 40 | ||
40 | movq %rdi, %rdx # w -> t | 41 | movq %rdi, %rdx # w -> t |
@@ -60,6 +61,7 @@ ENTRY(__sw_hweight64) | |||
60 | shrq $56, %rax # w = w_tmp >> 56 | 61 | shrq $56, %rax # w = w_tmp >> 56 |
61 | 62 | ||
62 | popq %rdx | 63 | popq %rdx |
64 | popq %rdi | ||
63 | ret | 65 | ret |
64 | #else /* CONFIG_X86_32 */ | 66 | #else /* CONFIG_X86_32 */ |
65 | /* We're getting an u64 arg in (%eax,%edx): unsigned long hweight64(__u64 w) */ | 67 | /* We're getting an u64 arg in (%eax,%edx): unsigned long hweight64(__u64 w) */ |