This repository has been archived on 2025-10-08. You can view files and clone it, but cannot push or open issues or pull requests.
miniauthold/vendor/modernc.org/libc/builtin32.go
kekskurse 713975698b
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/playwright Pipeline was successful
ci/woodpecker/push/deplyoment Pipeline was successful
chore: add NewStore function
2025-03-13 15:03:23 +01:00

24 lines
583 B
Go

// Copyright 2024 The Libc Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build linux && (386 || arm)
package libc // import "modernc.org/libc"
import (
mbits "math/bits"
)
func X__builtin_ctzl(tls *TLS, x ulong) int32 {
return int32(mbits.TrailingZeros32(x))
}
func X__builtin_clzl(t *TLS, n ulong) int32 {
return int32(mbits.LeadingZeros32(n))
}
// int __builtin_popcountl (unsigned long x)
func X__builtin_popcountl(t *TLS, x ulong) int32 {
return int32(mbits.OnesCount32(x))
}