David S. Miller | ef7c4d4 | 2011-07-29 09:42:07 -0700 | [diff] [blame] | 1 | #include <linux/linkage.h> |
Al Viro | d3867f04 | 2016-01-16 21:39:30 -0500 | [diff] [blame^] | 2 | #include <asm/export.h> |
David S. Miller | ef7c4d4 | 2011-07-29 09:42:07 -0700 | [diff] [blame] | 3 | |
| 4 | .text |
| 5 | .align 32 |
| 6 | ENTRY(__arch_hweight8) |
| 7 | ba,pt %xcc, __sw_hweight8 |
| 8 | nop |
| 9 | nop |
| 10 | ENDPROC(__arch_hweight8) |
Al Viro | d3867f04 | 2016-01-16 21:39:30 -0500 | [diff] [blame^] | 11 | EXPORT_SYMBOL(__arch_hweight8) |
David S. Miller | ef7c4d4 | 2011-07-29 09:42:07 -0700 | [diff] [blame] | 12 | .section .popc_3insn_patch, "ax" |
| 13 | .word __arch_hweight8 |
| 14 | sllx %o0, 64-8, %g1 |
| 15 | retl |
| 16 | popc %g1, %o0 |
| 17 | .previous |
| 18 | |
| 19 | ENTRY(__arch_hweight16) |
| 20 | ba,pt %xcc, __sw_hweight16 |
| 21 | nop |
| 22 | nop |
| 23 | ENDPROC(__arch_hweight16) |
Al Viro | d3867f04 | 2016-01-16 21:39:30 -0500 | [diff] [blame^] | 24 | EXPORT_SYMBOL(__arch_hweight16) |
David S. Miller | ef7c4d4 | 2011-07-29 09:42:07 -0700 | [diff] [blame] | 25 | .section .popc_3insn_patch, "ax" |
| 26 | .word __arch_hweight16 |
| 27 | sllx %o0, 64-16, %g1 |
| 28 | retl |
| 29 | popc %g1, %o0 |
| 30 | .previous |
| 31 | |
| 32 | ENTRY(__arch_hweight32) |
| 33 | ba,pt %xcc, __sw_hweight32 |
| 34 | nop |
| 35 | nop |
| 36 | ENDPROC(__arch_hweight32) |
Al Viro | d3867f04 | 2016-01-16 21:39:30 -0500 | [diff] [blame^] | 37 | EXPORT_SYMBOL(__arch_hweight32) |
David S. Miller | ef7c4d4 | 2011-07-29 09:42:07 -0700 | [diff] [blame] | 38 | .section .popc_3insn_patch, "ax" |
| 39 | .word __arch_hweight32 |
| 40 | sllx %o0, 64-32, %g1 |
| 41 | retl |
| 42 | popc %g1, %o0 |
| 43 | .previous |
| 44 | |
| 45 | ENTRY(__arch_hweight64) |
| 46 | ba,pt %xcc, __sw_hweight64 |
| 47 | nop |
| 48 | nop |
| 49 | ENDPROC(__arch_hweight64) |
Al Viro | d3867f04 | 2016-01-16 21:39:30 -0500 | [diff] [blame^] | 50 | EXPORT_SYMBOL(__arch_hweight64) |
David S. Miller | ef7c4d4 | 2011-07-29 09:42:07 -0700 | [diff] [blame] | 51 | .section .popc_3insn_patch, "ax" |
| 52 | .word __arch_hweight64 |
| 53 | retl |
| 54 | popc %o0, %o0 |
| 55 | nop |
| 56 | .previous |