bits

package
v0.0.0-...-da58827 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2024 License: BSD-3-Clause Imports: 0 Imported by: 2

Documentation

Overview

Package bits provides primitives for bitwise operations on 32/64 bit registers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear(addr *uint32, pos int)

Clear modifies the pointed value by clearing an individual bit at the position argument.

func Clear64

func Clear64(addr *uint64, pos int)

Clear64 modifies the pointed value by clearing an individual bit at the position argument.

func Get

func Get(addr *uint32, pos int, mask int) uint32

Get returns the pointed value at a specific bit position and with a bitmask applied.

func Get64

func Get64(addr *uint64, pos int, mask int) uint64

Get64 returns the pointed value at a specific bit position and with a bitmask applied.

func Set

func Set(addr *uint32, pos int)

Set modifies the pointed value by setting an individual bit at the position argument.

func Set64

func Set64(addr *uint64, pos int)

Set64 modifies the pointed value by setting an individual bit at the position argument.

func SetN

func SetN(addr *uint32, pos int, mask int, val uint32)

SetN modifies the pointed value by setting a value at a specific bit position and with a bitmask applied.

func SetN64

func SetN64(addr *uint64, pos int, mask int, val uint64)

SetN64 modifies the pointed value by setting a value at a specific bit position and with a bitmask applied.

func SetTo

func SetTo(addr *uint32, pos int, val bool)

SetTo modifies the pointed value by setting an individual bit at the position argument.

func SetTo64

func SetTo64(addr *uint64, pos int, val bool)

SetTo64 modifies the pointed value by setting an individual bit at the position argument.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL