mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-27 21:14:44 +08:00
ef7c4d4675
Just like powerpc, we code patch at boot time. Signed-off-by: David S. Miller <davem@davemloft.net>
52 lines
846 B
ArmAsm
52 lines
846 B
ArmAsm
#include <linux/linkage.h>
|
|
|
|
.text
|
|
.align 32
|
|
ENTRY(__arch_hweight8)
|
|
ba,pt %xcc, __sw_hweight8
|
|
nop
|
|
nop
|
|
ENDPROC(__arch_hweight8)
|
|
.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)
|
|
.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)
|
|
.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)
|
|
.section .popc_3insn_patch, "ax"
|
|
.word __arch_hweight64
|
|
retl
|
|
popc %o0, %o0
|
|
nop
|
|
.previous
|