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
1010# export RUST_TEST_NOCAPTURE=1
1111# export RUST_TEST_THREADS=1
1212
13- export RUSTFLAGS=" ${RUSTFLAGS} -D warnings -Z merge-functions=disabled "
13+ export RUSTFLAGS=" ${RUSTFLAGS} -D warnings -Z merge-functions=disabled -Z verify-llvm-ir "
1414export HOST_RUSTFLAGS=" ${RUSTFLAGS} "
1515export PROFILE=" ${PROFILE:= " --profile=release" } "
1616
Original file line number Diff line number Diff line change @@ -46,15 +46,17 @@ pub unsafe fn _rdtsc() -> u64 {
4646#[ cfg_attr( test, assert_instr( rdtscp) ) ]
4747#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
4848pub unsafe fn __rdtscp ( aux : * mut u32 ) -> u64 {
49- rdtscp ( aux as * mut _ )
49+ let ( tsc, auxval) = rdtscp ( ) ;
50+ * aux = auxval;
51+ tsc
5052}
5153
5254#[ allow( improper_ctypes) ]
53- unsafe extern "C " {
55+ unsafe extern "unadjusted " {
5456 #[ link_name = "llvm.x86.rdtsc" ]
5557 fn rdtsc ( ) -> u64 ;
5658 #[ link_name = "llvm.x86.rdtscp" ]
57- fn rdtscp ( aux : * mut u8 ) -> u64 ;
59+ fn rdtscp ( ) -> ( u64 , u32 ) ;
5860}
5961
6062#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments