diff options
author | 2021-09-29 23:34:39 -0700 | |
---|---|---|
committer | 2021-09-29 23:34:39 -0700 | |
commit | b0dcf8dd08b0a817510d2f55e8bc25edcc4f8809 (patch) | |
tree | 83d6ec011b36fc033eb12c2f4bdc78613a26a385 /src/lib.rs | |
parent | 4cdaaa20c5e07c4fd90414581de06c3a469784f2 (diff) | |
download | rust-x86-b0dcf8dd08b0a817510d2f55e8bc25edcc4f8809.tar.gz rust-x86-b0dcf8dd08b0a817510d2f55e8bc25edcc4f8809.tar.zst rust-x86-b0dcf8dd08b0a817510d2f55e8bc25edcc4f8809.zip |
Convert some things to asm! syntax.
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -90,7 +90,7 @@ pub enum Ring { /// Will cause a general protection fault if used outside of ring 0. #[inline(always)] pub unsafe fn halt() { - llvm_asm!("hlt" :::: "volatile"); + asm!("hlt", options(att_syntax, nomem, nostack)); // check if preserves_flags } #[cfg(all(test, feature = "vmtest"))] @@ -117,7 +117,7 @@ mod x86testing { #[inline(always)] pub unsafe fn rdpid() -> u64 { let mut pid: u64; - llvm_asm!("rdpid $0" : "=r"(pid)); + asm!("rdpid {pid}", pid = out(reg) pid, options(att_syntax)); pid } |