Skip to content

Commit 4347a92

Browse files
committed
Fix handling of __builtin_ia32_rdtscp
1 parent 67d8469 commit 4347a92

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/intrinsic/llvm.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,8 @@ pub fn adjust_intrinsic_arguments<'a, 'b, 'gcc, 'tcx>(
649649
args = new_args.into();
650650
}
651651
"__builtin_ia32_rdtscp" => {
652-
let ptr_type = builder.u32_type.make_pointer();
653-
let result = builder.current_func().new_local(None, ptr_type, "result");
654-
let new_args = vec![result.to_rvalue()];
652+
let result = builder.current_func().new_local(None, builder.u32_type, "result");
653+
let new_args = vec![result.get_address(None).to_rvalue()];
655654
args = new_args.into();
656655
}
657656
_ => (),

0 commit comments

Comments
 (0)