2
2
//!
3
3
//! The reference is [Intel 64 and IA-32 Architectures Software Developer's
4
4
//! Manual Volume 2: Instruction Set Reference,
5
- //! A-Z](http://www.intel.de/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures -software-developer-instruction-set-reference-manual-325383.pdf).
5
+ //! A-Z](http://www.intel.de/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectu res -software-developer-instruction-set-reference-manual-325383.pdf).
6
6
//!
7
7
//! [Wikipedia](https://en.wikipedia.org/wiki/Bit_Manipulation_Instruction_Sets#BMI2_.28Bit_Manipulation_Instruction_Set_2.29)
8
8
//! provides a quick overview of the available instructions.
@@ -15,6 +15,8 @@ use assert_instr::assert_instr;
15
15
/// Unsigned multiplication of `a` with `b` returning a pair `(lo, hi)` with
16
16
/// the low half and the high half of the result.
17
17
#[ inline( always) ]
18
+ // LLVM BUG (should be mulxl): https://bugs.llvm.org/show_bug.cgi?id=34232
19
+ #[ cfg_attr( test, assert_instr( imul) ) ]
18
20
#[ target_feature = "+bmi2" ]
19
21
pub fn _mulx_u32 ( a : u32 , b : u32 ) -> ( u32 , u32 ) {
20
22
let result: u64 = ( a as u64 ) * ( b as u64 ) ;
@@ -27,6 +29,7 @@ pub fn _mulx_u32(a: u32, b: u32) -> (u32, u32) {
27
29
/// Unsigned multiplication of `a` with `b` returning a pair `(lo, hi)` with
28
30
/// the low half and the high half of the result.
29
31
#[ inline( always) ]
32
+ #[ cfg_attr( test, assert_instr( mulx) ) ]
30
33
#[ target_feature = "+bmi2" ]
31
34
pub fn _mulx_u64 ( a : u64 , b : u64 ) -> ( u64 , u64 ) {
32
35
let result: u128 = ( a as u128 ) * ( b as u128 ) ;
0 commit comments