File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ pub unsafe fn __cpuid(leaf: u32) -> CpuidResult {
7878}
7979
8080/// Does the host support the `cpuid` instruction?
81- #[ inline( never ) ]
81+ #[ inline]
8282pub fn has_cpuid ( ) -> bool {
8383 #[ cfg( target_arch = "x86_64" ) ]
8484 {
@@ -116,14 +116,15 @@ pub fn has_cpuid() -> bool {
116116 # otherwise. All other bits have not been modified and
117117 # are zero:
118118 xor $0, $1
119- # Store in $0 the value of the 21st bit
120- shr $0, 21
121119 "#
122120 : "=r" ( result) , "=r" ( _temp)
123121 :
124122 : "cc" , "memory"
125123 : "intel" ) ;
126124 }
125+ // Therefore, if result is 0, the bit was not modified and cpuid is
126+ // not available. If cpuid is available, the bit was modified and
127+ // result != 0.
127128 result != 0
128129 }
129130 }
You can’t perform that action at this time.
0 commit comments