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