.\" .\" This file and its contents are supplied under the terms of the .\" Common Development and Distribution License ("CDDL"), version 1.0. .\" You may only use this file in accordance with the terms of version .\" 1.0 of the CDDL. .\" .\" A full copy of the text of the CDDL should have accompanied this .\" source. A copy of the CDDL is also available via the Internet at .\" http://www.illumos.org/license/CDDL. .\" .\" .\" Copyright 2022 Oxide Computer Company .\" .Dd April 12, 2022 .Dt BITDEL64 9F .Os .Sh NAME .Nm bitdel64 .Nd delete bits from an integer .Sh SYNOPSIS .In sys/bitext.h .Ft uint64_t .Fo bitdel64 .Fa "uint64_t value" .Fa "uint_t high" .Fa "uint_t low" .Fc .Sh INTERFACE LEVEL .Sy Volatile - This interface is still evolving in illumos. API and ABI stability is not guaranteed. .Sh PARAMETERS .Bl -tag -width Fa .It Fa value .It Fa high The high end, inclusive, of the bit range to delete from .Fa value . .It Fa low The low end, inclusive, of the bit range to delete from .Fa value . .It Fa value An integer to remove bits from. .El .Sh DESCRIPTION The .Fn bitdel64 function removes bits from an integer, .Fa value . The act of removing a bit range not only removes all the bits in the range specified by .Fa low and .Fa high , but also causes all remaining bits to be shifted over to start at .Fa low . .Pp For example, consider the binary value 0b11_1101_0011 .Pq 0x3d3 . If we deleted bits 4 through 7, the resulting value would be 0b11_0011 .Pq 0x33 . .Pp .Fa high and .Fa low are an inclusive range .Po .Pf [ Fa low , .Fa high ] .Pc and the value of .Fa low cannot be greater than .Fa high or 63. .Sh RETURN VALUES Upon successful completion, the .Fn bitdel64 returns the modified integer with the appropriate bits removed. .Sh SEE ALSO .Xr bitset64 9F , .Xr bitx64 9F