summaryrefslogtreecommitdiffstats
path: root/arch/sparc/lib
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-06-22 10:56:48 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-06-30 08:59:55 +0900
commit9289ea7f952b14ef2627edc49f9508234952a85e (patch)
treefd746c0c986e7683840b94158f0e511743b9219c /arch/sparc/lib
parent3c2993b8c6143d8a5793746a54eba8f86f95240f (diff)
downloadlinux-9289ea7f952b14ef2627edc49f9508234952a85e.tar.bz2
sparc64: Use indirect calls in hamming weight stubs
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>
Diffstat (limited to 'arch/sparc/lib')
-rw-r--r--arch/sparc/lib/hweight.S16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/sparc/lib/hweight.S b/arch/sparc/lib/hweight.S
index f9985f129fb6..d21cf20e5c1e 100644
--- a/arch/sparc/lib/hweight.S
+++ b/arch/sparc/lib/hweight.S
@@ -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"
@@ -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"
@@ -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"
@@ -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"