hweight.S 997 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #include <linux/linkage.h>
  2. #include <asm/export.h>
  3. .text
  4. .align 32
  5. ENTRY(__arch_hweight8)
  6. ba,pt %xcc, __sw_hweight8
  7. nop
  8. nop
  9. ENDPROC(__arch_hweight8)
  10. EXPORT_SYMBOL(__arch_hweight8)
  11. .section .popc_3insn_patch, "ax"
  12. .word __arch_hweight8
  13. sllx %o0, 64-8, %g1
  14. retl
  15. popc %g1, %o0
  16. .previous
  17. ENTRY(__arch_hweight16)
  18. ba,pt %xcc, __sw_hweight16
  19. nop
  20. nop
  21. ENDPROC(__arch_hweight16)
  22. EXPORT_SYMBOL(__arch_hweight16)
  23. .section .popc_3insn_patch, "ax"
  24. .word __arch_hweight16
  25. sllx %o0, 64-16, %g1
  26. retl
  27. popc %g1, %o0
  28. .previous
  29. ENTRY(__arch_hweight32)
  30. ba,pt %xcc, __sw_hweight32
  31. nop
  32. nop
  33. ENDPROC(__arch_hweight32)
  34. EXPORT_SYMBOL(__arch_hweight32)
  35. .section .popc_3insn_patch, "ax"
  36. .word __arch_hweight32
  37. sllx %o0, 64-32, %g1
  38. retl
  39. popc %g1, %o0
  40. .previous
  41. ENTRY(__arch_hweight64)
  42. ba,pt %xcc, __sw_hweight64
  43. nop
  44. nop
  45. ENDPROC(__arch_hweight64)
  46. EXPORT_SYMBOL(__arch_hweight64)
  47. .section .popc_3insn_patch, "ax"
  48. .word __arch_hweight64
  49. retl
  50. popc %o0, %o0
  51. nop
  52. .previous