Extract a range of bits from an integer.
||-||Specifies the integer from which to extract bits.|
||-||Specifies the index of the first bit to extract.|
||-||Specifies the number of bits to extract.|
bitfieldExtract extracts a subset of the bits of
value and returns it in the least significant bits of the result. The range of bits extracted is [
bits - 1].
For unsigned data types, the most significant bits of the result will be set to zero. For signed data types, the most significant bits will be set to the value of bit
base - 1 (i.e., it issign extendedto the width of the return type).
bits is zero, the result will be zero. The result will be undefined if
bits is negative, or if the sum of
bits is greater than the number of bits used to store the operand.
Copyright© 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.