xref: /illumos-gate/usr/src/man/man9f/bitdel64.9f (revision 71815ce76261aa773c97600750fdce92334d1990)
1*71815ce7SRobert Mustacchi.\"
2*71815ce7SRobert Mustacchi.\" This file and its contents are supplied under the terms of the
3*71815ce7SRobert Mustacchi.\" Common Development and Distribution License ("CDDL"), version 1.0.
4*71815ce7SRobert Mustacchi.\" You may only use this file in accordance with the terms of version
5*71815ce7SRobert Mustacchi.\" 1.0 of the CDDL.
6*71815ce7SRobert Mustacchi.\"
7*71815ce7SRobert Mustacchi.\" A full copy of the text of the CDDL should have accompanied this
8*71815ce7SRobert Mustacchi.\" source.  A copy of the CDDL is also available via the Internet at
9*71815ce7SRobert Mustacchi.\" http://www.illumos.org/license/CDDL.
10*71815ce7SRobert Mustacchi.\"
11*71815ce7SRobert Mustacchi.\"
12*71815ce7SRobert Mustacchi.\" Copyright 2022 Oxide Computer Company
13*71815ce7SRobert Mustacchi.\"
14*71815ce7SRobert Mustacchi.Dd April 12, 2022
15*71815ce7SRobert Mustacchi.Dt BITDEL64 9F
16*71815ce7SRobert Mustacchi.Os
17*71815ce7SRobert Mustacchi.Sh NAME
18*71815ce7SRobert Mustacchi.Nm bitdel64
19*71815ce7SRobert Mustacchi.Nd delete bits from an integer
20*71815ce7SRobert Mustacchi.Sh SYNOPSIS
21*71815ce7SRobert Mustacchi.In sys/bitext.h
22*71815ce7SRobert Mustacchi.Ft uint64_t
23*71815ce7SRobert Mustacchi.Fo bitdel64
24*71815ce7SRobert Mustacchi.Fa "uint64_t value"
25*71815ce7SRobert Mustacchi.Fa "uint_t high"
26*71815ce7SRobert Mustacchi.Fa "uint_t low"
27*71815ce7SRobert Mustacchi.Fc
28*71815ce7SRobert Mustacchi.Sh INTERFACE LEVEL
29*71815ce7SRobert Mustacchi.Sy Volatile -
30*71815ce7SRobert MustacchiThis interface is still evolving in illumos.
31*71815ce7SRobert MustacchiAPI and ABI stability is not guaranteed.
32*71815ce7SRobert Mustacchi.Sh PARAMETERS
33*71815ce7SRobert Mustacchi.Bl -tag -width Fa
34*71815ce7SRobert Mustacchi.It Fa value
35*71815ce7SRobert Mustacchi.It Fa high
36*71815ce7SRobert MustacchiThe high end, inclusive, of the bit range to delete from
37*71815ce7SRobert Mustacchi.Fa value .
38*71815ce7SRobert Mustacchi.It Fa low
39*71815ce7SRobert MustacchiThe low end, inclusive, of the bit range to delete from
40*71815ce7SRobert Mustacchi.Fa value .
41*71815ce7SRobert Mustacchi.It Fa value
42*71815ce7SRobert MustacchiAn integer to remove bits from.
43*71815ce7SRobert Mustacchi.El
44*71815ce7SRobert Mustacchi.Sh DESCRIPTION
45*71815ce7SRobert MustacchiThe
46*71815ce7SRobert Mustacchi.Fn bitdel64
47*71815ce7SRobert Mustacchifunction removes bits from an integer,
48*71815ce7SRobert Mustacchi.Fa value .
49*71815ce7SRobert MustacchiThe act of removing a bit range not only removes all the bits in the
50*71815ce7SRobert Mustacchirange specified by
51*71815ce7SRobert Mustacchi.Fa low
52*71815ce7SRobert Mustacchiand
53*71815ce7SRobert Mustacchi.Fa high ,
54*71815ce7SRobert Mustacchibut also causes all remaining bits to be shifted over to start at
55*71815ce7SRobert Mustacchi.Fa low .
56*71815ce7SRobert Mustacchi.Pp
57*71815ce7SRobert MustacchiFor example, consider the binary value 0b11_1101_0011
58*71815ce7SRobert Mustacchi.Pq 0x3d3 .
59*71815ce7SRobert MustacchiIf we deleted bits 4 through 7, the resulting value would be 0b11_0011
60*71815ce7SRobert Mustacchi.Pq 0x33 .
61*71815ce7SRobert Mustacchi.Pp
62*71815ce7SRobert Mustacchi.Fa high
63*71815ce7SRobert Mustacchiand
64*71815ce7SRobert Mustacchi.Fa low
65*71815ce7SRobert Mustacchiare an inclusive range
66*71815ce7SRobert Mustacchi.Po
67*71815ce7SRobert Mustacchi.Pf [ Fa low ,
68*71815ce7SRobert Mustacchi.Fa high ]
69*71815ce7SRobert Mustacchi.Pc
70*71815ce7SRobert Mustacchiand the value of
71*71815ce7SRobert Mustacchi.Fa low
72*71815ce7SRobert Mustacchicannot be greater than
73*71815ce7SRobert Mustacchi.Fa high
74*71815ce7SRobert Mustacchior 63.
75*71815ce7SRobert Mustacchi.Sh RETURN VALUES
76*71815ce7SRobert MustacchiUpon successful completion, the
77*71815ce7SRobert Mustacchi.Fn bitdel64
78*71815ce7SRobert Mustacchireturns the modified integer with the appropriate bits removed.
79*71815ce7SRobert Mustacchi.Sh SEE ALSO
80*71815ce7SRobert Mustacchi.Xr bitset64 9F ,
81*71815ce7SRobert Mustacchi.Xr bitx64 9F
82