| David S. Miller | ef7c4d4 | 2011-07-29 09:42:07 -0700 | [diff] [blame] | 1 | #include <linux/linkage.h> | 
 | 2 |  | 
 | 3 | 	.text | 
 | 4 | 	.align	32 | 
 | 5 | ENTRY(__arch_hweight8) | 
 | 6 | 	ba,pt	%xcc, __sw_hweight8 | 
 | 7 | 	 nop | 
 | 8 | 	nop | 
 | 9 | ENDPROC(__arch_hweight8) | 
 | 10 | 	.section	.popc_3insn_patch, "ax" | 
 | 11 | 	.word		__arch_hweight8 | 
 | 12 | 	sllx		%o0, 64-8, %g1 | 
 | 13 | 	retl | 
 | 14 | 	 popc		%g1, %o0 | 
 | 15 | 	.previous | 
 | 16 |  | 
 | 17 | ENTRY(__arch_hweight16) | 
 | 18 | 	ba,pt	%xcc, __sw_hweight16 | 
 | 19 | 	 nop | 
 | 20 | 	nop | 
 | 21 | ENDPROC(__arch_hweight16) | 
 | 22 | 	.section	.popc_3insn_patch, "ax" | 
 | 23 | 	.word		__arch_hweight16 | 
 | 24 | 	sllx		%o0, 64-16, %g1 | 
 | 25 | 	retl | 
 | 26 | 	 popc		%g1, %o0 | 
 | 27 | 	.previous | 
 | 28 |  | 
 | 29 | ENTRY(__arch_hweight32) | 
 | 30 | 	ba,pt	%xcc, __sw_hweight32 | 
 | 31 | 	 nop | 
 | 32 | 	nop | 
 | 33 | ENDPROC(__arch_hweight32) | 
 | 34 | 	.section	.popc_3insn_patch, "ax" | 
 | 35 | 	.word		__arch_hweight32 | 
 | 36 | 	sllx		%o0, 64-32, %g1 | 
 | 37 | 	retl | 
 | 38 | 	 popc		%g1, %o0 | 
 | 39 | 	.previous | 
 | 40 |  | 
 | 41 | ENTRY(__arch_hweight64) | 
 | 42 | 	ba,pt	%xcc, __sw_hweight64 | 
 | 43 | 	 nop | 
 | 44 | 	nop | 
 | 45 | ENDPROC(__arch_hweight64) | 
 | 46 | 	.section	.popc_3insn_patch, "ax" | 
 | 47 | 	.word		__arch_hweight64 | 
 | 48 | 	retl | 
 | 49 | 	 popc		%o0, %o0 | 
 | 50 | 	nop | 
 | 51 | 	.previous |