File: popcnt_amd64.s

package info (click to toggle)
golang-github-dgryski-go-bits 0.0~git20151205.0.86c69b3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 88 kB
  • ctags: 26
  • sloc: asm: 24; makefile: 2
file content (11 lines) | stat: -rw-r--r-- 266 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
// +build amd64,!appengine,!popcntgo

#define POPCNTQ_DX_DX BYTE $0xf3; BYTE $0x48; BYTE $0x0f; BYTE $0xb8; BYTE $0xd2

// func Popcnt(x uint64) uint64

TEXT ·Popcnt(SB),4,$0-16
        MOVQ  x+0(FP), DX
        POPCNTQ_DX_DX
        MOVQ DX, ret+8(FP)
        RET