Skip to content

Commit 8eb9286

Browse files
Amanieuraoulstrackx
authored andcommitted
Use llvm_asm! instead of asm!
The asm! syntax is changing: rust-lang/rust#69171
1 parent 863b195 commit 8eb9286

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//! testing this crate.
1313
1414
#![cfg_attr(feature = "allocator-api", feature(allocator_api))]
15-
#![cfg_attr(target_env = "sgx", feature(asm))]
15+
#![cfg_attr(target_env = "sgx", feature(llvm_asm))]
1616
#![cfg_attr(not(feature = "allocator-api"), allow(dead_code))]
1717
#![no_std]
1818
#![deny(missing_docs)]

src/sgx.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ unsafe fn rel_ptr_mut<T>(offset: u64) -> *mut T {
1313
#[inline(always)]
1414
fn image_base() -> u64 {
1515
let base;
16-
unsafe { asm!("lea IMAGE_BASE(%rip),$0":"=r"(base)) };
16+
unsafe { llvm_asm!("lea IMAGE_BASE(%rip),$0":"=r"(base)) };
1717
base
1818
}
1919

0 commit comments

Comments
 (0)