File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,8 @@ pub unsafe fn _xabort(imm8: u32) {
92
92
#[ inline]
93
93
#[ target_feature( enable = "rtm" ) ]
94
94
#[ cfg_attr( test, assert_instr( xtest) ) ]
95
- pub unsafe fn _xtest ( ) -> bool {
96
- x86_xtest ( ) != 0
95
+ pub unsafe fn _xtest ( ) -> u8 {
96
+ x86_xtest ( ) as _
97
97
}
98
98
99
99
/// Retrieves the parameter passed to [`_xabort`] when [`_xbegin`]'s status has the
@@ -145,7 +145,7 @@ mod tests {
145
145
146
146
#[ simd_test( enable = "rtm" ) ]
147
147
unsafe fn test_xtest ( ) {
148
- assert_eq ! ( _xtest( ) , false ) ;
148
+ assert_eq ! ( _xtest( ) , 0 ) ;
149
149
150
150
for _ in 0 ..10 {
151
151
let code = rtm:: _xbegin ( ) ;
@@ -155,7 +155,7 @@ mod tests {
155
155
156
156
// putting the assert inside the transaction would abort the transaction on fail
157
157
// without any output/panic/etc
158
- assert_eq ! ( in_tx, true ) ;
158
+ assert_eq ! ( in_tx, 1 ) ;
159
159
break
160
160
}
161
161
}
You can’t perform that action at this time.
0 commit comments