hweight.S 997 字节
Newer Older
1
#include <linux/linkage.h>
A
Al Viro 已提交
2
#include <asm/export.h>
3 4 5 6 7 8 9 10

	.text
	.align	32
ENTRY(__arch_hweight8)
	ba,pt	%xcc, __sw_hweight8
	 nop
	nop
ENDPROC(__arch_hweight8)
A
Al Viro 已提交
11
EXPORT_SYMBOL(__arch_hweight8)
12 13 14 15 16 17 18 19 20 21 22 23
	.section	.popc_3insn_patch, "ax"
	.word		__arch_hweight8
	sllx		%o0, 64-8, %g1
	retl
	 popc		%g1, %o0
	.previous

ENTRY(__arch_hweight16)
	ba,pt	%xcc, __sw_hweight16
	 nop
	nop
ENDPROC(__arch_hweight16)
A
Al Viro 已提交
24
EXPORT_SYMBOL(__arch_hweight16)
25 26 27 28 29 30 31 32 33 34 35 36
	.section	.popc_3insn_patch, "ax"
	.word		__arch_hweight16
	sllx		%o0, 64-16, %g1
	retl
	 popc		%g1, %o0
	.previous

ENTRY(__arch_hweight32)
	ba,pt	%xcc, __sw_hweight32
	 nop
	nop
ENDPROC(__arch_hweight32)
A
Al Viro 已提交
37
EXPORT_SYMBOL(__arch_hweight32)
38 39 40 41 42 43 44 45 46 47 48 49
	.section	.popc_3insn_patch, "ax"
	.word		__arch_hweight32
	sllx		%o0, 64-32, %g1
	retl
	 popc		%g1, %o0
	.previous

ENTRY(__arch_hweight64)
	ba,pt	%xcc, __sw_hweight64
	 nop
	nop
ENDPROC(__arch_hweight64)
A
Al Viro 已提交
50
EXPORT_SYMBOL(__arch_hweight64)
51 52 53 54 55 56
	.section	.popc_3insn_patch, "ax"
	.word		__arch_hweight64
	retl
	 popc		%o0, %o0
	nop
	.previous