Skip to content

Commit

Permalink
sparc64: Use indirect calls in hamming weight stubs
Browse files Browse the repository at this point in the history
Otherwise, depending upon link order, the branch relocation
limits could be exceeded.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
  • Loading branch information
David S. Miller authored and Masahiro Yamada committed Jun 29, 2017
1 parent 3c2993b commit 9289ea7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions arch/sparc/lib/hweight.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
.text
.align 32
ENTRY(__arch_hweight8)
ba,pt %xcc, __sw_hweight8
sethi %hi(__sw_hweight8), %g1
jmpl %g1 + %lo(__sw_hweight8), %g0
nop
nop
ENDPROC(__arch_hweight8)
EXPORT_SYMBOL(__arch_hweight8)
.section .popc_3insn_patch, "ax"
Expand All @@ -17,9 +17,9 @@ EXPORT_SYMBOL(__arch_hweight8)
.previous

ENTRY(__arch_hweight16)
ba,pt %xcc, __sw_hweight16
sethi %hi(__sw_hweight16), %g1
jmpl %g1 + %lo(__sw_hweight16), %g0
nop
nop
ENDPROC(__arch_hweight16)
EXPORT_SYMBOL(__arch_hweight16)
.section .popc_3insn_patch, "ax"
Expand All @@ -30,9 +30,9 @@ EXPORT_SYMBOL(__arch_hweight16)
.previous

ENTRY(__arch_hweight32)
ba,pt %xcc, __sw_hweight32
sethi %hi(__sw_hweight32), %g1
jmpl %g1 + %lo(__sw_hweight32), %g0
nop
nop
ENDPROC(__arch_hweight32)
EXPORT_SYMBOL(__arch_hweight32)
.section .popc_3insn_patch, "ax"
Expand All @@ -43,9 +43,9 @@ EXPORT_SYMBOL(__arch_hweight32)
.previous

ENTRY(__arch_hweight64)
ba,pt %xcc, __sw_hweight64
sethi %hi(__sw_hweight16), %g1
jmpl %g1 + %lo(__sw_hweight16), %g0
nop
nop
ENDPROC(__arch_hweight64)
EXPORT_SYMBOL(__arch_hweight64)
.section .popc_3insn_patch, "ax"
Expand Down

0 comments on commit 9289ea7

Please sign in to comment.