Skip to content

Commit eabbcac

Browse files
committed
Change return type of read_rip to VirtAddr
1 parent 9343bbc commit eabbcac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/instructions/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
//! Special x86_64 instructions.
44
5+
use crate::VirtAddr;
6+
57
pub mod interrupts;
68
pub mod port;
79
pub mod random;
@@ -56,12 +58,12 @@ pub fn bochs_breakpoint() {
5658
/// instructions to execute.
5759
#[cfg(feature = "inline_asm")]
5860
#[inline(always)]
59-
pub fn read_rip() -> u64 {
61+
pub fn read_rip() -> VirtAddr {
6062
let rip: u64;
6163
unsafe {
6264
asm!(
6365
"lea {}, [rip]", out(reg) rip, options(nostack, nomem)
6466
);
6567
}
66-
rip
68+
VirtAddr::new(rip)
6769
}

0 commit comments

Comments
 (0)