File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ mod tests {
1414 use crate :: error:: { Error , Result } ;
1515 use crate :: RawDetour ;
1616 use matches:: assert_matches;
17+ use std:: arch:: asm;
1718 use std:: mem;
1819
1920 /// Default test case function definition.
@@ -43,12 +44,12 @@ mod tests {
4344 asm ! (
4445 "
4546 xor eax, eax
46- je ret5
47+ je 5f
4748 mov eax, 2
48- jmp done
49- ret5 :
49+ jmp 1f
50+ 5 :
5051 mov eax, 5
51- done :
52+ 1 :
5253 ret" ,
5354 options( noreturn)
5455 ) ;
@@ -102,11 +103,11 @@ mod tests {
102103 unsafe extern "C" fn external_loop ( ) -> i32 {
103104 asm ! (
104105 "
105- loop dest
106+ loop 1f
106107 nop
107108 nop
108109 nop
109- dest :" ,
110+ 1 :" ,
110111 options( noreturn)
111112 ) ;
112113 }
Original file line number Diff line number Diff line change 22#![ cfg_attr( feature = "nightly" , feature( unboxed_closures, abi_thiscall) ) ]
33#![ cfg_attr(
44 all( feature = "nightly" , test) ,
5- feature( naked_functions, core_intrinsics, asm )
5+ feature( naked_functions, core_intrinsics)
66) ]
77
88//! A cross-platform detour library written in Rust.
You can’t perform that action at this time.
0 commit comments