File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ set -ex
10
10
# export RUST_TEST_NOCAPTURE=1
11
11
# export RUST_TEST_THREADS=1
12
12
13
- export RUSTFLAGS=" ${RUSTFLAGS} -D warnings -Z merge-functions=disabled "
13
+ export RUSTFLAGS=" ${RUSTFLAGS} -D warnings -Z merge-functions=disabled -Z verify-llvm-ir "
14
14
export HOST_RUSTFLAGS=" ${RUSTFLAGS} "
15
15
export PROFILE=" ${PROFILE:= " --profile=release" } "
16
16
Original file line number Diff line number Diff line change @@ -46,15 +46,17 @@ pub unsafe fn _rdtsc() -> u64 {
46
46
#[ cfg_attr( test, assert_instr( rdtscp) ) ]
47
47
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
48
48
pub unsafe fn __rdtscp ( aux : * mut u32 ) -> u64 {
49
- rdtscp ( aux as * mut _ )
49
+ let ( tsc, auxval) = rdtscp ( ) ;
50
+ * aux = auxval;
51
+ tsc
50
52
}
51
53
52
54
#[ allow( improper_ctypes) ]
53
- unsafe extern "C " {
55
+ unsafe extern "unadjusted " {
54
56
#[ link_name = "llvm.x86.rdtsc" ]
55
57
fn rdtsc ( ) -> u64 ;
56
58
#[ link_name = "llvm.x86.rdtscp" ]
57
- fn rdtscp ( aux : * mut u8 ) -> u64 ;
59
+ fn rdtscp ( ) -> ( u64 , u32 ) ;
58
60
}
59
61
60
62
#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments