@@ -192,6 +192,28 @@ _bextr_u32(unsigned int __X, unsigned int __Y, unsigned int __Z)
192
192
return __builtin_ia32_bextr_u32 (__X , ((__Y & 0xff ) | ((__Z & 0xff ) << 8 )));
193
193
}
194
194
195
+ /* Intel-specified, single-leading-underscore version of BEXTR2 */
196
+ /// Extracts the specified bits from the first operand and returns them
197
+ /// in the least significant bits of the result.
198
+ ///
199
+ /// \headerfile <x86intrin.h>
200
+ ///
201
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
202
+ ///
203
+ /// \param __X
204
+ /// An unsigned integer whose bits are to be extracted.
205
+ /// \param __Y
206
+ /// An unsigned integer used to specify which bits are extracted. Bits [7:0]
207
+ /// specify the index of the least significant bit. Bits [15:8] specify the
208
+ /// number of bits to be extracted.
209
+ /// \returns An unsigned integer whose least significant bits contain the
210
+ /// extracted bits.
211
+ /// \see __bextr_u32
212
+ static __inline__ unsigned int __DEFAULT_FN_ATTRS
213
+ _bextr2_u32 (unsigned int __X , unsigned int __Y ) {
214
+ return __builtin_ia32_bextr_u32 (__X , __Y );
215
+ }
216
+
195
217
/// Clears all bits in the source except for the least significant bit
196
218
/// containing a value of 1 and returns the result.
197
219
///
@@ -321,6 +343,28 @@ _bextr_u64(unsigned long long __X, unsigned int __Y, unsigned int __Z)
321
343
return __builtin_ia32_bextr_u64 (__X , ((__Y & 0xff ) | ((__Z & 0xff ) << 8 )));
322
344
}
323
345
346
+ /* Intel-specified, single-leading-underscore version of BEXTR2 */
347
+ /// Extracts the specified bits from the first operand and returns them
348
+ /// in the least significant bits of the result.
349
+ ///
350
+ /// \headerfile <x86intrin.h>
351
+ ///
352
+ /// This intrinsic corresponds to the <c> BEXTR </c> instruction.
353
+ ///
354
+ /// \param __X
355
+ /// An unsigned 64-bit integer whose bits are to be extracted.
356
+ /// \param __Y
357
+ /// An unsigned 64-bit integer used to specify which bits are extracted. Bits
358
+ /// [7:0] specify the index of the least significant bit. Bits [15:8] specify
359
+ /// the number of bits to be extracted.
360
+ /// \returns An unsigned 64-bit integer whose least significant bits contain the
361
+ /// extracted bits.
362
+ /// \see __bextr_u64
363
+ static __inline__ unsigned long long __DEFAULT_FN_ATTRS
364
+ _bextr2_u64 (unsigned long long __X , unsigned long long __Y ) {
365
+ return __builtin_ia32_bextr_u64 (__X , __Y );
366
+ }
367
+
324
368
/// Clears all bits in the source except for the least significant bit
325
369
/// containing a value of 1 and returns the result.
326
370
///
0 commit comments