SHARE
TWEET
Untitled
a guest
Nov 6th, 2018
88
Never
- #[derive(Debug, Copy, Clone)]
- pub struct Cr3(u64);
- impl Cr3 {
- #[inline(always)]
- pub fn read_register() -> Cr3 {
- let cr3: Cr3;
- unsafe {asm!("mov %cr3, %rax" : "=rax"(cr3) ::: );}
- cr3
- }
- #[inline(always)]
- pub unsafe fn save(&self) {
- asm!("mov %rax, %cr3" :: "rax"(self.0) :: );
- }
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.


