File: clz_amd64.s

package info (click to toggle)
golang-github-dgryski-go-bits 0.0~git20180112.bd8a69a-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 104 kB
  • sloc: asm: 24; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 246 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
// +build !gccgo,!appengine

// func Clz(x uint64) uint64
TEXT ·Clz(SB),4,$0-16
        BSRQ  x+0(FP), AX
        JZ zero
        SUBQ  $63, AX
        NEGQ AX
        MOVQ AX, ret+8(FP)
        RET
zero:
        MOVQ $64, ret+8(FP)
        RET