2011-07-30 00:42:07 +08:00
|
|
|
#include <linux/linkage.h>
|
2016-01-17 10:39:30 +08:00
|
|
|
#include <asm/export.h>
|
2011-07-30 00:42:07 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
.align 32
|
|
|
|
ENTRY(__arch_hweight8)
|
2017-06-22 22:56:48 +08:00
|
|
|
sethi %hi(__sw_hweight8), %g1
|
|
|
|
jmpl %g1 + %lo(__sw_hweight8), %g0
|
2011-07-30 00:42:07 +08:00
|
|
|
nop
|
|
|
|
ENDPROC(__arch_hweight8)
|
2016-01-17 10:39:30 +08:00
|
|
|
EXPORT_SYMBOL(__arch_hweight8)
|
2011-07-30 00:42:07 +08:00
|
|
|
.section .popc_3insn_patch, "ax"
|
|
|
|
.word __arch_hweight8
|
|
|
|
sllx %o0, 64-8, %g1
|
|
|
|
retl
|
|
|
|
popc %g1, %o0
|
|
|
|
.previous
|
|
|
|
|
|
|
|
ENTRY(__arch_hweight16)
|
2017-06-22 22:56:48 +08:00
|
|
|
sethi %hi(__sw_hweight16), %g1
|
|
|
|
jmpl %g1 + %lo(__sw_hweight16), %g0
|
2011-07-30 00:42:07 +08:00
|
|
|
nop
|
|
|
|
ENDPROC(__arch_hweight16)
|
2016-01-17 10:39:30 +08:00
|
|
|
EXPORT_SYMBOL(__arch_hweight16)
|
2011-07-30 00:42:07 +08:00
|
|
|
.section .popc_3insn_patch, "ax"
|
|
|
|
.word __arch_hweight16
|
|
|
|
sllx %o0, 64-16, %g1
|
|
|
|
retl
|
|
|
|
popc %g1, %o0
|
|
|
|
.previous
|
|
|
|
|
|
|
|
ENTRY(__arch_hweight32)
|
2017-06-22 22:56:48 +08:00
|
|
|
sethi %hi(__sw_hweight32), %g1
|
|
|
|
jmpl %g1 + %lo(__sw_hweight32), %g0
|
2011-07-30 00:42:07 +08:00
|
|
|
nop
|
|
|
|
ENDPROC(__arch_hweight32)
|
2016-01-17 10:39:30 +08:00
|
|
|
EXPORT_SYMBOL(__arch_hweight32)
|
2011-07-30 00:42:07 +08:00
|
|
|
.section .popc_3insn_patch, "ax"
|
|
|
|
.word __arch_hweight32
|
|
|
|
sllx %o0, 64-32, %g1
|
|
|
|
retl
|
|
|
|
popc %g1, %o0
|
|
|
|
.previous
|
|
|
|
|
|
|
|
ENTRY(__arch_hweight64)
|
2017-06-22 22:56:48 +08:00
|
|
|
sethi %hi(__sw_hweight16), %g1
|
|
|
|
jmpl %g1 + %lo(__sw_hweight16), %g0
|
2011-07-30 00:42:07 +08:00
|
|
|
nop
|
|
|
|
ENDPROC(__arch_hweight64)
|
2016-01-17 10:39:30 +08:00
|
|
|
EXPORT_SYMBOL(__arch_hweight64)
|
2011-07-30 00:42:07 +08:00
|
|
|
.section .popc_3insn_patch, "ax"
|
|
|
|
.word __arch_hweight64
|
|
|
|
retl
|
|
|
|
popc %o0, %o0
|
|
|
|
nop
|
|
|
|
.previous
|