We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f1afba8 + 3a29ead commit 9ed3a52Copy full SHA for 9ed3a52
src/lib.rs
@@ -4,7 +4,7 @@
4
5
#![doc(html_root_url = "https://docs.rs/tinypci")]
6
7
-#![feature(llvm_asm)]
+#![feature(asm)]
8
9
#![cfg_attr(not(feature="std"), no_std)]
10
@@ -30,14 +30,14 @@ pub use enums::*;
30
#[inline]
31
unsafe fn read_from_port(port: u16) -> u32 {
32
let value: u32;
33
- llvm_asm!("inl %dx, %eax" : "={eax}"(value) : "{dx}"(port) :: "volatile");
+ asm!("inl eax, dx", out("eax") value, in("dx") port);
34
value
35
}
36
37
// extracted from the `x86_64` crate.
38
39
unsafe fn write_to_port(port: u16, value: u32) {
40
- llvm_asm!("outl %eax, %dx" :: "{dx}"(port), "{eax}"(value) :: "volatile");
+ asm!("outl dx, eax", out("dx") port, in("eax") value);
41
42
43
0 commit comments